ifw-fcf 6.0.0
Loading...
Searching...
No Matches
shutterConfig.hpp
Go to the documentation of this file.
1
10#ifndef FCF_DEVMGR_DEVICE_SHUTTER_CONFIG_HPP
11#define FCF_DEVMGR_DEVICE_SHUTTER_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::shutter {
26
27 constexpr auto LOGGER_NAME = "shutter";
28 // Constants for internal mapping
29 constexpr auto CI_ACTIVE_LOW_CLOSED = "low_closed";
30 constexpr auto CI_ACTIVE_LOW_FAULT = "low_fault";
31 constexpr auto CI_ACTIVE_LOW_OPEN = "low_open";
32 constexpr auto CI_ACTIVE_LOW_SWITCH = "low_switch";
33 constexpr auto CI_IGNORE_CLOSED = "ignore_closed";
34 constexpr auto CI_IGNORE_FAULT = "ignore_fault";
35 constexpr auto CI_IGNORE_OPEN = "ignore_open";
36 constexpr auto CI_INITIAL_STATE = "initial_state";
37 constexpr auto CI_TIMEOUT = "timeout";
38
39 constexpr bool DEFAULT_ACTIVE_LOW_CLOSE = false;
40 constexpr bool DEFAULT_ACTIVE_LOW_FAULT = false;
41 constexpr bool DEFAULT_ACTIVE_LOW_OPEN = false;
42 constexpr bool DEFAULT_ACTIVE_LOW_SWITCH = false;
43 constexpr bool DEFAULT_IGNORE_CLOSED = false;
44 constexpr bool DEFAULT_IGNORE_FAULT = false;
45 constexpr bool DEFAULT_IGNORE_OPEN = false;
46 constexpr bool DEFAULT_INITIAL_STATE = false;
47 constexpr unsigned int DEFAULT_TIMEOUT = 10000;
48
49 // Specific shutter RPC
50 constexpr auto RPC_OPEN = "rpcOpen";
51 constexpr auto RPC_CLOSE = "rpcClose";
52
53 // Specific constant values for shutter device state/substate
54
55 constexpr short SUBSTATE_READY_CLOSE = 105;
56 constexpr short SUBSTATE_READY_OPEN = 106;
57 constexpr short SUBSTATE_OP_CLOSE = 212;
58 constexpr short SUBSTATE_OP_CLOSING = 213;
59 constexpr short SUBSTATE_OP_OPEN = 214;
60 constexpr short SUBSTATE_OP_OPENING = 215;
61
62 constexpr auto SUBSTATE_READY_CLOSE_STR = "Ready/Close";
63 constexpr auto SUBSTATE_READY_OPEN_STR = "Ready/Open";
64 constexpr auto SUBSTATE_OP_CLOSE_STR = "Close";
65 constexpr auto SUBSTATE_OP_CLOSING_STR = "Closing";
66 constexpr auto SUBSTATE_OP_OPEN_STR = "Open";
67 constexpr auto SUBSTATE_OP_OPENING_STR = "Opening";
68
69
70 const std::unordered_map<short, std::string> SubstateMap = {
82 };
83
84
85
86}
87
88
89#endif //FCF_DEVMGR_DEVICE_SHUTTER_CONFIG_HPP
DataContext class header file.
DeviceConfig class header file.
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 int SUBSTATE_OP_DISABLING
Definition: deviceConfig.hpp:107
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:103
constexpr auto SUBSTATE_OP_DISABLING_STR
Definition: deviceConfig.hpp:110
Definition: shutter.hpp:19
constexpr bool DEFAULT_ACTIVE_LOW_OPEN
Definition: shutterConfig.hpp:41
const std::unordered_map< short, std::string > SubstateMap
Definition: shutterConfig.hpp:70
constexpr auto CI_TIMEOUT
Definition: shutterConfig.hpp:37
constexpr auto CI_ACTIVE_LOW_FAULT
Definition: shutterConfig.hpp:30
constexpr bool DEFAULT_IGNORE_CLOSED
Definition: shutterConfig.hpp:43
constexpr bool DEFAULT_ACTIVE_LOW_FAULT
Definition: shutterConfig.hpp:40
constexpr short SUBSTATE_READY_CLOSE
Definition: shutterConfig.hpp:55
constexpr auto CI_IGNORE_FAULT
Definition: shutterConfig.hpp:34
constexpr unsigned int DEFAULT_TIMEOUT
Definition: shutterConfig.hpp:47
constexpr short SUBSTATE_OP_CLOSE
Definition: shutterConfig.hpp:57
constexpr bool DEFAULT_INITIAL_STATE
Definition: shutterConfig.hpp:46
constexpr auto LOGGER_NAME
Definition: shutterConfig.hpp:27
constexpr bool DEFAULT_IGNORE_FAULT
Definition: shutterConfig.hpp:44
constexpr auto RPC_CLOSE
Definition: shutterConfig.hpp:51
constexpr bool DEFAULT_IGNORE_OPEN
Definition: shutterConfig.hpp:45
constexpr auto SUBSTATE_OP_CLOSE_STR
Definition: shutterConfig.hpp:64
constexpr auto CI_ACTIVE_LOW_SWITCH
Definition: shutterConfig.hpp:32
constexpr bool DEFAULT_ACTIVE_LOW_SWITCH
Definition: shutterConfig.hpp:42
constexpr auto SUBSTATE_OP_OPEN_STR
Definition: shutterConfig.hpp:66
constexpr auto SUBSTATE_OP_OPENING_STR
Definition: shutterConfig.hpp:67
constexpr auto CI_IGNORE_CLOSED
Definition: shutterConfig.hpp:33
constexpr short SUBSTATE_OP_CLOSING
Definition: shutterConfig.hpp:58
constexpr bool DEFAULT_ACTIVE_LOW_CLOSE
Definition: shutterConfig.hpp:39
constexpr auto SUBSTATE_READY_OPEN_STR
Definition: shutterConfig.hpp:63
constexpr auto SUBSTATE_OP_CLOSING_STR
Definition: shutterConfig.hpp:65
constexpr auto RPC_OPEN
Definition: shutterConfig.hpp:50
constexpr short SUBSTATE_OP_OPENING
Definition: shutterConfig.hpp:60
constexpr auto CI_INITIAL_STATE
Definition: shutterConfig.hpp:36
constexpr auto SUBSTATE_READY_CLOSE_STR
Definition: shutterConfig.hpp:62
constexpr short SUBSTATE_OP_OPEN
Definition: shutterConfig.hpp:59
constexpr auto CI_IGNORE_OPEN
Definition: shutterConfig.hpp:35
constexpr short SUBSTATE_READY_OPEN
Definition: shutterConfig.hpp:56
constexpr auto CI_ACTIVE_LOW_CLOSED
Definition: shutterConfig.hpp:29
constexpr auto CI_ACTIVE_LOW_OPEN
Definition: shutterConfig.hpp:31
ShutterHwErrors header file.
LampRpcErrors header file.