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