sends::parse_stage Class Reference
[Sends Pipeline Stage Classes]

Command parser SEDA stage. More...

#include <parse_stage.hh>

Inheritance diagram for sends::parse_stage:

sends::seda_stage sends::thread_pool

List of all members.

Public Types

typedef thread::mt_queue
< buffer * > 
buffer_queue
 Buffer list.

Public Member Functions

 parse_stage (int nThread, int nTrans)
 Stage template constructor.
virtual ~parse_stage (void)
void filter (transaction *trans)
 Transaction filter for this stage.
void init_thread (void)
 Thread initialization.
buffer_poolref_resource (void)
virtual void shut (void)
 Shut down all threads in the pool.
const char * stage_name (void) const
 Stage name.


Detailed Description

Command parser SEDA stage.

The parse_stage class is the command parser stage of the SENDS server. For each transaction entered into the input queue, the parse stage reads a command line (terminated by a new-line or null) and parses the command. The command format is:

      <command> [<start> [<end>] <delta>] [<type>] [{<chan1> [... <chanN>]}];
         

The command may be one of the following:

The data times are specified by a start GPS time and either an end time, a data stride or both. If two time fields are specified and the second is less than the first the second field is taken to be a duration (delta) time and the end time is caculated from the start minus the end. If the second field is greater than the first, or three fields are specified, the second field specifies the end time and the optional third field specifies the data stride (segment length for a single transfer).

The channel list contains an arbitrary number (up to 1024) of space separated channel descriptors enclosed in braces. Each channel descriptor has a channel name and optional channel-type, sample-rate or both separated by commas or percent signs.

Author:
J. Zweizig
Version:
1.0; Last modified December 28, 2007

Member Typedef Documentation

typedef thread::mt_queue<buffer*> sends::parse_stage::buffer_queue

Buffer list.

Data type for preallocated buffer free list.


Constructor & Destructor Documentation

sends::parse_stage::parse_stage ( int  nThread,
int  nTrans 
)

Stage template constructor.

Construct a parse_stage object. The arguments indicate the number of threads in the pool and the number of input transactions that may be queue simultaneously (note that the pipline gets indigestion only after more than (nTrans + nThread) trasactions need to execute in this stage.

Parameters:
nThread Number of threads to run simultaneously in the pool.
nTrans Number of transactions that may be queued.

virtual sends::parse_stage::~parse_stage ( void   )  [virtual]

Stage template destructor is null by default. It is mostly useful to remove resources allocated by the stages.


Member Function Documentation

void sends::parse_stage::filter ( transaction trans  )  [virtual]

Transaction filter for this stage.

The filter method performs the transaction processing for a single stage. By default this is a null filter that passes the transaction on to the next

Parameters:
trans Pointer to the current transaction

Implements sends::seda_stage.

void sends::parse_stage::init_thread ( void   )  [virtual]

Thread initialization.

Set up the signal handling for this thread.

Reimplemented from sends::seda_stage.

buffer_pool & sends::parse_stage::ref_resource ( void   )  [inline]

Reference the resource (input buffer) queue.

virtual void sends::parse_stage::shut ( void   )  [virtual]

Shut down all threads in the pool.

Shut down all threads in the parse pool.

Reimplemented from sends::seda_stage.

const char* sends::parse_stage::stage_name ( void   )  const [virtual]

Stage name.

Return a constant pointer to a null-terminated character vector containing the name of the stage.

Returns:
Constant pointer to the stage name string.

Implements sends::seda_stage.


The documentation for this class was generated from the following file:

Generated on Tue Jun 10 12:18:12 2008 for SENDS by  doxygen 1.5.5