#include <SchemaRunner.h>

Definition at line 40 of file SchemaRunner.h.
| SchemaRunner::SchemaRunner | ( | OPC * | opc | ) |
Definition at line 30 of file SchemaRunner.cc.
References allowWalkingCancelation, opencog::config(), currentWalkingProcedure, currentWalkingTargetId, opencog::AttentionValue::DEFAULTATOMSTI, defaultAttentionValue, defaultCount, defaultMean, defaultTruthValue, executingSchema, executingSchemaID, executingSchemaImplicationLink, executingSchemaNode, executingSchemaTimestamp, factory(), opencog::Config::get_bool(), opencog::Config::get_double(), opencog::Config::get_long(), petIsMoving, procedureExecutionTimeout, and opencog::Handle::UNDEFINED.
| SchemaRunner::~SchemaRunner | ( | ) | [virtual] |
Definition at line 50 of file SchemaRunner.cc.
References defaultAttentionValue, and defaultTruthValue.
| Handle SchemaRunner::addLink | ( | Type | linkType, | |
| const HandleSeq & | outgoing | |||
| ) |
Definition at line 56 of file SchemaRunner.cc.
References AtomSpaceUtil::addLink(), defaultAttentionValue, defaultTruthValue, opencog::Logger::fine(), opencog::BaseServer::getAtomSpace(), opencog::logger(), opc, opencog::AtomSpace::setAV(), and opencog::AtomSpace::setTV().

| bool SchemaRunner::runSchema | ( | const std::string & | ruleName, | |
| const std::string & | schemaName, | |||
| const std::vector< std::string > & | arguments | |||
| ) |
Returns true if the schema with the given name was really sent to ProcedureInterpreter to be executed.
Definition at line 67 of file SchemaRunner.cc.
References combo::abs_min_arity(), addLink(), AtomSpaceUtil::addNode(), opencog::AtomSpace::addTimeInfo(), allowWalkingCancelation, combo::arity(), Procedure::ProcedureRepository::contains(), currentWalkingProcedure, currentWalkingTargetId, opencog::Logger::debug(), opencog::Logger::error(), executingSchema, executingSchemaID, executingSchemaImplicationLink, executingSchemaNode, executingSchemaRealTime, executingSchemaTimestamp, opencog::Logger::fine(), Procedure::ProcedureRepository::get(), Procedure::GeneralProcedure::getArity(), opencog::BaseServer::getAtomSpace(), Spatial::LocalSpaceMap2D::getEntity(), opencog::AtomSpace::getHandle(), OperationalPetController::Pet::getLatestGotoTarget(), opencog::SpaceServer::getLatestMap(), opencog::SpaceServer::getLatestMapHandle(), PerceptionActionInterface::PAI::getLatestSimWorldTimestamp(), OperationalPetController::Pet::getMode(), Procedure::GeneralProcedure::getName(), OperationalPetController::OPC::getPAI(), OperationalPetController::OPC::getPet(), OperationalPetController::OPC::getProcedureInterpreter(), OperationalPetController::OPC::getProcedureRepository(), AtomSpaceUtil::getRuleImplicationLink(), opencog::AtomSpace::getSpaceServer(), Procedure::GeneralProcedure::getType(), opencog::Logger::info(), Procedure::ProcedureInterpreter::isFinished(), opencog::logger(), OC_ASSERT, opc, petIsMoving, procedureExecutionTimeout, Procedure::ProcedureInterpreter::runProcedure(), OperationalPetController::SCAVENGER_HUNT, SELECTED_RULE_PREDICATE_NAME, Procedure::ProcedureInterpreter::stopProcedure(), opencog::Handle::UNDEFINED, and opencog::Logger::warn().

| void SchemaRunner::updateStatus | ( | void | ) |
Update local variables that shows if the previous selected schema is running or finished
Definition at line 330 of file SchemaRunner.cc.
References executingSchema, executingSchemaID, OperationalPetController::OPC::getProcedureInterpreter(), Procedure::ProcedureInterpreter::isFinished(), opc, and petIsMoving.
| Handle OperationalPetController::SchemaRunner::getExecutingSchemaImplicationLink | ( | ) | [inline] |
Return the rule implication link for the current executing schema. UndefinedHandle is returned if there is no executing schema.
Definition at line 67 of file SchemaRunner.h.
References executingSchemaImplicationLink.

| unsigned long OperationalPetController::SchemaRunner::getExecutingSchemaTimestamp | ( | ) | [inline] |
Return the start timestamp for the current executing schema.
Definition at line 74 of file SchemaRunner.h.
References executingSchemaTimestamp.

| bool OperationalPetController::SchemaRunner::isExecutingSchema | ( | void | ) | [inline] |
Return true if there is an schema being executed or false otherwise.
Definition at line 81 of file SchemaRunner.h.
References isSchemaExecFinished().

| bool OperationalPetController::SchemaRunner::isSchemaExecFinished | ( | ) | [inline] |
Return true if the current executing schema Id has finished its execution, false otherwise.
Definition at line 89 of file SchemaRunner.h.
References executingSchemaID.

| combo::vertex SchemaRunner::getSchemaExecResult | ( | ) |
Return the result for the executing schema Id. If called before the schema has finished its execution an assertion exception will be raised. So always use isSchemaExecFinished() before getting the result.
Definition at line 340 of file SchemaRunner.cc.
References combo::id::action_failure, combo::id::action_success, executingSchemaID, OperationalPetController::OPC::getProcedureInterpreter(), Procedure::ProcedureInterpreter::getResult(), Procedure::ProcedureInterpreter::isFailed(), and opc.

| bool OperationalPetController::SchemaRunner::isSchemaExecFinished | ( | Procedure::RunningProcedureID | schemaId | ) | [inline] |
Definition at line 102 of file SchemaRunner.h.
References OperationalPetController::OPC::getProcedureInterpreter(), and Procedure::ProcedureInterpreter::isFinished().
| Procedure::RunningProcedureID OperationalPetController::SchemaRunner::getExecutingSchemaID | ( | void | ) | const [inline] |
Definition at line 111 of file SchemaRunner.h.
References executingSchemaID.

friend class RuleEngineUtil [friend] |
Definition at line 138 of file SchemaRunner.h.
OPC* OperationalPetController::SchemaRunner::opc [private] |
Definition at line 116 of file SchemaRunner.h.
bool OperationalPetController::SchemaRunner::executingSchema [private] |
Definition at line 119 of file SchemaRunner.h.
Definition at line 120 of file SchemaRunner.h.
time_t OperationalPetController::SchemaRunner::executingSchemaRealTime [private] |
Definition at line 121 of file SchemaRunner.h.
Definition at line 122 of file SchemaRunner.h.
unsigned long OperationalPetController::SchemaRunner::executingSchemaTimestamp [private] |
Definition at line 123 of file SchemaRunner.h.
Definition at line 125 of file SchemaRunner.h.
Definition at line 126 of file SchemaRunner.h.
Definition at line 127 of file SchemaRunner.h.
float OperationalPetController::SchemaRunner::defaultMean [private] |
Definition at line 129 of file SchemaRunner.h.
float OperationalPetController::SchemaRunner::defaultCount [private] |
Definition at line 130 of file SchemaRunner.h.
Definition at line 131 of file SchemaRunner.h.
Definition at line 132 of file SchemaRunner.h.
bool OperationalPetController::SchemaRunner::petIsMoving [private] |
Definition at line 134 of file SchemaRunner.h.
std::string OperationalPetController::SchemaRunner::currentWalkingProcedure [private] |
Definition at line 135 of file SchemaRunner.h.
std::string OperationalPetController::SchemaRunner::currentWalkingTargetId [private] |
Definition at line 136 of file SchemaRunner.h.
1.5.6