ifw-fcf 6.0.0
Loading...
Searching...
No Matches
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>
24
25namespace fcf::devmgr::actuator {
26
27 constexpr auto LOGGER_NAME = "actuator";
28
29 // Constants for internal mapping
30 constexpr auto CI_ACTIVE_LOW_ON = "low_on";
31 constexpr auto CI_ACTIVE_LOW_SWITCH = "low_switch";
32 constexpr auto CI_INVERT_ANALOG = "invert_analog";
33 constexpr auto CI_ANALOG_THRESHOLD = "analog_threshold";
34 constexpr auto CI_MAX_ON = "maxon";
35 constexpr auto CI_INITIAL_STATE = "initial_state";
36 constexpr auto CI_AUTO_OP = "auto_operational";
37 constexpr auto CI_TIMEOUT = "timeout";
38 constexpr auto CI_SIG_STABLE_PERIOD = "signal_stable_period";
39
40 // Specific Actuator RPC
41 const std::string RPC_ON = "rpcSwitchOn";
42 const std::string RPC_OFF = "rpcSwitchOff";
43
44 // Specific constant values for actuator device state/substate
45 constexpr int SUBSTATE_READY_OFF = 103;
46 constexpr int SUBSTATE_READY_ON = 104;
47 constexpr int SUBSTATE_SWITCHING_OFF = 109;
48 constexpr int SUBSTATE_SWITCHING_ON = 110;
49
50 constexpr int SUBSTATE_OP_DISABLING = 205;
51 constexpr int SUBSTATE_OP_OFF = 206;
52 constexpr int SUBSTATE_OP_SWITCHING_OFF = 207;
53 constexpr int SUBSTATE_OP_ON = 209;
54 constexpr int SUBSTATE_OP_SWITCHING_ON = 210;
55
56 constexpr auto SUBSTATE_NOTREADY_STR = "NotReady";
57 constexpr auto SUBSTATE_READY_OFF_STR = "Ready/Off";
58 constexpr auto SUBSTATE_READY_ON_STR = "Ready/On";
59 constexpr auto SUBSTATE_SWITCHING_OFF_STR = "Ready/Swit_off";
60 constexpr auto SUBSTATE_SWITCHING_ON_STR = "Ready/Swit_on";
61 constexpr auto SUBSTATE_OP_OFF_STR = "Off";
62 constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR = "Switching_off";
63 constexpr auto SUBSTATE_OP_ON_STR = "On";
64 constexpr auto SUBSTATE_OP_SWITCHING_ON_STR = "Switching_on";
65
66
67 const std::unordered_map<short, std::string> SubstateMap = {
80 };
81
82
83}
84
85
86#endif //FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_H
actuatorHwErrors header file.
actuatorRpcErrors header file.
DataContext class header file.
DeviceConfig class header file.
Definition: actuator.cpp:25
constexpr auto SUBSTATE_READY_OFF_STR
Definition: actuatorConfig.hpp:57
constexpr auto SUBSTATE_NOTREADY_STR
Definition: actuatorConfig.hpp:56
constexpr int SUBSTATE_OP_DISABLING
Definition: actuatorConfig.hpp:50
constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR
Definition: actuatorConfig.hpp:62
constexpr auto SUBSTATE_SWITCHING_OFF_STR
Definition: actuatorConfig.hpp:59
constexpr int SUBSTATE_READY_ON
Definition: actuatorConfig.hpp:46
constexpr auto CI_MAX_ON
Definition: actuatorConfig.hpp:34
constexpr auto CI_SIG_STABLE_PERIOD
Definition: actuatorConfig.hpp:38
constexpr auto SUBSTATE_OP_OFF_STR
Definition: actuatorConfig.hpp:61
constexpr int SUBSTATE_SWITCHING_ON
Definition: actuatorConfig.hpp:48
constexpr auto SUBSTATE_OP_SWITCHING_ON_STR
Definition: actuatorConfig.hpp:64
const std::string RPC_ON
Definition: actuatorConfig.hpp:41
constexpr int SUBSTATE_OP_SWITCHING_ON
Definition: actuatorConfig.hpp:54
constexpr auto SUBSTATE_READY_ON_STR
Definition: actuatorConfig.hpp:58
constexpr auto LOGGER_NAME
Definition: actuatorConfig.hpp:27
const std::unordered_map< short, std::string > SubstateMap
Definition: actuatorConfig.hpp:67
constexpr int SUBSTATE_OP_OFF
Definition: actuatorConfig.hpp:51
constexpr auto CI_ANALOG_THRESHOLD
Definition: actuatorConfig.hpp:33
constexpr auto CI_ACTIVE_LOW_ON
Definition: actuatorConfig.hpp:30
constexpr auto SUBSTATE_OP_ON_STR
Definition: actuatorConfig.hpp:63
const std::string RPC_OFF
Definition: actuatorConfig.hpp:42
constexpr int SUBSTATE_OP_SWITCHING_OFF
Definition: actuatorConfig.hpp:52
constexpr auto SUBSTATE_SWITCHING_ON_STR
Definition: actuatorConfig.hpp:60
constexpr int SUBSTATE_SWITCHING_OFF
Definition: actuatorConfig.hpp:47
constexpr int SUBSTATE_READY_OFF
Definition: actuatorConfig.hpp:45
constexpr auto CI_INITIAL_STATE
Definition: actuatorConfig.hpp:35
constexpr int SUBSTATE_OP_ON
Definition: actuatorConfig.hpp:53
constexpr auto CI_ACTIVE_LOW_SWITCH
Definition: actuatorConfig.hpp:31
constexpr auto CI_INVERT_ANALOG
Definition: actuatorConfig.hpp:32
constexpr auto CI_TIMEOUT
Definition: actuatorConfig.hpp:37
constexpr auto CI_AUTO_OP
Definition: actuatorConfig.hpp:36
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:108
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:99
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:111
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:105
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:100
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:97
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:102
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:103