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);
106 virtual void GetConfig(ifw::core::protocol::base::VectorVariant& params)
const override;
117 virtual void GetMotorConfig(ifw::core::protocol::base::VectorVariant& params)
const;
119 virtual void GetMotorConfig(
const std::string motor, ifw::core::protocol::base::VectorVariant& params)
const;
121 virtual void SetScaleFactor(
const std::string motor,
double scale_factor);
138 virtual void GetConfigList(ifw::core::utils::bat::DbVector& cfg_list,
139 std::string prefix)
const override;
160 std::optional<int>
GetMotorIndex(
const std::string& motor)
const;
163 void GetMotorNames(std::vector<std::string>& motor_names)
const;
173 std::string
GetMotorName(
const std::string nodeid)
const;
175 inline long unsigned int GetNumAxes()
const {
return m_num_axis;};
200 std::map<std::string, std::unique_ptr<ifw::fcf::devmgr::motor::MotorConfig>> m_motor_config_map;
203 std::unordered_map<std::string, std::vector<double>> m_named_positions;
207 std::map<std::string, std::string> m_motor_prefix_map;
210 log4cplus::Logger m_logger;
Device Configuration class.
Definition deviceConfig.hpp:124
adc Configuration class
Definition maxisConfig.hpp:71
double GetMotorScaleFactor(const int axis_num) const
Definition maxisConfig.cpp:322
MAxisConfig(const std::string filename, const std::string name)
DeviceConfig constructor.
Definition maxisConfig.cpp:27
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:369
long unsigned int GetNumAxes() const
Definition maxisConfig.hpp:175
virtual std::string GetMotorMapFile() const
Definition maxisConfig.cpp:179
void Init()
Define configuration parameters for adc device.
Definition maxisConfig.cpp:44
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
virtual void GetConfig(ifw::core::protocol::base::VectorVariant ¶ms) const override
Obtain the list of configuration parameters.
Definition maxisConfig.cpp:94
virtual void GetMotorConfig(ifw::core::protocol::base::VectorVariant ¶ms) const
Obtain the list of ADC motor configuration parameters.
Definition maxisConfig.cpp:103
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:58
constexpr auto SUBSTATE_ABORTING_STR
Definition motorBaseConfig.hpp:57
constexpr int SUBSTATE_OP_STOPPING
Definition motorBaseConfig.hpp:54
constexpr auto SUBSTATE_OP_MOVING_STR
Definition motorBaseConfig.hpp:59
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition motorBaseConfig.hpp:61
constexpr int SUBSTATE_OP_STANDSTILL
Definition motorBaseConfig.hpp:51
constexpr int SUBSTATE_ABORTING
Definition motorBaseConfig.hpp:50
constexpr int SUBSTATE_OP_MOVING
Definition motorBaseConfig.hpp:52