Public Member Functions | |
Dump (bool rawTime) | |
Protected Member Functions | |
void | connectionClosed (Stream *stream, bool abnormal) |
void | connectionCreated (Stream *stream) |
void | incomingData (Stream *stream) |
Private Attributes | |
bool | rawTime |
should displayed timestamps be of the form sec:usec since 1970 |
A simple message dumper. This class calls Aseba::Message::dump() for each message
Definition at line 43 of file dump.cpp.
void Aseba::Dump::connectionClosed | ( | Stream * | , | |
bool | ||||
) | [inline, protected, virtual] |
Called when target closes connection. The only valid method to call on the stream is getTargetName(), input/output operations are forbidden. You must not call closeStream(stream) from within this method for the same stream as the one passed as parameter. Subclass can implement this method. Called with the stream lock held.
stream | stream to the target. | |
abnormal | whether the connection was closed during step (abnormal == false) or when an operation was performed (abnormal == true) |
Reimplemented from Aseba::Hub.
void Aseba::Dump::connectionCreated | ( | Stream * | ) | [inline, protected, virtual] |
Called when any data connection is created. It is not called when a listening connection (eg tcpin:) is created. If the stream is closed during this method, an exception occurs: the caller is responsible to handle it. The stream is already inserted in the stream list when this function is called. Subclass can implement this method. Called with the stream lock held.
stream | stream to the target |
Reimplemented from Aseba::Hub.
void Aseba::Dump::incomingData | ( | Stream * | ) | [inline, protected, virtual] |
Called when data is available for reading on the stream. If the stream is closed during this method, an exception occurs: Hub stops the execution of this method and calls connectionClosed(); objects dynamically allocated must thus be handled with auto_ptr. If step() is used, subclass must implement this method and call read at least once. Called with the stream lock held.
stream | stream to the target |
Reimplemented from Aseba::Hub.
bool Aseba::Dump::rawTime [private] |
should displayed timestamps be of the form sec:usec since 1970
Reimplemented from Aseba::Hub.