StateMachine¶
- mod
State
- synopsis
state machine
state machine
- class DIRAC.Core.Utilities.StateMachine.StateMachine(state=None, transTable=None)¶
Bases:
object
- class StateMachine¶
simple state machine
- __init__(state=None, transTable=None)¶
c’tor
- Parameters
self – self reference
state (mixed) – initial state
transTable (dict) – transition table
- addTransition(fromState, toState, condition)¶
add transtion rule from :fromState: to :toState: upon condition :condition:
- next(*args, **kwargs)¶
make transition to the next state
- setState(state)¶
set state
- property state¶
get current state