#include <rtcObject.hpp>
◆ RtcObject()
| rtctk::rtcSupervisor::RtcObject::RtcObject |
( |
const std::string & |
name, |
|
|
const std::string & |
rr_uri, |
|
|
const std::string & |
ps_uri |
|
) |
| |
- Parameters
-
| name | Name of the object e.g. VisAcq |
| rr_uri | URI of request response end point |
| ps_uri | URI of publish reply end point for state Event publication |
- Returns
- none
To allow easy unit tests we allow reation of an rtcObject without trying to resolve it
Generate the handles by which we can send commands to the object this might throw if the resolition fails
◆ ~RtcObject()
| rtctk::rtcSupervisor::RtcObject::~RtcObject |
( |
| ) |
|
|
virtual |
◆ BelievedError() [1/2]
| virtual bool rtctk::rtcSupervisor::RtcObject::BelievedError |
( |
| ) |
|
|
inlinevirtual |
◆ BelievedError() [2/2]
| virtual void rtctk::rtcSupervisor::RtcObject::BelievedError |
( |
bool |
i | ) |
|
|
inlinevirtual |
Setter and Getter for BelievedError.
◆ BelievedState() [1/2]
| std::string rtctk::rtcSupervisor::RtcObject::BelievedState |
( |
| ) |
|
|
virtual |
Set the believed state as a string and evaluate as enumeration.
- Returns
- String as stored by BelievedState
◆ BelievedState() [2/2]
| void rtctk::rtcSupervisor::RtcObject::BelievedState |
( |
const std::string & |
s | ) |
|
|
virtual |
Set the believed state as a string and evaluate as enumeration.
- Parameters
-
| s | State as string from Event |
◆ BelievedSubstate()
| std::string rtctk::rtcSupervisor::RtcObject::BelievedSubstate |
( |
| ) |
|
|
virtual |
◆ BuildObject()
| void rtctk::rtcSupervisor::RtcObject::BuildObject |
( |
| ) |
|
|
virtual |
Called from ctor, public for mocking purposes.
Try and establish the MAL connection to the object and build the handles
This will be called initially but also if communication fails with the component
Check if we had problems communicating with this component
Try and decode whatever type of exception we got and re-throw it as something which is recognised by the rest of the system
◆ EvaluatedState()
| void rtctk::rtcSupervisor::RtcObject::EvaluatedState |
( |
RtcState & |
state, |
|
|
RtcSubState & |
substate |
|
) |
| |
Return the state evaluated as enumeration.
- Returns
- State and Substate evaluated as enumeration
Return the state which has been evaluated by the object
◆ GetAsyncCommandOK()
| bool rtctk::rtcSupervisor::RtcObject::GetAsyncCommandOK |
( |
| ) |
|
|
virtual |
Get indication that async command was OK, no exception or funny return values.
◆ Name()
| virtual std::string rtctk::rtcSupervisor::RtcObject::Name |
( |
| ) |
|
|
inlinevirtual |
◆ RunAsync()
| std::string rtctk::rtcSupervisor::RtcObject::RunAsync |
( |
RtcCommand |
cmd | ) |
|
|
virtual |
Run command async.
Check if we had problems communicating with this component
Try and decode whatever type of exception we got and re-throw it as something which is recognised by the rest of the system
◆ RunCmd()
| std::string rtctk::rtcSupervisor::RtcObject::RunCmd |
( |
RtcCommand |
cmd, |
|
|
bool |
shortTmo |
|
) |
| |
|
virtual |
Run command with optional arg.
Check if we had problems communicating with this component and if so throw an error
Assume success initially
Some components do not indicate errors as exceptions but a non-OK reply we use a flag to indicate that commands should return an OK
Now just switch on the command and call the appropriate interface either using the interface stub with a timeout or not depending on the timed flag
Try and decode whatever type of exception we got and re-throw it as something which is recognised by the rest of the system
◆ WaitAsync()
| std::string rtctk::rtcSupervisor::RtcObject::WaitAsync |
( |
| ) |
|
|
virtual |
Wait for previously async run command.
Try and decode whatever type of exception we got and re-throw it as something which is recognised by the rest of the system
The documentation for this class was generated from the following files:
- reusableComponents/rtcSupervisor/library/src/include/rtctk/rtcSupervisor/rtcObject.hpp
- reusableComponents/rtcSupervisor/library/src/rtcObject.cpp