RTC Toolkit  2.0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rtctk::telSub::BusinessLogic Class Reference

Implements the Telemetry Subscriber business logic. More...

#include <businessLogic.hpp>

Inheritance diagram for rtctk::telSub::BusinessLogic:
rtctk::componentFramework::Runnable< Super >::BizLogicIf

Public Types

using ComponentType = LifeCycle
 
using OperationalLogicFactory = std::function< std::unique_ptr< OperationalLogicIf >(OperationalLogicFactoryParams const &)>
 

Public Member Functions

 BusinessLogic (const std::string &name, componentFramework::ServiceContainer &services, OperationalLogicFactory factory)
 
void ActivityStarting (componentFramework::StopToken st) override
 Deletes the operational logic if the object exists. More...
 
void ActivityInitialising (componentFramework::StopToken st) override
 Main tasks: More...
 
void ActivityEnabling (componentFramework::StopToken st) override
 Main tasks: More...
 
void ActivityDisabling (componentFramework::StopToken st) override
 Main tasks: More...
 
void ActivityGoingRunning (componentFramework::StopToken st) override
 Main tasks: More...
 
void ActivityGoingIdle (componentFramework::StopToken st) override
 Main tasks: More...
 
void ActivityRunning (componentFramework::StopToken st) override
 TBC if we have anything to do here. More...
 
void ActivityUpdating (componentFramework::StopToken st, componentFramework::Payload args) override
 TBD what, if anything can be updated? I can't think of anything that does not require reinitialization. More...
 
bool GuardUpdatingAllowed (componentFramework::Payload args) override
 
- Public Member Functions inherited from rtctk::componentFramework::Runnable< Super >::BizLogicIf
virtual void ActivityRecovering (StopToken st)
 

Protected Member Functions

template<typename T >
void GetParam (const rtctk::componentFramework::DataPointPath &path, T &value)
 Helper method to fetch and log datapoint values loaded from the Runtime Repository. More...
 
template<typename T >
bool GetOptionalParam (const rtctk::componentFramework::DataPointPath &path, T &value)
 Helper method similar to GetParam, except no exceptions are thrown if the path does not exit and the value is not modified. More...
 
std::optional< numapp::NumaPolicies > LoadNumaPolicies (const rtctk::componentFramework::DataPointPath &path)
 Helper method that builds full path and logs loaded configuration. More...
 

Protected Attributes

std::string m_name
 
rtctk::componentFramework::RuntimeRepoIfm_rtr
 
OperationalLogicFactory m_operational_logic_factory
 
std::unique_ptr< OperationalLogicIfm_operational_logic
 Operational logic constructed during Initialization with parameters from configuration. More...
 

Detailed Description

Implements the Telemetry Subscriber business logic.

Member Typedef Documentation

◆ ComponentType

◆ OperationalLogicFactory

Constructor & Destructor Documentation

◆ BusinessLogic()

BusinessLogic::BusinessLogic ( const std::string &  name,
componentFramework::ServiceContainer services,
OperationalLogicFactory  factory 
)

Member Function Documentation

◆ ActivityDisabling()

void BusinessLogic::ActivityDisabling ( componentFramework::StopToken  st)
override

Main tasks:

Requires re-initialization to re-enter Operational.

◆ ActivityEnabling()

void BusinessLogic::ActivityEnabling ( componentFramework::StopToken  st)
override

Main tasks:

  • Starts subscribing to DDS topics (but discards any received samples) (TBC, might be already done in Initializing to simplify).

◆ ActivityGoingIdle()

void BusinessLogic::ActivityGoingIdle ( componentFramework::StopToken  st)
overridevirtual

Main tasks:

Reimplemented from rtctk::componentFramework::Runnable< Super >::BizLogicIf.

◆ ActivityGoingRunning()

void BusinessLogic::ActivityGoingRunning ( componentFramework::StopToken  st)
overridevirtual

Main tasks:

Reimplemented from rtctk::componentFramework::Runnable< Super >::BizLogicIf.

◆ ActivityInitialising()

void BusinessLogic::ActivityInitialising ( componentFramework::StopToken  st)
override

Main tasks:

◆ ActivityRunning()

void BusinessLogic::ActivityRunning ( componentFramework::StopToken  st)
overridevirtual

TBC if we have anything to do here.

Reimplemented from rtctk::componentFramework::Runnable< Super >::BizLogicIf.

◆ ActivityStarting()

void BusinessLogic::ActivityStarting ( componentFramework::StopToken  st)
override

Deletes the operational logic if the object exists.

When the Reset command is received and the Starting activity is executed, we need to delete the operational logic object that might already exist, because the component has already been initialised. If the component is starting for the first time then there is nothing to do.

Parameters
stThis parameter is ignored.

◆ ActivityUpdating()

void BusinessLogic::ActivityUpdating ( componentFramework::StopToken  st,
componentFramework::Payload  args 
)
override

TBD what, if anything can be updated? I can't think of anything that does not require reinitialization.

◆ GetOptionalParam()

template<typename T >
bool rtctk::telSub::BusinessLogic::GetOptionalParam ( const rtctk::componentFramework::DataPointPath path,
T &  value 
)
inlineprotected

Helper method similar to GetParam, except no exceptions are thrown if the path does not exit and the value is not modified.

Returns
true if the datapoint exists and false otherwise.

◆ GetParam()

template<typename T >
void rtctk::telSub::BusinessLogic::GetParam ( const rtctk::componentFramework::DataPointPath path,
T &  value 
)
inlineprotected

Helper method to fetch and log datapoint values loaded from the Runtime Repository.

◆ GuardUpdatingAllowed()

bool BusinessLogic::GuardUpdatingAllowed ( componentFramework::Payload  args)
override

◆ LoadNumaPolicies()

std::optional< numapp::NumaPolicies > BusinessLogic::LoadNumaPolicies ( const rtctk::componentFramework::DataPointPath path)
protected

Helper method that builds full path and logs loaded configuration.

Member Data Documentation

◆ m_name

std::string rtctk::telSub::BusinessLogic::m_name
protected

◆ m_operational_logic

std::unique_ptr<OperationalLogicIf> rtctk::telSub::BusinessLogic::m_operational_logic
protected

Operational logic constructed during Initialization with parameters from configuration.

◆ m_operational_logic_factory

OperationalLogicFactory rtctk::telSub::BusinessLogic::m_operational_logic_factory
protected

◆ m_rtr

rtctk::componentFramework::RuntimeRepoIf& rtctk::telSub::BusinessLogic::m_rtr
protected

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