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

TeamMessage Class Reference

Represents a collection of all data that is exchanged between the different robots. More...

#include <TeamMessage.h>

Inheritance diagram for TeamMessage:

Inheritance graph
[legend]
Collaboration diagram for TeamMessage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TeamMessage ()
 Constructor.

virtual ~TeamMessage ()
bool isActual () const
 The function determines, whether the team message is actual.

bool isActual (int i) const
long getTimeStampInOwnTime () const
 This function returns the time of the remote player in the time system of the local player.

long getTimeInOwnTime (long time) const
 This function converts a remote timeStamp to the local time system.

long getTimeInRemoteTime (long time) const
 This function converts a local timeStamp to the remote time system.

void resetSendMarkers ()
 This function sets all send-markers to false.


Public Attributes

unsigned int timeStamp
 The time stamp of the sending robot.

unsigned int lastReceivedTimeStamp [4]
 The timeStamp of the last package received from the receiving robot.

unsigned int incomingTimeStamp [4]
 The local receiving time of the last package received from the receiving robot.

RobotPose robotPose
 The robot pose of the robot.

bool sendRobotPose
 Send robotPose if true.

SeenBallState seenBallState
 The ball seen by the robot.

bool sendSeenBallState
 Send seenBallState if true.

BehaviorTeamMessage behaviorTeamMessage
 Messages by the behavior.

bool sendBehaviorTeamMessage
 Send behaviorTeamMessage if true.

PlayersPercept playersPercept
bool sendPlayersPercept
SensorBehaviorTeamMessage sensorBehaviorTeamMessage
 > Send playersPercept if true

bool sendSensorBehaviorTeamMessage
 >

OdometryData odometryData
 > Send sensorBehaviorTeamMessage if true

bool sendOdometryData
 > The odometry data of the robot

MultipleBallPerceptList multipleBallPerceptList
 > Send odometryData if true

bool sendMultipleBallPerceptList
 > The list of ball percepts of the robot

GT2005ParticleContainerSend gt2005ParticleContainerSend
 > Send multipleBallPerceptList if true

bool sendGT2005ParticleContainerSend
 > The representative ball particles of the robot

RobotPoseCollection robotPoseCollection
 > Send gt2005ParticleContainerSend if true

bool sendRobotPoseCollection
 > The possible and most reliable robot poses

ObstaclesModel obstaclesModel
 > Send robotPoseCollection if true

bool sendObstaclesModel
 > The obstacles models of the robot

signed long timeOffset
 timeOffset Remote time - local time

Player::playerNumber playerNumberOfSender
 The player number of the Sender.


Static Private Member Functions

void read (In &stream, Vector2< double > &v)
void read (In &stream, Pose2D &p)
void write (Out &stream, const Vector2< double > &v)
void write (Out &stream, const Pose2D &p)

Friends

Inoperator>> (In &stream, TeamMessage &teamMessage)
 Streaming operator that reads a team message from a stream.

Outoperator<< (Out &stream, const TeamMessage &teamMessage)
 Streaming operator that writes a team message to a stream.


Detailed Description

Represents a collection of all data that is exchanged between the different robots.

Definition at line 52 of file TeamMessage.h.


Constructor & Destructor Documentation

TeamMessage::TeamMessage  ) 
 

Constructor.

Definition at line 21 of file TeamMessage.cpp.

References incomingTimeStamp, lastReceivedTimeStamp, playerNumberOfSender, and resetSendMarkers().

Here is the call graph for this function:

TeamMessage::~TeamMessage  )  [virtual]
 

Definition at line 53 of file TeamMessage.cpp.


Member Function Documentation

bool TeamMessage::isActual  )  const
 

The function determines, whether the team message is actual.

Returns:
Did the communication take less than 1 seconds?

Definition at line 58 of file TeamMessage.cpp.

References getPlayer(), SystemCall::getTimeSince(), and lastReceivedTimeStamp.

Referenced by TeamMessageCollection::processMessages().

Here is the call graph for this function:

bool TeamMessage::isActual int  i  )  const
 

Definition at line 63 of file TeamMessage.cpp.

References getPlayer(), SystemCall::getTimeSince(), and lastReceivedTimeStamp.

Here is the call graph for this function:

long TeamMessage::getTimeStampInOwnTime  )  const
 

This function returns the time of the remote player in the time system of the local player.

Definition at line 295 of file TeamMessage.cpp.

References timeOffset.

long TeamMessage::getTimeInOwnTime long  time  )  const
 

This function converts a remote timeStamp to the local time system.

Parameters:
time the timeStamp to be converted

Definition at line 300 of file TeamMessage.cpp.

References timeOffset.

long TeamMessage::getTimeInRemoteTime long  time  )  const
 

This function converts a local timeStamp to the remote time system.

Parameters:
time the timeStamp to be converted

Definition at line 305 of file TeamMessage.cpp.

References timeOffset.

void TeamMessage::resetSendMarkers  ) 
 

This function sets all send-markers to false.

Its called by the TeamMessageCollection

Definition at line 39 of file TeamMessage.cpp.

References sendBehaviorTeamMessage, sendGT2005ParticleContainerSend, sendMultipleBallPerceptList, sendObstaclesModel, sendPlayersPercept, sendRobotPose, sendRobotPoseCollection, sendSeenBallState, and sendSensorBehaviorTeamMessage.

Referenced by TeamMessageCollection::processMessages(), and TeamMessage().

void TeamMessage::read In stream,
Vector2< double > &  v
[static, private]
 

Definition at line 263 of file TeamMessage.cpp.

References Vector2< V >::x, and Vector2< V >::y.

Referenced by operator>>(), and read().

void TeamMessage::read In stream,
Pose2D p
[static, private]
 

Definition at line 273 of file TeamMessage.cpp.

References read(), Pose2D::rotation, and Pose2D::translation.

Here is the call graph for this function:

void TeamMessage::write Out stream,
const Vector2< double > &  v
[static, private]
 

Definition at line 281 of file TeamMessage.cpp.

References Vector2< V >::x, and Vector2< V >::y.

Referenced by operator<<(), and write().

void TeamMessage::write Out stream,
const Pose2D p
[static, private]
 

Definition at line 289 of file TeamMessage.cpp.

References Pose2D::rotation, Pose2D::translation, and write().

Here is the call graph for this function:


Friends And Related Function Documentation

In& operator>> In stream,
TeamMessage teamMessage
[friend]
 

Streaming operator that reads a team message from a stream.

Parameters:
stream The stream from which is read.
teamMessage The object to be read.
Returns:
The stream.

Definition at line 68 of file TeamMessage.cpp.

Out& operator<< Out stream,
const TeamMessage teamMessage
[friend]
 

Streaming operator that writes a team message to a stream.

Parameters:
stream The stream to write on.
teamMessage The object to be written.
Returns:
The stream.

Definition at line 167 of file TeamMessage.cpp.


Member Data Documentation

unsigned int TeamMessage::timeStamp
 

The time stamp of the sending robot.

Definition at line 56 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), TeamMessageCollection::processOutMessages(), and TeamMessageCollection::processTimeStamps().

unsigned int TeamMessage::lastReceivedTimeStamp[4]
 

The timeStamp of the last package received from the receiving robot.

Definition at line 57 of file TeamMessage.h.

Referenced by isActual(), operator<<(), operator>>(), TeamMessageCollection::processTimeStamps(), and TeamMessage().

unsigned int TeamMessage::incomingTimeStamp[4]
 

The local receiving time of the last package received from the receiving robot.

Definition at line 58 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), TeamMessageCollection::processTimeStamps(), and TeamMessage().

RobotPose TeamMessage::robotPose
 

The robot pose of the robot.

Definition at line 60 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendRobotPose
 

Send robotPose if true.

Definition at line 61 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

SeenBallState TeamMessage::seenBallState
 

The ball seen by the robot.

Definition at line 63 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendSeenBallState
 

Send seenBallState if true.

Definition at line 64 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

BehaviorTeamMessage TeamMessage::behaviorTeamMessage
 

Messages by the behavior.

Definition at line 66 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendBehaviorTeamMessage
 

Send behaviorTeamMessage if true.

Definition at line 67 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

PlayersPercept TeamMessage::playersPercept
 

Definition at line 69 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendPlayersPercept
 

Definition at line 70 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

SensorBehaviorTeamMessage TeamMessage::sensorBehaviorTeamMessage
 

> Send playersPercept if true

Definition at line 72 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendSensorBehaviorTeamMessage
 

>

Definition at line 73 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

OdometryData TeamMessage::odometryData
 

> Send sensorBehaviorTeamMessage if true

Definition at line 75 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendOdometryData
 

> The odometry data of the robot

Definition at line 76 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

MultipleBallPerceptList TeamMessage::multipleBallPerceptList
 

> Send odometryData if true

Definition at line 78 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendMultipleBallPerceptList
 

> The list of ball percepts of the robot

Definition at line 79 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

GT2005ParticleContainerSend TeamMessage::gt2005ParticleContainerSend
 

> Send multipleBallPerceptList if true

Definition at line 81 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendGT2005ParticleContainerSend
 

> The representative ball particles of the robot

Definition at line 82 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

RobotPoseCollection TeamMessage::robotPoseCollection
 

> Send gt2005ParticleContainerSend if true

Definition at line 84 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendRobotPoseCollection
 

> The possible and most reliable robot poses

Definition at line 85 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

ObstaclesModel TeamMessage::obstaclesModel
 

> Send robotPoseCollection if true

Definition at line 87 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), and TeamMessageCollection::send().

bool TeamMessage::sendObstaclesModel
 

> The obstacles models of the robot

Definition at line 88 of file TeamMessage.h.

Referenced by operator<<(), operator>>(), resetSendMarkers(), and TeamMessageCollection::send().

signed long TeamMessage::timeOffset
 

timeOffset Remote time - local time

Definition at line 90 of file TeamMessage.h.

Referenced by getTimeInOwnTime(), getTimeInRemoteTime(), and getTimeStampInOwnTime().

Player::playerNumber TeamMessage::playerNumberOfSender
 

The player number of the Sender.

Definition at line 91 of file TeamMessage.h.

Referenced by operator>>(), TeamMessageCollection::processTimeStamps(), and TeamMessage().


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:22:03 2006 for GT2005 by doxygen 1.3.6