Go to the documentation of this file.
10 #ifndef FCF_DEVMGR_DEVICE_MOTOR_BASE_CONFIG_HPP
11 #define FCF_DEVMGR_DEVICE_MOTOR_BASE_CONFIG_HPP
15 #include <unordered_map>
18 #include <yaml-cpp/yaml.h>
20 #include <utils/bat/logger.hpp>
21 #include <fcf/common/iComm.hpp>
127 const std::string name);
162 std::string prefix)
const override;
206 double& position)
const;
215 std::string& name)
const;
239 #endif //FCF_DEVMGR_DEVICE_MOTOR_BASE_CONFIG_HPP
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorBaseConfig.hpp:66
DataContext class header file.
constexpr auto CI_STAT_TARGET_POSNAME
Definition: motorBaseConfig.hpp:86
constexpr auto CI_SCALE_FACTOR
Definition: motorBaseConfig.hpp:48
constexpr auto FITS_PARAM_POSNAME
Definition: motorBaseConfig.hpp:95
constexpr auto CI_STAT_POS_ERROR
Definition: motorBaseConfig.hpp:90
m_logger(log4cplus::Logger::getInstance(LOGGER_NAME))
Definition: {{cookiecutter.device_name}}.cpp:32
std::string GetNamedPosition(const int index) const
GetNamedPosition.
Definition: motorBaseConfig.cpp:82
constexpr auto CI_POSITIONS
Definition: motorBaseConfig.hpp:44
virtual void GetConfigList(utils::bat::DbVector &cfg_list, std::string prefix) const override
Get configuration list.
Definition: motorBaseConfig.cpp:138
std::string const
Definition: test{{cookiecutter.device_name|capitalize()}}.cpp:162
constexpr auto RPC_MOVE_VEL
Definition: motorBaseConfig.hpp:55
DeviceConfig class header file.
constexpr int SUBSTATE_OP_MOVING
Definition: motorBaseConfig.hpp:59
virtual ~MotorBaseConfig()=default
MotorConfig destructor.
constexpr auto CI_MIN_POS
Definition: motorBaseConfig.hpp:34
constexpr auto CI_STAT_TARGET_VEL
Definition: motorBaseConfig.hpp:92
virtual double GetScaleFactor() const
Definition: motorBaseConfig.cpp:69
constexpr auto CI_STAT_TARGET_POS
Definition: motorBaseConfig.hpp:88
constexpr int SUBSTATE_ABORTING
Definition: motorBaseConfig.hpp:57
constexpr auto UndefinedNamedPos
Definition: motorBaseConfig.hpp:99
LampRpcErrors header file.
constexpr auto FITS_PARAM_POS
Definition: motorBaseConfig.hpp:96
constexpr auto CI_MAX_POS
Definition: motorBaseConfig.hpp:33
constexpr auto CI_POS_NAME
Definition: motorBaseConfig.hpp:45
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorBaseConfig.hpp:65
constexpr auto CI_POS_VALUE
Definition: motorBaseConfig.hpp:46
constexpr auto CI_STAT_ENC_POS
Definition: motorBaseConfig.hpp:84
std::unordered_map< std::string, double > m_named_positions
Definition: motorBaseConfig.hpp:227
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:103
configSet class header file.
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:104
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:98
MotorBaseConfig(const std::string filename, const std::string name)
MotorConfig constructor.
Definition: motorBaseConfig.cpp:25
friend class Sensor
Definition: motorBaseConfig.hpp:117
constexpr auto CI_STAT_ACTUAL_POSNAME
Definition: motorBaseConfig.hpp:87
constexpr auto CI_STAT_ACTUAL_POS
Definition: motorBaseConfig.hpp:89
constexpr auto CI_STAT_ACTUAL_VEL
Definition: motorBaseConfig.hpp:91
constexpr auto CI_TIMEOUT_MOVE
Definition: motorBaseConfig.hpp:38
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:100
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:109
constexpr auto RPC_MOVE_ABS
Definition: motorBaseConfig.hpp:53
int GetNumberOfNamedPositions() const noexcept
Definition: motorBaseConfig.hpp:170
constexpr int SUBSTATE_OP_SETTING_POS
Definition: motorBaseConfig.hpp:60
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:112
constexpr auto RPC_MOVE_REL
Definition: motorBaseConfig.hpp:54
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:101
int m_num_named_pos
Number of named positions.
Definition: motorBaseConfig.hpp:228
constexpr auto CI_DEF_VEL
Definition: motorBaseConfig.hpp:32
constexpr auto SUBSTATE_READY_STR
Definition: motorBaseConfig.hpp:63
constexpr auto CI_STAT_TARGET_ENC
Definition: motorBaseConfig.hpp:85
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorBaseConfig.hpp:64
Device Configuration class.
Definition: deviceConfig.hpp:127
constexpr auto CI_STAT_INITIALISED
Definition: motorBaseConfig.hpp:93
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:105
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:99
double GetNamedPositionValue(const int index) const
GetNamedPositionValue.
Definition: motorBaseConfig.cpp:95
constexpr auto CI_TIMEOUT_INIT
Definition: motorBaseConfig.hpp:37
constexpr auto SUBSTATE_OP_SETTING_POS_STR
Definition: motorBaseConfig.hpp:67
virtual void Init()
Read the configuration.
Definition: motorBaseConfig.cpp:41
Motor Base Configuration class.
Definition: motorBaseConfig.hpp:116
double GetVelocity() const
Definition: motorBaseConfig.cpp:57
bool FindNamedPositionValue(const std::string named_pos, double &position) const
Find value associated to a named position.
Definition: motorBaseConfig.cpp:106
constexpr int SUBSTATE_OP_STOPPING
Definition: motorBaseConfig.hpp:61
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorBaseConfig.hpp:68
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:106
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorBaseConfig.hpp:58
const std::unordered_map< short, std::string > SubstateMap
Definition: motorBaseConfig.hpp:70
double GetNpTolerance() const
Get named position tolerance.
Definition: motorBaseConfig.cpp:159
constexpr auto CI_TIMEOUT_SWITCH
Definition: motorBaseConfig.hpp:39
constexpr auto CI_NAME_POS_TOLERANCE
Definition: motorBaseConfig.hpp:47