ARPDAS_QNX6 1.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
data_generator Class Reference

#include <DG.h>

Inheritance diagram for data_generator:
Collaboration diagram for data_generator:

List of all members.

Public Member Functions

 data_generator (int nQrows, int low_water)
virtual ~data_generator ()
void init (int collection)
void operate ()
int execute (const char *cmd)
virtual void event (enum dg_event evt)
virtual void service_row_timer ()=0

Public Attributes

DG_dispatchdispatch

Protected Member Functions

void transmit_data (int single_row)

Protected Attributes

bool quit
bool started
bool regulated
bool autostart
bool regulation_optional
int dg_bfr_fd
DG_cmdcmd
DG_tmrtmr

Private Member Functions

void tm_start (int lock_needed=1)
void tm_play (int lock_needed=1)
void tm_stop ()
void check_writev (int rc, int wr_size, const char *where)

Private Attributes

uint64_t row_period_nsec_default
uint64_t row_period_nsec_current

Detailed Description

Definition at line 15 of file DG.h.


Constructor & Destructor Documentation

data_generator::data_generator ( int  nQrows,
int  low_water 
)

Definition at line 6 of file DG.cc.

References autostart, dg_bfr_fd, quit, regulated, regulation_optional, and started.

data_generator::~data_generator ( ) [virtual]

Definition at line 16 of file DG.cc.


Member Function Documentation

void data_generator::check_writev ( int  rc,
int  wr_size,
const char *  where 
) [private]

Definition at line 106 of file DG.cc.

References nl_error.

Referenced by init(), and transmit_data().

Here is the caller graph for this function:

void data_generator::event ( enum dg_event  evt) [virtual]

Reimplemented in collector, and tmc_collector.

Definition at line 263 of file DG.cc.

Referenced by execute(), tm_start(), and tm_stop().

Here is the caller graph for this function:

int data_generator::execute ( const char *  cmd)

Interperet data generator commands: I need to abstract the "signal handlers" operation. It appears that the key notifications are: Start Stop Quit Change to unregulated output (fast forward)

TM start: "TMc" Set start condition If regulated, program timer else stop timer if ext_stop, signal handlers TM end/stop "TMe" Set stop condition stop timer if ext_time, signal handlers Quit: "" Set stop and quit conditions stop timer if ext_stop or ext_time, signal handlers TM play "TM>" set regulated set row_rate to default if stopped, do start else reprogram timer TM fast forward "TM}" if regulation_optional stop timer set unregulated if stopped, do start else if ext_time, signal handlers TM faster/slower "TM+" "TM-" if regulation_optional if stopped do play else if regulated increase/decrease row_rate program timer TM single step "TMs"

Command Summary: "" Quit "TMc" TM Start "TMe" TM End/Stop/Pause "TMs" Single Step "TM>" Play "TM+" Faster "TM-" Slower "TM}" Fast Forward

Still need to add the search functions: TM Advance to MFCtr TM Advance to Time

Definition at line 176 of file DG.cc.

References dg_bfr_fd, dg_event_fast, dg_event_quit, dispatch, event(), data_queue::lock(), nl_error, quit, DG_dispatch::ready_to_quit(), regulated, regulation_optional, row_period_nsec_current, service_row_timer(), DG_tmr::settime(), started, tm_play(), tm_start(), tm_stop(), tmr, and data_queue::unlock().

Referenced by DG_cmd::execute().

Here is the call graph for this function:

Here is the caller graph for this function:

void data_generator::init ( int  collection)

Assumes tm_info is defined

Definition at line 21 of file DG.cc.

References DG_tmr::attach(), DG_cmd::attach(), check_writev(), cmd, dg_bfr_fd, dispatch, data_queue::init(), nl_error, row_period_nsec_current, row_period_nsec_default, tm_dev_name(), tm_info, TMHDR_WORD, tmi, tmr, and TMTYPE_INIT.

Here is the call graph for this function:

void data_generator::operate ( )

Control initialization This is how

Definition at line 116 of file DG.cc.

References autostart, dispatch, DG_dispatch::Loop(), and tm_start().

Here is the call graph for this function:

virtual void data_generator::service_row_timer ( ) [pure virtual]

Implemented in tmc_collector.

Referenced by DG_tmr_pulse_func(), and execute().

Here is the caller graph for this function:

void data_generator::tm_play ( int  lock_needed = 1) [private]

Definition at line 274 of file DG.cc.

References data_queue::lock(), regulated, row_period_nsec_current, row_period_nsec_default, DG_tmr::settime(), started, tm_start(), tmr, and data_queue::unlock().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

void data_generator::tm_start ( int  lock_needed = 1) [private]

Definition at line 265 of file DG.cc.

References dg_event_start, event(), data_queue::lock(), regulated, row_period_nsec_current, DG_tmr::settime(), started, tmr, and data_queue::unlock().

Referenced by execute(), operate(), and tm_play().

Here is the call graph for this function:

Here is the caller graph for this function:

void data_generator::tm_stop ( ) [private]

Definition at line 284 of file DG.cc.

References dg_event_stop, event(), data_queue::lock(), DG_tmr::settime(), started, tmr, and data_queue::unlock().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

void data_generator::transmit_data ( int  single_row) [protected]

Member Data Documentation

bool data_generator::autostart [protected]

Definition at line 29 of file DG.h.

Referenced by data_generator(), and operate().

Definition at line 35 of file DG.h.

Referenced by init().

int data_generator::dg_bfr_fd [protected]

Definition at line 34 of file DG.h.

Referenced by data_generator(), execute(), init(), and transmit_data().

bool data_generator::quit [protected]

Definition at line 26 of file DG.h.

Referenced by data_generator(), and execute().

bool data_generator::regulated [protected]

Definition at line 28 of file DG.h.

Referenced by collector::collector(), data_generator(), execute(), tm_play(), and tm_start().

Definition at line 30 of file DG.h.

Referenced by collector::collector(), data_generator(), and execute().

Definition at line 42 of file DG.h.

Referenced by execute(), init(), tm_play(), and tm_start().

Definition at line 41 of file DG.h.

Referenced by init(), and tm_play().

bool data_generator::started [protected]

Definition at line 27 of file DG.h.

Referenced by data_generator(), execute(), tm_play(), tm_start(), and tm_stop().

Definition at line 36 of file DG.h.

Referenced by execute(), init(), tm_play(), tm_start(), and tm_stop().


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