RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
CustomRtcSupervisor::CustomStatusEstimator Class Referencefinal

Status Estimator Extension. More...

Inheritance diagram for CustomRtcSupervisor::CustomStatusEstimator:
rtctk::rtcSupervisor::StatusEstimator

Protected Member Functions

std::string ApplyEstimationHeuristic (const std::map< std::string, std::string > &states) override
 The actual system status estimation algorithm.
 

Additional Inherited Members

- Public Member Functions inherited from rtctk::rtcSupervisor::StatusEstimator
 StatusEstimator ()
 
virtual ~StatusEstimator ()=default
 
void Reset ()
 Reset internal state of the StatusEstimator object.
 
std::string EstimateStatus (const std::string &name, const std::string &state)
 Public method to estimate system status.
 
- Protected Attributes inherited from rtctk::rtcSupervisor::StatusEstimator
std::map< std::string, std::string > m_states
 
std::map< std::string, std::string > m_prev_states
 
std::string m_prev_status
 

Detailed Description

Status Estimator Extension.

This class is intended to show how to customise the StatusEstimator.

Note
You may want to move this into a dedicated file so that it can be unit-tested.

Member Function Documentation

◆ ApplyEstimationHeuristic()

std::string CustomRtcSupervisor::CustomStatusEstimator::ApplyEstimationHeuristic ( const std::map< std::string, std::string > & states)
inlineoverrideprotectedvirtual

The actual system status estimation algorithm.

Override this method in case you need a custom status estimation algorithm. For more complicated algorithms you can also take the map keys (component names) and the protected member variables of this class m_prev_status and m_rev_states into account;

Returns
One of the status string constants defined above, e.g.: STATUS_NOT_READY

Note, we are returning a string here on purpuse to keep the method open for future extension where individual consortia may want to return a richer set of status strings.

Reimplemented from rtctk::rtcSupervisor::StatusEstimator.


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