ifw-fcf 7.1.4
Loading...
Searching...
No Matches
actuatorConfig.hpp
Go to the documentation of this file.
1
8#ifndef FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_HPP
9#define FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_HPP
10
11#include <string>
12
13#include <yaml-cpp/yaml.h>
14
15#include <ifw/core/utils/bat/logger.hpp>
20
21
23
24 constexpr auto LOGGER_NAME = "actuator";
25
26 // Constants for internal mapping
27 constexpr auto CI_ACTIVE_LOW_ON = "low_on";
28 constexpr auto CI_ACTIVE_LOW_SWITCH = "low_switch";
29 constexpr auto CI_INVERT_ANALOG = "invert_analog";
30 constexpr auto CI_ANALOG_THRESHOLD = "analog_threshold";
31 constexpr auto CI_MAX_ON = "maxon";
32 constexpr auto CI_INITIAL_STATE = "initial_state";
33 constexpr auto CI_AUTO_OP = "auto_operational";
34 constexpr auto CI_TIMEOUT = "timeout";
35 constexpr auto CI_SIG_STABLE_PERIOD = "signal_stable_period";
36
37 // Specific Actuator RPC
38 const std::string RPC_ON = "rpcSwitchOn";
39 const std::string RPC_OFF = "rpcSwitchOff";
40
41 // Specific constant values for actuator device state/substate
42 constexpr int SUBSTATE_READY_OFF = 103;
43 constexpr int SUBSTATE_READY_ON = 104;
44 constexpr int SUBSTATE_SWITCHING_OFF = 109;
45 constexpr int SUBSTATE_SWITCHING_ON = 110;
46
47 constexpr int SUBSTATE_OP_DISABLING = 205;
48 constexpr int SUBSTATE_OP_OFF = 206;
49 constexpr int SUBSTATE_OP_SWITCHING_OFF = 207;
50 constexpr int SUBSTATE_OP_ON = 209;
51 constexpr int SUBSTATE_OP_SWITCHING_ON = 210;
52
53 constexpr auto SUBSTATE_NOTREADY_STR = "NotReady";
54 constexpr auto SUBSTATE_READY_OFF_STR = "Ready/Off";
55 constexpr auto SUBSTATE_READY_ON_STR = "Ready/On";
56 constexpr auto SUBSTATE_SWITCHING_OFF_STR = "Ready/Swit_off";
57 constexpr auto SUBSTATE_SWITCHING_ON_STR = "Ready/Swit_on";
58 constexpr auto SUBSTATE_OP_OFF_STR = "Off";
59 constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR = "Switching_off";
60 constexpr auto SUBSTATE_OP_ON_STR = "On";
61 constexpr auto SUBSTATE_OP_SWITCHING_ON_STR = "Switching_on";
62
63
78
79
80}
81
82
83#endif //FCF_DEVMGR_DEVICE_ACTUATOR_CONFIG_H
actuator class header file.
Definition actuator.cpp:21
constexpr auto SUBSTATE_NOTREADY_STR
Definition actuatorConfig.hpp:53
constexpr int SUBSTATE_READY_OFF
Definition actuatorConfig.hpp:42
constexpr auto CI_SIG_STABLE_PERIOD
Definition actuatorConfig.hpp:35
constexpr auto CI_ANALOG_THRESHOLD
Definition actuatorConfig.hpp:30
constexpr int SUBSTATE_READY_ON
Definition actuatorConfig.hpp:43
constexpr auto LOGGER_NAME
Definition actuatorConfig.hpp:24
constexpr auto CI_ACTIVE_LOW_ON
Definition actuatorConfig.hpp:27
const std::string RPC_ON
Definition actuatorConfig.hpp:38
constexpr auto SUBSTATE_SWITCHING_OFF_STR
Definition actuatorConfig.hpp:56
constexpr auto SUBSTATE_READY_OFF_STR
Definition actuatorConfig.hpp:54
constexpr int SUBSTATE_OP_OFF
Definition actuatorConfig.hpp:48
constexpr auto SUBSTATE_SWITCHING_ON_STR
Definition actuatorConfig.hpp:57
constexpr auto CI_AUTO_OP
Definition actuatorConfig.hpp:33
constexpr auto CI_INVERT_ANALOG
Definition actuatorConfig.hpp:29
constexpr auto SUBSTATE_OP_OFF_STR
Definition actuatorConfig.hpp:58
constexpr int SUBSTATE_OP_SWITCHING_ON
Definition actuatorConfig.hpp:51
constexpr auto SUBSTATE_OP_ON_STR
Definition actuatorConfig.hpp:60
constexpr int SUBSTATE_OP_ON
Definition actuatorConfig.hpp:50
constexpr auto SUBSTATE_READY_ON_STR
Definition actuatorConfig.hpp:55
constexpr auto CI_ACTIVE_LOW_SWITCH
Definition actuatorConfig.hpp:28
constexpr auto CI_MAX_ON
Definition actuatorConfig.hpp:31
constexpr auto SUBSTATE_OP_SWITCHING_ON_STR
Definition actuatorConfig.hpp:61
constexpr auto CI_INITIAL_STATE
Definition actuatorConfig.hpp:32
constexpr int SUBSTATE_SWITCHING_OFF
Definition actuatorConfig.hpp:44
constexpr int SUBSTATE_OP_DISABLING
Definition actuatorConfig.hpp:47
constexpr auto SUBSTATE_OP_SWITCHING_OFF_STR
Definition actuatorConfig.hpp:59
constexpr int SUBSTATE_SWITCHING_ON
Definition actuatorConfig.hpp:45
constexpr int SUBSTATE_OP_SWITCHING_OFF
Definition actuatorConfig.hpp:49
const std::unordered_map< short, std::string > SUBSTATE_MAP
Definition actuatorConfig.hpp:64
const std::string RPC_OFF
Definition actuatorConfig.hpp:39
constexpr auto CI_TIMEOUT
Definition actuatorConfig.hpp:34
constexpr int SUBSTATE_ERROR
Definition deviceConfig.hpp:97
constexpr auto SUBSTATE_INITIALISING_STR
Definition deviceConfig.hpp:100
constexpr auto SUBSTATE_ERROR_STR
Definition deviceConfig.hpp:102
constexpr int SUBSTATE_INITIALISING
Definition deviceConfig.hpp:96
constexpr auto SUBSTATE_NOTREADY_STR
Definition deviceConfig.hpp:99
constexpr int SUBSTATE_OP_ERROR
Definition deviceConfig.hpp:105
constexpr int SUBSTATE_NOTREADY
Definition deviceConfig.hpp:94
constexpr auto SUBSTATE_OP_ERROR_STR
Definition deviceConfig.hpp:108