10 #ifndef FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
11 #define FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
15 #include <unordered_map>
18 #include <yaml-cpp/yaml.h>
20 #include <fcf/common/iComm.hpp>
28 namespace fcf::devmgr::motor {
356 const std::string name);
381 virtual void GetConfig(fcf::common::VectorVariant& params);
393 virtual void GetConfigList(std::vector<std::string>& cfg_list,
469 double m_scale_factor;
471 double m_np_tolerance;
474 std::unordered_map<std::string, double> m_named_positions;
483 #endif //FCF_DEVMGR_DEVICE_MOTOR_CONFIG_H
constexpr auto CI_INIT_ACTION_CALIB_SWITCH
Definition: motorConfig.hpp:108
constexpr auto CI_STAT_LOCAL
Definition: deviceConfig.hpp:53
Definition: motorConfig.hpp:255
constexpr auto CI_LOCK_TOLERANCE
Definition: motorConfig.hpp:41
constexpr auto CI_BRAKE
Definition: motorConfig.hpp:31
constexpr auto CI_STAT_AXIS_READY
Definition: motorConfig.hpp:156
Definition: motorConfig.hpp:338
Definition: motorConfig.hpp:259
Definition: motorConfig.hpp:326
Definition: motorConfig.hpp:320
constexpr auto CI_AXIS_TYPE_CIRCULAR_STR
Definition: motorConfig.hpp:81
Definition: motorConfig.hpp:252
constexpr auto CI_STAT_AXIS_INFO_DATA_2
Definition: motorConfig.hpp:164
constexpr auto RPC_INIT
Definition: deviceConfig.hpp:43
const double GetNamedPositionValue(const std::string named_pos)
GetNamedPositionValue.
Definition: motorConfig.cpp:292
bool FindNamedPositionValue(const std::string named_pos, double &position)
Find value associated to a named position.
Definition: motorConfig.cpp:313
Definition: motorConfig.hpp:253
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:84
constexpr auto CI_INIT_VALUE_1
Definition: motorConfig.hpp:65
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:87
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorConfig.hpp:125
InitAction()
Definition: motorConfig.hpp:303
constexpr auto CI_STAT_SIGNAL_LSTOP
Definition: motorConfig.hpp:166
Definition: motorConfig.hpp:328
friend class Sensor
Definition: motorConfig.hpp:316
constexpr auto CI_STAT_AXIS_LOCK
Definition: motorConfig.hpp:159
int id
Definition: motorConfig.hpp:299
constexpr int CI_AXIS_TYPE_CIRCULAR
Definition: motorConfig.hpp:77
constexpr auto CI_ACTIVE_LOW_LHW
Definition: motorConfig.hpp:51
constexpr auto CI_ACTIVE_LOW_USTOP
Definition: motorConfig.hpp:55
constexpr auto CI_STAT_TARGET_POS
Definition: motorConfig.hpp:145
constexpr auto CI_NAME_POS_TOLERANCE
Definition: motorConfig.hpp:73
Definition: motorConfig.hpp:324
constexpr auto CI_EXEC_POST_MOVE
Definition: motorConfig.hpp:60
Definition: motorConfig.hpp:254
virtual void GetConfigList(std::vector< std::string > &cfg_list, std::string prefix)
Get configuration list.
Definition: motorConfig.cpp:345
constexpr auto CI_POS_NAMES
Definition: motorConfig.hpp:72
constexpr auto CI_CHECK_INPOS
Definition: motorConfig.hpp:38
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorConfig.hpp:115
Definition: motorConfig.hpp:331
constexpr auto CI_INIT_ACTION_END
Definition: motorConfig.hpp:97
const std::unordered_map< int, std::string > AxisModeMap
Definition: motorConfig.hpp:90
constexpr auto CI_STAT_AXIS_BRAKE
Definition: motorConfig.hpp:160
const std::vector< std::string > cfgMapping
Definition: motorConfig.hpp:189
constexpr auto FITS_PARAM_BRAKE
Definition: motorConfig.hpp:183
constexpr auto CI_INIT_ACTION_FIND_REF_UE
Definition: motorConfig.hpp:100
constexpr auto CI_STAT_SCALE_FACTOR
Definition: motorConfig.hpp:150
Definition: motorConfig.hpp:336
const std::string GetNamedPosition(const int index)
GetNamedPosition.
Definition: motorConfig.cpp:277
double GetNpTolerance() const
Get named position tolerance.
Definition: motorConfig.cpp:402
constexpr auto CI_STAT_SUBSTATE
Definition: deviceConfig.hpp:50
constexpr auto RPC_DISABLE
Definition: deviceConfig.hpp:45
constexpr auto CI_STAT_AXIS_INFO_DATA_1
Definition: motorConfig.hpp:163
constexpr auto CI_AXIS_MODE_INVEL_STR
Definition: motorConfig.hpp:88
constexpr int CI_AXIS_TYPE_CIRCULAR_OPT
Definition: motorConfig.hpp:78
constexpr auto CI_STAT_POS_ERROR
Definition: motorConfig.hpp:147
constexpr auto CI_INIT_ACTION_FIND_UHW
Definition: motorConfig.hpp:102
constexpr auto CI_STAT_TARGET_ENC
Definition: motorConfig.hpp:142
constexpr int SUBSTATE_OP_STOPPING
Definition: motorConfig.hpp:118
Definition: motorConfig.hpp:345
constexpr auto CI_STAT_ENC_POS
Definition: motorConfig.hpp:141
Definition: motorConfig.hpp:341
constexpr auto CI_EXEC_PRE_INIT
Definition: motorConfig.hpp:57
constexpr auto CI_INIT_SEQUENCE
Definition: motorConfig.hpp:63
constexpr auto CI_STAT_INIT_STEP
Definition: motorConfig.hpp:154
constexpr int SUBSTATE_OP_MOVING
Definition: motorConfig.hpp:116
void SetScaleFactor(double scale)
Set Scale Factor.
Definition: motorConfig.cpp:267
const std::vector< std::string > statMapping
Definition: motorConfig.hpp:203
constexpr auto CI_STAT_SIGNAL_UHW
Definition: motorConfig.hpp:170
constexpr auto CI_INIT_ACTION_CALIB_REL
Definition: motorConfig.hpp:107
constexpr auto CI_INIT_ACTION
Definition: motorConfig.hpp:64
constexpr auto CI_INITIALISATION
Definition: motorConfig.hpp:62
constexpr auto CI_POSITIONS
Definition: motorConfig.hpp:71
constexpr auto CI_ACTIVE_LOW_UHW
Definition: motorConfig.hpp:54
constexpr auto CI_ACTIVE_LOW_BRAKE
Definition: motorConfig.hpp:48
LampRpcErrors header file.
constexpr auto CI_STAT_AXIS_STOP_NEG
Definition: motorConfig.hpp:161
Definition: motorConfig.hpp:339
Definition: motorConfig.hpp:257
constexpr auto CI_INIT_ACTION_CALIB_ABS
Definition: motorConfig.hpp:106
constexpr auto CI_ACTIVE_LOW_INDEX
Definition: motorConfig.hpp:53
Definition: motorConfig.hpp:337
Signal
Definition: motorConfig.hpp:173
constexpr auto CI_BACKLASH
Definition: motorConfig.hpp:32
constexpr auto SUBSTATE_READY_STR
Definition: motorConfig.hpp:120
constexpr auto CI_STAT_SIGNAL_REF
Definition: motorConfig.hpp:168
constexpr auto CI_INIT_ACTION_MOVE_REL
Definition: motorConfig.hpp:105
const std::unordered_map< int, std::string > InitActions2Map
Definition: motorConfig.hpp:283
constexpr auto CI_STAT_MODE
Definition: motorConfig.hpp:152
constexpr auto RPC_MOVE_REL
Definition: motorConfig.hpp:111
configSet class header file.
constexpr auto CI_INIT_ACTION_FIND_LHW
Definition: motorConfig.hpp:101
constexpr auto RPC_MOVE_ABS
Definition: motorConfig.hpp:110
constexpr auto CI_INIT_ACTION_MOVE_ABS
Definition: motorConfig.hpp:104
constexpr auto CI_DISABLE
Definition: motorConfig.hpp:42
constexpr auto CI_AXIS_MODE_INPOS_STR
Definition: motorConfig.hpp:87
constexpr int SUBSTATE_ABORTING
Definition: motorConfig.hpp:114
double GetVelocity()
Definition: motorConfig.cpp:256
double value1
Definition: motorConfig.hpp:300
Definition: motorConfig.hpp:335
constexpr auto RPC_STOP
Definition: deviceConfig.hpp:46
Definition: motorConfig.hpp:330
constexpr int CI_AXIS_MODE_INVEL
Definition: motorConfig.hpp:85
constexpr int CI_AXIS_TYPE_LINEAR
Definition: motorConfig.hpp:76
constexpr auto CI_STAT_STATE
Definition: deviceConfig.hpp:51
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:82
std::unordered_map< int, InitAction > m_init_sequence_map
Definition: motorConfig.hpp:465
const std::vector< std::string > rpcMapping
Definition: motorConfig.hpp:229
constexpr auto CI_STAT_BACKLASH_STEP
Definition: motorConfig.hpp:151
Definition: motorConfig.hpp:321
constexpr auto CI_ACTIVE_LOW_INPOS
Definition: motorConfig.hpp:49
Definition: motorConfig.hpp:329
Definition: motorConfig.hpp:343
constexpr auto CI_INIT_ACTION_FIND_INDEX
Definition: motorConfig.hpp:98
constexpr auto CI_STAT_SIGNAL_INDEX
Definition: motorConfig.hpp:169
constexpr auto CI_STAT_AXIS_STOP_POS
Definition: motorConfig.hpp:162
Definition: motorConfig.hpp:327
constexpr auto CI_EXEC_PRE_MOVE
Definition: motorConfig.hpp:59
Motor Configuration class.
Definition: motorConfig.hpp:314
constexpr auto CI_INIT_VALUE_2
Definition: motorConfig.hpp:66
Definition: motorConfig.hpp:346
constexpr auto CI_STAT_TARGET_POSNAME
Definition: motorConfig.hpp:143
constexpr auto CI_STAT_ACTUAL_VEL
Definition: motorConfig.hpp:148
const std::unordered_map< std::string, int > AxisTypeMap
Definition: motorConfig.hpp:241
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorConfig.hpp:123
Definition: motorConfig.hpp:323
double value2
Definition: motorConfig.hpp:301
DataContext class header file.
constexpr auto CI_AXIS_TYPE_CIRCULAR_OPT_STR
Definition: motorConfig.hpp:82
constexpr auto CI_ACTIVE_LOW_STOP
Definition: motorConfig.hpp:50
const std::unordered_map< short, std::string > SubstateMap
Definition: motorConfig.hpp:127
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:96
constexpr auto CI_TIMEOUT_SWITCH
Definition: motorConfig.hpp:46
Definition: motorConfig.hpp:333
constexpr auto CI_STAT_ACTUAL_POS
Definition: motorConfig.hpp:146
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:88
int GetNumberOfNamedPositions()
Definition: motorConfig.cpp:397
Definition: motorConfig.hpp:340
constexpr auto CI_ACTIVE_LOW_REF
Definition: motorConfig.hpp:52
constexpr auto CI_SCALE_FACTOR
Definition: motorConfig.hpp:74
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:89
constexpr auto CI_MAX_POS
Definition: motorConfig.hpp:35
constexpr auto CI_STAT_TARGET_VEL
Definition: motorConfig.hpp:149
constexpr auto CI_AXIS_TYPE
Definition: motorConfig.hpp:33
double GetScaleFactor() const
Definition: motorConfig.cpp:273
Definition: motorConfig.hpp:251
constexpr auto CI_INIT_ACTION_FIND_REF_LE
Definition: motorConfig.hpp:99
constexpr auto FITS_PARAM_POS
Definition: motorConfig.hpp:182
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorConfig.hpp:122
constexpr auto CI_EXEC_POST_INIT
Definition: motorConfig.hpp:58
Definition: motorConfig.hpp:298
constexpr auto RPC_MOVE_VEL
Definition: motorConfig.hpp:112
virtual ~MotorConfig()
MotorConfig destructor.
Definition: motorConfig.cpp:83
Definition: motorConfig.hpp:322
constexpr auto FITS_PARAM_LOCK
Definition: motorConfig.hpp:184
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:93
Definition: motorConfig.hpp:249
Definition: motorConfig.hpp:342
constexpr auto CI_LOCK_POS
Definition: motorConfig.hpp:40
Definition: motorConfig.hpp:250
constexpr auto RPC_RESET
Definition: deviceConfig.hpp:47
virtual void ReadConfig()
Read the configuration.
Definition: motorConfig.cpp:87
Definition: motorConfig.hpp:258
constexpr auto CI_TIMEOUT_MOVE
Definition: motorConfig.hpp:45
Definition: motorConfig.hpp:256
constexpr auto CI_STAT_AXIS_ENABLE
Definition: motorConfig.hpp:157
constexpr int CI_MAX_INIT_STEPS
Definition: motorConfig.hpp:95
constexpr int CI_AXIS_MODE_INPOS
Definition: motorConfig.hpp:84
Device Configuration class.
Definition: deviceConfig.hpp:125
Definition: motorConfig.hpp:334
constexpr auto CI_LOCK
Definition: motorConfig.hpp:39
Definition: motorConfig.hpp:344
constexpr auto FITS_PARAM_POSNAME
Definition: motorConfig.hpp:181
constexpr auto CI_AXIS_TYPE_LINEAR_STR
Definition: motorConfig.hpp:80
const std::unordered_map< std::string, int > InitActionsMap
Definition: motorConfig.hpp:267
constexpr auto CI_STAT_SIGNAL_LHW
Definition: motorConfig.hpp:167
constexpr auto CI_STAT_ERROR_CODE
Definition: deviceConfig.hpp:54
virtual void GetConfig(fcf::common::VectorVariant ¶ms)
Obtain the list of configuration parameters.
Definition: motorConfig.cpp:222
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:85
Definition: motorConfig.hpp:325
constexpr auto CI_STAT_INIT_ACTION
Definition: motorConfig.hpp:155
constexpr auto CI_STAT_AXIS_INPOS
Definition: motorConfig.hpp:158
Definition: motorConfig.hpp:248
constexpr auto CI_STAT_ACTUAL_POSNAME
Definition: motorConfig.hpp:144
constexpr auto CI_TIMEOUT_INIT
Definition: motorConfig.hpp:44
constexpr auto RPC_ENABLE
Definition: deviceConfig.hpp:44
constexpr int SUBSTATE_OP_SETTING_POS
Definition: motorConfig.hpp:117
MotorHwErrors header file.
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorConfig.hpp:121
DeviceConfig class header file.
constexpr auto CI_DEF_VEL
Definition: motorConfig.hpp:34
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:90
Definition: motorConfig.hpp:332
constexpr auto SUBSTATE_OP_SETTING_POS_STR
Definition: motorConfig.hpp:124
constexpr auto CI_STAT_INITIALISED
Definition: motorConfig.hpp:153
constexpr auto UndefinedNamedPos
Definition: motorConfig.hpp:187
constexpr auto CI_STAT_SIGNAL_USTOP
Definition: motorConfig.hpp:171
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:83
constexpr auto CI_MIN_POS
Definition: motorConfig.hpp:36
constexpr auto CI_INIT_ACTION_DELAY
Definition: motorConfig.hpp:103
MotorConfig(const std::string filename, const std::string name)
MotorConfig constructor.
Definition: motorConfig.cpp:25