An algorithm capable of executing other algorithms.
More...
#include <KarlEvaluator.h>
|
| | KarlEvaluator (const std::string &logic, const std::string &store_result, bool is_wait, double wait_time, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0) |
| | Constructor. More...
|
| |
| | ~KarlEvaluator () |
| | 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...
|
| |
| 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= (KarlEvaluator &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...
|
| |
An algorithm capable of executing other algorithms.
Definition at line 68 of file KarlEvaluator.h.
Constructor.
- Parameters
-
| logic | a KaRL logic to evaluate |
| store_result | location in knowledge base to store result. if empty, do not store the result |
| is_wait | indicates if KaRL should wait for logic to be true |
| wait_time | maximum time to wait for logic to be true. -1 will wait forever. |
| knowledge | the context containing variables and values |
| platform | the underlying platform the algorithm will use |
| sensors | map of sensor names to sensor information |
| self | self-referencing variables |
| agents | variables referencing agents |
| gams::algorithms::KarlEvaluator::~KarlEvaluator |
( |
| ) |
|
| virtual int gams::algorithms::KarlEvaluator::analyze |
( |
void |
| ) |
|
|
virtual |
| virtual int gams::algorithms::KarlEvaluator::execute |
( |
void |
| ) |
|
|
virtual |
Gets algorithm status variables.
| madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::get_knowledge_base |
( |
void |
| ) |
|
|
inherited |
Gets self-defined variables.
Gets the available sensor information.
| void gams::algorithms::KarlEvaluator::operator= |
( |
KarlEvaluator & |
rhs | ) |
|
Assignment operator.
- Parameters
-
| virtual int gams::algorithms::KarlEvaluator::plan |
( |
void |
| ) |
|
|
virtual |
| virtual void gams::algorithms::BaseAlgorithm::set_agents |
( |
variables::Agents * |
agents | ) |
|
|
virtualinherited |
Sets the list of agents in the swarm.
- Parameters
-
Sets the platform.
- Parameters
-
| platform | the underlying platform the algorithm will use |
| virtual void gams::algorithms::BaseAlgorithm::set_self |
( |
variables::Self * |
self | ) |
|
|
virtualinherited |
Sets the map of sensor names to sensor information.
- Parameters
-
| self | pointer to self-referencing variables container |
Sets the map of sensor names to sensor information.
- Parameters
-
| sensors | map of sensor names to sensor information |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
| madara::knowledge::CompiledExpression gams::algorithms::KarlEvaluator::compiled_logic_ |
|
protected |
| madara::utility::EpochEnforcer<std::chrono::steady_clock> gams::algorithms::KarlEvaluator::enforcer_ |
|
protected |
| unsigned int gams::algorithms::BaseAlgorithm::executions_ |
|
protectedinherited |
| bool gams::algorithms::KarlEvaluator::is_wait_ |
|
protected |
indicates if the logic should be evaluated as a wait statement
Definition at line 138 of file KarlEvaluator.h.
| madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::knowledge_ |
|
protectedinherited |
| std::string gams::algorithms::KarlEvaluator::logic_ |
|
protected |
| madara::knowledge::EvalSettings gams::algorithms::KarlEvaluator::settings_ |
|
protected |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.
| double gams::algorithms::KarlEvaluator::wait_time_ |
|
protected |
indicates the time to wait. -1 means wait forever.
Definition at line 141 of file KarlEvaluator.h.
The documentation for this class was generated from the following file: