ARPDAS_QNX6 1.0
|
#include <DQ.h>
Public Member Functions | |
data_queue (int n_Qrows, int low_water) | |
void | init () |
Protected Member Functions | |
int | allocate_rows (unsigned char **rowp) |
void | commit_rows (mfc_t MFCtr, int mfrow, int n_rows) |
void | commit_tstamp (mfc_t MFCtr, time_t time) |
void | retire_rows (dq_data_ref *dqd, int n_rows) |
void | retire_tstamp (dq_tstamp_ref *dqts) |
virtual void | lock (const char *by=0, int line=-1) |
virtual void | unlock () |
Protected Attributes | |
unsigned char * | raw |
unsigned char ** | row |
tm_hdrw_t | output_tm_type |
int | total_Qrows |
int | nbQrow |
int | nbDataHdr |
int | first |
int | last |
bool | full |
dq_ref * | first_dqr |
dq_ref * | last_dqr |
int | dq_low_water |
data_queue::data_queue | ( | int | n_Qrows, |
int | low_water | ||
) |
data_queue base class constructor. Determines the output_tm_type and allocates the queue storage.
Definition at line 48 of file DQ.cc.
References dq_low_water, first, first_dqr, full, last, last_dqr, nl_error, raw, row, and total_Qrows.
int data_queue::allocate_rows | ( | unsigned char ** | rowp | ) | [protected] |
void data_queue::commit_rows | ( | mfc_t | MFCtr, |
int | mfrow, | ||
int | nrows | ||
) | [protected] |
MFCtr, mfrow are the MFCtr and minor frame row of the first row being committed. Does not signal whoever is reading the queue Assumes DQ is locked and unlocks before exit
Definition at line 125 of file DQ.cc.
References dq_data_ref::append_rows(), dq_data, first, first_dqr, full, last, last_dqr, lock(), dq_data_ref::MFCtr_next, dq_ref::next(), nl_assert, dq_data_ref::row_next, total_Qrows, dq_ref::type, and unlock().
void data_queue::commit_tstamp | ( | mfc_t | MFCtr, |
time_t | time | ||
) | [protected] |
void data_queue::init | ( | ) |
General DG initialization. Assumes tm_info structure has been defined. Establishes the connection to the TMbfr, specifying the O_NONBLOCK option for collection. Initializes the queue itself. Creates dispatch queue and registers "DG/cmd" device and initializes timer.
Reimplemented in collector.
Definition at line 67 of file DQ.cc.
References nbDataHdr, nbQrow, nl_error, tm_info_t::nrowminf, output_tm_type, raw, row, tm_info, tmi, TMTYPE_DATA_T1, TMTYPE_DATA_T2, TMTYPE_DATA_T3, and total_Qrows.
Referenced by data_generator::init().
void data_queue::lock | ( | const char * | by = 0 , |
int | line = -1 |
||
) | [protected, virtual] |
Definition at line 98 of file DQ.cc.
Referenced by commit_rows(), commit_tstamp(), data_generator::execute(), retire_rows(), retire_tstamp(), data_generator::tm_play(), data_generator::tm_start(), data_generator::tm_stop(), and data_generator::transmit_data().
void data_queue::retire_rows | ( | dq_data_ref * | dqd, |
int | n_rows | ||
) | [protected] |
Definition at line 161 of file DQ.cc.
References first, first_dqr, full, last, lock(), dq_data_ref::MFCtr_start, dq_data_ref::n_rows, dq_ref::next_dqr, nl_assert, nl_error, tm_info_t::nrowminf, dq_data_ref::Qrow, dq_data_ref::row_start, tm_info, total_Qrows, and unlock().
Referenced by data_generator::transmit_data().
void data_queue::retire_tstamp | ( | dq_tstamp_ref * | dqts | ) | [protected] |
Definition at line 193 of file DQ.cc.
References first_dqr, last_dqr, lock(), dq_ref::next_dqr, nl_assert, and unlock().
Referenced by data_generator::transmit_data().
void data_queue::unlock | ( | ) | [protected, virtual] |
Definition at line 103 of file DQ.cc.
Referenced by commit_rows(), commit_tstamp(), data_generator::execute(), retire_rows(), retire_tstamp(), data_generator::tm_play(), data_generator::tm_start(), data_generator::tm_stop(), and data_generator::transmit_data().
int data_queue::dq_low_water [protected] |
Definition at line 79 of file DQ.h.
Referenced by data_queue().
int data_queue::first [protected] |
Definition at line 73 of file DQ.h.
Referenced by allocate_rows(), commit_rows(), data_queue(), and retire_rows().
dq_ref* data_queue::first_dqr [protected] |
Definition at line 77 of file DQ.h.
Referenced by commit_rows(), commit_tstamp(), data_queue(), retire_rows(), retire_tstamp(), and data_generator::transmit_data().
bool data_queue::full [protected] |
Definition at line 75 of file DQ.h.
Referenced by allocate_rows(), commit_rows(), data_queue(), and retire_rows().
int data_queue::last [protected] |
Definition at line 74 of file DQ.h.
Referenced by allocate_rows(), commit_rows(), data_queue(), and retire_rows().
dq_ref* data_queue::last_dqr [protected] |
Definition at line 78 of file DQ.h.
Referenced by commit_rows(), commit_tstamp(), data_queue(), and retire_tstamp().
int data_queue::nbDataHdr [protected] |
Definition at line 72 of file DQ.h.
Referenced by init(), and data_generator::transmit_data().
int data_queue::nbQrow [protected] |
Definition at line 71 of file DQ.h.
Referenced by init(), and data_generator::transmit_data().
tm_hdrw_t data_queue::output_tm_type [protected] |
Definition at line 69 of file DQ.h.
Referenced by init(), and data_generator::transmit_data().
unsigned char* data_queue::raw [protected] |
Definition at line 67 of file DQ.h.
Referenced by data_queue(), and init().
unsigned char** data_queue::row [protected] |
Definition at line 68 of file DQ.h.
Referenced by allocate_rows(), data_queue(), init(), and data_generator::transmit_data().
int data_queue::total_Qrows [protected] |
Definition at line 70 of file DQ.h.
Referenced by allocate_rows(), commit_rows(), data_queue(), init(), retire_rows(), and data_generator::transmit_data().