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. |
The basic state machine implementation. This class should be subclassed to create a state machine.
def simplehsm.SimpleHsm.Initialize | ( | self, | ||
top_state | ||||
) |
Initialise a simplehsm state machine.
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).
new_state | The state to transition to |
def simplehsm.SimpleHsm.IsInState | ( | self, | ||
state | ||||
) |
Check if a state machine is currently in a certain state.
state | The state to check |
def simplehsm.SimpleHsm.RecordDeephist | ( | self, | ||
history_parent, | ||||
history_state | ||||
) |
Record deep history psuedostate.
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.
history_parent | The parent state of the deep history psuedostate |
def simplehsm.SimpleHsm.SignalCurrentState | ( | self, | ||
state_event | ||||
) |
Send a signal to the state machine.
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:
new_state | The state to transition to | |
to_deep_hist | Whether to transition to the states internal deep history psuedostate |