betfsm.EventSequential
Bases: GeneratorWithList
EventSequential checks events in a sequential way. It can execute a nominal subtree or wait by ticking forever. If there are incoming events, these are queued in a FIFO way and the corresponding subtree is executed one by one. If any of the subtrees returns with an outcome different from TICKING or SUCCEED EventSequential finishes with that outcome.
The nominal state can be interrupted by the events, will pause while the subtrees corresponding to the events are executing, and, if all return SUCCEED, will resume after all subtrees are processed.
Typical use: - interrupt nominal state by event with cleanup - waiting when sequentially executing the subtrees associated with incomming events.
__init__(name, event_poller, event_map=Dict[str, TickingState])
| Parameters: |
|
|---|
add_state(state)
Not defined for an EventSequential