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

LogClient Class Reference

#include <LogClient.hh>

List of all members.


Detailed Description

Client side class for accessing the LogServer module on the robot.

This class provides a standard abstract interface for interacting with a LogServer instance running on a robot. The class includes facilities for making contact with the server on teh robot, downloading a list of loggable variables, and crating a new LogTask instance.


Public Member Functions

 LogClient (CommManager *com, const char *spec, const com_id_t log_port=DEFAULT_LOG_STREAM)
 LogClient (CommManager *com, RemoteManager *rmt, const com_id_t log_port=DEFAULT_LOG_STREAM)
bool ping (const unsigned int msec=LOG_CLIENT_TIMEOUT)
bool reset (const unsigned int msec=LOG_CLIENT_TIMEOUT)
bool query (const unsigned int msec=LOG_CLIENT_TIMEOUT)
void clearVars ()
unsigned int listVars ()
log_name_t * getNextVar ()
utils::ListIterator< log_name_t > * varIterator ()
LogTasknewLog ()
bool destroyLog (LogTask *task)


Constructor & Destructor Documentation

LogClient::LogClient CommManager com,
const char *  spec,
const com_id_t  log_port = DEFAULT_LOG_STREAM
 

Create a LogClient associated with a particular named remote communicator

Com is a reference to your local CommManager. Spec is the specificaiton of the remote communicator, usually something like 'net: port=5000; machine=whatever;' for a log server running on whatever at port 5000. Log_port is the stream port used by the LogServer on the remote machine.

LogClient::LogClient CommManager com,
RemoteManager rmt,
const com_id_t  log_port = DEFAULT_LOG_STREAM
 

Create a LogClient associated with a particularremote CommManager.

Com is a reference to your local CommManager. Rmt is the RemoteManager object associated with the machine where logServer is running. Log_port is the stream port used by the LogServer on the remote machine.


Member Function Documentation

void LogClient::clearVars  ) 
 

Clears the local dictionary where the list of avaliable variables is stored. If you believe that things have changed on the remote LogServer you should call clearVars before issuing a new query. Returns false if an error occurs or the timeout specified by msec expires

bool LogClient::destroyLog LogTask task  ) 
 

destroys a previously created logging task

log_name_t* LogClient::getNextVar  ) 
 

Returns the next variable on the internal list

unsigned int LogClient::listVars  ) 
 

Generates an internal list containing all the variables returned from the remote server by a query. The resulting list can be traversed by calls to getNextVar, or through the iterator returned by varIterator.

LogTask* LogClient::newLog  ) 
 

Crates a new logging task through which data can actualy be acquired

bool LogClient::ping const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

Test if the remote LogServer is alive. Returns false if an error occurs or the timeout specified by msec expires

bool LogClient::query const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

Query the remote LogServer for a list of avaliable variables. Returns false if an error occurs or the timeout specified by msec expires

bool LogClient::reset const unsigned int  msec = LOG_CLIENT_TIMEOUT  ) 
 

Attempts to reset the remote LogServer. Returns false if an error occurs or the timeout specified by msec expires

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

returns a newed iterator for the internal list of variables. User code must not manipulate (add/remove) items from this list


RHexLib Reference Documentation