8#ifndef FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
9#define FCF_DEVMGR_DEVICE_MOTOR_CONFIG_HPP
12#include <unordered_map>
14#include <yaml-cpp/yaml.h>
16#include <ifw/core/utils/bat/logger.hpp>
227 const std::string name);
262 virtual void GetConfig(ifw::core::protocol::base::VectorVariant& params)
const override;
274 virtual void GetConfigList(ifw::core::utils::bat::DbVector& cfg_list,
275 std::string prefix)
const override;
302 std::vector<InitAction> m_init_sequence;
303 double m_scale_factor{1.0};
m_logger(log4cplus::Logger::getInstance(LOGGER_NAME))
Definition {{cookiecutter.device_name}}.cpp:32
Motor Base Configuration class.
Definition motorBaseConfig.hpp:138
Motor Configuration class.
Definition motorConfig.hpp:216
virtual ~MotorConfig()=default
MotorConfig destructor.
double GetScaleFactor() const override
Definition motorConfig.cpp:179
void Init()
Read the configuration.
Definition motorConfig.cpp:61
void SetScaleFactor(double scale)
Set Scale Factor.
Definition motorConfig.cpp:184
virtual void GetConfigList(ifw::core::utils::bat::DbVector &cfg_list, std::string prefix) const override
Get configuration list.
Definition motorConfig.cpp:149
int GetNumberOfInitSteps() const noexcept
Get number of initialisations steps.
Definition motorConfig.hpp:282
MotorConfig(const std::string filename, const std::string name)
MotorConfig constructor.
Definition motorConfig.cpp:45
virtual void GetConfig(ifw::core::protocol::base::VectorVariant ¶ms) const override
Obtain the list of configuration parameters.
Definition motorConfig.cpp:105
friend class Sensor
Definition motorConfig.hpp:217
Motor class source file.
Definition motor.hpp:17
constexpr auto CI_ACTIVE_LOW_INPOS
Definition motorConfig.hpp:40
constexpr int CI_AXIS_MODE_INVEL
Definition motorConfig.hpp:72
constexpr auto CI_INIT_ACTION_FIND_REF_LE
Definition motorConfig.hpp:86
constexpr auto CI_AXIS_MODE_INPOS_STR
Definition motorConfig.hpp:74
constexpr auto CI_STAT_INIT_ACTION
Definition motorConfig.hpp:104
constexpr int CI_AXIS_TYPE_CIRCULAR
Definition motorConfig.hpp:64
constexpr auto CI_INIT_SEQUENCE
Definition motorConfig.hpp:54
constexpr auto CI_STAT_AXIS_STOP_NEG
Definition motorConfig.hpp:110
constexpr auto CI_AXIS_TYPE_CIRCULAR_STR
Definition motorConfig.hpp:68
constexpr auto CI_INITIALISATION
Definition motorConfig.hpp:53
constexpr auto CI_ACTIVE_LOW_BRAKE
Definition motorConfig.hpp:39
constexpr auto CI_STAT_SIGNAL_INDEX
Definition motorConfig.hpp:118
constexpr auto CI_STAT_AXIS_STOP_POS
Definition motorConfig.hpp:111
constexpr auto CI_STAT_INIT_STEP
Definition motorConfig.hpp:103
constexpr auto CI_INIT_ACTION_MOVE_REL
Definition motorConfig.hpp:92
constexpr auto CI_LOCK_POS
Definition motorConfig.hpp:35
const std::unordered_map< std::string, int > INIT_ACTIONS_MAP
Definition motorConfig.hpp:159
@ INIT_ACTION_END
Definition motorConfig.hpp:140
@ INIT_ACTION_CALIB_ABS
Definition motorConfig.hpp:149
@ INIT_ACTION_FIND_REF_LE
Definition motorConfig.hpp:142
@ INIT_ACTION_CALIB_REL
Definition motorConfig.hpp:150
@ INIT_ACTION_FIND_UHW
Definition motorConfig.hpp:145
@ INIT_ACTION_MOVE_ABS
Definition motorConfig.hpp:147
@ INIT_ACTION_CALIB_SWITCH
Definition motorConfig.hpp:151
@ INIT_ACTION_FIND_LHW
Definition motorConfig.hpp:144
@ INIT_ACTION_MOVE_REL
Definition motorConfig.hpp:148
@ INIT_ACTION_DELAY
Definition motorConfig.hpp:146
@ INIT_ACTION_FIND_REF_UE
Definition motorConfig.hpp:143
@ INIT_ACTION_FIND_INDEX
Definition motorConfig.hpp:141
constexpr auto CI_STAT_AXIS_INPOS
Definition motorConfig.hpp:107
constexpr auto CI_INIT_ACTION_FIND_INDEX
Definition motorConfig.hpp:85
constexpr auto CI_INIT_ACTION_CALIB_REL
Definition motorConfig.hpp:94
constexpr auto CI_ACTIVE_LOW_INDEX
Definition motorConfig.hpp:44
constexpr auto CI_INIT_VALUE_1
Definition motorConfig.hpp:56
constexpr auto CI_INIT_ACTION_FIND_LHW
Definition motorConfig.hpp:88
constexpr auto CI_ACTIVE_LOW_USTOP
Definition motorConfig.hpp:46
constexpr auto CI_LOCK_TOLERANCE
Definition motorConfig.hpp:36
constexpr auto CI_LOCK
Definition motorConfig.hpp:34
constexpr auto CI_INIT_ACTION_END
Definition motorConfig.hpp:84
constexpr auto CI_INIT_ACTION_FIND_UHW
Definition motorConfig.hpp:89
constexpr auto CI_AXIS_TYPE_LINEAR_STR
Definition motorConfig.hpp:67
constexpr auto CI_STAT_AXIS_INFO_DATA_2
Definition motorConfig.hpp:113
constexpr int CI_AXIS_MODE_INPOS
Definition motorConfig.hpp:71
constexpr auto CI_ACTIVE_LOW_REF
Definition motorConfig.hpp:43
const std::unordered_map< int, std::string > INIT_ACTIONS2_MAP
Definition motorConfig.hpp:175
constexpr auto CI_BRAKE
Definition motorConfig.hpp:29
constexpr int CI_AXIS_TYPE_LINEAR
Definition motorConfig.hpp:63
constexpr auto CI_AXIS_MODE_INVEL_STR
Definition motorConfig.hpp:75
constexpr auto CI_INIT_ACTION_DELAY
Definition motorConfig.hpp:90
constexpr auto CI_ACTIVE_LOW_STOP
Definition motorConfig.hpp:41
constexpr auto CI_EXEC_POST_INIT
Definition motorConfig.hpp:49
constexpr auto CI_INIT_ACTION_CALIB_SWITCH
Definition motorConfig.hpp:95
constexpr auto CI_STAT_SIGNAL_LHW
Definition motorConfig.hpp:116
constexpr auto CI_INIT_ACTION_MOVE_ABS
Definition motorConfig.hpp:91
constexpr auto CI_STAT_SIGNAL_USTOP
Definition motorConfig.hpp:120
constexpr auto CI_BACKLASH
Definition motorConfig.hpp:30
constexpr auto CI_INIT_VALUE_2
Definition motorConfig.hpp:57
constexpr auto CI_STAT_SIGNAL_UHW
Definition motorConfig.hpp:119
constexpr auto CI_EXEC_PRE_MOVE
Definition motorConfig.hpp:50
Signal
Definition motorConfig.hpp:122
constexpr auto CI_STAT_AXIS_INFO_DATA_1
Definition motorConfig.hpp:112
constexpr auto CI_DISABLE
Definition motorConfig.hpp:37
constexpr auto CI_STAT_AXIS_ENABLE
Definition motorConfig.hpp:106
constexpr auto CI_STAT_SIGNAL_REF
Definition motorConfig.hpp:117
const std::unordered_map< std::string, int > AXIS_TYPE_MAP
Definition motorConfig.hpp:133
constexpr auto CI_CHECK_INPOS
Definition motorConfig.hpp:33
constexpr auto CI_INIT_ACTION_FIND_REF_UE
Definition motorConfig.hpp:87
constexpr auto CI_STAT_SIGNAL_LSTOP
Definition motorConfig.hpp:115
constexpr int CI_AXIS_TYPE_CIRCULAR_OPT
Definition motorConfig.hpp:65
constexpr auto FITS_PARAM_BRAKE
Definition motorConfig.hpp:129
constexpr auto CI_STAT_AXIS_BRAKE
Definition motorConfig.hpp:109
constexpr auto CI_EXEC_PRE_INIT
Definition motorConfig.hpp:48
constexpr auto CI_INIT_ACTION_CALIB_ABS
Definition motorConfig.hpp:93
constexpr auto CI_AXIS_TYPE_CIRCULAR_OPT_STR
Definition motorConfig.hpp:69
constexpr auto CI_STAT_SCALE_FACTOR
Definition motorConfig.hpp:100
constexpr auto CI_ACTIVE_LOW_UHW
Definition motorConfig.hpp:45
constexpr auto CI_STAT_BACKLASH_STEP
Definition motorConfig.hpp:101
constexpr auto CI_STAT_AXIS_LOCK
Definition motorConfig.hpp:108
constexpr auto CI_EXEC_POST_MOVE
Definition motorConfig.hpp:51
constexpr auto CI_AXIS_TYPE
Definition motorConfig.hpp:31
constexpr auto CI_STAT_AXIS_READY
Definition motorConfig.hpp:105
constexpr int CI_MAX_INIT_STEPS
Definition motorConfig.hpp:82
constexpr auto CI_STAT_MODE
Definition motorConfig.hpp:102
constexpr auto FITS_PARAM_LOCK
Definition motorConfig.hpp:130
constexpr auto CI_INIT_ACTION
Definition motorConfig.hpp:55
const std::unordered_map< int, std::string > AXIS_MODE_MAP
Definition motorConfig.hpp:77
constexpr auto LOGGER_NAME
Definition motorConfig.hpp:26
constexpr auto CI_ACTIVE_LOW_LHW
Definition motorConfig.hpp:42
Definition motorConfig.hpp:190
void SetId(int id)
Definition motorConfig.cpp:26
InitAction()
Definition motorConfig.hpp:193
int GetId() const
Definition motorConfig.cpp:22
double GetValue1() const
Definition motorConfig.cpp:30
double GetValue2() const
Definition motorConfig.cpp:37
void SetValue1(double value)
Definition motorConfig.cpp:33
void SetValue2(double value)
Definition motorConfig.cpp:41
std::string const
Definition test{{cookiecutter.device_name|capitalize()}}.cpp:161