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:

[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.
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.
## 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.
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
MessageQueueBase & | queue
| The message queue where the messages are written into.
## Friends
class | MessageQueue
| gives the MessageQueue class access to protected members
class | LogPlayer
| gives the LogPlayer class access to protected members
class | CRemoteCamToolBar
| gives the CRemoteCamToolBar 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
In & | operator>> (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(), operator>>(), Process::processMain(), LogPlayer::saveSynchronized(), GTXabsl2EngineExecutor::sendDebugMessage(), GT2005WalkingEngine::sendPolys(), and GT2005WalkingEngine::streamDebugData().

Here is the call graph for this function:

void OutMessage::finishMessage | ( | MessageID | id,
|  | unsigned long | timeStamp,
|  | Player::teamColor | teamColor,
|  | Player::playerNumber | playerNumber,
|  | bool | messageWasSentFromAPhysicalRobot
| ) |

  | 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 62 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 LogPlayer`[friend]`

| gives the LogPlayer class access to protected members Definition at line 158 of file OutMessage.h.

friend class CRemoteCamToolBar`[friend]`

| gives the CRemoteCamToolBar class access to protected members Definition at line 161 of file OutMessage.h.

friend class InMessage`[friend]`

| gives the InMessage class access to protected members Definition at line 164 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(), operator>>(), Process::processMain(), LogPlayer::saveSynchronized(), GTXabsl2EngineExecutor::sendDebugMessage(), GT2005WalkingEngine::sendPolys(), and GT2005WalkingEngine::streamDebugData().

OutTextMessage OutMessage::text

| An interface for writing text messages into the queue. Definition at line 113 of file OutMessage.h.

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

| 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

| 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:

- Tools/MessageQueue/OutMessage.h
- Tools/MessageQueue/OutMessage.cpp