Public Member Functions | Private Attributes
smclib.statemap.FSMContext Class Reference

List of all members.

Public Member Functions

def __init__
def clearState
def emptyStateStack
def getDebugFlag
def getDebugStream
def getPreviousState
def getState
def getStateStackDepth
def getTransition
def isInTransition
def isStateStackEmpty
def popState
def pushState
def setDebugFlag
def setDebugStream
def setState

Private Attributes

 _debug_flag
 _debug_stream
 _previous_state
 _state
 _state_stack
 _transition

Detailed Description

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.

Definition at line 67 of file statemap.py.


Constructor & Destructor Documentation

def smclib.statemap.FSMContext.__init__ (   self,
  state 
)

Definition at line 76 of file statemap.py.


Member Function Documentation

Clears the current state.

Definition at line 120 of file statemap.py.

Remove all states from the state stack.

Definition at line 170 of file statemap.py.

Returns the debug flag's current setting.

Definition at line 84 of file statemap.py.

Returns the stream to which debug output is written.

Definition at line 93 of file statemap.py.

Returns the state which a transition left.
May be None

Definition at line 126 of file statemap.py.

Returns the current state.

Definition at line 101 of file statemap.py.

Returns the state stack's depth.

Definition at line 144 of file statemap.py.

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

Definition at line 115 of file statemap.py.

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

Definition at line 107 of file statemap.py.

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

Definition at line 140 of file statemap.py.

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

Definition at line 159 of file statemap.py.

def smclib.statemap.FSMContext.pushState (   self,
  state 
)
Push the current state on top of the state stack
and make the specified state the current state.

Definition at line 148 of file statemap.py.

def smclib.statemap.FSMContext.setDebugFlag (   self,
  flag 
)
Sets the debug flag.
A true value means debugging is on and false means off.

Definition at line 88 of file statemap.py.

def smclib.statemap.FSMContext.setDebugStream (   self,
  stream 
)
Sets the debug output stream.

Definition at line 97 of file statemap.py.

def smclib.statemap.FSMContext.setState (   self,
  state 
)
Sets the current state to the specified state.

Definition at line 132 of file statemap.py.


Member Data Documentation

Definition at line 76 of file statemap.py.

Definition at line 76 of file statemap.py.

Definition at line 76 of file statemap.py.

Definition at line 76 of file statemap.py.

Definition at line 76 of file statemap.py.

Definition at line 76 of file statemap.py.


The documentation for this class was generated from the following file:


smclib
Author(s): Various
autogenerated on Sun Oct 5 2014 22:32:28