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.

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

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.


Public Attributes

unsigned timeStamp
 The time stamp of the sending robot.

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

unsigned incomingTimeStamp
 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.

SeenBallPosition seenBallPosition
 The ball seen by the robot.

bool sendSeenBallPosition
 Send seenBallPosition if true.

BehaviorTeamMessage behaviorTeamMessage
 Messages by the behavior.

bool sendBehaviorTeamMessage
 Send behaviorTeamMessage if true.

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 44 of file TeamMessage.h.


Constructor & Destructor Documentation

TeamMessage::TeamMessage  )  [inline]
 

Constructor.

Definition at line 68 of file TeamMessage.h.

References incomingTimeStamp, lastReceivedTimeStamp, sendBehaviorTeamMessage, sendRobotPose, and sendSeenBallPosition.


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 14 of file TeamMessage.cpp.

References SystemCall::getTimeSince(), and lastReceivedTimeStamp.

Referenced by TeamMessageCollection::processMessages().

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 120 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 125 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 130 of file TeamMessage.cpp.

References timeOffset.

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

Definition at line 93 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 101 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 109 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 114 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 19 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 58 of file TeamMessage.cpp.


Member Data Documentation

unsigned TeamMessage::timeStamp
 

The time stamp of the sending robot.

Definition at line 48 of file TeamMessage.h.

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

unsigned TeamMessage::lastReceivedTimeStamp
 

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

Definition at line 48 of file TeamMessage.h.

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

unsigned TeamMessage::incomingTimeStamp
 

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

Definition at line 48 of file TeamMessage.h.

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

RobotPose TeamMessage::robotPose
 

The robot pose of the robot.

Definition at line 52 of file TeamMessage.h.

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

bool TeamMessage::sendRobotPose
 

Send robotPose if true.

Definition at line 53 of file TeamMessage.h.

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

SeenBallPosition TeamMessage::seenBallPosition
 

The ball seen by the robot.

Definition at line 55 of file TeamMessage.h.

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

bool TeamMessage::sendSeenBallPosition
 

Send seenBallPosition if true.

Definition at line 56 of file TeamMessage.h.

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

BehaviorTeamMessage TeamMessage::behaviorTeamMessage
 

Messages by the behavior.

Definition at line 58 of file TeamMessage.h.

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

bool TeamMessage::sendBehaviorTeamMessage
 

Send behaviorTeamMessage if true.

Definition at line 59 of file TeamMessage.h.

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

signed long TeamMessage::timeOffset
 

timeOffset Remote time - local time

Definition at line 61 of file TeamMessage.h.

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

Player::playerNumber TeamMessage::playerNumberOfSender
 

The player number of the Sender.

Definition at line 63 of file TeamMessage.h.

Referenced by operator>>().


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