ifw-fcf 6.0.0
Loading...
Searching...
No Matches
drotConfig.hpp
Go to the documentation of this file.
1
10#ifndef FCF_DEVMGR_DEVICE_DROT_CONFIG_HPP
11#define FCF_DEVMGR_DEVICE_DROT_CONFIG_HPP
12
13#include <string>
14#include <yaml-cpp/yaml.h>
15
16#include <utils/bat/logger.hpp>
21
22namespace fcf {
23 namespace devmgr {
24 namespace drot {
25
26 constexpr auto LOGGER_NAME = "drot";
27 // Constants for internal mapping
28 // Specifics Drot status values
29 constexpr auto CI_FOCUS_SIGN = "focus_sign";
30 constexpr auto CI_DIR_SIGN = "dir_sign";
31 constexpr auto CI_STAT_REF = "stat_ref";
32 constexpr auto CI_STAT_SKY = "sky_ref";
33 constexpr auto CI_STAT_ELEV = "elev_ref";
34 constexpr auto CI_STAT_USER = "user_ref";
35 constexpr auto CI_USER_PAR1 = "user_par1";
36 constexpr auto CI_USER_PAR2 = "user_par2";
37 constexpr auto CI_USER_PAR3 = "user_par3";
38 constexpr auto CI_USER_PAR4 = "user_par4";
39 constexpr auto CI_LATITUDE = "latitude";
40 constexpr auto CI_LONGITUDE = "longitude";
41 constexpr auto CI_TRK_PERIOD = "trk_period";
42 constexpr auto CI_TRK_THRESHOLD = "trk_threshold";
43
44 // Specific Drot RPCSUBSTATE_OP_DISABLING
45 constexpr auto RPC_MOVE_ANGLE = "rpcMoveAngle";
46 constexpr auto RPC_START_TRACK = "rpcStartTrack";
47 constexpr auto RPC_TRACK_OFFSET = "rpcTrackOffset";
48 constexpr auto RPC_STOP_TRACK = "rpcStopTrack";
49
50 // Specific constant values for Drot device state/substate
51 // The other state/substate values are the same as the motor device.
52 constexpr int SUBSTATE_RESETTING = 109;
53 constexpr int SUBSTATE_ENABLING = 110;
54
55 constexpr int SUBSTATE_OP_TRACKING = 220;
56 constexpr int SUBSTATE_OP_PRESETTING = 221;
57
58 constexpr auto SUBSTATE_RESETTING_STR = "Resetting";
59 constexpr auto SUBSTATE_ENABLING_STR = "Enabling";
60 constexpr auto SUBSTATE_OP_TRACKING_STR = "Tracking";
61 constexpr auto SUBSTATE_OP_PRESETTING_STR = "Presetting";
62
63 const std::unordered_map<short, std::string> SubstateMap = {
78 };
79
80 constexpr short TRK_MODE_ENG = 0;
81 constexpr short TRK_MODE_STAT = 1;
82 constexpr short TRK_MODE_SKY = 2;
83 constexpr short TRK_MODE_ELEV = 3;
84 constexpr short TRK_MODE_USER = 4;
85
86 constexpr auto TRK_MODE_ENG_STR = "eng";
87 constexpr auto TRK_MODE_STAT_STR = "stat";
88 constexpr auto TRK_MODE_SKY_STR = "sky";
89 constexpr auto TRK_MODE_ELEV_STR = "elev";
90 constexpr auto TRK_MODE_USER_STR = "user";
91
92 const std::unordered_map<short, std::string> TrkModeMap = {
98 };
99
100 constexpr auto CI_STAT_TRACK_MODE = "track_mode";
101 constexpr auto CI_STAT_TRACK_OFFSET = "track_offset";
102 constexpr auto CI_STAT_ROTATION = "rotation";
103 constexpr auto CI_STAT_PUPIL = "pupil";
104 constexpr auto CI_STAT_ANGLE_ON_SKY = "angle_on_sky";
105
106 constexpr auto FITS_PARAM_TRKMODE = "MODE";
107 constexpr auto FITS_PARAM_ROTATION = "ROTATION";
108 constexpr auto FITS_PARAM_PUPIL = "PUPIL";
109 constexpr auto FITS_PARAM_POSANG = "POSANG";
110 }
111 }
112}
113
114#endif //FCF_DEVMGR_DEVICE_DROT_CONFIG_H
DataContext class header file.
DrotHwErrors header file.
DrotRpcErrors header file.
MotorConfig class header file.
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:108
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:99
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:98
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_READY_STR
Definition: deviceConfig.hpp:104
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
constexpr auto TRK_MODE_USER_STR
Definition: drotConfig.hpp:90
constexpr auto CI_STAT_REF
Definition: drotConfig.hpp:31
constexpr auto CI_STAT_USER
Definition: drotConfig.hpp:34
constexpr auto CI_USER_PAR1
Definition: drotConfig.hpp:35
const std::unordered_map< short, std::string > SubstateMap
Definition: drotConfig.hpp:63
constexpr auto FITS_PARAM_POSANG
Definition: drotConfig.hpp:109
constexpr auto CI_USER_PAR3
Definition: drotConfig.hpp:37
constexpr auto RPC_STOP_TRACK
Definition: drotConfig.hpp:48
constexpr auto CI_STAT_SKY
Definition: drotConfig.hpp:32
constexpr auto TRK_MODE_SKY_STR
Definition: drotConfig.hpp:88
constexpr auto TRK_MODE_ELEV_STR
Definition: drotConfig.hpp:89
constexpr auto CI_STAT_ANGLE_ON_SKY
Definition: drotConfig.hpp:104
constexpr short TRK_MODE_SKY
Definition: drotConfig.hpp:82
constexpr auto FITS_PARAM_TRKMODE
Definition: drotConfig.hpp:106
constexpr auto FITS_PARAM_ROTATION
Definition: drotConfig.hpp:107
constexpr auto CI_LATITUDE
Definition: drotConfig.hpp:39
constexpr auto RPC_MOVE_ANGLE
Definition: drotConfig.hpp:45
constexpr auto TRK_MODE_ENG_STR
Definition: drotConfig.hpp:86
constexpr short TRK_MODE_ENG
Definition: drotConfig.hpp:80
constexpr auto CI_USER_PAR2
Definition: drotConfig.hpp:36
constexpr int SUBSTATE_RESETTING
Definition: drotConfig.hpp:52
constexpr auto RPC_START_TRACK
Definition: drotConfig.hpp:46
const std::unordered_map< short, std::string > TrkModeMap
Definition: drotConfig.hpp:92
constexpr auto CI_TRK_PERIOD
Definition: drotConfig.hpp:41
constexpr auto CI_STAT_PUPIL
Definition: drotConfig.hpp:103
constexpr auto CI_STAT_ROTATION
Definition: drotConfig.hpp:102
constexpr auto TRK_MODE_STAT_STR
Definition: drotConfig.hpp:87
constexpr auto SUBSTATE_OP_TRACKING_STR
Definition: drotConfig.hpp:60
constexpr auto CI_STAT_TRACK_MODE
Definition: drotConfig.hpp:100
constexpr auto CI_STAT_ELEV
Definition: drotConfig.hpp:33
constexpr int SUBSTATE_OP_PRESETTING
Definition: drotConfig.hpp:56
constexpr auto SUBSTATE_ENABLING_STR
Definition: drotConfig.hpp:59
constexpr auto CI_FOCUS_SIGN
Definition: drotConfig.hpp:29
constexpr short TRK_MODE_STAT
Definition: drotConfig.hpp:81
constexpr auto CI_TRK_THRESHOLD
Definition: drotConfig.hpp:42
constexpr auto CI_DIR_SIGN
Definition: drotConfig.hpp:30
constexpr short TRK_MODE_USER
Definition: drotConfig.hpp:84
constexpr int SUBSTATE_ENABLING
Definition: drotConfig.hpp:53
constexpr auto CI_LONGITUDE
Definition: drotConfig.hpp:40
constexpr auto LOGGER_NAME
Definition: drotConfig.hpp:26
constexpr auto FITS_PARAM_PUPIL
Definition: drotConfig.hpp:108
constexpr auto RPC_TRACK_OFFSET
Definition: drotConfig.hpp:47
constexpr auto CI_USER_PAR4
Definition: drotConfig.hpp:38
constexpr auto SUBSTATE_RESETTING_STR
Definition: drotConfig.hpp:58
constexpr auto SUBSTATE_OP_PRESETTING_STR
Definition: drotConfig.hpp:61
constexpr int SUBSTATE_OP_TRACKING
Definition: drotConfig.hpp:55
constexpr short TRK_MODE_ELEV
Definition: drotConfig.hpp:83
constexpr auto CI_STAT_TRACK_OFFSET
Definition: drotConfig.hpp:101
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorBaseConfig.hpp:64
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorBaseConfig.hpp:63
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorBaseConfig.hpp:66
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorBaseConfig.hpp:62
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorBaseConfig.hpp:56
constexpr int SUBSTATE_OP_STOPPING
Definition: motorBaseConfig.hpp:59
constexpr int SUBSTATE_ABORTING
Definition: motorBaseConfig.hpp:55
constexpr int SUBSTATE_OP_MOVING
Definition: motorBaseConfig.hpp:57
Definition: actionMgr.cpp:29