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

LogServer Class Reference
[Remote Data Logging Services]

#include <LogServer.hh>

Inherits Module.

List of all members.


Detailed Description

Basic logging services for use on the robot.

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


Member Function Documentation

bool LogServer::deleteVar char *  mod_name,
char *  name
 

delete reference to variable "name"

bool LogServer::deleteVar unsigned int  id  ) 
 

delete references to variable "id" (returns FALSE if error)

unsigned int LogServer::getBufSize  ) 
 

returns the ammount of data pending to be sent (in log-packets)

unsigned int LogServer::registerVar log_var_type_t  type,
int  array_size,
char *  mod_name,
char *  name,
LogAccessor a
 

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.

unsigned int LogServer::registerVar log_var_type_t  type,
int  array_size,
char *  mod_name,
char *  name,
unsigned char *  p
 

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.


Friends And Related Function Documentation

DEFAULT_LOG_STREAM [related]
 

Default stream port used by the LogServer -- 76.


RHexLib Reference Documentation