stateful_node
drunc.controller.stateful_node
Classes
StatefulNode(fsm_configuration, publisher=None, init_state='', session='', name='', top_segment_controller=False)
Bases: ABC
Source code in drunc/controller/stateful_node.py
Functions
decode_fsm_arguments(fsm_command)
Decodes the arguments of a FSMCommand according to the transition definition in the FSM configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fsm_command
|
FSMCommand
|
The FSMCommand containing the command name and arguments. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
A dictionary containing the decoded arguments for the transition. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the command name does not correspond to any transition in the FSM configuration. |
ValueError
|
If the arguments cannot be decoded according to the transition definition. |