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.
◆ KarlEvaluator()
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 |
◆ ~KarlEvaluator()
gams::algorithms::KarlEvaluator::~KarlEvaluator |
( |
| ) |
|
◆ analyze()
virtual int gams::algorithms::KarlEvaluator::analyze |
( |
void |
| ) |
|
|
virtual |
◆ execute()
virtual int gams::algorithms::KarlEvaluator::execute |
( |
void |
| ) |
|
|
virtual |
◆ get_agents()
◆ get_algorithm_status()
Gets algorithm status variables.
◆ get_knowledge_base()
madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::get_knowledge_base |
( |
void |
| ) |
|
|
inherited |
◆ get_platform()
◆ get_self()
Gets self-defined variables.
◆ get_sensors()
Gets the available sensor information.
◆ operator=()
void gams::algorithms::KarlEvaluator::operator= |
( |
KarlEvaluator & |
rhs | ) |
|
Assignment operator.
- Parameters
-
◆ plan()
virtual int gams::algorithms::KarlEvaluator::plan |
( |
void |
| ) |
|
|
virtual |
◆ set_agents()
virtual void gams::algorithms::BaseAlgorithm::set_agents |
( |
variables::Agents * |
agents | ) |
|
|
virtualinherited |
Sets the list of agents in the swarm.
- Parameters
-
◆ set_platform()
Sets the platform.
- Parameters
-
platform | the underlying platform the algorithm will use |
◆ set_self()
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 |
◆ set_sensors()
Sets the map of sensor names to sensor information.
- Parameters
-
sensors | map of sensor names to sensor information |
◆ agents_
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
◆ compiled_logic_
madara::knowledge::CompiledExpression gams::algorithms::KarlEvaluator::compiled_logic_ |
|
protected |
◆ enforcer_
madara::utility::EpochEnforcer<std::chrono::steady_clock> gams::algorithms::KarlEvaluator::enforcer_ |
|
protected |
◆ executions_
unsigned int gams::algorithms::BaseAlgorithm::executions_ |
|
protectedinherited |
◆ is_wait_
bool gams::algorithms::KarlEvaluator::is_wait_ |
|
protected |
indicates if the logic should be evaluated as a wait statement
Definition at line 140 of file KarlEvaluator.h.
◆ knowledge_
madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::knowledge_ |
|
protectedinherited |
◆ logic_
std::string gams::algorithms::KarlEvaluator::logic_ |
|
protected |
◆ platform_
◆ self_
◆ sensors_
◆ settings_
madara::knowledge::EvalSettings gams::algorithms::KarlEvaluator::settings_ |
|
protected |
◆ status_
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.
◆ wait_time_
double gams::algorithms::KarlEvaluator::wait_time_ |
|
protected |
indicates the time to wait. -1 means wait forever.
Definition at line 143 of file KarlEvaluator.h.
The documentation for this class was generated from the following file: