#include <LogPlayer.h>
Inheritance diagram for LogPlayer:


Public Types | |
| enum | LogPlayerState { initial, recording, paused, playing } |
| different states of the logplayer More... | |
Public Member Functions | |
| LogPlayer (MessageQueue &targetQueue) | |
| Constructor. | |
| LogPlayerState | getState () |
| Returns the state of the queue. | |
| void | _new () |
| Deletes all messages from the queue. | |
| bool | open (const char *fileName) |
| Opens a log file and reads all messages into the queue. | |
| void | play () |
| Playes the queue. | |
| void | pause () |
| Pauses playing the queue. | |
| void | stop () |
| Stops playing the queue, resets the position in the queue to the first message. | |
| void | stepForward () |
| Plays the next message in the queue. | |
| void | stepBackward () |
| Plays the previous message in the queue. | |
| void | stepRepeat () |
| repeats the current message in the queue | |
| void | jumpFrame (int frame) |
| jumps to given message-number in the queue | |
| void | record () |
| Starts / Stops recording. | |
| void | smooth () |
| Activates/deactivates jpeg image smoothing. | |
| bool | save (const char *fileName) |
| Writes all messages in the log player queue to a log file. | |
| bool | saveAMV (const char *fileName) |
| Writes all messages in the log player queue to an AIBOVision compatibile movie file. | |
| void | saveCSVrow (OutTextRawFile &file, double *row, unsigned int rowLen) |
| Writes an row of doubles to an comma separated value file. | |
| bool | saveCSV (const char *fileName) |
| Writes a couple of message types in the log player queue to an comma separated value file with a common time line. | |
| bool | saveSynchronized (const char *fileName) |
| Synchronizes the RemoteCamWorldstates with the robots timestamps and writes a resorted version of the logfile. | |
| bool | saveImages (const char *fileName) |
| Writes all images in the log player queue to a bunch of files (*.bmp or *.jpg). | |
| void | setPlaySpeed (double speed) |
| Sets the playing speed of the log player. | |
| void | handleMessage (InMessage &message) |
| Adds the message to the queue depending on isRecording. | |
| void | onIdle () |
| If playing a log file, that function checks if it is time to release the next message dependend on the time stamp. | |
| int | getNumberOfMessages () const |
| Returns the number of stored messages. | |
| int | getCurrentMessageNumber () const |
| Returns the number of the current message. | |
| MessageID | getCurrentMessageID () const |
| Returns the type of the current message. | |
| void | keep (MessageID *messageIDs) |
| The functions filters the message queue. | |
| void | remove (MessageID *messageIDs) |
| The functions filters the message queue. | |
| void | statistics (int frequency[numOfMessageIDs]) |
| The function creates a histogram on the message ids contained in the log file. | |
| bool | isSmoothingEnabled () const |
| Returns the status of the smoothing flag. | |
Protected Attributes | |
| int | currentMessageNumber |
| The number of the current message. | |
Private Member Functions | |
| void | convertIntString (char *str, int value) |
| little routine to convert an integer into C style string | |
| unsigned long | getTimeStamp (int message) |
| Returns the time stamp of a given message. | |
Private Attributes | |
| LogPlayerState | state |
| the state of the log player | |
| MessageQueue & | targetQueue |
| double | playSpeed |
| A factor, how fast the messages are played. | |
| unsigned long | timeWhenFirstMessageWasPlayed |
| The time when the first message was played. | |
| unsigned long | timeOfFirstPlayedMessage |
| The time stamp of the first played message. | |
| bool | smoothingEnabled |
| Flag which triggers smoothing of jpeg compressed images. | |
Friends | |
| class | CRemoteCamToolBar |
| class | CLogAnalyzerBase |
The messages are played in the same time sequence as they were recorded.
Definition at line 22 of file LogPlayer.h.
|
|
different states of the logplayer
Definition at line 32 of file LogPlayer.h. Referenced by getState(). |
|
|
Constructor.
Definition at line 22 of file LogPlayer.cpp. References _new(). |
Here is the call graph for this function:

|
|
Returns the state of the queue.
Definition at line 578 of file LogPlayer.cpp. References LogPlayerState. |
|
|
Deletes all messages from the queue.
Definition at line 30 of file LogPlayer.cpp. References MessageQueue::clear(), initial, and stop(). Referenced by LogPlayer(). |
Here is the call graph for this function:

|
|
Opens a log file and reads all messages into the queue.
Definition at line 37 of file LogPlayer.cpp. References MessageQueue::clear(), InFile::exists(), and stop(). Referenced by CLogAnalyzerBase::openLogfile(). |
Here is the call graph for this function:

|
|
Playes the queue. Note that you have to call onIdle() regularely if you want to use that function Definition at line 50 of file LogPlayer.cpp. |
Here is the call graph for this function:

|
|
Pauses playing the queue.
Definition at line 62 of file LogPlayer.cpp. References getNumberOfMessages(), initial, paused, timeOfFirstPlayedMessage, and timeWhenFirstMessageWasPlayed. Referenced by jumpFrame(), play(), record(), stepBackward(), stepForward(), stepRepeat(), and stop(). |
Here is the call graph for this function:

|
|
Stops playing the queue, resets the position in the queue to the first message.
Definition at line 56 of file LogPlayer.cpp. References currentMessageNumber, and pause(). Referenced by _new(), onIdle(), open(), saveAMV(), saveCSV(), and saveImages(). |
Here is the call graph for this function:

|
|
Plays the next message in the queue.
Definition at line 79 of file LogPlayer.cpp. References MessageQueue::copyMessage(), currentMessageNumber, getNumberOfMessages(), pause(), paused, and targetQueue. |
Here is the call graph for this function:

|
|
Plays the previous message in the queue.
Definition at line 71 of file LogPlayer.cpp. References MessageQueue::copyMessage(), currentMessageNumber, pause(), paused, and targetQueue. |
Here is the call graph for this function:

|
|
repeats the current message in the queue
Definition at line 87 of file LogPlayer.cpp. References MessageQueue::copyMessage(), currentMessageNumber, pause(), paused, and targetQueue. |
Here is the call graph for this function:

|
|
jumps to given message-number in the queue
Definition at line 95 of file LogPlayer.cpp. References MessageQueue::copyMessage(), currentMessageNumber, getNumberOfMessages(), pause(), paused, and targetQueue. |
Here is the call graph for this function:

|
|
Starts / Stops recording. Note that you have to notify the queue on new messages with handleMessage(). Definition at line 543 of file LogPlayer.cpp. References initial, pause(), paused, playing, and recording. |
Here is the call graph for this function:

|
|
Activates/deactivates jpeg image smoothing.
Definition at line 558 of file LogPlayer.cpp. References smoothingEnabled. |
|
|
Writes all messages in the log player queue to a log file.
Definition at line 103 of file LogPlayer.cpp. References OutFile::exists(), and getNumberOfMessages(). Referenced by saveSynchronized(). |
Here is the call graph for this function:

|
|
Writes all messages in the log player queue to an AIBOVision compatibile movie file. Images are encoded in a raw YUV format.
Definition at line 131 of file LogPlayer.cpp. References InMessage::bin, Image::cameraInfo, convertIntString(), currentMessageNumber, OutFile::exists(), getCurrentMessageID(), getNumberOfMessages(), idImage, idJPEGImage, Image::image, MessageQueue::in, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, MessageQueueBase::setSelectedMessageForReading(), stop(), JPEGImage::toImage(), and OutStream< OutFile, OutBinary >::write(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Writes an row of doubles to an comma separated value file.
Definition at line 199 of file LogPlayer.cpp. Referenced by saveCSV(). |
|
|
Writes a couple of message types in the log player queue to an comma separated value file with a common time line.
Definition at line 220 of file LogPlayer.cpp. References InMessage::bin, SpecialPercept::checkerPose, currentMessageNumber, OutFile::exists(), RobotPose::frameNumber, SpecialPercept::frameNumber, getCurrentMessageID(), getNumberOfMessages(), idRemoteCamWorldState, idSpecialPercept, idWorldState, MessageQueue::in, RECEIVE_WORLDSTATE, Pose2D::rotation, saveCSVrow(), MessageQueueBase::setSelectedMessageForReading(), stop(), RobotPose::timestamp, Pose2D::translation, SpecialPercept::type, Vector2< double >::x, and Vector2< double >::y. |
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Writes all images in the log player queue to a bunch of files (*.bmp or *.jpg).
Definition at line 454 of file LogPlayer.cpp. References InMessage::bin, Image::cameraInfo, Image::convertFromYCbCrToRGB(), currentMessageNumber, OutFile::exists(), getCurrentMessageID(), getNumberOfMessages(), idImage, idJPEGImage, Image::image, MessageQueue::in, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, MessageQueueBase::setSelectedMessageForReading(), stop(), JPEGImage::toImage(), and OutStream< OutFile, OutBinary >::write(). |
Here is the call graph for this function:

|
|
Sets the playing speed of the log player. "2" playes the messages double as fast as they were recorded, "0.5" plays the messages with the half speed. Definition at line 566 of file LogPlayer.cpp. References playSpeed, and timeWhenFirstMessageWasPlayed. |
|
|
Adds the message to the queue depending on isRecording. That function should be called for every message in the queue that the log player shall work on. Definition at line 572 of file LogPlayer.cpp. References recording. |
|
|
If playing a log file, that function checks if it is time to release the next message dependend on the time stamp. Call that function whenever there is some processing time left. Definition at line 583 of file LogPlayer.cpp. References MessageQueue::copyMessage(), currentMessageNumber, SystemCall::getCurrentSystemTime(), getNumberOfMessages(), SystemCall::getTimeSince(), getTimeStamp(), playing, playSpeed, MessageQueue::removeRepetitions(), stop(), targetQueue, timeOfFirstPlayedMessage, and timeWhenFirstMessageWasPlayed. |
Here is the call graph for this function:

|
|
Returns the number of stored messages.
Definition at line 627 of file LogPlayer.cpp. References MessageQueueBase::getNumberOfMessages(). Referenced by jumpFrame(), keep(), onIdle(), pause(), CLogAnalyzerBase::readLogfile(), remove(), save(), saveAMV(), saveCSV(), saveImages(), saveSynchronized(), statistics(), and stepForward(). |
Here is the call graph for this function:

|
|
Returns the number of the current message.
Definition at line 632 of file LogPlayer.cpp. References currentMessageNumber. |
|
|
Returns the type of the current message.
Definition at line 637 of file LogPlayer.cpp. References currentMessageNumber, MessageQueueBase::getMessageID(), and MessageID. Referenced by keep(), CLogAnalyzerBase::readLogfile(), remove(), saveAMV(), saveCSV(), saveImages(), and saveSynchronized(). |
Here is the call graph for this function:

|
|
The functions filters the message queue.
Definition at line 643 of file LogPlayer.cpp. References currentMessageNumber, getCurrentMessageID(), getNumberOfMessages(), MessageID, MessageQueue::moveAllMessages(), MessageQueue::queue, MessageQueueBase::setSelectedMessageForReading(), and stepRepeat(). |
Here is the call graph for this function:

|
|
The functions filters the message queue.
Definition at line 663 of file LogPlayer.cpp. References currentMessageNumber, getCurrentMessageID(), getNumberOfMessages(), MessageID, MessageQueue::moveAllMessages(), MessageQueue::queue, MessageQueueBase::setSelectedMessageForReading(), and stepRepeat(). |
Here is the call graph for this function:

|
|
The function creates a histogram on the message ids contained in the log file.
Definition at line 682 of file LogPlayer.cpp. References ASSERT, MessageQueueBase::getMessageID(), getNumberOfMessages(), numOfMessageIDs, and MessageQueueBase::setSelectedMessageForReading(). |
Here is the call graph for this function:

|
|
Returns the status of the smoothing flag.
Definition at line 178 of file LogPlayer.h. References smoothingEnabled. |
|
||||||||||||
|
little routine to convert an integer into C style string
Definition at line 117 of file LogPlayer.cpp. Referenced by saveAMV(). |
|
|
Returns the time stamp of a given message.
Definition at line 622 of file LogPlayer.cpp. References MessageQueueBase::getTimeStamp(). Referenced by onIdle(). |
Here is the call graph for this function:

|
|
Reimplemented from MessageQueue. Definition at line 212 of file LogPlayer.h. |
|
|
Definition at line 213 of file LogPlayer.h. |
|
|
the state of the log player
Definition at line 186 of file LogPlayer.h. |
|
|
Definition at line 189 of file LogPlayer.h. Referenced by jumpFrame(), onIdle(), stepBackward(), stepForward(), and stepRepeat(). |
|
|
A factor, how fast the messages are played. "2" playes the messages double as fast as they were recorded, "0.5" plays the messages with the half speed. Definition at line 199 of file LogPlayer.h. Referenced by onIdle(), and setPlaySpeed(). |
|
|
The number of the current message.
Definition at line 210 of file LogPlayer.h. Referenced by getCurrentMessageID(), getCurrentMessageNumber(), jumpFrame(), keep(), onIdle(), CLogAnalyzerBase::readLogfile(), remove(), saveAMV(), saveCSV(), saveImages(), saveSynchronized(), stepBackward(), stepForward(), stepRepeat(), and stop(). |
|
|
The time when the first message was played.
Definition at line 217 of file LogPlayer.h. Referenced by onIdle(), pause(), and setPlaySpeed(). |
|
|
The time stamp of the first played message.
Definition at line 220 of file LogPlayer.h. |
|
|
Flag which triggers smoothing of jpeg compressed images.
Definition at line 223 of file LogPlayer.h. Referenced by isSmoothingEnabled(), and smooth(). |
1.3.6