RTC Toolkit  0.1.0-alpha
Public Member Functions | Protected Attributes | List of all members
rtctk::componentFramework::RunnableStateMachineLogic Class Reference

#include <runnableStateMachineLogic.hpp>

Inheritance diagram for rtctk::componentFramework::RunnableStateMachineLogic:
rtctk::componentFramework::RunnableStateMachineLogicIf rtctk::exampleComponent::ExampleBusinessLogic rtctk::exampleDataTask::BusinessLogic< ComputationType, TopicType > rtctk::exampleDataTask::BusinessLogicGpu< ComputationType, TopicType > rtctk::telSub::BusinessLogic

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
 
ServiceContainerm_services
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RunnableStateMachineLogic()

rtctk::componentFramework::RunnableStateMachineLogic::RunnableStateMachineLogic ( std::string const &  name,
ServiceContainer services 
)
inline

◆ ~RunnableStateMachineLogic()

virtual rtctk::componentFramework::RunnableStateMachineLogic::~RunnableStateMachineLogic ( )
virtualdefault

Member Function Documentation

◆ Disabling()

void rtctk::componentFramework::RunnableStateMachineLogic::Disabling ( StopToken  st)
inlineoverridevirtual

Activity On::Operational::Disabling

Activity method to to back to NotOperational, e.g. stop threads, etc.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ Enabling()

void rtctk::componentFramework::RunnableStateMachineLogic::Enabling ( StopToken  st)
inlineoverridevirtual

Activity On::NotOperational::Enabling

Activity method to prepare the component for operation, e.g. start threads, etc.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ GoingIdle()

void rtctk::componentFramework::RunnableStateMachineLogic::GoingIdle ( StopToken  st)
inlineoverridevirtual

Activity On::Operational::GoingIdle

Activity method to leave state running, e.g. turn off receivers, etc.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ GoingRunning()

void rtctk::componentFramework::RunnableStateMachineLogic::GoingRunning ( StopToken  st)
inlineoverridevirtual

Activity On::Operational::GoingRunning

Activity method to prepare to run, e.g. start receiving data, etc.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ Initialising()

void rtctk::componentFramework::RunnableStateMachineLogic::Initialising ( StopToken  st)
inlineoverridevirtual

Activity On::NotOperational::Initialising

Activity method to initialise the component, e.g. construct members, etc.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ IsUpdatingAllowed()

bool rtctk::componentFramework::RunnableStateMachineLogic::IsUpdatingAllowed ( Payload  args)
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.

Parameters
argsPayload, to be able to receive information on what to update
Returns
false if update is dissalowed.
true, if update is allowed.

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ Recovering()

void rtctk::componentFramework::RunnableStateMachineLogic::Recovering ( StopToken  st)
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

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

◆ Running()

void rtctk::componentFramework::RunnableStateMachineLogic::Running ( StopToken  st)
inlineoverridevirtual

Activity On::Operational::Running

Activity method for state running, e.g. receive, compute, send

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ Starting()

void rtctk::componentFramework::RunnableStateMachineLogic::Starting ( StopToken  st)
inlineoverridevirtual

Activity On::NotOperational::Starting

Activity method to perfrom setup work after start and reset of component.

Parameters
stStopToken, to get notified when the activity is supposed to terminate

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

◆ Updating()

void rtctk::componentFramework::RunnableStateMachineLogic::Updating ( StopToken  st,
Payload  args 
)
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.

Parameters
stStopToken, to get notified when the activity is supposed to terminate
argsPayload, to be able to receive information on what to update

Implements rtctk::componentFramework::RunnableStateMachineLogicIf.

Reimplemented in rtctk::telSub::BusinessLogic.

Member Data Documentation

◆ m_name

const std::string& rtctk::componentFramework::RunnableStateMachineLogic::m_name
protected

◆ m_services

ServiceContainer& rtctk::componentFramework::RunnableStateMachineLogic::m_services
protected

The documentation for this class was generated from the following file: