#include <GTXabsl2EngineExecutor.h>
Inheritance diagram for GTXabsl2EngineExecutor:
Definition at line 122 of file GTXabsl2EngineExecutor.h.
enum GTXabsl2EngineExecutor::Xabsl2DebugMode [private] |
The requested debug mode
Definition at line 196 of file GTXabsl2EngineExecutor.h.
GTXabsl2EngineExecutor::GTXabsl2EngineExecutor | ( | SolutionRequest::xabsl2EngineID | id, | |
SolutionRequest::ModuleID | module, | |||
const unsigned long & | frameNumber | |||
) |
Constructor.
id | The id of the Xabsl2Engine derivate. | |
module | The id of the module (not the solution) that embeds the engine | |
frameNumber | A reference to a variable containing the current frame number |
Definition at line 14 of file GTXabsl2EngineExecutor.cpp.
GTXabsl2EngineExecutor::~GTXabsl2EngineExecutor | ( | ) |
void GTXabsl2EngineExecutor::executeEngine | ( | ) |
Executes the engine
Definition at line 61 of file GTXabsl2EngineExecutor.cpp.
References ASSERT, SolutionRequest::behaviorControl, GTXabsl2Profiler::collectProfiles, debugMode, GTXabsl2Profiler::dontWriteProfiles, GTXabsl2Profiler::doProfiling(), errorHandler, Xabsl2ErrorHandler::errorsOccurred, Xabsl2Engine::execute(), executeBasicBehavior, executeIfEngineCouldNotBeCreated(), executeOption, executeRootOption, Xabsl2Engine::executeSelectedBasicBehavior(), getDebugKeyTable(), Xabsl2Array< T >::getSize(), SolutionRequest::headControl, module, pEngine, profiler, GTXabsl2Profiler::profilerCollectMode, GTXabsl2Profiler::profilerWriteMode, GTXabsl2Profiler::recordCollectedLogs(), GTXabsl2Profiler::recordCompleteLog(), sendDebugMessage(), DebugKeyTable::sendXabsl2DebugMessagesForBehaviorControl, DebugKeyTable::sendXabsl2DebugMessagesForHeadControl, setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, Xabsl2Symbols::setOutputSymbols(), Xabsl2Engine::setRootOption(), GTXabsl2Profiler::size(), GTXabsl2Profiler::writeCompleteProfiles, and GTXabsl2Profiler::writeProfiles.
Referenced by GT2004HeadControl::execute(), and GT2004BehaviorControl::execute().
virtual void GTXabsl2EngineExecutor::executeIfEngineCouldNotBeCreated | ( | ) | [protected, pure virtual] |
Is called if the engine could not be created
Implemented in Xabsl2BehaviorControl, and Xabsl2HeadControl.
Referenced by executeEngine().
bool GTXabsl2EngineExecutor::handleMessage | ( | InMessage & | message | ) | [virtual] |
Is called for every incoming debug message.
message | An interface to read the message from the queue |
Reimplemented in GT2004BehaviorControl, Xabsl2BehaviorControl, GT2004HeadControl, and Xabsl2HeadControl.
Definition at line 251 of file GTXabsl2EngineExecutor.cpp.
References Xabsl2Array< T >::append(), InMessage::bin, Xabsl2Array< T >::clear(), InMessage::config, debugMode, Xabsl2EnumeratedOutputSymbol::enumElements, executeBasicBehavior, executeOption, executeRootOption, Xabsl2Array< T >::exists(), Xabsl2Symbols::existsBooleanInputSymbol(), Xabsl2Symbols::existsDecimalInputSymbol(), Xabsl2Symbols::existsEnumeratedInputSymbol(), Xabsl2Symbols::existsEnumeratedOutputSymbol(), Xabsl2Symbols::getBooleanInputSymbol(), Xabsl2Symbols::getDecimalInputSymbol(), Xabsl2Array< T >::getElement(), Xabsl2Symbols::getEnumeratedInputSymbol(), Xabsl2Symbols::getEnumeratedOutputSymbol(), InMessage::getMessageID(), idText, idXabsl2DebugRequest, idXabsl2IntermediateCode, init(), OUTPUT, pEngine, Xabsl2Engine::setBasicBehaviorParameter(), setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, Xabsl2Engine::setOptionParameter(), Xabsl2Engine::setRootOption(), Xabsl2Engine::setSelectedBasicBehavior(), text, Xabsl2EnumElement::v, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols.
Referenced by Xabsl2HeadControl::handleMessage(), and Xabsl2BehaviorControl::handleMessage().
void GTXabsl2EngineExecutor::init | ( | Xabsl2InputSource & | input | ) |
Creates a new engine
input | An input source to read to intermediate code from |
Definition at line 27 of file GTXabsl2EngineExecutor.cpp.
References Xabsl2Array< T >::clear(), Xabsl2Engine::createOptionGraph(), debugMode, errorHandler, Xabsl2ErrorHandler::errorsOccurred, executeRootOption, SystemCall::getCurrentSystemTime(), SystemCall::getFreeMem(), GTXabsl2Profiler::init(), Xabsl2ErrorHandler::message(), pEngine, profiler, GTXabsl2Profiler::registerSymbols(), registerSymbolsAndBasicBehaviors(), setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols.
Referenced by GT2004BehaviorControl::GT2004BehaviorControl(), GT2004HeadControl::GT2004HeadControl(), and handleMessage().
virtual void GTXabsl2EngineExecutor::printGeneratedMainActionToString | ( | char * | buf | ) | [protected, pure virtual] |
Prints the main action that was generated by the execution of the engine to a string
buf | the string where to print the action |
Implemented in Xabsl2BehaviorControl, and Xabsl2HeadControl.
Referenced by sendDebugMessage().
virtual void GTXabsl2EngineExecutor::registerSymbolsAndBasicBehaviors | ( | ) | [pure virtual] |
Registers symbols and basic behaviors at the engine
Implemented in GT2004BehaviorControl, and GT2004HeadControl.
Referenced by init().
void GTXabsl2EngineExecutor::sendDebugMessage | ( | ) | [private] |
Sends a debug message to the Xabsl2 dialog depending on the last request
Definition at line 124 of file GTXabsl2EngineExecutor.cpp.
References Xabsl2Option::activeState, OutMessage::bin, debugMode, executeOption, executeRootOption, OutMessage::finishMessage(), getDebugOut(), Xabsl2Array< T >::getName(), Xabsl2Engine::getRootOption(), Xabsl2Engine::getSelectedAgentName(), Xabsl2Engine::getSelectedBasicBehavior(), Xabsl2Array< T >::getSize(), idXabsl2DebugMessage, Xabsl2NamedItem::n, Xabsl2BasicBehavior::parameters, Xabsl2Option::parameters, pEngine, printGeneratedMainActionToString(), Xabsl2State::subsequentOption, Xabsl2Option::timeOfOptionExecution, Xabsl2State::timeOfStateExecution, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols.
Referenced by executeEngine().
void GTXabsl2EngineExecutor::setSelectedAgent | ( | const char * | name | ) |
Sets the selected Agent. If the last selected agent was different from the new one, the root option is changed depending on the new agent.
name | The name of the agent |
Definition at line 407 of file GTXabsl2EngineExecutor.cpp.
References pEngine, and Xabsl2Engine::setSelectedAgent().
Referenced by Xabsl2HeadControlAgentInterface::execute(), and Xabsl2BehaviorControlAgentInterface::execute().
The requested debug mode
Referenced by executeEngine(), handleMessage(), init(), and sendDebugMessage().
Is invoked when errors occur
Definition at line 170 of file GTXabsl2EngineExecutor.h.
Referenced by executeEngine(), and init().
The id of the Xabsl2Engine derivate.
Definition at line 187 of file GTXabsl2EngineExecutor.h.
The id of the module (not the solution) that embeds the engine
Definition at line 190 of file GTXabsl2EngineExecutor.h.
Referenced by executeEngine().
Xabsl2Engine* GTXabsl2EngineExecutor::pEngine [protected] |
An engine that executes the XML formalized behaviors
Definition at line 167 of file GTXabsl2EngineExecutor.h.
Referenced by executeEngine(), GT2004BehaviorControl::GT2004BehaviorControl(), handleMessage(), init(), GT2004HeadControl::registerSymbolsAndBasicBehaviors(), GT2004BehaviorControl::registerSymbolsAndBasicBehaviors(), sendDebugMessage(), setSelectedAgent(), and ~GTXabsl2EngineExecutor().
GTXabsl2Profiler GTXabsl2EngineExecutor::profiler [protected] |
The profiler
Definition at line 182 of file GTXabsl2EngineExecutor.h.
Referenced by GT2004HeadControl::execute(), executeEngine(), init(), and GT2004BehaviorControl::postExecute().
Xabsl2Array<Xabsl2EnumeratedOutputSymbol*> GTXabsl2EngineExecutor::setEnumeratedOutputSymbols [private] |
The output symbols that are set from the Xabsl2 Dialog
Definition at line 214 of file GTXabsl2EngineExecutor.h.
Referenced by executeEngine(), handleMessage(), and init().
The values for the set output symbols
Definition at line 217 of file GTXabsl2EngineExecutor.h.
Referenced by executeEngine(), handleMessage(), and init().
The boolean input symbols that are watched by the Xabsl2 Dialog
Definition at line 205 of file GTXabsl2EngineExecutor.h.
Referenced by handleMessage(), init(), and sendDebugMessage().
The decimal input symbols that are watched by the Xabsl2 Dialog
Definition at line 202 of file GTXabsl2EngineExecutor.h.
Referenced by handleMessage(), init(), and sendDebugMessage().
Xabsl2Array<Xabsl2EnumeratedInputSymbol*> GTXabsl2EngineExecutor::watchedEnumeratedInputSymbols [private] |
The enumerated input symbols that are watched by the Xabsl2 Dialog
Definition at line 208 of file GTXabsl2EngineExecutor.h.
Referenced by handleMessage(), init(), and sendDebugMessage().
Xabsl2Array<Xabsl2EnumeratedOutputSymbol*> GTXabsl2EngineExecutor::watchedEnumeratedOutputSymbols [private] |
The enumerated output symbols that are watched by the Xabsl2 Dialog
Definition at line 211 of file GTXabsl2EngineExecutor.h.
Referenced by handleMessage(), init(), and sendDebugMessage().