Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SexpMonitor Class Reference

monitor plugin that generates S-Expressions for the rcssmonitor3D More...

#include <sexpmonitor.h>

Inheritance diagram for SexpMonitor:

Inheritance graph
[legend]
Collaboration diagram for SexpMonitor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SexpMonitor ()
virtual ~SexpMonitor ()
void ParseMonitorMessage (const std::string &data)
 If a monitor sends information to the world model, this function is called to process it.
virtual std::string GetMonitorInfo (const oxygen::PredicateList &pList)
 This function will be called periodically to get information about the current state of the world.
virtual std::string GetMonitorHeaderInfo (const oxygen::PredicateList &pList)
 This function is called once for every MonitorSystem each time a new client connects.
void SendRotationMatrix (bool send)
 This method can be used to set the flag for sending the rotation matrix of every object to the monitor.

Protected Member Functions

virtual bool ConstructInternal ()
 called after the object has been created and attached to a core to allow for object dependent internal construction
void AddAgents (boost::shared_ptr< oxygen::Scene > activeScene, std::ostringstream &ss) const
 collects data from agentaspects and constructs a S-Expr description
void AddFlags (boost::shared_ptr< oxygen::Scene > activeScene, std::ostringstream &ss)
 collects flag data and constructs a S-Expression description
void AddBall (boost::shared_ptr< oxygen::Scene > activeScene, std::ostringstream &ss) const
 adds ball data to output string stream
virtual void OnLink ()
 sets the reference to the GameStateAspect
virtual void OnUnlink ()
 resets the reference to the GameStateAspect
virtual void UpdateCached ()
 update variables from a script
void ResetSentFlags ()
void AddPredicates (std::ostringstream &ss, const oxygen::PredicateList &pList)
 constructs a S-Expression from the predicate list received from the MonitorServer

Protected Attributes

boost::shared_ptr< GameStateAspectmGameState
boost::shared_ptr< TrainerCommandParsermCommandParser
boost::shared_ptr< BallStateAspectmBallState
bool mSendRotMatrix
bool mSentFlags
 flag if the monitors received field flags information

Detailed Description

monitor plugin that generates S-Expressions for the rcssmonitor3D

Protocoll: (Init ...) Sends information about the simulator setup

Definition at line 45 of file sexpmonitor.h.


Constructor & Destructor Documentation

SexpMonitor::SexpMonitor  ) 
 

Definition at line 46 of file sexpmonitor.cpp.

SexpMonitor::~SexpMonitor  )  [virtual]
 

Definition at line 50 of file sexpmonitor.cpp.


Member Function Documentation

void SexpMonitor::AddAgents boost::shared_ptr< oxygen::Scene activeScene,
std::ostringstream &  ss
const [protected]
 

collects data from agentaspects and constructs a S-Expr description

Referenced by GetMonitorInfo().

void SexpMonitor::AddBall boost::shared_ptr< oxygen::Scene activeScene,
std::ostringstream &  ss
const [protected]
 

adds ball data to output string stream

Referenced by GetMonitorInfo().

void SexpMonitor::AddFlags boost::shared_ptr< oxygen::Scene activeScene,
std::ostringstream &  ss
[protected]
 

collects flag data and constructs a S-Expression description

Referenced by GetMonitorInfo().

void SexpMonitor::AddPredicates std::ostringstream &  ss,
const oxygen::PredicateList pList
[protected]
 

constructs a S-Expression from the predicate list received from the MonitorServer

Definition at line 81 of file sexpmonitor.cpp.

References zeitgeist::ParameterList::AdvanceValue(), zeitgeist::ParameterList::begin(), oxygen::PredicateList::begin(), zeitgeist::ParameterList::end(), oxygen::PredicateList::end(), oxygen::Predicate::name, oxygen::Predicate::parameter, and paramList.

Referenced by GetMonitorHeaderInfo(), and GetMonitorInfo().

Here is the call graph for this function:

bool SexpMonitor::ConstructInternal  )  [protected, virtual]
 

called after the object has been created and attached to a core to allow for object dependent internal construction

Reimplemented from zeitgeist::Object.

Definition at line 55 of file sexpmonitor.cpp.

string SexpMonitor::GetMonitorHeaderInfo const oxygen::PredicateList pList  )  [virtual]
 

This function is called once for every MonitorSystem each time a new client connects.

It should return any header/setup information that is needed.

Parameters:
items holds a list of additional name value pairs. These predicates are collected from MonitorItem objects registered to the MonitorServer. The monitor should transfer them to the client if possible.

Implements oxygen::MonitorSystem.

Definition at line 250 of file sexpmonitor.cpp.

References AddPredicates(), and ResetSentFlags().

Here is the call graph for this function:

string SexpMonitor::GetMonitorInfo const oxygen::PredicateList pList  )  [virtual]
 

This function will be called periodically to get information about the current state of the world.

Parameters:
items holds a list of additional name value pairs. These predicates are collected from MonitorItem objects registered to the MonitorServer. The monitor should transfer them to the client if possible.

Implements oxygen::MonitorSystem.

Definition at line 213 of file sexpmonitor.cpp.

References AddAgents(), AddBall(), AddFlags(), AddPredicates(), zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), mCommandParser, and mGameState.

Here is the call graph for this function:

void SexpMonitor::OnLink  )  [protected, virtual]
 

sets the reference to the GameStateAspect

Reimplemented from zeitgeist::Leaf.

Definition at line 264 of file sexpmonitor.cpp.

References zeitgeist::Node::AddChildReference(), zeitgeist::Object::GetCore(), SoccerBase::GetGameState(), zeitgeist::Object::GetLog(), mCommandParser, mGameState, and UpdateCached().

Here is the call graph for this function:

void SexpMonitor::OnUnlink  )  [protected, virtual]
 

resets the reference to the GameStateAspect

Reimplemented from zeitgeist::Leaf.

Definition at line 299 of file sexpmonitor.cpp.

References mBallState, mCommandParser, and mGameState.

void SexpMonitor::ParseMonitorMessage const std::string &  data  )  [virtual]
 

If a monitor sends information to the world model, this function is called to process it.

Parameters:
data data sent from monitor to monitorsystem via SPADES.

Implements oxygen::MonitorSystem.

void SexpMonitor::ResetSentFlags  )  [protected]
 

Definition at line 307 of file sexpmonitor.cpp.

References mSentFlags.

Referenced by GetMonitorHeaderInfo().

void SexpMonitor::SendRotationMatrix bool  send  ) 
 

This method can be used to set the flag for sending the rotation matrix of every object to the monitor.

Parameters:
send flag wether to send the matrix or not

Definition at line 313 of file sexpmonitor.cpp.

References mSendRotMatrix.

void SexpMonitor::UpdateCached  )  [protected, virtual]
 

update variables from a script

Reimplemented from zeitgeist::Node.

Definition at line 286 of file sexpmonitor.cpp.

References zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), and mBallState.

Referenced by OnLink().

Here is the call graph for this function:


Member Data Documentation

boost::shared_ptr<BallStateAspect> SexpMonitor::mBallState [protected]
 

Definition at line 117 of file sexpmonitor.h.

Referenced by OnUnlink(), and UpdateCached().

boost::shared_ptr<TrainerCommandParser> SexpMonitor::mCommandParser [protected]
 

Definition at line 115 of file sexpmonitor.h.

Referenced by GetMonitorInfo(), OnLink(), and OnUnlink().

boost::shared_ptr<GameStateAspect> SexpMonitor::mGameState [protected]
 

Definition at line 113 of file sexpmonitor.h.

Referenced by GetMonitorInfo(), OnLink(), and OnUnlink().

bool SexpMonitor::mSendRotMatrix [protected]
 

Definition at line 120 of file sexpmonitor.h.

Referenced by SendRotationMatrix().

bool SexpMonitor::mSentFlags [protected]
 

flag if the monitors received field flags information

Definition at line 124 of file sexpmonitor.h.

Referenced by ResetSentFlags().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:40:25 2006 for rcssserver3d by  doxygen 1.4.4