ARPDAS_QNX6 1.0
|
00001 #include "DGcol.h" 00002 00003 unsigned short collector::majf_row = 0; 00004 unsigned short collector::minf_row = 0; 00005 00006 collector::collector() : data_generator(4,1) { 00007 regulated = true; 00008 regulation_optional = false; 00009 } 00010 00011 collector::~collector() {} 00012 00013 void collector::init() { 00014 data_generator::init( 1 ); 00015 } 00016 00017 void collector::event(enum dg_event evt) { 00018 if ( evt == dg_event_start ) { 00019 next_minor_frame = majf_row = 0; 00020 minf_row = 0; 00021 } 00022 } 00023 00024 void collector::commit_tstamp( mfc_t MFCtr, time_t time ) { 00025 tm_info.t_stmp.mfc_num = MFCtr; 00026 tm_info.t_stmp.secs = time; 00027 data_generator::commit_tstamp(MFCtr, time); 00028 } 00029 00030 /** 00031 * Collect_Row() is reponsible for: 00032 * -determining whether a new timestamp is required 00033 * -filling in/defining the minor fram counter and synch 00034 * -populating the row of data 00035 * New timestamp may be required because: 00036 * -we just started 00037 * -the minor frame counter is rolling over 00038 * -we are greater than TS_MFC_LIMIT minor frames from the old timestamp 00039 * -we have drifted from realtime somehow 00040 * Implemented in colmain.skel 00041 */ 00042 00043 DG_data *collector::receive(const char *name, void *data, 00044 int data_size, int synch) { 00045 DG_data *DGd = new DG_data(dispatch, name, data, data_size, synch); 00046 data_clients.push_back(DGd); 00047 return DGd; 00048 } 00049