#include <usystem.hh>
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. |
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.
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);
Definition at line 78 of file usystem.cc.