ifw-fcf  4.1.0-pre2
actuatorConfig.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_HPP
11 #define FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_HPP
12 
13 // System headers
14 #include <string>
15 
16 // Third party headers
17 #include <yaml-cpp/yaml.h>
18 
19 #include <utils/bat/logger.hpp>
20 #include "fcf/common/iComm.hpp"
26 
27 namespace fcf::devmgr::actuator {
28 
29  constexpr auto LOGGER_NAME = "actuator";
30 
31  // Constants for internal mapping
32  constexpr auto CI_ACTIVE_LOW_ON = "low_on";
33  constexpr auto CI_ACTIVE_LOW_SWITCH = "low_switch";
34  constexpr auto CI_INVERT_ANALOG = "invert_analog";
35  constexpr auto CI_ANALOG_THRESHOLD = "analog_threshold";
36  constexpr auto CI_MAX_ON = "maxon";
37  constexpr auto CI_INITIAL_STATE = "initial_state";
38  constexpr auto CI_AUTO_OP = "auto_operational";
39  constexpr auto CI_TIMEOUT = "timeout";
40  constexpr auto CI_SIG_STABLE_PERIOD = "signal_stable_period";
41 
42  // Specific Actuator RPC
43  const std::string RPC_ON = "rpcSwitchOn";
44  const std::string RPC_OFF = "rpcSwitchOff";
45 
46  // Specific constant values for actuator device state/substate
47  constexpr int SUBSTATE_READY_OFF = 103;
48  constexpr int SUBSTATE_READY_ON = 104;
49  constexpr int SUBSTATE_SWITCHING_OFF = 109;
50  constexpr int SUBSTATE_SWITCHING_ON = 110;
51 
52  constexpr int SUBSTATE_OP_DISABLING = 205;
53  constexpr int SUBSTATE_OP_OFF = 206;
54  constexpr int SUBSTATE_OP_SWITCHING_OFF = 207;
55  constexpr int SUBSTATE_OP_ON = 209;
56  constexpr int SUBSTATE_OP_SWITCHING_ON = 210;
57 
58  constexpr auto SUBSTATE_NOTREADY_STR = "NotReady";
59  constexpr auto SUBSTATE_READY_OFF_STR = "Ready/Off";
60  constexpr auto SUBSTATE_READY_ON_STR = "Ready/On";
61  constexpr auto SUBSTATE_SWITCHING_OFF_STR = "Ready/Swit_off";
62  constexpr auto SUBSTATE_SWITCHING_ON_STR = "Ready/Swit_on";
63  constexpr auto SUBSTATE_OP_OFF_STR = "Off";
64  constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR = "Switching_off";
65  constexpr auto SUBSTATE_OP_ON_STR = "On";
66  constexpr auto SUBSTATE_OP_SWITCHING_ON_STR = "Switching_on";
67 
68 
69  const std::unordered_map<short, std::string> SubstateMap = {
82  };
83 
84 
85 }
86 
87 
88 #endif //FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_H
fcf::devmgr::actuator::SUBSTATE_READY_ON
constexpr int SUBSTATE_READY_ON
Definition: actuatorConfig.hpp:48
actuatorHwErrors.hpp
actuatorHwErrors header file.
fcf::devmgr::actuator::SUBSTATE_OP_SWITCHING_OFF
constexpr int SUBSTATE_OP_SWITCHING_OFF
Definition: actuatorConfig.hpp:54
fcf::devmgr::actuator::CI_AUTO_OP
constexpr auto CI_AUTO_OP
Definition: actuatorConfig.hpp:38
dataContext.hpp
DataContext class header file.
fcf::devmgr::actuator::SubstateMap
const std::unordered_map< short, std::string > SubstateMap
Definition: actuatorConfig.hpp:69
fcf::devmgr::actuator::SUBSTATE_READY_OFF_STR
constexpr auto SUBSTATE_READY_OFF_STR
Definition: actuatorConfig.hpp:59
fcf::devmgr::actuator::SUBSTATE_NOTREADY_STR
constexpr auto SUBSTATE_NOTREADY_STR
Definition: actuatorConfig.hpp:58
fcf::devmgr::actuator::SUBSTATE_SWITCHING_ON
constexpr int SUBSTATE_SWITCHING_ON
Definition: actuatorConfig.hpp:50
deviceConfig.hpp
DeviceConfig class header file.
fcf::devmgr::actuator::CI_INITIAL_STATE
constexpr auto CI_INITIAL_STATE
Definition: actuatorConfig.hpp:37
fcf::devmgr::actuator::SUBSTATE_READY_ON_STR
constexpr auto SUBSTATE_READY_ON_STR
Definition: actuatorConfig.hpp:60
fcf::devmgr::actuator::SUBSTATE_OP_DISABLING
constexpr int SUBSTATE_OP_DISABLING
Definition: actuatorConfig.hpp:52
fcf::devmgr::actuator::SUBSTATE_OP_SWITCHING_ON
constexpr int SUBSTATE_OP_SWITCHING_ON
Definition: actuatorConfig.hpp:56
fcf::devmgr::actuator::LOGGER_NAME
constexpr auto LOGGER_NAME
Definition: actuatorConfig.hpp:29
fcf::devmgr::actuator::CI_ANALOG_THRESHOLD
constexpr auto CI_ANALOG_THRESHOLD
Definition: actuatorConfig.hpp:35
fcf::devmgr::actuator::SUBSTATE_SWITCHING_ON_STR
constexpr auto SUBSTATE_SWITCHING_ON_STR
Definition: actuatorConfig.hpp:62
actuatorRpcErrors.hpp
actuatorRpcErrors header file.
fcf::devmgr::common::SUBSTATE_NOTREADY_STR
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:103
configSet.hpp
configSet class header file.
fcf::devmgr::common::SUBSTATE_INITIALISING_STR
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:104
fcf::devmgr::common::SUBSTATE_NOTREADY
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:98
fcf::devmgr::actuator::SUBSTATE_READY_OFF
constexpr int SUBSTATE_READY_OFF
Definition: actuatorConfig.hpp:47
fcf::devmgr::actuator::RPC_ON
const std::string RPC_ON
Definition: actuatorConfig.hpp:43
fcf::devmgr::actuator::CI_INVERT_ANALOG
constexpr auto CI_INVERT_ANALOG
Definition: actuatorConfig.hpp:34
fcf::devmgr::common::SUBSTATE_INITIALISING
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:100
fcf::devmgr::actuator::CI_SIG_STABLE_PERIOD
constexpr auto CI_SIG_STABLE_PERIOD
Definition: actuatorConfig.hpp:40
fcf::devmgr::actuator
Definition: actuator.cpp:25
fcf::devmgr::common::SUBSTATE_OP_ERROR
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:109
fcf::devmgr::common::SUBSTATE_OP_ERROR_STR
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:112
fcf::devmgr::actuator::SUBSTATE_OP_OFF
constexpr int SUBSTATE_OP_OFF
Definition: actuatorConfig.hpp:53
fcf::devmgr::actuator::SUBSTATE_OP_OFF_STR
constexpr auto SUBSTATE_OP_OFF_STR
Definition: actuatorConfig.hpp:63
fcf::devmgr::actuator::SUBSTATE_OP_ON_STR
constexpr auto SUBSTATE_OP_ON_STR
Definition: actuatorConfig.hpp:65
fcf::devmgr::actuator::SUBSTATE_OP_SWITCHING_OFF_STR
constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR
Definition: actuatorConfig.hpp:64
fcf::devmgr::actuator::SUBSTATE_SWITCHING_OFF
constexpr int SUBSTATE_SWITCHING_OFF
Definition: actuatorConfig.hpp:49
fcf::devmgr::common::SUBSTATE_ERROR
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:101
fcf::devmgr::actuator::SUBSTATE_OP_SWITCHING_ON_STR
constexpr auto SUBSTATE_OP_SWITCHING_ON_STR
Definition: actuatorConfig.hpp:66
fcf::devmgr::actuator::SUBSTATE_SWITCHING_OFF_STR
constexpr auto SUBSTATE_SWITCHING_OFF_STR
Definition: actuatorConfig.hpp:61
fcf::devmgr::actuator::CI_ACTIVE_LOW_ON
constexpr auto CI_ACTIVE_LOW_ON
Definition: actuatorConfig.hpp:32
fcf::devmgr::actuator::RPC_OFF
const std::string RPC_OFF
Definition: actuatorConfig.hpp:44
fcf::devmgr::common::SUBSTATE_ERROR_STR
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:106
fcf::devmgr::actuator::SUBSTATE_OP_ON
constexpr int SUBSTATE_OP_ON
Definition: actuatorConfig.hpp:55
fcf::devmgr::actuator::CI_TIMEOUT
constexpr auto CI_TIMEOUT
Definition: actuatorConfig.hpp:39
fcf::devmgr::actuator::CI_ACTIVE_LOW_SWITCH
constexpr auto CI_ACTIVE_LOW_SWITCH
Definition: actuatorConfig.hpp:33
fcf::devmgr::actuator::CI_MAX_ON
constexpr auto CI_MAX_ON
Definition: actuatorConfig.hpp:36