#include <LogServer.hh>
Inherits Module.
The LogServer module provides on robot facilities for performing data acquisition and communication tasks associated with logging data from the running robot. Remote clients make contact with the LogServer module in order to query for avaliable variables and request make requests to start and stop logging of desired variables.
On robot modules can register (and delete) loggable variables in order to make them avaliable to client programs. Typically registration should happen when a module is first initialized, and deletion should happen when the module uninit method is called.
Public Member Functions | |
unsigned int | registerVar (log_var_type_t type, int array_size, char *mod_name, char *name, unsigned char *p) |
unsigned int | registerVar (log_var_type_t type, int array_size, char *mod_name, char *name, LogAccessor *a) |
bool | deleteVar (unsigned int id) |
bool | deleteVar (char *mod_name, char *name) |
unsigned int | getBufSize () |
void | init (void) |
void | uninit (void) |
void | activate (void) |
void | deactivate (void) |
void | update (void) |
bool | updateable (void) |
Related Functions | |
(Note that these are not member functions.) | |
DEFAULT_LOG_STREAM |
|
delete reference to variable "name" |
|
delete references to variable "id" (returns FALSE if error) |
|
returns the ammount of data pending to be sent (in log-packets) |
|
Register a variable to be logged This method is used to register a variable with the logging service. type (defined in LogMsg.hh) indicates the variable type, array_size indicates the number of elements contained in this variable, mod_name and name are combined to form the name that will appear to a logging client, and a is a pointer to an instance of LogAccessor. The LogAccessor::getVar method will be called whenever the logging service attempts to acquire this variable, and is responsible for copying the correct data into the logging systems data buffer. The method returns a unique ID for the entry or 0 if there was an error. |
|
Register a variable to be logged This method is used to register a variable with the logging service. type (defined in LogMsg.hh) indicates the variable type, array_size indicates the number of elements contained in this variable, mod_name and name are combined to form the name that will appear to a logging client, and p is a pointer to the begining of the first element of the variable. array_size and type are used to determine the size of the memeory block copied from p when this variable is recorded. The method returns a unique ID for the entry or 0 if there was an error. |
|
Default stream port used by the LogServer -- 76. |