Public Member Functions | Private Attributes | List of all members
smclib.statemap.FSMContext Class Reference
Inheritance diagram for smclib.statemap.FSMContext:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, state)
 
def clearState (self)
 
def emptyStateStack (self)
 
def getDebugFlag (self)
 
def getDebugStream (self)
 
def getPreviousState (self)
 
def getState (self)
 
def getStateStackDepth (self)
 
def getTransition (self)
 
def isInTransition (self)
 
def isStateStackEmpty (self)
 
def popState (self)
 
def pushState (self, state)
 
def setDebugFlag (self, flag)
 
def setDebugStream (self, stream)
 
def setState (self, state)
 

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 68 of file statemap.py.

Constructor & Destructor Documentation

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

Definition at line 77 of file statemap.py.

Member Function Documentation

def smclib.statemap.FSMContext.clearState (   self)
Clears the current state.

Definition at line 121 of file statemap.py.

def smclib.statemap.FSMContext.emptyStateStack (   self)
Remove all states from the state stack.

Definition at line 169 of file statemap.py.

def smclib.statemap.FSMContext.getDebugFlag (   self)
Returns the debug flag's current setting.

Definition at line 85 of file statemap.py.

def smclib.statemap.FSMContext.getDebugStream (   self)
Returns the stream to which debug output is written.

Definition at line 94 of file statemap.py.

def smclib.statemap.FSMContext.getPreviousState (   self)
Returns the state which a transition left.
May be None

Definition at line 126 of file statemap.py.

def smclib.statemap.FSMContext.getState (   self)
Returns the current state.

Definition at line 102 of file statemap.py.

def smclib.statemap.FSMContext.getStateStackDepth (   self)
Returns the state stack's depth.

Definition at line 143 of file statemap.py.

def smclib.statemap.FSMContext.getTransition (   self)
Returns the current transition's name.
Used only for debugging purposes.

Definition at line 116 of file statemap.py.

def smclib.statemap.FSMContext.isInTransition (   self)
Is this state machine already inside a transition?
True if state is undefined.

Definition at line 108 of file statemap.py.

def smclib.statemap.FSMContext.isStateStackEmpty (   self)
Returns True if the state stack is empty and False otherwise.

Definition at line 139 of file statemap.py.

def smclib.statemap.FSMContext.popState (   self)
Make the state on top of the state stack the current state.

Definition at line 158 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 147 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 89 of file statemap.py.

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

Definition at line 98 of file statemap.py.

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

Definition at line 131 of file statemap.py.

Member Data Documentation

smclib.statemap.FSMContext._debug_flag
private

Definition at line 82 of file statemap.py.

smclib.statemap.FSMContext._debug_stream
private

Definition at line 83 of file statemap.py.

smclib.statemap.FSMContext._previous_state
private

Definition at line 79 of file statemap.py.

smclib.statemap.FSMContext._state
private

Definition at line 78 of file statemap.py.

smclib.statemap.FSMContext._state_stack
private

Definition at line 80 of file statemap.py.

smclib.statemap.FSMContext._transition
private

Definition at line 81 of file statemap.py.


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


smclib
Author(s): Various
autogenerated on Wed Sep 2 2020 03:40:43