#include <gamecontrolserver.h>
Inheritance diagram for oxygen::GameControlServer:
Public Member Functions | |
GameControlServer () | |
~GameControlServer () | |
bool | InitParser (const std::string &parserName) |
creates a parser instance and registers it to the GameControlServer | |
void | InitEffector (const std::string &effectorName) |
sets effectorName as the effector class that is initially created with every new AgentAspect instance. | |
bool | InitControlAspect (const std::string &aspectName) |
creates an instance of aspectName and registers it as a ControlAspect to the GameControlServer. | |
boost::shared_ptr< BaseParser > | GetParser () |
returns the parser currently registered to the GameControlServer | |
boost::shared_ptr< ActionObject::TList > | Parse (int id, const std::string &str) const |
parses a command string using the registerd parser and uses the registered effectors of the agent identified by param to construct an ActionObject. | |
bool | AgentConnect (int id) |
notifies the GameControlServer that an agent has connected to the simulation. | |
bool | AgentDisappear (int id) |
notifies the GameControlServer that an agent has disappeared from the simulation. | |
float | GetSenseInterval (int id) |
returns the time between to queries of the agents perceptors in seconds | |
float | GetSenseLatency (int id) |
GetSenseLatency returns latency it takes to query the sensors of an agent in seconds. | |
float | GetActionLatency (int id) |
GetActionLatency returns the latency it takes to realize an agent action in seconds. | |
boost::shared_ptr< AgentAspect > | GetAgentAspect (int id) |
returns the AgentAspect for the given | |
void | Update (float deltaTime) |
This method is used to notify the GameControlServer that the game has advanced deltaTime seconds. | |
bool | IsFinished () const |
This method is used to indicate that the simulation is finished. | |
void | Quit () |
This method is used to set the simulation into the 'finished' state. | |
Protected Types | |
typedef std::map< int, boost::shared_ptr< AgentAspect > > | TAgentMap |
Protected Member Functions | |
boost::shared_ptr< Scene > | GetActiveScene () |
helper method that queries the SceneServer for the currently active Scene | |
Protected Attributes | |
TAgentMap | mAgentMap |
a map from agent IDs to agent instances | |
boost::shared_ptr< BaseParser > | mParser |
the parser instance used | |
std::string | mCreateEffector |
the name of the initial effector class of each new agent has to construct all remaining parts | |
bool | mExit |
flag if the simulation is over |
Definition at line 36 of file gamecontrolserver.h.
|
Definition at line 129 of file gamecontrolserver.h. |
|
Definition at line 38 of file gamecontrolserver.cpp. References mExit. |
|
Definition at line 43 of file gamecontrolserver.cpp. |
|
notifies the GameControlServer that an agent has connected to the simulation.
Definition at line 119 of file gamecontrolserver.cpp. References GetActiveScene(), zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), mAgentMap, and mCreateEffector. Here is the call graph for this function: ![]() |
|
notifies the GameControlServer that an agent has disappeared from the simulation.
Definition at line 166 of file gamecontrolserver.cpp. References GetActiveScene(), zeitgeist::Object::GetLog(), and mAgentMap. Here is the call graph for this function: ![]() |
|
GetActionLatency returns the latency it takes to realize an agent action in seconds.
Definition at line 220 of file gamecontrolserver.cpp. |
|
helper method that queries the SceneServer for the currently active Scene
Definition at line 94 of file gamecontrolserver.cpp. References zeitgeist::Object::GetCore(), and zeitgeist::Object::GetLog(). Referenced by AgentConnect(), and AgentDisappear(). Here is the call graph for this function: ![]() |
|
returns the AgentAspect for the given
Definition at line 291 of file gamecontrolserver.cpp. References mAgentMap. |
|
returns the parser currently registered to the GameControlServer
Definition at line 88 of file gamecontrolserver.cpp. References mParser. |
|
returns the time between to queries of the agents perceptors in seconds
Definition at line 204 of file gamecontrolserver.cpp. |
|
GetSenseLatency returns latency it takes to query the sensors of an agent in seconds.
Definition at line 212 of file gamecontrolserver.cpp. |
|
creates an instance of aspectName and registers it as a ControlAspect to the GameControlServer.
|
|
sets effectorName as the effector class that is initially created with every new AgentAspect instance.
Definition at line 63 of file gamecontrolserver.cpp. References mCreateEffector. |
|
creates a parser instance and registers it to the GameControlServer
Definition at line 48 of file gamecontrolserver.cpp. References zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), and mParser. Here is the call graph for this function: ![]() |
|
This method is used to indicate that the simulation is finished. The GameControlServer knows that the simulatio is finished if one of the GameControlAspects below indicate that the simulation is finished. The finished state is set during GameControlServer::Update().
Definition at line 330 of file gamecontrolserver.cpp. References mExit. |
|
parses a command string using the registerd parser and uses the registered effectors of the agent identified by param to construct an ActionObject. This method must be const as it is called from SpadesServer::ParseAct, which is const to prevent it from modifying the world model. |
|
This method is used to set the simulation into the 'finished' state.
Definition at line 324 of file gamecontrolserver.cpp. References mExit. |
|
This method is used to notify the GameControlServer that the game has advanced deltaTime seconds. The GameControlServer will in turn update all registered GameControlAspects below it. Definition at line 303 of file gamecontrolserver.cpp. |
|
a map from agent IDs to agent instances
Definition at line 132 of file gamecontrolserver.h. Referenced by AgentConnect(), AgentDisappear(), and GetAgentAspect(). |
|
the name of the initial effector class of each new agent has to construct all remaining parts
Definition at line 139 of file gamecontrolserver.h. Referenced by AgentConnect(), and InitEffector(). |
|
flag if the simulation is over
Definition at line 142 of file gamecontrolserver.h. Referenced by GameControlServer(), IsFinished(), and Quit(). |
|
the parser instance used
Definition at line 135 of file gamecontrolserver.h. Referenced by GetParser(), and InitParser(). |