GTXabsl2EngineExecutor Class Reference

#include <GTXabsl2EngineExecutor.h>

Inheritance diagram for GTXabsl2EngineExecutor:

Xabsl2BehaviorControl Xabsl2HeadControl GT2004BehaviorControl GT2004HeadControl List of all members.

Debug interface to the Xabsl2 Dialog

enum  Xabsl2DebugMode { executeRootOption, executeOption, executeBasicBehavior }
void sendDebugMessage ()
enum GTXabsl2EngineExecutor::Xabsl2DebugMode debugMode
Xabsl2Array< Xabsl2DecimalInputSymbol * > watchedDecimalInputSymbols
Xabsl2Array< Xabsl2BooleanInputSymbol * > watchedBooleanInputSymbols
Xabsl2Array< Xabsl2EnumeratedInputSymbol * > watchedEnumeratedInputSymbols
Xabsl2Array< Xabsl2EnumeratedOutputSymbol * > watchedEnumeratedOutputSymbols
Xabsl2Array< Xabsl2EnumeratedOutputSymbol * > setEnumeratedOutputSymbols
Xabsl2Array< int > setEnumeratedOutputSymbolValues

Public Member Functions

 GTXabsl2EngineExecutor (SolutionRequest::xabsl2EngineID id, SolutionRequest::ModuleID module, const unsigned long &frameNumber)
 ~GTXabsl2EngineExecutor ()
void init (Xabsl2InputSource &input)
void executeEngine ()
virtual void registerSymbolsAndBasicBehaviors ()=0
void setSelectedAgent (const char *name)
virtual bool handleMessage (InMessage &message)

Protected Member Functions

virtual void executeIfEngineCouldNotBeCreated ()=0
virtual void printGeneratedMainActionToString (char *buf)=0

Protected Attributes

Xabsl2EnginepEngine
GTXabsl2ErrorHandler errorHandler
GTXabsl2Profiler profiler

Private Attributes

SolutionRequest::xabsl2EngineID id
SolutionRequest::ModuleID module

Detailed Description

Executes an Xabsl2Engine in the GT - architecture

Author:
Martin Lötzsch

Definition at line 122 of file GTXabsl2EngineExecutor.h.


Member Enumeration Documentation

enum GTXabsl2EngineExecutor::Xabsl2DebugMode [private]

The requested debug mode

Enumerator:
executeRootOption 
executeOption 
executeBasicBehavior 

Definition at line 196 of file GTXabsl2EngineExecutor.h.


Constructor & Destructor Documentation

GTXabsl2EngineExecutor::GTXabsl2EngineExecutor ( SolutionRequest::xabsl2EngineID  id,
SolutionRequest::ModuleID  module,
const unsigned long &  frameNumber 
)

Constructor.

Parameters:
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 (  ) 

destructor

Definition at line 22 of file GTXabsl2EngineExecutor.cpp.

References pEngine.


Member Function Documentation

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.

Parameters:
message An interface to read the message from the queue
Returns:
if the messag was read

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

Parameters:
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

Parameters:
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.

Parameters:
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().


Member Data Documentation

enum GTXabsl2EngineExecutor::Xabsl2DebugMode GTXabsl2EngineExecutor::debugMode [private]

The requested debug mode

Referenced by executeEngine(), handleMessage(), init(), and sendDebugMessage().

GTXabsl2ErrorHandler GTXabsl2EngineExecutor::errorHandler [protected]

Is invoked when errors occur

Definition at line 170 of file GTXabsl2EngineExecutor.h.

Referenced by executeEngine(), and init().

SolutionRequest::xabsl2EngineID GTXabsl2EngineExecutor::id [private]

The id of the Xabsl2Engine derivate.

Definition at line 187 of file GTXabsl2EngineExecutor.h.

SolutionRequest::ModuleID GTXabsl2EngineExecutor::module [private]

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().

Xabsl2Array<int> GTXabsl2EngineExecutor::setEnumeratedOutputSymbolValues [private]

The values for the set output symbols

Definition at line 217 of file GTXabsl2EngineExecutor.h.

Referenced by executeEngine(), handleMessage(), and init().

Xabsl2Array<Xabsl2BooleanInputSymbol*> GTXabsl2EngineExecutor::watchedBooleanInputSymbols [private]

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().

Xabsl2Array<Xabsl2DecimalInputSymbol*> GTXabsl2EngineExecutor::watchedDecimalInputSymbols [private]

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:36:38 2006 for DT2005.panorama by  doxygen 1.4.7