ifw-fcf  4.1.0-pre2
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 #include "fcf/common/iComm.hpp"
16 
17 #include <utils/bat/logger.hpp>
23 
24 namespace fcf {
25  namespace devmgr {
26  namespace drot {
27 
28  constexpr auto LOGGER_NAME = "drot";
29  // Constants for internal mapping
30  // Specifics Drot status values
31  constexpr auto CI_FOCUS_SIGN = "focus_sign";
32  constexpr auto CI_DIR_SIGN = "dir_sign";
33  constexpr auto CI_STAT_REF = "stat_ref";
34  constexpr auto CI_STAT_SKY = "sky_ref";
35  constexpr auto CI_STAT_ELEV = "elev_ref";
36  constexpr auto CI_STAT_USER = "user_ref";
37  constexpr auto CI_USER_PAR1 = "user_par1";
38  constexpr auto CI_USER_PAR2 = "user_par2";
39  constexpr auto CI_USER_PAR3 = "user_par3";
40  constexpr auto CI_USER_PAR4 = "user_par4";
41  constexpr auto CI_LATITUDE = "latitude";
42  constexpr auto CI_LONGITUDE = "longitude";
43  constexpr auto CI_TRK_PERIOD = "trk_period";
44  constexpr auto CI_TRK_THRESHOLD = "trk_threshold";
45 
46 
47  // Specific Drot RPC
48  constexpr auto RPC_MOVE_ANGLE = "rpcMoveAngle";
49  constexpr auto RPC_START_TRACK = "rpcStartTrack";
50  constexpr auto RPC_STOP_TRACK = "rpcStopTrack";
51 
52 
53  // Specific constant values for Drot device state/substate
54  // The other state/substate values are the same as the motor device.
55  constexpr int SUBSTATE_RESETTING = 109;
56  constexpr int SUBSTATE_ENABLING = 110;
57 
58  constexpr int SUBSTATE_OP_TRACKING = 220;
59  constexpr int SUBSTATE_OP_PRESETTING = 221;
60 
61  constexpr auto SUBSTATE_RESETTING_STR = "Resetting";
62  constexpr auto SUBSTATE_ENABLING_STR = "Enabling";
63  constexpr auto SUBSTATE_OP_TRACKING_STR = "Tracking";
64  constexpr auto SUBSTATE_OP_PRESETTING_STR = "Presetting";
65 
66  const std::unordered_map<short, std::string> SubstateMap = {
81  };
82 
83  constexpr short TRK_MODE_ENG = 0;
84  constexpr short TRK_MODE_STAT = 1;
85  constexpr short TRK_MODE_SKY = 2;
86  constexpr short TRK_MODE_ELEV = 3;
87  constexpr short TRK_MODE_USER = 4;
88 
89  constexpr auto TRK_MODE_ENG_STR = "eng";
90  constexpr auto TRK_MODE_STAT_STR = "stat";
91  constexpr auto TRK_MODE_SKY_STR = "sky";
92  constexpr auto TRK_MODE_ELEV_STR = "elev";
93  constexpr auto TRK_MODE_USER_STR = "user";
94 
95  const std::unordered_map<short, std::string> TrkModeMap = {
101  };
102 
103  constexpr auto CI_STAT_TRACK_MODE = "track_mode";
104  constexpr auto CI_STAT_ROTATION = "rotation";
105  constexpr auto CI_STAT_PUPIL = "pupil";
106  constexpr auto CI_STAT_ANGLE_ON_SKY = "angle_on_sky";
107 
108  constexpr auto FITS_PARAM_TRKMODE = "MODE";
109  constexpr auto FITS_PARAM_ROTATION = "ROTATION";
110  constexpr auto FITS_PARAM_PUPIL = "PUPIL";
111  constexpr auto FITS_PARAM_POSANG = "POSANG";
112  }
113  }
114 }
115 
116 #endif //FCF_DEVMGR_DEVICE_DROT_CONFIG_H
fcf::devmgr::motor::SUBSTATE_OP_MOVING_STR
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorBaseConfig.hpp:66
fcf::devmgr::drot::CI_LONGITUDE
constexpr auto CI_LONGITUDE
Definition: drotConfig.hpp:42
fcf::devmgr::drot::FITS_PARAM_TRKMODE
constexpr auto FITS_PARAM_TRKMODE
Definition: drotConfig.hpp:108
fcf::devmgr::drot::FITS_PARAM_POSANG
constexpr auto FITS_PARAM_POSANG
Definition: drotConfig.hpp:111
dataContext.hpp
DataContext class header file.
fcf::devmgr::drot::TRK_MODE_SKY_STR
constexpr auto TRK_MODE_SKY_STR
Definition: drotConfig.hpp:91
fcf::devmgr::drot::CI_STAT_PUPIL
constexpr auto CI_STAT_PUPIL
Definition: drotConfig.hpp:105
fcf::devmgr::drot::CI_TRK_THRESHOLD
constexpr auto CI_TRK_THRESHOLD
Definition: drotConfig.hpp:44
fcf::devmgr::drot::CI_STAT_ROTATION
constexpr auto CI_STAT_ROTATION
Definition: drotConfig.hpp:104
fcf::devmgr::drot::RPC_MOVE_ANGLE
constexpr auto RPC_MOVE_ANGLE
Definition: drotConfig.hpp:48
fcf::devmgr::drot::CI_STAT_SKY
constexpr auto CI_STAT_SKY
Definition: drotConfig.hpp:34
fcf::devmgr::drot::SUBSTATE_RESETTING
constexpr int SUBSTATE_RESETTING
Definition: drotConfig.hpp:55
fcf::devmgr::drot::CI_STAT_REF
constexpr auto CI_STAT_REF
Definition: drotConfig.hpp:33
fcf::devmgr::drot::CI_DIR_SIGN
constexpr auto CI_DIR_SIGN
Definition: drotConfig.hpp:32
fcf::devmgr::drot::TRK_MODE_ELEV
constexpr short TRK_MODE_ELEV
Definition: drotConfig.hpp:86
fcf::devmgr::common::SUBSTATE_OP_DISABLING_STR
constexpr auto SUBSTATE_OP_DISABLING_STR
Definition: deviceConfig.hpp:111
drotRpcErrors.hpp
DrotRpcErrors header file.
fcf::devmgr::drot::TRK_MODE_STAT_STR
constexpr auto TRK_MODE_STAT_STR
Definition: drotConfig.hpp:90
fcf::devmgr::drot::CI_USER_PAR2
constexpr auto CI_USER_PAR2
Definition: drotConfig.hpp:38
fcf::devmgr::motor::SUBSTATE_OP_MOVING
constexpr int SUBSTATE_OP_MOVING
Definition: motorBaseConfig.hpp:59
fcf::devmgr::drot::CI_USER_PAR3
constexpr auto CI_USER_PAR3
Definition: drotConfig.hpp:39
fcf::devmgr::drot::CI_STAT_USER
constexpr auto CI_STAT_USER
Definition: drotConfig.hpp:36
fcf::devmgr::motor::SUBSTATE_ABORTING
constexpr int SUBSTATE_ABORTING
Definition: motorBaseConfig.hpp:57
fcf::devmgr::drot::TRK_MODE_USER_STR
constexpr auto TRK_MODE_USER_STR
Definition: drotConfig.hpp:93
fcf::devmgr::drot::RPC_START_TRACK
constexpr auto RPC_START_TRACK
Definition: drotConfig.hpp:49
fcf::devmgr::drot::CI_USER_PAR4
constexpr auto CI_USER_PAR4
Definition: drotConfig.hpp:40
fcf::devmgr::drot::SUBSTATE_RESETTING_STR
constexpr auto SUBSTATE_RESETTING_STR
Definition: drotConfig.hpp:61
fcf::devmgr::motor::SUBSTATE_OP_STANDSTILL_STR
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorBaseConfig.hpp:65
drot
Definition: __init__.py:1
fcf::devmgr::drot::TRK_MODE_USER
constexpr short TRK_MODE_USER
Definition: drotConfig.hpp:87
fcf::devmgr::drot::CI_TRK_PERIOD
constexpr auto CI_TRK_PERIOD
Definition: drotConfig.hpp:43
fcf::devmgr::drot::SUBSTATE_OP_PRESETTING
constexpr int SUBSTATE_OP_PRESETTING
Definition: drotConfig.hpp:59
fcf::devmgr::drot::SUBSTATE_ENABLING_STR
constexpr auto SUBSTATE_ENABLING_STR
Definition: drotConfig.hpp:62
fcf::devmgr::drot::CI_LATITUDE
constexpr auto CI_LATITUDE
Definition: drotConfig.hpp:41
fcf::devmgr::common::SUBSTATE_OP_DISABLING
constexpr int SUBSTATE_OP_DISABLING
Definition: deviceConfig.hpp:108
fcf::devmgr::drot::TrkModeMap
const std::unordered_map< short, std::string > TrkModeMap
Definition: drotConfig.hpp:95
fcf::devmgr::common::SUBSTATE_NOTREADY_STR
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:103
fcf
Definition: actionMgr.cpp:29
configSet.hpp
configSet class header file.
fcf::devmgr::common::SUBSTATE_INITIALISING_STR
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:104
fcf::devmgr::drot::SUBSTATE_ENABLING
constexpr int SUBSTATE_ENABLING
Definition: drotConfig.hpp:56
fcf::devmgr::common::SUBSTATE_NOTREADY
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:98
fcf::devmgr::drot::TRK_MODE_ENG_STR
constexpr auto TRK_MODE_ENG_STR
Definition: drotConfig.hpp:89
fcf::devmgr::common::SUBSTATE_INITIALISING
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:100
fcf::devmgr::drot::SUBSTATE_OP_PRESETTING_STR
constexpr auto SUBSTATE_OP_PRESETTING_STR
Definition: drotConfig.hpp:64
fcf::devmgr::drot::CI_FOCUS_SIGN
constexpr auto CI_FOCUS_SIGN
Definition: drotConfig.hpp:31
fcf::devmgr::drot::LOGGER_NAME
constexpr auto LOGGER_NAME
Definition: drotConfig.hpp:28
fcf::devmgr::drot::CI_STAT_ELEV
constexpr auto CI_STAT_ELEV
Definition: drotConfig.hpp:35
fcf::devmgr::drot::CI_STAT_ANGLE_ON_SKY
constexpr auto CI_STAT_ANGLE_ON_SKY
Definition: drotConfig.hpp:106
fcf::devmgr::common::SUBSTATE_OP_ERROR
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:109
fcf::devmgr::drot::RPC_STOP_TRACK
constexpr auto RPC_STOP_TRACK
Definition: drotConfig.hpp:50
fcf::devmgr::common::SUBSTATE_OP_ERROR_STR
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:112
fcf::devmgr::drot::CI_STAT_TRACK_MODE
constexpr auto CI_STAT_TRACK_MODE
Definition: drotConfig.hpp:103
fcf::devmgr::drot::CI_USER_PAR1
constexpr auto CI_USER_PAR1
Definition: drotConfig.hpp:37
fcf::devmgr::drot::TRK_MODE_ELEV_STR
constexpr auto TRK_MODE_ELEV_STR
Definition: drotConfig.hpp:92
fcf::devmgr::common::SUBSTATE_ERROR
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:101
fcf::devmgr::drot::TRK_MODE_SKY
constexpr short TRK_MODE_SKY
Definition: drotConfig.hpp:85
fcf::devmgr::drot::FITS_PARAM_PUPIL
constexpr auto FITS_PARAM_PUPIL
Definition: drotConfig.hpp:110
fcf::devmgr::motor::SUBSTATE_ABORTING_STR
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorBaseConfig.hpp:64
fcf::devmgr::common::SUBSTATE_READY_STR
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:105
fcf::devmgr::common::SUBSTATE_READY
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:99
fcf::devmgr::drot::SubstateMap
const std::unordered_map< short, std::string > SubstateMap
Definition: drotConfig.hpp:66
drotHwErrors.hpp
DrotHwErrors header file.
fcf::devmgr::drot::SUBSTATE_OP_TRACKING
constexpr int SUBSTATE_OP_TRACKING
Definition: drotConfig.hpp:58
fcf::devmgr::motor::SUBSTATE_OP_STOPPING
constexpr int SUBSTATE_OP_STOPPING
Definition: motorBaseConfig.hpp:61
fcf::devmgr::motor::SUBSTATE_OP_STOPPING_STR
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorBaseConfig.hpp:68
fcf::devmgr::common::SUBSTATE_ERROR_STR
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:106
fcf::devmgr::drot::FITS_PARAM_ROTATION
constexpr auto FITS_PARAM_ROTATION
Definition: drotConfig.hpp:109
motorConfig.hpp
MotorConfig class header file.
fcf::devmgr::drot::TRK_MODE_ENG
constexpr short TRK_MODE_ENG
Definition: drotConfig.hpp:83
fcf::devmgr::motor::SUBSTATE_OP_STANDSTILL
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorBaseConfig.hpp:58
fcf::devmgr::drot::SUBSTATE_OP_TRACKING_STR
constexpr auto SUBSTATE_OP_TRACKING_STR
Definition: drotConfig.hpp:63
fcf::devmgr::drot::TRK_MODE_STAT
constexpr short TRK_MODE_STAT
Definition: drotConfig.hpp:84