|
GAMS
1.2.2
|
A facade for Java algorithms. More...
#include <JavaAlgorithm.h>
Public Member Functions | |
| JavaAlgorithm (jobject obj, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0) | |
| Constructor. More... | |
| ~JavaAlgorithm () | |
| Destructor. More... | |
| virtual int | analyze (void) |
| Analyzes environment, platform, or other information. More... | |
| virtual int | execute (void) |
| 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... | |
| virtual std::string | get_id () const |
| Gets the unique identifier of the algorithm. More... | |
| jobject | get_java_instance (void) |
| Returns the Java instance that derives from BaseAlgorithm. More... | |
| madara::knowledge::KnowledgeBase * | get_knowledge_base (void) |
| Gets the knowledge base. More... | |
| virtual std::string | get_name () const |
| Gets the name of the algorithm. 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 JavaAlgorithm &rhs) |
| Assignment operator. More... | |
| virtual int | plan (void) |
| 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... | |
| jclass | class_ |
| the class of the Java object obj_ More... | |
| unsigned int | executions_ |
| number of executions More... | |
| madara::knowledge::KnowledgeBase * | knowledge_ |
| provides access to the knowledge base More... | |
| jobject | obj_ |
| the Java object with callable methods 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... | |
A facade for Java algorithms.
Definition at line 77 of file JavaAlgorithm.h.
| gams::algorithms::JavaAlgorithm::JavaAlgorithm | ( | jobject | obj, |
| madara::knowledge::KnowledgeBase * | knowledge = 0, |
||
| platforms::BasePlatform * | platform = 0, |
||
| variables::Sensors * | sensors = 0, |
||
| variables::Self * | self = 0, |
||
| variables::Agents * | agents = 0 |
||
| ) |
Constructor.
| obj | the Java object to call methods on |
| knowledge | knowledge base |
| platform | the platform to use |
| sensors | map of sensor names to sensor information |
| self | agent variables that describe self state |
| agents | list of participating agents |
| gams::algorithms::JavaAlgorithm::~JavaAlgorithm | ( | ) |
Destructor.
|
virtual |
Analyzes environment, platform, or other information.
Implements gams::algorithms::BaseAlgorithm.
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
virtual |
Gets the unique identifier of the algorithm.
This should be an alphanumeric identifier that can be used as part of a MADARA variable (e.g. rac, follow_leader, etc.)
| jobject gams::algorithms::JavaAlgorithm::get_java_instance | ( | void | ) |
Returns the Java instance that derives from BaseAlgorithm.
|
inherited |
Gets the knowledge base.
|
virtual |
Gets the name of the algorithm.
|
inherited |
Gets the platform.
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
| void gams::algorithms::JavaAlgorithm::operator= | ( | const JavaAlgorithm & | rhs | ) |
Assignment operator.
| rhs | values to copy |
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
virtualinherited |
Sets the list of agents in the swarm.
| agents | list of agents |
|
virtualinherited |
Sets the platform.
| platform | the underlying platform the algorithm will use |
|
virtualinherited |
Sets the map of sensor names to sensor information.
| self | pointer to self-referencing variables container |
|
virtualinherited |
Sets the map of sensor names to sensor information.
| sensors | map of sensor names to sensor information |
|
protectedinherited |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
|
protected |
the class of the Java object obj_
Definition at line 149 of file JavaAlgorithm.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
the Java object with callable methods
Definition at line 146 of file JavaAlgorithm.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protectedinherited |
the algorithm's concept of self
Definition at line 213 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to sensor information
Definition at line 216 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.