class documentation

class FSMContext(object):

Constructor: FSMContext(state)

View In Hierarchy

The user can derive FSM contexts from this class and interface to them with the methods of this class.

The finite state machine needs to be initialized to the starting state of the FSM. This must be done manually in the constructor of the derived class.

Method __init__ Undocumented
Method clearState Clears the current state.
Method emptyStateStack Remove all states from the state stack.
Method getDebugFlag Returns the debug flag's current setting.
Method getDebugStream Returns the stream to which debug output is written.
Method getPreviousState Returns the state which a transition left. May be None
Method getState Returns the current state.
Method getStateStackDepth Returns the state stack's depth.
Method getTransition Returns the current transition's name. Used only for debugging purposes.
Method isInTransition Is this state machine already inside a transition? True if state is undefined.
Method isStateStackEmpty Returns True if the state stack is empty and False otherwise.
Method popState Make the state on top of the state stack the current state.
Method pushState Push the current state on top of the state stack and make the specified state the current state.
Method setDebugFlag Sets the debug flag. A true value means debugging is on and false means off.
Method setDebugStream Sets the debug output stream.
Method setState Sets the current state to the specified state.
Instance Variable _debug_flag Undocumented
Instance Variable _debug_stream Undocumented
Instance Variable _previous_state Undocumented
Instance Variable _state Undocumented
Instance Variable _state_stack Undocumented
Instance Variable _transition Undocumented
def __init__(self, state):

Undocumented

def clearState(self):

Clears the current state.

def emptyStateStack(self):

Remove all states from the state stack.

def getDebugFlag(self):

Returns the debug flag's current setting.

def getDebugStream(self):

Returns the stream to which debug output is written.

def getPreviousState(self):

Returns the state which a transition left. May be None

def getState(self):

Returns the current state.

def getStateStackDepth(self):

Returns the state stack's depth.

def getTransition(self):

Returns the current transition's name. Used only for debugging purposes.

def isInTransition(self):

Is this state machine already inside a transition? True if state is undefined.

def isStateStackEmpty(self):

Returns True if the state stack is empty and False otherwise.

def popState(self):

Make the state on top of the state stack the current state.

def pushState(self, state):

Push the current state on top of the state stack and make the specified state the current state.

def setDebugFlag(self, flag):

Sets the debug flag. A true value means debugging is on and false means off.

def setDebugStream(self, stream):

Sets the debug output stream.

def setState(self, state):

Sets the current state to the specified state.

_debug_flag =

Undocumented

_debug_stream =

Undocumented

_previous_state =

Undocumented

_state =

Undocumented

_state_stack: list =

Undocumented

_transition =

Undocumented