#include <rtcObjectConfig.hpp>
|
| | RtcObjectConfig (std::string name, rtctk::componentFramework::RuntimeRepoApiIf &rtr, rtctk::componentFramework::ServiceDiscovery &svc, rtctk::componentFramework::OldbApiIf &oldb) |
| |
| virtual | ~RtcObjectConfig () |
| |
| void | BuildFromRuntimeRepo () |
| |
| std::shared_ptr< RtcObject > | FindObject (const std::string &name) |
| |
| std::shared_ptr< RtcCommandRequestList > | AllObjectsRequestList () |
| |
| void | OnStateEventReceived (const double timestamp, const std::string &name, const std::string &state, std::string &gstate, std::string &gsubstate, bool &gerror, std::string &gerror_who) |
| |
| std::list< std::shared_ptr< RtcObject > > & | ObjectList () |
| |
| std::vector< elt::mal::Uri > & | PubSubURIs () |
| |
| void | EvaluateBelievedState (std::string &gstate, std::string &gsubstate, bool &gerror, std::string &gerror_who) |
| |
| void | Cleanup () |
| |
| void | Dump () |
| |
◆ RtcObjectConfig()
◆ ~RtcObjectConfig()
| rtctk::rtcSupervisor::RtcObjectConfig::~RtcObjectConfig |
( |
| ) |
|
|
virtual |
◆ AllObjectsRequestList()
◆ BuildFromRuntimeRepo()
| void rtctk::rtcSupervisor::RtcObjectConfig::BuildFromRuntimeRepo |
( |
| ) |
|
◆ Cleanup()
| void rtctk::rtcSupervisor::RtcObjectConfig::Cleanup |
( |
| ) |
|
◆ Dump()
| void rtctk::rtcSupervisor::RtcObjectConfig::Dump |
( |
| ) |
|
◆ EvaluateBelievedState()
| void rtctk::rtcSupervisor::RtcObjectConfig::EvaluateBelievedState |
( |
std::string & |
gstate, |
|
|
std::string & |
gsubstate, |
|
|
bool & |
gerror, |
|
|
std::string & |
gerror_who |
|
) |
| |
Evaluate the believed state by traversing the list of objects and finding the minimum state/substate.
This is called after a state/substate has been updated by the pub/sub callback
The global state is the minumum state of all components
- Todo:
- , work out what to do with substate
Global error is true if anyone is in error
◆ FindObject()
| std::shared_ptr< RtcObject > rtctk::rtcSupervisor::RtcObjectConfig::FindObject |
( |
const std::string & |
name | ) |
|
◆ ObjectList()
| std::list<std::shared_ptr<RtcObject> >& rtctk::rtcSupervisor::RtcObjectConfig::ObjectList |
( |
| ) |
|
|
inline |
◆ OnStateEventReceived()
| void rtctk::rtcSupervisor::RtcObjectConfig::OnStateEventReceived |
( |
const double |
timestamp, |
|
|
const std::string & |
name, |
|
|
const std::string & |
state, |
|
|
std::string & |
gstate, |
|
|
std::string & |
gsubstate, |
|
|
bool & |
gerror, |
|
|
std::string & |
gerror_who |
|
) |
| |
Called from the rtcServer business logic when a state change event is recrived from any of the supervised rtcObjects publish subscribe endpoints.
Traverse the list of components updating the state of the correct one
Evaluate the global state based on the update
Publish the resultant state
◆ PubSubURIs()
| std::vector<elt::mal::Uri>& rtctk::rtcSupervisor::RtcObjectConfig::PubSubURIs |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files: