ARPDAS_QNX6 1.0
Public Member Functions | Protected Member Functions | Protected Attributes
data_queue Class Reference

#include <DQ.h>

Inheritance diagram for data_queue:
Collaboration diagram for data_queue:

List of all members.

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_reffirst_dqr
dq_reflast_dqr
int dq_low_water

Detailed Description

Definition at line 53 of file DQ.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

int data_queue::allocate_rows ( unsigned char **  rowp) [protected]

no longer a blocking function. Returns the largest number of contiguous rows currently free. Caller can decide whether that is adequate. Assumes the DQ is locked.

Definition at line 110 of file DQ.cc.

References first, full, last, row, and total_Qrows.

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().

Here is the call graph for this function:

void data_queue::commit_tstamp ( mfc_t  MFCtr,
time_t  time 
) [protected]

Does not signal whoever is reading the queue

Reimplemented in collector.

Definition at line 154 of file DQ.cc.

References first_dqr, last_dqr, lock(), dq_ref::next(), and unlock().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

void data_queue::lock ( const char *  by = 0,
int  line = -1 
) [protected, virtual]
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void data_queue::unlock ( ) [protected, virtual]

Member Data Documentation

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().

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().

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().

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]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines