#include <parse_stage.hh>

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_pool & | ref_resource (void) |
| virtual void | shut (void) |
| Shut down all threads in the pool. | |
| const char * | stage_name (void) const |
| Stage name. | |
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.
| typedef thread::mt_queue<buffer*> sends::parse_stage::buffer_queue |
Buffer list.
Data type for preallocated buffer free list.
| 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.
| 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.
| 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
| 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.
Implements sends::seda_stage.
1.5.5