8#ifndef FCF_DEVMGR_DEVICE_MAXIS_CONFIG_HPP
9#define FCF_DEVMGR_DEVICE_MAXIS_CONFIG_HPP
12#include <yaml-cpp/yaml.h>
14#include <ifw/core/utils/bat/logger.hpp>
81 const std::string name);
107 std::vector<std::pair<std::string, ifw::fnd::defs::Value>>& params)
const override;
119 std::vector<std::pair<std::string, ifw::fnd::defs::Value>>& params)
const;
122 const std::string
motor,
123 std::vector<std::pair<std::string, ifw::fnd::defs::Value>>& params)
const;
142 virtual void GetConfigList(ifw::core::utils::bat::DbVector& cfg_list,
143 std::string prefix)
const override;
167 void GetMotorNames(std::vector<std::string>& motor_names)
const;
180 std::string
GetMotorName(
const std::string nodeid)
const;
182 inline long unsigned int GetNumAxes()
const {
return m_num_axis;};
207 std::map<std::string, std::unique_ptr<ifw::fcf::devmgr::motor::MotorConfig>> m_motor_config_map;
210 std::unordered_map<std::string, std::vector<double>> m_named_positions;
214 std::map<std::string, std::string> m_motor_prefix_map;
217 log4cplus::Logger m_logger;
Device Configuration class.
Definition deviceConfig.hpp:124
double GetMotorNamedPositionValue(const int axis_num, const std::string &posname) const
Definition maxisConfig.cpp:322
double GetMotorScaleFactor(const int axis_num) const
Definition maxisConfig.cpp:357
MAxisConfig(const std::string filename, const std::string name)
DeviceConfig constructor.
Definition maxisConfig.cpp:28
std::optional< std::vector< double > > GetNamedPositionValues(const int index) const
GetNamedPositionValue.
Definition maxisConfig.cpp:137
double GetMotorVelocity(const int axis_num) const
Definition maxisConfig.cpp:293
std::optional< int > GetMotorIndex(const std::string &motor) const
Definition maxisConfig.cpp:238
std::optional< std::string > GetNamedPosition(const int index) const
GetNamedPosition.
Definition maxisConfig.cpp:120
virtual ~MAxisConfig()=default
DeviceConfig destructor.
virtual void GetConfigList(ifw::core::utils::bat::DbVector &cfg_list, std::string prefix) const override
Get configuration list.
Definition maxisConfig.cpp:169
double GetNpTolerance() const
Get named position tolerance.
Definition maxisConfig.cpp:404
virtual void GetConfig(std::vector< std::pair< std::string, ifw::fnd::defs::Value > > ¶ms) const override
Obtain the list of configuration parameters.
Definition maxisConfig.cpp:95
virtual void GetMotorConfig(std::vector< std::pair< std::string, ifw::fnd::defs::Value > > ¶ms) const
Obtain the list of ADC motor configuration parameters.
Definition maxisConfig.cpp:103
long unsigned int GetNumAxes() const
Definition maxisConfig.hpp:182
virtual std::string GetMotorMapFile() const
Definition maxisConfig.cpp:179
void Init()
Define configuration parameters for adc device.
Definition maxisConfig.cpp:45
std::string GetMotorName(const int &index) const
Definition maxisConfig.cpp:261
virtual std::string GetMotorType() const
Definition maxisConfig.cpp:197
virtual void SetScaleFactor(const std::string motor, double scale_factor)
Definition maxisConfig.cpp:285
void GetMotorPrefixes(std::vector< std::string > &motor_prefixes) const
Definition maxisConfig.cpp:278
void GetMotorNames(std::vector< std::string > &motor_names) const
Definition maxisConfig.cpp:271
std::string GetMotorPrefix(const int &index) const
Definition maxisConfig.cpp:208
constexpr int SUBSTATE_ERROR
Definition deviceConfig.hpp:97
constexpr int SUBSTATE_OP_DISABLING
Definition deviceConfig.hpp:104
constexpr auto SUBSTATE_INITIALISING_STR
Definition deviceConfig.hpp:100
constexpr int SUBSTATE_READY
Definition deviceConfig.hpp:95
constexpr auto SUBSTATE_ERROR_STR
Definition deviceConfig.hpp:102
constexpr int SUBSTATE_INITIALISING
Definition deviceConfig.hpp:96
constexpr auto SUBSTATE_NOTREADY_STR
Definition deviceConfig.hpp:99
constexpr auto SUBSTATE_OP_DISABLING_STR
Definition deviceConfig.hpp:107
constexpr auto SUBSTATE_READY_STR
Definition deviceConfig.hpp:101
constexpr int SUBSTATE_OP_ERROR
Definition deviceConfig.hpp:105
constexpr int SUBSTATE_NOTREADY
Definition deviceConfig.hpp:94
constexpr auto SUBSTATE_OP_ERROR_STR
Definition deviceConfig.hpp:108
MAxis class header file.
Definition maxis.hpp:18
const std::unordered_map< short, std::string > SUBSTATE_MAP
Definition maxisConfig.hpp:49
constexpr auto LOGGER_NAME
Definition maxisConfig.hpp:23
constexpr auto SUBSTATE_ENABLING_STR
Definition maxisConfig.hpp:44
constexpr auto CI_MOTOR_MAP_FILE
Definition maxisConfig.hpp:25
constexpr auto CI_AXES
Definition maxisConfig.hpp:26
constexpr int SUBSTATE_RESETTING
Definition maxisConfig.hpp:38
constexpr auto CI_POSITIONS
Definition maxisConfig.hpp:27
constexpr auto CI_POS_VALUES
Definition maxisConfig.hpp:29
constexpr auto SUBSTATE_RESETTING_STR
Definition maxisConfig.hpp:43
constexpr int SUBSTATE_ENABLING
Definition maxisConfig.hpp:39
constexpr auto CI_POS_NAME
Definition maxisConfig.hpp:28
constexpr auto RPC_MOVE_AXES
Definition maxisConfig.hpp:33
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition motorBaseConfig.hpp:57
constexpr auto SUBSTATE_ABORTING_STR
Definition motorBaseConfig.hpp:56
constexpr int SUBSTATE_OP_STOPPING
Definition motorBaseConfig.hpp:53
constexpr auto SUBSTATE_OP_MOVING_STR
Definition motorBaseConfig.hpp:58
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition motorBaseConfig.hpp:60
constexpr int SUBSTATE_OP_STANDSTILL
Definition motorBaseConfig.hpp:50
constexpr int SUBSTATE_ABORTING
Definition motorBaseConfig.hpp:49
constexpr int SUBSTATE_OP_MOVING
Definition motorBaseConfig.hpp:51