ifw-fcf  3.0.0
motorConfig.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
11 #define FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
12 
13 // System headers
14 #include <string>
15 #include <unordered_map>
16 
17 // Third party headers
18 #include <yaml-cpp/yaml.h>
19 
20 #include <fcf/common/iComm.hpp>
26 
27 
28 namespace fcf::devmgr::motor {
29 
30  // Constants for internal mapping
31  constexpr auto CI_BRAKE = "brake";
32  constexpr auto CI_BACKLASH = "backlash";
33  constexpr auto CI_AXIS_TYPE = "axis_type";
34  constexpr auto CI_DEF_VEL = "velocity";
35  constexpr auto CI_MAX_POS = "max_pos";
36  constexpr auto CI_MIN_POS = "min_pos";
37 
38  constexpr auto CI_CHECK_INPOS = "check_inpos";
39  constexpr auto CI_LOCK = "lock";
40  constexpr auto CI_LOCK_POS = "lock_pos";
41  constexpr auto CI_LOCK_TOLERANCE = "lock_tolerance";
42  constexpr auto CI_DISABLE = "disable";
43 
44  constexpr auto CI_TIMEOUT_INIT = "tout_init";
45  constexpr auto CI_TIMEOUT_MOVE = "tout_move";
46  constexpr auto CI_TIMEOUT_SWITCH = "tout_switch";
47 
48  constexpr auto CI_ACTIVE_LOW_BRAKE = "low_brake";
49  constexpr auto CI_ACTIVE_LOW_INPOS = "low_inpos";
50  constexpr auto CI_ACTIVE_LOW_STOP = "active_low_lstop";
51  constexpr auto CI_ACTIVE_LOW_LHW = "active_low_lhw";
52  constexpr auto CI_ACTIVE_LOW_REF = "active_low_ref";
53  constexpr auto CI_ACTIVE_LOW_INDEX = "active_low_index";
54  constexpr auto CI_ACTIVE_LOW_UHW = "active_low_uhw";
55  constexpr auto CI_ACTIVE_LOW_USTOP = "active_low_ustop";
56 
57  constexpr auto CI_EXEC_PRE_INIT = "exec_pre_init";
58  constexpr auto CI_EXEC_POST_INIT = "exec_post_init";
59  constexpr auto CI_EXEC_PRE_MOVE = "exec_pre_move";
60  constexpr auto CI_EXEC_POST_MOVE = "exec_post_move";
61 
62  constexpr auto CI_INITIALISATION = "initialisation";
63  constexpr auto CI_INIT_SEQUENCE = "sequence";
64  constexpr auto CI_INIT_ACTION = "action";
65  constexpr auto CI_INIT_VALUE_1 = "value1";
66  constexpr auto CI_INIT_VALUE_2 = "value2";
67 
68 
69  // WS configuration keywords
70  // These configuration only matters for WS level
71  constexpr auto CI_POSITIONS = "positions";
72  constexpr auto CI_POS_NAMES = "posnames";
73  constexpr auto CI_NAME_POS_TOLERANCE = "tolerance";
74  constexpr auto CI_SCALE_FACTOR = "scale_factor";
75 
76  constexpr int CI_AXIS_TYPE_LINEAR = 1;
77  constexpr int CI_AXIS_TYPE_CIRCULAR = 2;
78  constexpr int CI_AXIS_TYPE_CIRCULAR_OPT = 3;
79 
80  constexpr auto CI_AXIS_TYPE_LINEAR_STR = "LINEAR";
81  constexpr auto CI_AXIS_TYPE_CIRCULAR_STR = "CIRCULAR";
82  constexpr auto CI_AXIS_TYPE_CIRCULAR_OPT_STR = "CIRCULAR_OPT";
83 
84  constexpr int CI_AXIS_MODE_INPOS = 0;
85  constexpr int CI_AXIS_MODE_INVEL = 1;
86 
87  constexpr auto CI_AXIS_MODE_INPOS_STR = "InPosition";
88  constexpr auto CI_AXIS_MODE_INVEL_STR = "InVelocity";
89 
90  const std::unordered_map<int, std::string> AxisModeMap = {
93  };
94 
95  constexpr int CI_MAX_INIT_STEPS = 10;
96 
97  constexpr auto CI_INIT_ACTION_END = "END";
98  constexpr auto CI_INIT_ACTION_FIND_INDEX = "FIND_INDEX";
99  constexpr auto CI_INIT_ACTION_FIND_REF_LE = "FIND_REF_LE";
100  constexpr auto CI_INIT_ACTION_FIND_REF_UE = "FIND_REF_UE";
101  constexpr auto CI_INIT_ACTION_FIND_LHW = "FIND_LHW";
102  constexpr auto CI_INIT_ACTION_FIND_UHW = "FIND_UHW";
103  constexpr auto CI_INIT_ACTION_DELAY = "DELAY";
104  constexpr auto CI_INIT_ACTION_MOVE_ABS = "MOVE_ABS";
105  constexpr auto CI_INIT_ACTION_MOVE_REL = "MOVE_REL";
106  constexpr auto CI_INIT_ACTION_CALIB_ABS = "CALIB_ABS";
107  constexpr auto CI_INIT_ACTION_CALIB_REL = "CALIB_REL";
108  constexpr auto CI_INIT_ACTION_CALIB_SWITCH = "CALIB_SWITCH";
109 
110  constexpr auto RPC_MOVE_ABS = "rpcMoveAbs";
111  constexpr auto RPC_MOVE_REL = "rpcMoveRel";
112  constexpr auto RPC_MOVE_VEL = "rpcMoveVel";
113 
114  constexpr int SUBSTATE_ABORTING = 107;
115  constexpr int SUBSTATE_OP_STANDSTILL = 216;
116  constexpr int SUBSTATE_OP_MOVING = 217;
117  constexpr int SUBSTATE_OP_SETTING_POS = 218;
118  constexpr int SUBSTATE_OP_STOPPING = 219;
119 
120  constexpr auto SUBSTATE_READY_STR = "Ready";
121  constexpr auto SUBSTATE_ABORTING_STR = "Aborting";
122  constexpr auto SUBSTATE_OP_STANDSTILL_STR = "Standstill";
123  constexpr auto SUBSTATE_OP_MOVING_STR = "Moving";
124  constexpr auto SUBSTATE_OP_SETTING_POS_STR = "SettingPos";
125  constexpr auto SUBSTATE_OP_STOPPING_STR = "Stopping";
126 
127  const std::unordered_map<short, std::string> SubstateMap = {
138  };
139 
140  // encoders are used only at the WS level
141  constexpr auto CI_STAT_ENC_POS = "pos_enc";
142  constexpr auto CI_STAT_TARGET_ENC = "target_enc";
143  constexpr auto CI_STAT_TARGET_POSNAME = "pos_target_name";
144  constexpr auto CI_STAT_ACTUAL_POSNAME = "pos_actual_name";
145  constexpr auto CI_STAT_TARGET_POS = "pos_target";
146  constexpr auto CI_STAT_ACTUAL_POS = "pos_actual";
147  constexpr auto CI_STAT_POS_ERROR = "pos_error";
148  constexpr auto CI_STAT_ACTUAL_VEL = "vel_actual";
149  constexpr auto CI_STAT_TARGET_VEL = "vel_target";
150  constexpr auto CI_STAT_SCALE_FACTOR = "scale_factor";
151  constexpr auto CI_STAT_BACKLASH_STEP = "backlash_step";
152  constexpr auto CI_STAT_MODE = "mode";
153  constexpr auto CI_STAT_INITIALISED = "initialised";
154  constexpr auto CI_STAT_INIT_STEP = "init_step";
155  constexpr auto CI_STAT_INIT_ACTION = "init_action";
156  constexpr auto CI_STAT_AXIS_READY = "axis_ready";
157  constexpr auto CI_STAT_AXIS_ENABLE = "axis_enable";
158  constexpr auto CI_STAT_AXIS_INPOS = "axis_inposition";
159  constexpr auto CI_STAT_AXIS_LOCK = "axis_lock";
160  constexpr auto CI_STAT_AXIS_BRAKE = "axis_brake";
161  constexpr auto CI_STAT_AXIS_STOP_NEG = "axis_stop_pos";
162  constexpr auto CI_STAT_AXIS_STOP_POS = "axis_stop_neg";
163  constexpr auto CI_STAT_AXIS_INFO_DATA_1 = "axis_info_data1";
164  constexpr auto CI_STAT_AXIS_INFO_DATA_2 = "axis_info_data2";
165 
166  constexpr auto CI_STAT_SIGNAL_LSTOP = "signal_lstop";
167  constexpr auto CI_STAT_SIGNAL_LHW = "signal_lhw";
168  constexpr auto CI_STAT_SIGNAL_REF = "signal_ref";
169  constexpr auto CI_STAT_SIGNAL_INDEX = "signal_index";
170  constexpr auto CI_STAT_SIGNAL_UHW = "signal_uhw";
171  constexpr auto CI_STAT_SIGNAL_USTOP = "signal_ustop";
172 
173  enum class Signal : short {LSTOP = 0,
174  LHW = 1,
175  REF = 2,
176  INDEX = 3,
177  UHW = 4,
178  USTOP = 5};
179 
180 
181  constexpr auto FITS_PARAM_POSNAME = "POSNAME";
182  constexpr auto FITS_PARAM_POS = "POS";
183  constexpr auto FITS_PARAM_BRAKE = "BRAKE";
184  constexpr auto FITS_PARAM_LOCK = "LOCK";
185 
186 
187  constexpr auto UndefinedNamedPos = "undefined";
188 
189  const std::vector<std::string> cfgMapping = {
191  };
192 
203  const std::vector<std::string> statMapping = {
215  // CI_STAT_POS_ERROR,
216  // CI_STAT_MODE,
217  // CI_STAT_AXIS_READY,
218  // CI_STAT_AXIS_INPOSition,
219  // CI_STAT_SIGNAL_LSTOP,
220  // CI_STAT_SIGNAL_LHW,
221  // CI_STAT_SIGNAL_REF,
222  // CI_STAT_SIGNAL_INDEX,
223  // CI_STAT_SIGNAL_UHW,
224  // CI_STAT_SIGNAL_USTOP,
225  // CI_STAT_AXIS_INFO_DATA_1,
226  // CI_STAT_AXIS_INFO_DATA_2
227  };
228 
229  const std::vector<std::string> rpcMapping = {
235  RPC_MOVE_ABS,
236  RPC_MOVE_REL,
238  };
239 
240  // Map of Axis type to do the converstion between strings to numbers
241  const std::unordered_map<std::string, int> AxisTypeMap = {
245  };
246 
247  enum {
260  };
261 
262  // @TODO: replaced by boost bimaps
263  // Tried with boost bimap but I've got hundred of errors.
264  // I added temporaly two maps.
265 
266  // Map of motor initialisation steps
267  const std::unordered_map<std::string, int> InitActionsMap = {
280  };
281 
282  // Map of motor initialisation steps
283  const std::unordered_map<int, std::string> InitActions2Map = {
296  };
297 
298  struct InitAction {
299  int id;
300  double value1;
301  double value2;
302 
303  InitAction():id(0), value1(0.0), value2(0.0) {}
304  };
305 
306  class Sensor;
315  {
316  friend class Sensor;
317 
318  public:
319  enum {
346  END_ENUM_MOTOR // WARNING: This should be always last enumerator.
347  };
348 
349  public:
355  MotorConfig(const std::string filename,
356  const std::string name);
357 
362  MotorConfig(const std::string name);
363 
367  virtual ~MotorConfig();
368 
372  void InitConfig();
373 
382  virtual void ReadConfig();
383 
392  virtual void GetConfig(fcf::common::VectorVariant& params);
393 
394 
404  virtual void GetConfigList(std::vector<std::string>& cfg_list,
405  std::string prefix);
406 
407 
408 
414 
415 
420  double GetVelocity();
421 
426  void SetScaleFactor(double scale);
427 
432  double GetScaleFactor() const;
433 
439  const std::string GetNamedPosition(const int index);
440 
446  const double GetNamedPositionValue(const std::string named_pos);
447 
454  bool FindNamedPositionValue(const std::string named_pos,
455  double& position);
456 
463  bool FindNamedPositionValue(const double position,
464  std::string& name);
465 
470  double GetNpTolerance() const;
471 
472 
473  protected:
474 
475  // Map of motor init step to do the conversion between strings to numbers
476  std::unordered_map<int, InitAction> m_init_sequence_map;
477 
478  private:
479  // dynamic configuration values
480  double m_scale_factor;
481  int m_num_named_pos;
482  double m_np_tolerance;
483 
484  // Map of motor named positions
485  std::unordered_map<std::string, double> m_named_positions;
486 
487 
488 
489  };
490 
491 }
492 
493 
494 #endif //FCF_DEVMGR_DEVICE_MOTOR_CONFIG_H
fcf::devmgr::motor::SUBSTATE_OP_MOVING_STR
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorConfig.hpp:123
fcf::devmgr::motor::INIT_ACTION_MOVE_REL
@ INIT_ACTION_MOVE_REL
Definition: motorConfig.hpp:256
fcf::devmgr::motor::MotorConfig::CFG_LOCK
@ CFG_LOCK
Definition: motorConfig.hpp:327
fcf::devmgr::motor::INIT_ACTION_FIND_UHW
@ INIT_ACTION_FIND_UHW
Definition: motorConfig.hpp:253
fcf::devmgr::motor::CI_STAT_BACKLASH_STEP
constexpr auto CI_STAT_BACKLASH_STEP
Definition: motorConfig.hpp:151
fcf::devmgr::motor::CI_STAT_SIGNAL_USTOP
constexpr auto CI_STAT_SIGNAL_USTOP
Definition: motorConfig.hpp:171
dataContext.hpp
DataContext class header file.
fcf::devmgr::motor::MotorConfig::GetScaleFactor
double GetScaleFactor() const
Definition: motorConfig.cpp:283
fcf::devmgr::motor::CI_AXIS_TYPE_CIRCULAR_OPT_STR
constexpr auto CI_AXIS_TYPE_CIRCULAR_OPT_STR
Definition: motorConfig.hpp:82
fcf::devmgr::motor::CI_INIT_SEQUENCE
constexpr auto CI_INIT_SEQUENCE
Definition: motorConfig.hpp:63
fcf::devmgr::motor::InitAction::InitAction
InitAction()
Definition: motorConfig.hpp:303
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWINDEX
@ CFG_ACTLOWINDEX
Definition: motorConfig.hpp:339
fcf::devmgr::motor
Definition: motor.hpp:20
fcf::devmgr::motor::MotorConfig::InitConfig
void InitConfig()
Define configuration parameters for motor device.
Definition: motorConfig.cpp:49
fcf::devmgr::motor::InitAction::value2
double value2
Definition: motorConfig.hpp:301
fcf::devmgr::motor::AxisTypeMap
const std::unordered_map< std::string, int > AxisTypeMap
Definition: motorConfig.hpp:241
fcf::devmgr::motor::CI_LOCK_POS
constexpr auto CI_LOCK_POS
Definition: motorConfig.hpp:40
fcf::devmgr::motor::MotorConfig::SetScaleFactor
void SetScaleFactor(double scale)
Set Scale Factor.
Definition: motorConfig.cpp:277
fcf::devmgr::motor::INIT_ACTION_DELAY
@ INIT_ACTION_DELAY
Definition: motorConfig.hpp:254
fcf::devmgr::motor::CI_STAT_INIT_ACTION
constexpr auto CI_STAT_INIT_ACTION
Definition: motorConfig.hpp:155
fcf::devmgr::motor::CI_STAT_TARGET_POSNAME
constexpr auto CI_STAT_TARGET_POSNAME
Definition: motorConfig.hpp:143
fcf::devmgr::motor::MotorConfig::~MotorConfig
virtual ~MotorConfig()
MotorConfig destructor.
Definition: motorConfig.cpp:45
fcf::devmgr::motor::CI_SCALE_FACTOR
constexpr auto CI_SCALE_FACTOR
Definition: motorConfig.hpp:74
fcf::devmgr::motor::CI_INIT_ACTION_FIND_INDEX
constexpr auto CI_INIT_ACTION_FIND_INDEX
Definition: motorConfig.hpp:98
fcf::devmgr::motor::CI_STAT_INIT_STEP
constexpr auto CI_STAT_INIT_STEP
Definition: motorConfig.hpp:154
motorHwErrors.hpp
MotorHwErrors header file.
fcf::devmgr::motor::CI_BACKLASH
constexpr auto CI_BACKLASH
Definition: motorConfig.hpp:32
fcf::devmgr::motor::CI_POS_NAMES
constexpr auto CI_POS_NAMES
Definition: motorConfig.hpp:72
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWUSTOP
@ CFG_ACTLOWUSTOP
Definition: motorConfig.hpp:341
fcf::devmgr::motor::CI_EXEC_PRE_INIT
constexpr auto CI_EXEC_PRE_INIT
Definition: motorConfig.hpp:57
fcf::devmgr::motor::FITS_PARAM_POSNAME
constexpr auto FITS_PARAM_POSNAME
Definition: motorConfig.hpp:181
fcf::devmgr::motor::CI_STAT_POS_ERROR
constexpr auto CI_STAT_POS_ERROR
Definition: motorConfig.hpp:147
fcf::devmgr::motor::CI_ACTIVE_LOW_INDEX
constexpr auto CI_ACTIVE_LOW_INDEX
Definition: motorConfig.hpp:53
fcf::devmgr::motor::CI_ACTIVE_LOW_USTOP
constexpr auto CI_ACTIVE_LOW_USTOP
Definition: motorConfig.hpp:55
fcf::devmgr::common::CI_STAT_ERROR_CODE
constexpr auto CI_STAT_ERROR_CODE
Definition: deviceConfig.hpp:54
fcf::devmgr::motor::rpcMapping
const std::vector< std::string > rpcMapping
Definition: motorConfig.hpp:229
fcf::devmgr::motor::CI_INIT_ACTION_DELAY
constexpr auto CI_INIT_ACTION_DELAY
Definition: motorConfig.hpp:103
fcf::devmgr::motor::InitActions2Map
const std::unordered_map< int, std::string > InitActions2Map
Definition: motorConfig.hpp:283
fcf::devmgr::motor::CI_POSITIONS
constexpr auto CI_POSITIONS
Definition: motorConfig.hpp:71
fcf::devmgr::motor::CI_STAT_SIGNAL_INDEX
constexpr auto CI_STAT_SIGNAL_INDEX
Definition: motorConfig.hpp:169
fcf::devmgr::motor::MotorConfig::GetNumberOfNamedPositions
int GetNumberOfNamedPositions()
Definition: motorConfig.cpp:407
fcf::devmgr::motor::cfgMapping
const std::vector< std::string > cfgMapping
Definition: motorConfig.hpp:189
fcf::devmgr::motor::CI_EXEC_POST_MOVE
constexpr auto CI_EXEC_POST_MOVE
Definition: motorConfig.hpp:60
fcf::devmgr::motor::InitAction::value1
double value1
Definition: motorConfig.hpp:300
fcf::devmgr::motor::RPC_MOVE_VEL
constexpr auto RPC_MOVE_VEL
Definition: motorConfig.hpp:112
fcf::devmgr::motor::INIT_ACTION_END
@ INIT_ACTION_END
Definition: motorConfig.hpp:248
fcf::devmgr::motor::INIT_ACTION_CALIB_SWITCH
@ INIT_ACTION_CALIB_SWITCH
Definition: motorConfig.hpp:259
deviceConfig.hpp
DeviceConfig class header file.
fcf::devmgr::motor::CI_AXIS_TYPE_CIRCULAR
constexpr int CI_AXIS_TYPE_CIRCULAR
Definition: motorConfig.hpp:77
fcf::devmgr::motor::CI_AXIS_MODE_INPOS_STR
constexpr auto CI_AXIS_MODE_INPOS_STR
Definition: motorConfig.hpp:87
fcf::devmgr::motor::SUBSTATE_OP_MOVING
constexpr int SUBSTATE_OP_MOVING
Definition: motorConfig.hpp:116
fcf::devmgr::motor::MotorConfig::CFG_AUTODISABLE
@ CFG_AUTODISABLE
Definition: motorConfig.hpp:330
fcf::devmgr::motor::INIT_ACTION_FIND_REF_UE
@ INIT_ACTION_FIND_REF_UE
Definition: motorConfig.hpp:251
fcf::devmgr::motor::INIT_ACTION_FIND_LHW
@ INIT_ACTION_FIND_LHW
Definition: motorConfig.hpp:252
fcf::devmgr::motor::INIT_ACTION_CALIB_ABS
@ INIT_ACTION_CALIB_ABS
Definition: motorConfig.hpp:257
fcf::devmgr::motor::MotorConfig::GetVelocity
double GetVelocity()
Definition: motorConfig.cpp:266
fcf::devmgr::motor::CI_INITIALISATION
constexpr auto CI_INITIALISATION
Definition: motorConfig.hpp:62
fcf::devmgr::motor::CI_AXIS_MODE_INVEL_STR
constexpr auto CI_AXIS_MODE_INVEL_STR
Definition: motorConfig.hpp:88
fcf::devmgr::motor::CI_EXEC_PRE_MOVE
constexpr auto CI_EXEC_PRE_MOVE
Definition: motorConfig.hpp:59
fcf::devmgr::motor::MotorConfig::CFG_SWITCHTOUT
@ CFG_SWITCHTOUT
Definition: motorConfig.hpp:333
fcf::devmgr::motor::CI_MIN_POS
constexpr auto CI_MIN_POS
Definition: motorConfig.hpp:36
fcf::devmgr::common::CI_STAT_STATE
constexpr auto CI_STAT_STATE
Definition: deviceConfig.hpp:51
fcf::devmgr::motor::CI_STAT_SIGNAL_REF
constexpr auto CI_STAT_SIGNAL_REF
Definition: motorConfig.hpp:168
fcf::devmgr::common::CI_STAT_LOCAL
constexpr auto CI_STAT_LOCAL
Definition: deviceConfig.hpp:53
fcf::devmgr::motor::CI_STAT_TARGET_VEL
constexpr auto CI_STAT_TARGET_VEL
Definition: motorConfig.hpp:149
fcf::devmgr::motor::CI_STAT_AXIS_STOP_NEG
constexpr auto CI_STAT_AXIS_STOP_NEG
Definition: motorConfig.hpp:161
fcf::devmgr::motor::CI_ACTIVE_LOW_INPOS
constexpr auto CI_ACTIVE_LOW_INPOS
Definition: motorConfig.hpp:49
fcf::devmgr::motor::MotorConfig::FindNamedPositionValue
bool FindNamedPositionValue(const std::string named_pos, double &position)
Find value associated to a named position.
Definition: motorConfig.cpp:323
fcf::devmgr::motor::CI_STAT_TARGET_POS
constexpr auto CI_STAT_TARGET_POS
Definition: motorConfig.hpp:145
fcf::devmgr::motor::CI_STAT_AXIS_READY
constexpr auto CI_STAT_AXIS_READY
Definition: motorConfig.hpp:156
fcf::devmgr::motor::SUBSTATE_ABORTING
constexpr int SUBSTATE_ABORTING
Definition: motorConfig.hpp:114
fcf::devmgr::motor::MotorConfig::CFG_EXECPREMOVE
@ CFG_EXECPREMOVE
Definition: motorConfig.hpp:344
fcf::devmgr::motor::CI_INIT_ACTION_FIND_UHW
constexpr auto CI_INIT_ACTION_FIND_UHW
Definition: motorConfig.hpp:102
fcf::devmgr::motor::CI_STAT_SCALE_FACTOR
constexpr auto CI_STAT_SCALE_FACTOR
Definition: motorConfig.hpp:150
fcf::devmgr::motor::CI_DISABLE
constexpr auto CI_DISABLE
Definition: motorConfig.hpp:42
fcf::devmgr::motor::CI_BRAKE
constexpr auto CI_BRAKE
Definition: motorConfig.hpp:31
fcf::devmgr::motor::Signal
Signal
Definition: motorConfig.hpp:173
fcf::devmgr::motor::UndefinedNamedPos
constexpr auto UndefinedNamedPos
Definition: motorConfig.hpp:187
fcf::devmgr::motor::CI_INIT_ACTION_FIND_REF_LE
constexpr auto CI_INIT_ACTION_FIND_REF_LE
Definition: motorConfig.hpp:99
fcf::devmgr::motor::CI_CHECK_INPOS
constexpr auto CI_CHECK_INPOS
Definition: motorConfig.hpp:38
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWBRAKE
@ CFG_ACTLOWBRAKE
Definition: motorConfig.hpp:334
motorRpcErrors.hpp
LampRpcErrors header file.
fcf::devmgr::motor::FITS_PARAM_POS
constexpr auto FITS_PARAM_POS
Definition: motorConfig.hpp:182
fcf::devmgr::motor::CI_INIT_ACTION_MOVE_REL
constexpr auto CI_INIT_ACTION_MOVE_REL
Definition: motorConfig.hpp:105
fcf::devmgr::motor::MotorConfig::GetConfig
virtual void GetConfig(fcf::common::VectorVariant &params)
Obtain the list of configuration parameters.
Definition: motorConfig.cpp:232
fcf::devmgr::motor::CI_MAX_POS
constexpr auto CI_MAX_POS
Definition: motorConfig.hpp:35
fcf::devmgr::motor::MotorConfig::CFG_MINPOS
@ CFG_MINPOS
Definition: motorConfig.hpp:325
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWINPOS
@ CFG_ACTLOWINPOS
Definition: motorConfig.hpp:335
fcf::devmgr::common::RPC_STOP
constexpr auto RPC_STOP
Definition: deviceConfig.hpp:46
fcf::devmgr::motor::MotorConfig::CFG_BACKLASH
@ CFG_BACKLASH
Definition: motorConfig.hpp:321
fcf::devmgr::motor::SUBSTATE_OP_STANDSTILL_STR
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorConfig.hpp:122
fcf::devmgr::motor::MotorConfig::MotorConfig
MotorConfig(const std::string filename, const std::string name)
MotorConfig constructor.
Definition: motorConfig.cpp:25
fcf::devmgr::common::RPC_DISABLE
constexpr auto RPC_DISABLE
Definition: deviceConfig.hpp:45
fcf::devmgr::motor::MotorConfig::CFG_INITTOUT
@ CFG_INITTOUT
Definition: motorConfig.hpp:331
fcf::devmgr::motor::MotorConfig::Sensor
friend class Sensor
Definition: motorConfig.hpp:316
fcf::devmgr::motor::CI_INIT_ACTION_MOVE_ABS
constexpr auto CI_INIT_ACTION_MOVE_ABS
Definition: motorConfig.hpp:104
fcf::devmgr::motor::CI_AXIS_TYPE_CIRCULAR_STR
constexpr auto CI_AXIS_TYPE_CIRCULAR_STR
Definition: motorConfig.hpp:81
fcf::devmgr::motor::CI_STAT_ENC_POS
constexpr auto CI_STAT_ENC_POS
Definition: motorConfig.hpp:141
fcf::devmgr::motor::CI_STAT_AXIS_LOCK
constexpr auto CI_STAT_AXIS_LOCK
Definition: motorConfig.hpp:159
fcf::devmgr::motor::MotorConfig::CFG_MOVETOUT
@ CFG_MOVETOUT
Definition: motorConfig.hpp:332
fcf::devmgr::motor::CI_INIT_ACTION_END
constexpr auto CI_INIT_ACTION_END
Definition: motorConfig.hpp:97
fcf::devmgr::motor::MotorConfig::CFG_CHECKINPOS
@ CFG_CHECKINPOS
Definition: motorConfig.hpp:326
fcf::devmgr::motor::CI_ACTIVE_LOW_REF
constexpr auto CI_ACTIVE_LOW_REF
Definition: motorConfig.hpp:52
fcf::devmgr::motor::MotorConfig::CFG_MAXPOS
@ CFG_MAXPOS
Definition: motorConfig.hpp:324
fcf::devmgr::motor::MotorConfig::CFG_BRAKE
@ CFG_BRAKE
Definition: motorConfig.hpp:320
fcf::devmgr::motor::MotorConfig::ReadConfig
virtual void ReadConfig()
Read the configuration.
Definition: motorConfig.cpp:97
fcf::devmgr::motor::CI_LOCK
constexpr auto CI_LOCK
Definition: motorConfig.hpp:39
fcf::devmgr::motor::MotorConfig::CFG_LOCKPOS
@ CFG_LOCKPOS
Definition: motorConfig.hpp:328
fcf::devmgr::motor::MotorConfig::CFG_EXECPOSTINIT
@ CFG_EXECPOSTINIT
Definition: motorConfig.hpp:343
fcf::devmgr::motor::CI_AXIS_TYPE
constexpr auto CI_AXIS_TYPE
Definition: motorConfig.hpp:33
fcf::devmgr::common::SUBSTATE_NOTREADY_STR
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:87
configSet.hpp
configSet class header file.
fcf::devmgr::motor::Signal::LSTOP
@ LSTOP
fcf::devmgr::motor::MotorConfig::CFG_DEFVEL
@ CFG_DEFVEL
Definition: motorConfig.hpp:323
fcf::devmgr::common::SUBSTATE_INITIALISING_STR
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:88
fcf::devmgr::common::SUBSTATE_NOTREADY
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:82
fcf::devmgr::motor::CI_AXIS_TYPE_CIRCULAR_OPT
constexpr int CI_AXIS_TYPE_CIRCULAR_OPT
Definition: motorConfig.hpp:78
fcf::devmgr::motor::CI_STAT_ACTUAL_POSNAME
constexpr auto CI_STAT_ACTUAL_POSNAME
Definition: motorConfig.hpp:144
fcf::devmgr::motor::CI_INIT_ACTION_CALIB_SWITCH
constexpr auto CI_INIT_ACTION_CALIB_SWITCH
Definition: motorConfig.hpp:108
fcf::devmgr::motor::CI_STAT_ACTUAL_POS
constexpr auto CI_STAT_ACTUAL_POS
Definition: motorConfig.hpp:146
fcf::devmgr::motor::CI_STAT_ACTUAL_VEL
constexpr auto CI_STAT_ACTUAL_VEL
Definition: motorConfig.hpp:148
fcf::devmgr::motor::CI_TIMEOUT_MOVE
constexpr auto CI_TIMEOUT_MOVE
Definition: motorConfig.hpp:45
fcf::devmgr::common::SUBSTATE_INITIALISING
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:84
fcf::devmgr::motor::CI_ACTIVE_LOW_LHW
constexpr auto CI_ACTIVE_LOW_LHW
Definition: motorConfig.hpp:51
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWLHW
@ CFG_ACTLOWLHW
Definition: motorConfig.hpp:337
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWUHW
@ CFG_ACTLOWUHW
Definition: motorConfig.hpp:340
fcf::devmgr::motor::CI_ACTIVE_LOW_BRAKE
constexpr auto CI_ACTIVE_LOW_BRAKE
Definition: motorConfig.hpp:48
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWLSTOP
@ CFG_ACTLOWLSTOP
Definition: motorConfig.hpp:336
fcf::devmgr::common::RPC_ENABLE
constexpr auto RPC_ENABLE
Definition: deviceConfig.hpp:44
fcf::devmgr::common::SUBSTATE_OP_ERROR
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:93
fcf::devmgr::motor::CI_INIT_ACTION_FIND_LHW
constexpr auto CI_INIT_ACTION_FIND_LHW
Definition: motorConfig.hpp:101
fcf::devmgr::motor::CI_LOCK_TOLERANCE
constexpr auto CI_LOCK_TOLERANCE
Definition: motorConfig.hpp:41
fcf::devmgr::motor::RPC_MOVE_ABS
constexpr auto RPC_MOVE_ABS
Definition: motorConfig.hpp:110
fcf::devmgr::motor::CI_STAT_AXIS_INFO_DATA_1
constexpr auto CI_STAT_AXIS_INFO_DATA_1
Definition: motorConfig.hpp:163
fcf::devmgr::motor::MotorConfig::CFG_EXECPOSTMOVE
@ CFG_EXECPOSTMOVE
Definition: motorConfig.hpp:345
fcf::devmgr::motor::CI_STAT_AXIS_ENABLE
constexpr auto CI_STAT_AXIS_ENABLE
Definition: motorConfig.hpp:157
fcf::devmgr::motor::AxisModeMap
const std::unordered_map< int, std::string > AxisModeMap
Definition: motorConfig.hpp:90
fcf::devmgr::motor::CI_STAT_SIGNAL_UHW
constexpr auto CI_STAT_SIGNAL_UHW
Definition: motorConfig.hpp:170
fcf::devmgr::motor::MotorConfig::CFG_AXISTYPE
@ CFG_AXISTYPE
Definition: motorConfig.hpp:322
fcf::devmgr::motor::SUBSTATE_OP_SETTING_POS
constexpr int SUBSTATE_OP_SETTING_POS
Definition: motorConfig.hpp:117
fcf::devmgr::motor::CI_INIT_ACTION_CALIB_REL
constexpr auto CI_INIT_ACTION_CALIB_REL
Definition: motorConfig.hpp:107
fcf::devmgr::common::SUBSTATE_OP_ERROR_STR
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:96
fcf::devmgr::motor::CI_INIT_VALUE_2
constexpr auto CI_INIT_VALUE_2
Definition: motorConfig.hpp:66
fcf::devmgr::motor::CI_EXEC_POST_INIT
constexpr auto CI_EXEC_POST_INIT
Definition: motorConfig.hpp:58
fcf::devmgr::motor::RPC_MOVE_REL
constexpr auto RPC_MOVE_REL
Definition: motorConfig.hpp:111
fcf::devmgr::motor::CI_STAT_AXIS_INPOS
constexpr auto CI_STAT_AXIS_INPOS
Definition: motorConfig.hpp:158
fcf::devmgr::motor::INIT_ACTION_FIND_REF_LE
@ INIT_ACTION_FIND_REF_LE
Definition: motorConfig.hpp:250
fcf::devmgr::motor::CI_STAT_AXIS_BRAKE
constexpr auto CI_STAT_AXIS_BRAKE
Definition: motorConfig.hpp:160
fcf::devmgr::motor::MotorConfig::GetNpTolerance
double GetNpTolerance() const
Get named position tolerance.
Definition: motorConfig.cpp:412
fcf::devmgr::motor::MotorConfig::END_ENUM_MOTOR
@ END_ENUM_MOTOR
Definition: motorConfig.hpp:346
fcf::devmgr::motor::CI_INIT_ACTION_FIND_REF_UE
constexpr auto CI_INIT_ACTION_FIND_REF_UE
Definition: motorConfig.hpp:100
fcf::devmgr::common::CI_STAT_SUBSTATE
constexpr auto CI_STAT_SUBSTATE
Definition: deviceConfig.hpp:50
fcf::devmgr::common::SUBSTATE_ERROR
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:85
fcf::devmgr::motor::MotorConfig::GetNamedPosition
const std::string GetNamedPosition(const int index)
GetNamedPosition.
Definition: motorConfig.cpp:287
fcf::devmgr::motor::FITS_PARAM_BRAKE
constexpr auto FITS_PARAM_BRAKE
Definition: motorConfig.hpp:183
fcf::devmgr::motor::InitAction::id
int id
Definition: motorConfig.hpp:299
fcf::devmgr::motor::CI_DEF_VEL
constexpr auto CI_DEF_VEL
Definition: motorConfig.hpp:34
fcf::devmgr::motor::SUBSTATE_READY_STR
constexpr auto SUBSTATE_READY_STR
Definition: motorConfig.hpp:120
fcf::devmgr::motor::MotorConfig::CFG_ACTLOWREF
@ CFG_ACTLOWREF
Definition: motorConfig.hpp:338
fcf::devmgr::motor::MotorConfig::GetNamedPositionValue
const double GetNamedPositionValue(const std::string named_pos)
GetNamedPositionValue.
Definition: motorConfig.cpp:302
fcf::devmgr::motor::CI_STAT_TARGET_ENC
constexpr auto CI_STAT_TARGET_ENC
Definition: motorConfig.hpp:142
fcf::devmgr::common::RPC_INIT
constexpr auto RPC_INIT
Definition: deviceConfig.hpp:43
fcf::devmgr::motor::SUBSTATE_ABORTING_STR
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorConfig.hpp:121
fcf::devmgr::common::DeviceConfig
Device Configuration class.
Definition: deviceConfig.hpp:125
fcf::devmgr::motor::MotorConfig
Motor Configuration class.
Definition: motorConfig.hpp:315
fcf::devmgr::motor::CI_STAT_SIGNAL_LHW
constexpr auto CI_STAT_SIGNAL_LHW
Definition: motorConfig.hpp:167
fcf::devmgr::motor::CI_STAT_INITIALISED
constexpr auto CI_STAT_INITIALISED
Definition: motorConfig.hpp:153
fcf::devmgr::motor::MotorConfig::CFG_LOCKTOL
@ CFG_LOCKTOL
Definition: motorConfig.hpp:329
fcf::devmgr::motor::CI_AXIS_TYPE_LINEAR_STR
constexpr auto CI_AXIS_TYPE_LINEAR_STR
Definition: motorConfig.hpp:80
fcf::devmgr::motor::MotorConfig::m_init_sequence_map
std::unordered_map< int, InitAction > m_init_sequence_map
Definition: motorConfig.hpp:476
fcf::devmgr::motor::CI_ACTIVE_LOW_STOP
constexpr auto CI_ACTIVE_LOW_STOP
Definition: motorConfig.hpp:50
fcf::devmgr::common::SUBSTATE_READY_STR
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:89
fcf::devmgr::motor::CI_INIT_ACTION
constexpr auto CI_INIT_ACTION
Definition: motorConfig.hpp:64
fcf::devmgr::common::SUBSTATE_READY
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:83
fcf::devmgr::motor::INIT_ACTION_FIND_INDEX
@ INIT_ACTION_FIND_INDEX
Definition: motorConfig.hpp:249
fcf::devmgr::motor::CI_AXIS_MODE_INVEL
constexpr int CI_AXIS_MODE_INVEL
Definition: motorConfig.hpp:85
fcf::devmgr::motor::InitAction
Definition: motorConfig.hpp:298
fcf::devmgr::motor::INIT_ACTION_MOVE_ABS
@ INIT_ACTION_MOVE_ABS
Definition: motorConfig.hpp:255
fcf::devmgr::motor::CI_STAT_AXIS_INFO_DATA_2
constexpr auto CI_STAT_AXIS_INFO_DATA_2
Definition: motorConfig.hpp:164
fcf::devmgr::motor::CI_TIMEOUT_INIT
constexpr auto CI_TIMEOUT_INIT
Definition: motorConfig.hpp:44
fcf::devmgr::motor::CI_AXIS_MODE_INPOS
constexpr int CI_AXIS_MODE_INPOS
Definition: motorConfig.hpp:84
fcf::devmgr::motor::CI_ACTIVE_LOW_UHW
constexpr auto CI_ACTIVE_LOW_UHW
Definition: motorConfig.hpp:54
fcf::devmgr::motor::SUBSTATE_OP_SETTING_POS_STR
constexpr auto SUBSTATE_OP_SETTING_POS_STR
Definition: motorConfig.hpp:124
fcf::devmgr::motor::CI_MAX_INIT_STEPS
constexpr int CI_MAX_INIT_STEPS
Definition: motorConfig.hpp:95
fcf::devmgr::motor::MotorConfig::CFG_EXECPREINIT
@ CFG_EXECPREINIT
Definition: motorConfig.hpp:342
fcf::devmgr::motor::INIT_ACTION_CALIB_REL
@ INIT_ACTION_CALIB_REL
Definition: motorConfig.hpp:258
fcf::devmgr::motor::CI_STAT_SIGNAL_LSTOP
constexpr auto CI_STAT_SIGNAL_LSTOP
Definition: motorConfig.hpp:166
fcf::devmgr::motor::FITS_PARAM_LOCK
constexpr auto FITS_PARAM_LOCK
Definition: motorConfig.hpp:184
fcf::devmgr::motor::CI_INIT_ACTION_CALIB_ABS
constexpr auto CI_INIT_ACTION_CALIB_ABS
Definition: motorConfig.hpp:106
fcf::devmgr::motor::SUBSTATE_OP_STOPPING
constexpr int SUBSTATE_OP_STOPPING
Definition: motorConfig.hpp:118
fcf::devmgr::motor::InitActionsMap
const std::unordered_map< std::string, int > InitActionsMap
Definition: motorConfig.hpp:267
fcf::devmgr::motor::statMapping
const std::vector< std::string > statMapping
Definition: motorConfig.hpp:203
fcf::devmgr::motor::SUBSTATE_OP_STOPPING_STR
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorConfig.hpp:125
fcf::devmgr::common::SUBSTATE_ERROR_STR
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:90
fcf::devmgr::motor::CI_STAT_AXIS_STOP_POS
constexpr auto CI_STAT_AXIS_STOP_POS
Definition: motorConfig.hpp:162
fcf::devmgr::motor::CI_INIT_VALUE_1
constexpr auto CI_INIT_VALUE_1
Definition: motorConfig.hpp:65
fcf::devmgr::motor::CI_STAT_MODE
constexpr auto CI_STAT_MODE
Definition: motorConfig.hpp:152
fcf::devmgr::motor::CI_AXIS_TYPE_LINEAR
constexpr int CI_AXIS_TYPE_LINEAR
Definition: motorConfig.hpp:76
fcf::devmgr::motor::MotorConfig::GetConfigList
virtual void GetConfigList(std::vector< std::string > &cfg_list, std::string prefix)
Get configuration list.
Definition: motorConfig.cpp:355
fcf::devmgr::motor::SUBSTATE_OP_STANDSTILL
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorConfig.hpp:115
fcf::devmgr::motor::SubstateMap
const std::unordered_map< short, std::string > SubstateMap
Definition: motorConfig.hpp:127
fcf::devmgr::motor::CI_TIMEOUT_SWITCH
constexpr auto CI_TIMEOUT_SWITCH
Definition: motorConfig.hpp:46
fcf::devmgr::common::RPC_RESET
constexpr auto RPC_RESET
Definition: deviceConfig.hpp:47
fcf::devmgr::motor::CI_NAME_POS_TOLERANCE
constexpr auto CI_NAME_POS_TOLERANCE
Definition: motorConfig.hpp:73