ApparatusFramework::DynamicStateMachine Class Reference
[Pattern Services]

#include <PatternServices/current/include/DynamicStateMachine.h>

List of all members.

Public Member Functions

 DynamicStateMachine ()
virtual ~DynamicStateMachine ()
void reserveStateMemory (unsigned long StateSize)
void initialize ()
void handleStateMsg (Msg *pMsg)
const DynamicStategetCurrentState ()
unsigned char * getStateMemory ()

Protected Attributes

unsigned char * m_pAllStateMemory

Detailed Description

The class DynamicStateMachine implements the state machine to be used with dynamic states. It provides the state memory and is the interface to access the current state.

Definition at line 66 of file DynamicStateMachine.h.


Constructor & Destructor Documentation

ApparatusFramework::DynamicStateMachine::DynamicStateMachine (  ) 

constructors, destructors DynamicStateMachine Constructs a new state machine object.

virtual ApparatusFramework::DynamicStateMachine::~DynamicStateMachine (  )  [virtual]

~DynamicStateMachine destroys a state machine object and releases all the associated ressources.


Member Function Documentation

const DynamicState* ApparatusFramework::DynamicStateMachine::getCurrentState (  ) 

getCurrentState Returns the current state.

Returns:
The pointer to the current (active) state.
unsigned char* ApparatusFramework::DynamicStateMachine::getStateMemory (  )  [inline]

getStateMemory Get a reference to the state memory

Returns:
The pointer to the state memory

Definition at line 104 of file DynamicStateMachine.h.

void ApparatusFramework::DynamicStateMachine::handleStateMsg ( Msg pMsg  ) 

handleStateMsg This method has to be called from the inherited state machine, if an state event occured. The event is a message and is handled by the current state.

Parameters:
pMsg message to be handled
void ApparatusFramework::DynamicStateMachine::initialize (  ) 

initialize creates the state memory

void ApparatusFramework::DynamicStateMachine::reserveStateMemory ( unsigned long  StateSize  ) 

reserveStateMemory

Parameters:
StateSize the size of the state .

Member Data Documentation

fields m_pAllStateMemory static simulated heap memory for the states

Definition at line 111 of file DynamicStateMachine.h.

© 2004-2010 bbv Software Services AG / Apparatus Services