|
GAMS
1.2.2
|
The base class that algorithms in GAMS use. More...
#include <BaseAlgorithm.h>
Public Member Functions | |
| BaseAlgorithm (madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0) | |
| Constructor. More... | |
| virtual | ~BaseAlgorithm () |
| Destructor. More... | |
| virtual int | analyze (void)=0 |
| Analyzes environment, platform, or other information. More... | |
| virtual int | execute (void)=0 |
| Plans the next execution of the algorithm. More... | |
| variables::Agents * | get_agents (void) |
| Gets the list of agents. More... | |
| variables::AlgorithmStatus * | get_algorithm_status (void) |
| Gets algorithm status variables. More... | |
| madara::knowledge::KnowledgeBase * | get_knowledge_base (void) |
| Gets the knowledge base. More... | |
| platforms::BasePlatform * | get_platform (void) |
| Gets the platform. More... | |
| variables::Self * | get_self (void) |
| Gets self-defined variables. More... | |
| variables::Sensors * | get_sensors (void) |
| Gets the available sensor information. More... | |
| void | operator= (const BaseAlgorithm &rhs) |
| Assignment operator. More... | |
| virtual int | plan (void)=0 |
| Plans the next execution of the algorithm. More... | |
| virtual void | set_agents (variables::Agents *agents) |
| Sets the list of agents in the swarm. More... | |
| virtual void | set_platform (platforms::BasePlatform *platform) |
| Sets the platform. More... | |
| virtual void | set_self (variables::Self *self) |
| Sets the map of sensor names to sensor information. More... | |
| virtual void | set_sensors (variables::Sensors *sensors) |
| Sets the map of sensor names to sensor information. More... | |
Protected Attributes | |
| variables::Agents * | agents_ |
| the list of agents potentially participating in the algorithm More... | |
| unsigned int | executions_ |
| number of executions More... | |
| madara::knowledge::KnowledgeBase * | knowledge_ |
| provides access to the knowledge base More... | |
| platforms::BasePlatform * | platform_ |
| provides access to the platform More... | |
| variables::Self * | self_ |
| the algorithm's concept of self More... | |
| variables::Sensors * | sensors_ |
| provides access to sensor information More... | |
| variables::AlgorithmStatus | status_ |
| provides access to status information for this platform More... | |
Friends | |
| class | controllers::BaseController |
| class | controllers::Multicontroller |
The base class that algorithms in GAMS use.
Definition at line 94 of file BaseAlgorithm.h.
| gams::algorithms::BaseAlgorithm::BaseAlgorithm | ( | madara::knowledge::KnowledgeBase * | knowledge = 0, |
| platforms::BasePlatform * | platform = 0, |
||
| variables::Sensors * | sensors = 0, |
||
| variables::Self * | self = 0, |
||
| variables::Agents * | agents = 0 |
||
| ) |
Constructor.
| knowledge | the knowledge base of variables and values |
| platform | the underlying platform the algorithm will use |
| sensors | map of sensor names to sensor information |
| self | self-referencing variables for this agent |
| agents | list of agents in the swarm |
|
virtual |
Destructor.
|
pure virtual |
Analyzes environment, platform, or other information.
Implemented in gams::algorithms::FormationSync, gams::algorithms::Executor, gams::algorithms::ZoneCoverage, gams::algorithms::FormationCoverage, gams::algorithms::MessageProfiling, gams::algorithms::Move, gams::algorithms::PerimeterPatrol, gams::algorithms::GroupBarrier, gams::algorithms::area_coverage::MinTimeAreaCoverage, gams::algorithms::FormationFlying, gams::algorithms::Spell, gams::algorithms::area_coverage::WaypointsCoverage, gams::algorithms::DebugAlgorithm, gams::algorithms::JavaAlgorithm, gams::algorithms::KarlEvaluator, gams::algorithms::Follow, gams::algorithms::area_coverage::BaseAreaCoverage, gams::algorithms::Wait, gams::algorithms::Hold, gams::algorithms::Home, gams::algorithms::Land, gams::algorithms::NullAlgorithm, gams::algorithms::Takeoff, and gams::algorithms::PerformanceProfiling.
|
pure virtual |
Plans the next execution of the algorithm.
Implemented in gams::algorithms::FormationSync, gams::algorithms::Executor, gams::algorithms::ZoneCoverage, gams::algorithms::FormationCoverage, gams::algorithms::MessageProfiling, gams::algorithms::Move, gams::algorithms::PerimeterPatrol, gams::algorithms::GroupBarrier, gams::algorithms::FormationFlying, gams::algorithms::Spell, gams::algorithms::DebugAlgorithm, gams::algorithms::JavaAlgorithm, gams::algorithms::KarlEvaluator, gams::algorithms::Follow, gams::algorithms::area_coverage::BaseAreaCoverage, gams::algorithms::Wait, gams::algorithms::Hold, gams::algorithms::Home, gams::algorithms::Land, gams::algorithms::NullAlgorithm, gams::algorithms::Takeoff, and gams::algorithms::PerformanceProfiling.
| variables::Agents* gams::algorithms::BaseAlgorithm::get_agents | ( | void | ) |
Gets the list of agents.
| variables::AlgorithmStatus* gams::algorithms::BaseAlgorithm::get_algorithm_status | ( | void | ) |
Gets algorithm status variables.
| madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::get_knowledge_base | ( | void | ) |
Gets the knowledge base.
| platforms::BasePlatform* gams::algorithms::BaseAlgorithm::get_platform | ( | void | ) |
Gets the platform.
| variables::Self* gams::algorithms::BaseAlgorithm::get_self | ( | void | ) |
Gets self-defined variables.
| variables::Sensors* gams::algorithms::BaseAlgorithm::get_sensors | ( | void | ) |
Gets the available sensor information.
| void gams::algorithms::BaseAlgorithm::operator= | ( | const BaseAlgorithm & | rhs | ) |
Assignment operator.
| rhs | values to copy |
|
pure virtual |
Plans the next execution of the algorithm.
Implemented in gams::algorithms::FormationSync, gams::algorithms::Executor, gams::algorithms::ZoneCoverage, gams::algorithms::FormationCoverage, gams::algorithms::MessageProfiling, gams::algorithms::Move, gams::algorithms::PerimeterPatrol, gams::algorithms::GroupBarrier, gams::algorithms::FormationFlying, gams::algorithms::Spell, gams::algorithms::DebugAlgorithm, gams::algorithms::JavaAlgorithm, gams::algorithms::KarlEvaluator, gams::algorithms::Follow, gams::algorithms::area_coverage::BaseAreaCoverage, gams::algorithms::Wait, gams::algorithms::Hold, gams::algorithms::Home, gams::algorithms::Land, gams::algorithms::NullAlgorithm, gams::algorithms::Takeoff, and gams::algorithms::PerformanceProfiling.
|
virtual |
Sets the list of agents in the swarm.
| agents | list of agents |
|
virtual |
Sets the platform.
| platform | the underlying platform the algorithm will use |
|
virtual |
Sets the map of sensor names to sensor information.
| self | pointer to self-referencing variables container |
|
virtual |
Sets the map of sensor names to sensor information.
| sensors | map of sensor names to sensor information |
|
friend |
Definition at line 98 of file BaseAlgorithm.h.
|
friend |
Definition at line 99 of file BaseAlgorithm.h.
|
protected |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
|
protected |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protected |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protected |
the algorithm's concept of self
Definition at line 213 of file BaseAlgorithm.h.
|
protected |
provides access to sensor information
Definition at line 216 of file BaseAlgorithm.h.
|
protected |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.