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