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 <utils/bat/logger.hpp>
222 const std::string name);
257 virtual void GetConfig(protocol::base::VectorVariant& params)
const override;
270 std::string prefix)
const override;
m_logger(log4cplus::Logger::getInstance(LOGGER_NAME))
Definition: {{cookiecutter.device_name}}.cpp:32
Motor Base Configuration class.
Definition: motorBaseConfig.hpp:115
Motor Configuration class.
Definition: motorConfig.hpp:211
virtual void Init()
Read the configuration.
Definition: motorConfig.cpp:41
int GetNumberOfInitSteps() const noexcept
Get number of initialisations steps.
Definition: motorConfig.hpp:277
void SetScaleFactor(double scale)
Set Scale Factor.
Definition: motorConfig.cpp:164
MotorConfig(const std::string filename, const std::string name)
MotorConfig constructor.
Definition: motorConfig.cpp:25
virtual void GetConfig(protocol::base::VectorVariant ¶ms) const override
Obtain the list of configuration parameters.
Definition: motorConfig.cpp:85
double m_scale_factor
Definition: motorConfig.hpp:298
virtual void GetConfigList(utils::bat::DbVector &cfg_list, std::string prefix) const override
Get configuration list.
Definition: motorConfig.cpp:129
std::vector< InitAction > m_init_sequence
Definition: motorConfig.hpp:297
friend class Sensor
Definition: motorConfig.hpp:212
double GetScaleFactor() const override
Definition: motorConfig.cpp:159
virtual ~MotorConfig()=default
MotorConfig destructor.
DataContext class header file.
MotorConfig class header file.
MotorHwErrors header file.
LampRpcErrors header file.
constexpr auto CI_AXIS_TYPE
Definition: motorConfig.hpp:35
constexpr auto CI_STAT_INIT_STEP
Definition: motorConfig.hpp:107
constexpr auto CI_AXIS_TYPE_LINEAR_STR
Definition: motorConfig.hpp:71
constexpr auto CI_STAT_AXIS_STOP_POS
Definition: motorConfig.hpp:115
constexpr auto CI_INIT_VALUE_2
Definition: motorConfig.hpp:61
constexpr auto CI_AXIS_TYPE_CIRCULAR_STR
Definition: motorConfig.hpp:72
constexpr auto CI_STAT_INIT_ACTION
Definition: motorConfig.hpp:108
constexpr int CI_AXIS_MODE_INPOS
Definition: motorConfig.hpp:75
constexpr auto CI_INIT_ACTION_FIND_REF_UE
Definition: motorConfig.hpp:91
constexpr auto CI_STAT_SCALE_FACTOR
Definition: motorConfig.hpp:104
constexpr auto CI_INIT_VALUE_1
Definition: motorConfig.hpp:60
constexpr int CI_MAX_INIT_STEPS
Definition: motorConfig.hpp:86
constexpr auto CI_STAT_BACKLASH_STEP
Definition: motorConfig.hpp:105
const std::unordered_map< int, std::string > InitActions2Map
Definition: motorConfig.hpp:179
constexpr auto CI_INIT_ACTION_CALIB_SWITCH
Definition: motorConfig.hpp:99
constexpr auto CI_ACTIVE_LOW_USTOP
Definition: motorConfig.hpp:50
constexpr auto CI_STAT_SIGNAL_REF
Definition: motorConfig.hpp:121
constexpr auto CI_CHECK_INPOS
Definition: motorConfig.hpp:37
Signal
Definition: motorConfig.hpp:126
constexpr auto CI_STAT_SIGNAL_LSTOP
Definition: motorConfig.hpp:119
constexpr auto LOGGER_NAME
Definition: motorConfig.hpp:30
constexpr auto FITS_PARAM_LOCK
Definition: motorConfig.hpp:134
constexpr auto CI_INIT_ACTION_DELAY
Definition: motorConfig.hpp:94
constexpr auto CI_LOCK
Definition: motorConfig.hpp:38
constexpr auto CI_BACKLASH
Definition: motorConfig.hpp:34
constexpr auto CI_LOCK_POS
Definition: motorConfig.hpp:39
constexpr auto CI_AXIS_TYPE_CIRCULAR_OPT_STR
Definition: motorConfig.hpp:73
constexpr auto FITS_PARAM_BRAKE
Definition: motorConfig.hpp:133
constexpr auto CI_ACTIVE_LOW_LHW
Definition: motorConfig.hpp:46
constexpr auto CI_EXEC_PRE_INIT
Definition: motorConfig.hpp:52
constexpr auto CI_STAT_SIGNAL_USTOP
Definition: motorConfig.hpp:124
constexpr auto CI_STAT_AXIS_BRAKE
Definition: motorConfig.hpp:113
constexpr auto CI_AXIS_MODE_INVEL_STR
Definition: motorConfig.hpp:79
constexpr int CI_AXIS_TYPE_CIRCULAR_OPT
Definition: motorConfig.hpp:69
constexpr auto CI_ACTIVE_LOW_UHW
Definition: motorConfig.hpp:49
constexpr auto CI_ACTIVE_LOW_BRAKE
Definition: motorConfig.hpp:43
constexpr int CI_AXIS_MODE_INVEL
Definition: motorConfig.hpp:76
constexpr auto CI_LOCK_TOLERANCE
Definition: motorConfig.hpp:40
constexpr auto CI_INIT_ACTION_FIND_INDEX
Definition: motorConfig.hpp:89
constexpr auto CI_STAT_AXIS_INFO_DATA_1
Definition: motorConfig.hpp:116
constexpr auto CI_ACTIVE_LOW_INPOS
Definition: motorConfig.hpp:44
constexpr auto CI_INIT_ACTION_MOVE_ABS
Definition: motorConfig.hpp:95
constexpr auto CI_STAT_AXIS_ENABLE
Definition: motorConfig.hpp:110
constexpr auto CI_AXIS_MODE_INPOS_STR
Definition: motorConfig.hpp:78
const std::unordered_map< std::string, int > InitActionsMap
Definition: motorConfig.hpp:163
constexpr auto CI_DISABLE
Definition: motorConfig.hpp:41
constexpr auto CI_STAT_MODE
Definition: motorConfig.hpp:106
constexpr auto CI_INIT_ACTION_CALIB_REL
Definition: motorConfig.hpp:98
constexpr auto CI_STAT_AXIS_READY
Definition: motorConfig.hpp:109
const std::unordered_map< int, std::string > AxisModeMap
Definition: motorConfig.hpp:81
constexpr auto CI_STAT_AXIS_INFO_DATA_2
Definition: motorConfig.hpp:117
@ INIT_ACTION_FIND_REF_UE
Definition: motorConfig.hpp:147
@ INIT_ACTION_FIND_REF_LE
Definition: motorConfig.hpp:146
@ INIT_ACTION_MOVE_ABS
Definition: motorConfig.hpp:151
@ INIT_ACTION_END
Definition: motorConfig.hpp:144
@ INIT_ACTION_FIND_INDEX
Definition: motorConfig.hpp:145
@ INIT_ACTION_CALIB_REL
Definition: motorConfig.hpp:154
@ INIT_ACTION_MOVE_REL
Definition: motorConfig.hpp:152
@ INIT_ACTION_FIND_LHW
Definition: motorConfig.hpp:148
@ INIT_ACTION_CALIB_SWITCH
Definition: motorConfig.hpp:155
@ INIT_ACTION_CALIB_ABS
Definition: motorConfig.hpp:153
@ INIT_ACTION_DELAY
Definition: motorConfig.hpp:150
@ INIT_ACTION_FIND_UHW
Definition: motorConfig.hpp:149
constexpr auto CI_ACTIVE_LOW_INDEX
Definition: motorConfig.hpp:48
const std::unordered_map< std::string, int > AxisTypeMap
Definition: motorConfig.hpp:137
constexpr auto CI_INIT_ACTION_FIND_LHW
Definition: motorConfig.hpp:92
constexpr auto CI_STAT_SIGNAL_INDEX
Definition: motorConfig.hpp:122
constexpr auto CI_EXEC_PRE_MOVE
Definition: motorConfig.hpp:54
constexpr auto CI_STAT_AXIS_INPOS
Definition: motorConfig.hpp:111
constexpr auto CI_INITIALISATION
Definition: motorConfig.hpp:57
constexpr auto CI_EXEC_POST_MOVE
Definition: motorConfig.hpp:55
constexpr auto CI_ACTIVE_LOW_STOP
Definition: motorConfig.hpp:45
constexpr auto CI_BRAKE
Definition: motorConfig.hpp:33
constexpr auto CI_STAT_SIGNAL_LHW
Definition: motorConfig.hpp:120
constexpr auto CI_INIT_ACTION_MOVE_REL
Definition: motorConfig.hpp:96
constexpr auto CI_STAT_AXIS_STOP_NEG
Definition: motorConfig.hpp:114
constexpr auto CI_INIT_ACTION_FIND_REF_LE
Definition: motorConfig.hpp:90
constexpr auto CI_INIT_ACTION
Definition: motorConfig.hpp:59
constexpr auto CI_ACTIVE_LOW_REF
Definition: motorConfig.hpp:47
constexpr auto CI_STAT_SIGNAL_UHW
Definition: motorConfig.hpp:123
constexpr auto CI_STAT_AXIS_LOCK
Definition: motorConfig.hpp:112
constexpr int CI_AXIS_TYPE_CIRCULAR
Definition: motorConfig.hpp:68
constexpr auto CI_EXEC_POST_INIT
Definition: motorConfig.hpp:53
constexpr auto CI_INIT_SEQUENCE
Definition: motorConfig.hpp:58
constexpr auto CI_INIT_ACTION_END
Definition: motorConfig.hpp:88
constexpr auto CI_INIT_ACTION_CALIB_ABS
Definition: motorConfig.hpp:97
constexpr int CI_AXIS_TYPE_LINEAR
Definition: motorConfig.hpp:67
constexpr auto CI_INIT_ACTION_FIND_UHW
Definition: motorConfig.hpp:93
Definition: motorConfig.hpp:194
InitAction()
Definition: motorConfig.hpp:199
double value1
Definition: motorConfig.hpp:196
int id
Definition: motorConfig.hpp:195
double value2
Definition: motorConfig.hpp:197
std::string const
Definition: test{{cookiecutter.device_name|capitalize()}}.cpp:161