#include <gamestateperceptor.h>
Inheritance diagram for GameStatePerceptor:
Public Member Functions | |
GameStatePerceptor () | |
virtual | ~GameStatePerceptor () |
virtual bool | Percept (boost::shared_ptr< oxygen::PredicateList > predList) |
Protected Member Functions | |
virtual void | OnLink () |
sets up the reference to the GameStateAspect | |
virtual void | OnUnlink () |
resets the reference to the GameStateAspect | |
void | InsertInitialPercept (oxygen::Predicate &predicate) |
inserts predicate parameters the agent receives once after a successful init command into the predicate. | |
void | InsertSoccerParam (oxygen::Predicate &predicate, const std::string &name) |
inserts a soccer variable and its current value into the predicate | |
Protected Attributes | |
boost::shared_ptr< GameStateAspect > | mGameState |
a reference to the game state | |
boost::shared_ptr< AgentState > | mAgentState |
a reference to the agentstate | |
bool | mFirstPercept |
true until Percept() is called the first time after the agent is assigned to a team with a successful init command |
Definition at line 36 of file gamestateperceptor.h.
|
Definition at line 33 of file gamestateperceptor.cpp. References mFirstPercept. |
|
Definition at line 38 of file gamestateperceptor.cpp. |
|
inserts predicate parameters the agent receives once after a successful init command into the predicate. These are it's uniform number and team as well as a subset of the soccer variables Definition at line 57 of file gamestateperceptor.cpp. References zeitgeist::ParameterList::AddList(), zeitgeist::ParameterList::AddValue(), InsertSoccerParam(), mAgentState, oxygen::Predicate::parameter, TI_LEFT, TI_NONE, and TI_RIGHT. Referenced by Percept(). Here is the call graph for this function: ![]() |
|
inserts a soccer variable and its current value into the predicate
Definition at line 43 of file gamestateperceptor.cpp. References zeitgeist::ParameterList::AddList(), zeitgeist::ParameterList::AddValue(), SoccerBase::GetSoccerVar(), and oxygen::Predicate::parameter. Referenced by InsertInitialPercept(). Here is the call graph for this function: ![]() |
|
sets up the reference to the GameStateAspect
Reimplemented from zeitgeist::Leaf. Definition at line 144 of file gamestateperceptor.cpp. References SoccerBase::GetAgentState(), SoccerBase::GetGameState(), mAgentState, and mGameState. Here is the call graph for this function: ![]() |
|
resets the reference to the GameStateAspect
Reimplemented from zeitgeist::Leaf. Definition at line 151 of file gamestateperceptor.cpp. References mAgentState, and mGameState. |
|
Implements oxygen::Perceptor. Definition at line 104 of file gamestateperceptor.cpp. References zeitgeist::ParameterList::AddList(), zeitgeist::ParameterList::AddValue(), zeitgeist::ParameterList::Clear(), InsertInitialPercept(), mAgentState, mFirstPercept, mGameState, oxygen::Predicate::name, oxygen::Predicate::parameter, SoccerBase::PlayMode2Str(), and TI_NONE. Here is the call graph for this function: ![]() |
|
a reference to the agentstate
Definition at line 70 of file gamestateperceptor.h. Referenced by InsertInitialPercept(), OnLink(), OnUnlink(), and Percept(). |
|
true until Percept() is called the first time after the agent is assigned to a team with a successful init command
Definition at line 75 of file gamestateperceptor.h. Referenced by GameStatePerceptor(), and Percept(). |
|
a reference to the game state
Definition at line 67 of file gamestateperceptor.h. Referenced by OnLink(), OnUnlink(), and Percept(). |