#include <LogClient.hh>
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 () |
| LogTask * | newLog () |
| bool | destroyLog (LogTask *task) |
|
||||||||||||||||
|
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. |
|
||||||||||||||||
|
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. |
|
|
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 |
|
|
destroys a previously created logging task |
|
|
Returns the next variable on the internal list |
|
|
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. |
|
|
Crates a new logging task through which data can actualy be acquired |
|
|
Test if the remote LogServer is alive. Returns false if an error occurs or the timeout specified by msec expires |
|
|
Query the remote LogServer for a list of avaliable variables. Returns false if an error occurs or the timeout specified by msec expires |
|
|
Attempts to reset the remote LogServer. Returns false if an error occurs or the timeout specified by msec expires |
|
|
returns a newed iterator for the internal list of variables. User code must not manipulate (add/remove) items from this list |