RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
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 <rtctk/telSub/businessLogic.hpp>

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

Public Types

using ComponentType = LifeCycle
 
using OperationalLogicFactory
 

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.
 
void ActivityInitialising (componentFramework::StopToken st) override
 Main tasks:
 
void ActivityEnabling (componentFramework::StopToken st) override
 Main tasks:
 
void ActivityDisabling (componentFramework::StopToken st) override
 Main tasks:
 
void ActivityGoingRunning (componentFramework::StopToken st) override
 Main tasks:
 
void ActivityGoingIdle (componentFramework::StopToken st) override
 Main tasks:
 
void ActivityRunning (componentFramework::StopToken st) override
 TBC if we have anything to do here.
 
void ActionClearAlerts () override
 
void ActivityUpdating (componentFramework::StopToken st, const componentFramework::JsonPayload &args) override
 TBD what, if anything can be updated? I can't think of anything that does not require reinitialization.
 
bool GuardUpdatingAllowed (const componentFramework::JsonPayload &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.
 
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.
 
std::vector< DataPointPathGetTopicPaths ()
 
std::optional< numapp::NumaPolicies > LoadNumaPolicies (const rtctk::componentFramework::DataPointPath &path)
 Helper method that builds full path and logs loaded configuration.
 

Protected Attributes

log4cplus::Logger & m_logger
 
std::string m_name
 
rtctk::componentFramework::RuntimeRepoIfm_rtr
 
rtctk::componentFramework::ComponentMetricsIfm_metrics
 
rtctk::componentFramework::AlertServiceIfm_alerts
 
OperationalLogicFactory m_operational_logic_factory
 
std::unique_ptr< OperationalLogicIfm_operational_logic
 Operational logic constructed during Initialization with parameters from configuration.
 

Detailed Description

Implements the Telemetry Subscriber business logic.

Member Typedef Documentation

◆ ComponentType

◆ OperationalLogicFactory

Initial value:
std::function<std::unique_ptr<OperationalLogicIf>(const OperationalLogicFactoryParams&)>

Constructor & Destructor Documentation

◆ BusinessLogic()

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

Member Function Documentation

◆ ActionClearAlerts()

void BusinessLogic::ActionClearAlerts ( )
override

◆ 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,
const componentFramework::JsonPayload & 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.

◆ GetTopicPaths()

std::vector< DataPointPath > rtctk::telSub::BusinessLogic::GetTopicPaths ( )
inlineprotected

◆ GuardUpdatingAllowed()

bool BusinessLogic::GuardUpdatingAllowed ( const componentFramework::JsonPayload & 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_alerts

rtctk::componentFramework::AlertServiceIf& rtctk::telSub::BusinessLogic::m_alerts
protected

◆ m_logger

log4cplus::Logger& rtctk::telSub::BusinessLogic::m_logger
protected

◆ m_metrics

rtctk::componentFramework::ComponentMetricsIf& rtctk::telSub::BusinessLogic::m_metrics
protected

◆ 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: