RTC Toolkit  1.0.0
rtcSupervisorLib.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_RTCSUPERVISOR_RTCSUPERVISORLIB_HPP
13 #define RTCTK_RTCSUPERVISOR_RTCSUPERVISORLIB_HPP
14 
18 
19 // System headers
20 #include <unordered_map>
21 
22 namespace rtctk::rtcSupervisor {
23 
24 // Constants for state values
25 // TODO, need to work out what we do in terms of ordering states/substates
26 typedef enum {
27  // clang-format off
33  // clang-format on
34 } RtcState;
35 
36 // Constants for substate values
37 // TODO, need to work out what we do in terms of ordering states/substates
38 // There is a method in the rtcObject class EvaluatePrimarySubstate which does
39 // the conversion
40 typedef enum {
41  // clang-format off
53  // clang-format on
54 } RtcSubState;
55 
56 // clang-format off
57 const std::string SRV_STATE_NOT_OPERATIONAL_STR = "NotOperational";
58 const std::string SRV_STATE_OPERATIONAL_STR = "Operational";
59 const std::string SRV_STATE_UNAVAILABLE_STR = "Unavailable";
60 
61 const std::string SRV_SUBSTATE_NOTREADY_STR = "NotReady";
62 const std::string SRV_SUBSTATE_READY_STR = "Ready";
63 const std::string SRV_SUBSTATE_IDLE_STR = "Idle";
64 const std::string SRV_SUBSTATE_INITIALISING_STR = "Initialising";
65 const std::string SRV_SUBSTATE_ENABLING_STR = "Enabling";
66 const std::string SRV_SUBSTATE_DISABLING_STR = "Disabling";
67 const std::string SRV_SUBSTATE_GOING_RUNNING_STR = "GoingRunning";
68 const std::string SRV_SUBSTATE_GOING_IDLE_STR = "GoingIdle";
69 const std::string SRV_SUBSTATE_ERROR_STR = "Error";
70 // clang-format on
71 
72 typedef enum {
81 } RtcCommand;
82 
83 } // namespace rtctk::rtcSupervisor
84 
85 #endif // RTCTK_RTCSUPERVISOR_RTCSUPERVISORLIB_HPP
rtctk::rtcSupervisor::rtcSTOP
@ rtcSTOP
Definition: rtcSupervisorLib.hpp:73
rtctk::rtcSupervisor
Definition: rtcCommandRequest.hpp:18
rtctk::rtcSupervisor::SRV_STATE_MAX_STATE
@ SRV_STATE_MAX_STATE
Definition: rtcSupervisorLib.hpp:32
rtctk::rtcSupervisor::SRV_SUBSTATE_INITIALISING
@ SRV_SUBSTATE_INITIALISING
Definition: rtcSupervisorLib.hpp:46
exceptions.hpp
Provides macros and utilities for exception handling.
rtctk::rtcSupervisor::SRV_SUBSTATE_DISABLING
@ SRV_SUBSTATE_DISABLING
Definition: rtcSupervisorLib.hpp:48
rtctk::rtcSupervisor::SRV_SUBSTATE_ERROR_STR
const std::string SRV_SUBSTATE_ERROR_STR
Definition: rtcSupervisorLib.hpp:69
rtctk::rtcSupervisor::SRV_SUBSTATE_RUNNING
@ SRV_SUBSTATE_RUNNING
Definition: rtcSupervisorLib.hpp:51
rtctk::rtcSupervisor::SRV_STATE_OPERATIONAL
@ SRV_STATE_OPERATIONAL
Definition: rtcSupervisorLib.hpp:31
rtctk::rtcSupervisor::rtcENABLE
@ rtcENABLE
Definition: rtcSupervisorLib.hpp:76
rtctk::rtcSupervisor::rtcGETVERSION
@ rtcGETVERSION
Definition: rtcSupervisorLib.hpp:80
rtctk::rtcSupervisor::RtcCommand
RtcCommand
Definition: rtcSupervisorLib.hpp:72
rtctk::rtcSupervisor::rtcGETSTATE
@ rtcGETSTATE
Definition: rtcSupervisorLib.hpp:79
rtctk::rtcSupervisor::SRV_SUBSTATE_NOTREADY
@ SRV_SUBSTATE_NOTREADY
Definition: rtcSupervisorLib.hpp:43
rtctk::rtcSupervisor::SRV_SUBSTATE_NOTREADY_STR
const std::string SRV_SUBSTATE_NOTREADY_STR
Definition: rtcSupervisorLib.hpp:61
rtctk::rtcSupervisor::rtcEXIT
@ rtcEXIT
Definition: rtcSupervisorLib.hpp:78
rtctk::rtcSupervisor::SRV_SUBSTATE_ENABLING
@ SRV_SUBSTATE_ENABLING
Definition: rtcSupervisorLib.hpp:47
rtctk::rtcSupervisor::rtcDISABLE
@ rtcDISABLE
Definition: rtcSupervisorLib.hpp:77
rtctk::rtcSupervisor::SRV_STATE_UNKNOWN
@ SRV_STATE_UNKNOWN
Definition: rtcSupervisorLib.hpp:28
rtctk::rtcSupervisor::SRV_SUBSTATE_GOINGRUNNING
@ SRV_SUBSTATE_GOINGRUNNING
Definition: rtcSupervisorLib.hpp:49
rtctk::rtcSupervisor::SRV_SUBSTATE_READY
@ SRV_SUBSTATE_READY
Definition: rtcSupervisorLib.hpp:44
rtctk::rtcSupervisor::SRV_SUBSTATE_IDLE_STR
const std::string SRV_SUBSTATE_IDLE_STR
Definition: rtcSupervisorLib.hpp:63
rtctk::rtcSupervisor::SRV_STATE_NOT_OPERATIONAL
@ SRV_STATE_NOT_OPERATIONAL
Definition: rtcSupervisorLib.hpp:30
rtctk::rtcSupervisor::SRV_SUBSTATE_DISABLING_STR
const std::string SRV_SUBSTATE_DISABLING_STR
Definition: rtcSupervisorLib.hpp:66
rtctk::rtcSupervisor::SRV_SUBSTATE_GOING_IDLE_STR
const std::string SRV_SUBSTATE_GOING_IDLE_STR
Definition: rtcSupervisorLib.hpp:68
rtctk::rtcSupervisor::SRV_SUBSTATE_UNKNOWN
@ SRV_SUBSTATE_UNKNOWN
Definition: rtcSupervisorLib.hpp:42
rtctk::rtcSupervisor::rtcINIT
@ rtcINIT
Definition: rtcSupervisorLib.hpp:74
rtctk::rtcSupervisor::SRV_STATE_UNAVAILABLE_STR
const std::string SRV_STATE_UNAVAILABLE_STR
Definition: rtcSupervisorLib.hpp:59
rtctk::rtcSupervisor::SRV_SUBSTATE_IDLE
@ SRV_SUBSTATE_IDLE
Definition: rtcSupervisorLib.hpp:45
logger.hpp
Logging Support Library based on log4cplus.
rtctk::rtcSupervisor::rtcRESET
@ rtcRESET
Definition: rtcSupervisorLib.hpp:75
rtcMalContext.hpp
Convenience functions for accessing MAL stubs for the Stdif.
rtctk::rtcSupervisor::SRV_SUBSTATE_GOINGIDLE
@ SRV_SUBSTATE_GOINGIDLE
Definition: rtcSupervisorLib.hpp:50
rtctk::rtcSupervisor::RtcSubState
RtcSubState
Definition: rtcSupervisorLib.hpp:40
rtctk::rtcSupervisor::SRV_STATE_OFF
@ SRV_STATE_OFF
Definition: rtcSupervisorLib.hpp:29
rtctk::rtcSupervisor::SRV_STATE_NOT_OPERATIONAL_STR
const std::string SRV_STATE_NOT_OPERATIONAL_STR
Definition: rtcSupervisorLib.hpp:57
rtctk::rtcSupervisor::SRV_SUBSTATE_INITIALISING_STR
const std::string SRV_SUBSTATE_INITIALISING_STR
Definition: rtcSupervisorLib.hpp:64
rtctk::rtcSupervisor::SRV_SUBSTATE_READY_STR
const std::string SRV_SUBSTATE_READY_STR
Definition: rtcSupervisorLib.hpp:62
rtctk::rtcSupervisor::SRV_STATE_OPERATIONAL_STR
const std::string SRV_STATE_OPERATIONAL_STR
Definition: rtcSupervisorLib.hpp:58
rtctk::rtcSupervisor::RtcState
RtcState
Definition: rtcSupervisorLib.hpp:26
rtctk::rtcSupervisor::SRV_SUBSTATE_ENABLING_STR
const std::string SRV_SUBSTATE_ENABLING_STR
Definition: rtcSupervisorLib.hpp:65
rtctk::rtcSupervisor::SRV_SUBSTATE_GOING_RUNNING_STR
const std::string SRV_SUBSTATE_GOING_RUNNING_STR
Definition: rtcSupervisorLib.hpp:67
rtctk::rtcSupervisor::SRV_SUBSTATE_ERROR
@ SRV_SUBSTATE_ERROR
Definition: rtcSupervisorLib.hpp:52