urbi::USystem Class Reference

Main USystem class definition. More...

#include <usystem.hh>

List of all members.

Public Member Functions

 USystem ()
 USystemMessage constructor.
virtual ~USystem ()
 USystemMessage destructor.
void register_channel (const USystemChannel &channel)
 Register to be notified of kernel messages on a specific channel.
virtual int receive_message (const USystemChannel &channel, const USystemMessage &message)
 Kernel message callback.


Detailed Description

Main USystem class definition.

USystem provides an interface to system information and low level kernel messages. It can only be used in plugged kernel mode.

Current available channels for system messages are:

NEW_CHANNEL: send a message when a new command fail, with the name of the requested object in a UStringSystemMessage

Definition at line 79 of file usystem.hh.


Member Function Documentation

int urbi::USystem::receive_message ( const USystemChannel channel,
const USystemMessage message 
) [virtual]

Kernel message callback.

receive_message must return immediately, returning a timeout limit in milliseconds. If necessary, it should spawn a thread to handle asynchronous responses and set an appropriate timeout.

Possible channels are:

NEW_CHANNEL:

message contains the name of an object on which a 'new' command failed. It is stored as a UStringSystemMessage and a cast is needed + call to UStringSystemMessage::getMessage.

How to cast?

const UStringSystemMessage& msg = dynamic_cast<const UStringSystemMessage&> (message);

Returns:
the number of milliseconds before timeout.

Definition at line 78 of file usystem.cc.


The documentation for this class was generated from the following files:
Generated on Tue Apr 10 17:45:46 2007 for URBISDK by  doxygen 1.5.1