mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 23:51:21 +00:00
10 lines
353 B
Python
10 lines
353 B
Python
|
from .fsm_base import FSMBase
|
||
|
|
||
|
|
||
|
class LinearFSM(FSMBase):
|
||
|
def __init__(self, number_of_steps):
|
||
|
self.states = list(map(str, range(number_of_steps)))
|
||
|
self.transitions = [{'trigger': 'step', 'source': index, 'dest': str(int(index)+1)}
|
||
|
for index in self.states[:-1]]
|
||
|
super(LinearFSM, self).__init__()
|