simplehsm.SimpleHsm Class Reference

SimpleHsm class. More...

Inheritance diagram for simplehsm.SimpleHsm:

calc_hsm.CalcHsm oven.Oven

List of all members.

Public Member Functions

def Initialize
 Initialise a simplehsm state machine.
def TransitionState
 Initiate a transition to a new state.
def InitTransitionState
 Initiate an initial transition to a new state (this function should only be used from a SIG_INIT state event).
def SignalCurrentState
 Send a signal to the state machine.
def IsInState
 Check if a state machine is currently in a certain state.
def RecordDeephist
 Record deep history psuedostate.
def RetrieveDeephist
 Retrive deep history psuedostate.


Detailed Description

SimpleHsm class.

The basic state machine implementation. This class should be subclassed to create a state machine.


Member Function Documentation

def simplehsm.SimpleHsm.Initialize (   self,
  top_state 
)

Initialise a simplehsm state machine.

Parameters:
top_state The topmost (and initial) state of the hierachy

def simplehsm.SimpleHsm.InitTransitionState (   self,
  new_state 
)

Initiate an initial transition to a new state (this function should only be used from a SIG_INIT state event).

Parameters:
new_state The state to transition to

def simplehsm.SimpleHsm.IsInState (   self,
  state 
)

Check if a state machine is currently in a certain state.

Parameters:
state The state to check
Returns:
True if the state machine is currently in the specified state

def simplehsm.SimpleHsm.RecordDeephist (   self,
  history_parent,
  history_state 
)

Record deep history psuedostate.

Parameters:
history_parent The parent state of the deep history psuedostate
history_state The state to return to if transitioning to the deep history psuedostate

def simplehsm.SimpleHsm.RetrieveDeephist (   self,
  history_parent 
)

Retrive deep history psuedostate.

Parameters:
history_parent The parent state of the deep history psuedostate
Returns:
The state to transition to via the deep history psuedostate

def simplehsm.SimpleHsm.SignalCurrentState (   self,
  state_event 
)

Send a signal to the state machine.

Parameters:
state_event The event to send to the state machine

def simplehsm.SimpleHsm.TransitionState (   self,
  new_state,
  to_deep_hist = False 
)

Initiate a transition to a new state.

This function will:

  • replace the target state with the deep history target if required
  • store a deep history target state if exiting a composite state with a deep history child
  • perform the exit/entry chain from the current state to the target state

Parameters:
new_state The state to transition to
to_deep_hist Whether to transition to the states internal deep history psuedostate


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

Generated on Thu Feb 4 09:29:18 2010 for simplehsm(python) by  doxygen 1.5.9