Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

LogTask Class Reference

#include <LogClient.hh>

List of all members.


Detailed Description

A class for actually executing loigging tasks.

LogTask is the true business end of the client side of the logging system. It is the class that represents the data acquisition process to be performed by the remote LogServer. It includes facilites for "building" a logging job (deciding which variables to log) as well as facilties for starting, stopping, and retreiving data from a running task.

Creation of LogTask instances is perfromed exclusivly through LogClient::newLog.


Public Member Functions

bool addVar (const char *name)
unsigned int startLog (const unsigned int period, const unsigned int length, const unsigned int buf_size=1000, const unsigned int msec=LOG_CLIENT_TIMEOUT)
bool stopLog (const unsigned int msec=LOG_CLIENT_TIMEOUT)
bool abortLog (const unsigned int msec=LOG_CLIENT_TIMEOUT)
log_line_t * getData (const unsigned int msec=LOG_CLIENT_TIMEOUT)
utils::ListIterator< log_name_t > * varIterator ()
utils::List< log_name_t > * varList ()
unsigned int totalData () const
unsigned int bufferSize () const
unsigned int winSize () const
bool isDone () const


Member Function Documentation

bool LogTask::abortLog const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

completely kill this logging task, stopping data acquisition and discarding unprocessed data

bool LogTask::addVar const char *  name  ) 
 

Add the namned variable to the logging task. Returns false on failure

unsigned int LogTask::bufferSize  )  const [inline]
 

returns the amount of data buffered and ready to be processed

log_line_t* LogTask::getData const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

Return a pointer to the next line of data associated with tis loggin task, blocking for up to msec miliseconds. Setting msec to 0 returns immediatly, effectivly polling for avaliable data.

bool LogTask::isDone  )  const [inline]
 

returns true when the remote task is completed and all data has been processed or moved to the data buffer

unsigned int LogTask::startLog const unsigned int  period,
const unsigned int  length,
const unsigned int  buf_size = 1000,
const unsigned int  msec = LOG_CLIENT_TIMEOUT
 

Start this logging task

Begins execution of the logging task. period specifies the sampling rate in "cycles," length specifies the duration of the task in "cycles," buf_size controls the size of the internal buffer used to store data from the robot (in "messages"), and msec specifies the timeout for contact to the remote logServer

bool LogTask::stopLog const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

Stop data acquisition associated with this logging task

unsigned int LogTask::totalData  )  const [inline]
 

returns total data received so far for this task

utils::ListIterator<log_name_t>* LogTask::varIterator  )  [inline]
 

Returns a new iterator for the internal variable list. This list must NOT be edited.

utils::List<log_name_t>* LogTask::varList  )  [inline]
 

Returns a pointer to the internal variable list. This list must NOT be edited.

unsigned int LogTask::winSize  )  const [inline]
 

returns the amount of data received, but not yet ordered for processing


RHexLib Reference Documentation