|
RTC Toolkit
0.1.0-alpha
|
#include <runnableStateMachineLogic.hpp>
Public Member Functions | |
| RunnableStateMachineLogic (std::string const &name, ServiceContainer &services) | |
| virtual | ~RunnableStateMachineLogic ()=default |
| void | Starting (StopToken st) override |
| void | Recovering (StopToken st) override |
| void | Initialising (StopToken st) override |
| void | Enabling (StopToken st) override |
| void | Disabling (StopToken st) override |
| void | GoingRunning (StopToken st) override |
| void | GoingIdle (StopToken st) override |
| void | Running (StopToken st) override |
| void | Updating (StopToken st, Payload args) override |
| bool | IsUpdatingAllowed (Payload args) override |
Public Member Functions inherited from rtctk::componentFramework::RunnableStateMachineLogicIf | |
| virtual | ~RunnableStateMachineLogicIf ()=default |
Protected Attributes | |
| const std::string & | m_name |
| ServiceContainer & | m_services |
Class that provides empty implementations for the life-cycle methods and means of injecting services via the constructor.
This class was created for convenience, by deriving from it users only need to override the methods they really need.
The objects passed via the constructor contain the component instance name and a ServiceContainer that hosts and provides useful services.
|
inline |
|
virtualdefault |
|
inlineoverridevirtual |
Activity On::Operational::Disabling
Activity method to to back to NotOperational, e.g. stop threads, etc.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity On::NotOperational::Enabling
Activity method to prepare the component for operation, e.g. start threads, etc.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity On::Operational::GoingIdle
Activity method to leave state running, e.g. turn off receivers, etc.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity On::Operational::GoingRunning
Activity method to prepare to run, e.g. start receiving data, etc.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity On::NotOperational::Initialising
Activity method to initialise the component, e.g. construct members, etc.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Guard IsUpdatingAllowed
Guard method to further constrain whether an Update command is allowed to cause an Updating activity or not. Simply set the return value to configure as needed.
| args | Payload, to be able to receive information on what to update |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity Operational::Recovering
Activity method to recover from error in On::Operational::Error, after successful recovery the state machine will transition to state On::Operational::Idle
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
|
inlineoverridevirtual |
Activity On::Operational::Running
Activity method for state running, e.g. receive, compute, send
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity On::NotOperational::Starting
Activity method to perfrom setup work after start and reset of component.
| st | StopToken, to get notified when the activity is supposed to terminate |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
inlineoverridevirtual |
Activity Operational::Updating
Activity method to update dynamic component configuration. On default updates are only allowed ins states. On::Operational::Idle and On::Operational::Running.
| st | StopToken, to get notified when the activity is supposed to terminate |
| args | Payload, to be able to receive information on what to update |
Implements rtctk::componentFramework::RunnableStateMachineLogicIf.
Reimplemented in rtctk::telSub::BusinessLogic.
|
protected |
|
protected |