Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OutMessage Class Reference

An Interface for writing messages into a MessageQueue. More...

#include <OutMessage.h>

Collaboration diagram for OutMessage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutMessage (MessageQueueBase &queue)
 Constructor.

void finishMessage (MessageID id)
 Finishes the message and allows to write a new message.


Public Attributes

OutBinaryMessage bin
 An interface for writing binary messages into the queue.

OutTextMessage text
 An interface for writing text messages into the queue.

OutTextMessage textRaw
 An interface for writing text messages in a raw style (see class OutTextRaw) into the queue.


Protected Member Functions

void finishMessage (MessageID id, unsigned long timeStamp, Player::teamColor teamColor, Player::playerNumber playerNumber, bool messageWasSentFromAPhysicalRobot)
 Finishes the message and allows to write a new message.


Protected Attributes

Player::teamColor teamColorForNewMessages
 The player's team color that is attached to new messages.

Player::playerNumber playerNumberForNewMessages
 The player number that is attached to new messages.


Private Attributes

MessageQueueBasequeue
 The message queue where the messages are written into.


Friends

class MessageQueue
 gives the MessageQueue class access to protected members

class InMessage
 gives the InMessage class access to protected members

void operator>> (InMessage &message, MessageQueue &queue)
 gives the operator that copies a InMessage to another queue access to protected members

Inoperator>> (In &stream, MessageQueue &messageQueue)
 gives the In streaming opeator access to protected members


Detailed Description

An Interface for writing messages into a MessageQueue.

Use the bin or text member for formated writing into a message queue.

Definition at line 100 of file OutMessage.h.


Constructor & Destructor Documentation

OutMessage::OutMessage MessageQueueBase queue  ) 
 

Constructor.

Parameters:
queue A reference to a MessageQueueBase

Definition at line 43 of file OutMessage.cpp.


Member Function Documentation

void OutMessage::finishMessage MessageID  id  ) 
 

Finishes the message and allows to write a new message.

Call that function after the writing of every message.

Parameters:
id The type id of the message

Definition at line 50 of file OutMessage.cpp.

References MessageQueueBase::finishMessage(), playerNumberForNewMessages, and teamColorForNewMessages.

Referenced by MessageQueue::copyMessage(), BBInvKinIndividual::dump(), CalibrationIndividual::dump(), BB2004Calibrator::evolve(), GT2004BallLocator::handleMessage(), BB2004InvKinWalkingEngine::learn(), operator>>(), GTXabsl2EngineExecutor::sendDebugMessage(), and GT2004BallLocator::sendProcessModelStates().

Here is the call graph for this function:

void OutMessage::finishMessage MessageID  id,
unsigned long  timeStamp,
Player::teamColor  teamColor,
Player::playerNumber  playerNumber,
bool  messageWasSentFromAPhysicalRobot
[protected]
 

Finishes the message and allows to write a new message.

Parameters:
id The type id of the message
timeStamp The time stamp of the message
teamColor the team color of the robot that sent the message
playerNumber the player number of the robot that sent the message
messageWasSentFromAPhysicalRobot If true, then the message was sent from a physical robot.

Definition at line 56 of file OutMessage.cpp.

References MessageQueueBase::finishMessage().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class MessageQueue [friend]
 

gives the MessageQueue class access to protected members

Definition at line 155 of file OutMessage.h.

friend class InMessage [friend]
 

gives the InMessage class access to protected members

Definition at line 158 of file OutMessage.h.

void operator>> InMessage message,
MessageQueue queue
[friend]
 

gives the operator that copies a InMessage to another queue access to protected members

Parameters:
message The InMessage to write.
queue The MessageQueue object.

Definition at line 180 of file MessageQueue.cpp.

In& operator>> In stream,
MessageQueue messageQueue
[friend]
 

gives the In streaming opeator access to protected members

Parameters:
stream The stream from which is read.
messageQueue The MessageQueue object.
Returns:
The stream.

Definition at line 104 of file MessageQueue.cpp.


Member Data Documentation

MessageQueueBase& OutMessage::queue [private]
 

The message queue where the messages are written into.

Definition at line 106 of file OutMessage.h.

OutBinaryMessage OutMessage::bin
 

An interface for writing binary messages into the queue.

Definition at line 110 of file OutMessage.h.

Referenced by MessageQueue::copyMessage(), GT2004BallLocator::handleMessage(), operator>>(), GTXabsl2EngineExecutor::sendDebugMessage(), and GT2004BallLocator::sendProcessModelStates().

OutTextMessage OutMessage::text
 

An interface for writing text messages into the queue.

Definition at line 113 of file OutMessage.h.

Referenced by BBInvKinIndividual::dump(), CalibrationIndividual::dump(), BB2004Calibrator::evolve(), and BB2004InvKinWalkingEngine::learn().

OutTextMessage OutMessage::textRaw
 

An interface for writing text messages in a raw style (see class OutTextRaw) into the queue.

Definition at line 119 of file OutMessage.h.

Player::teamColor OutMessage::teamColorForNewMessages [protected]
 

The player's team color that is attached to new messages.

Definition at line 149 of file OutMessage.h.

Referenced by finishMessage(), and MessageQueue::setPlayerForNewMessages().

Player::playerNumber OutMessage::playerNumberForNewMessages [protected]
 

The player number that is attached to new messages.

Definition at line 152 of file OutMessage.h.

Referenced by finishMessage(), and MessageQueue::setPlayerForNewMessages().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:10:18 2004 for GT2004 by doxygen 1.3.6