9#ifndef FCF_DEVMGR_DEVICE_MAXIS_CONFIG_HPP
10#define FCF_DEVMGR_DEVICE_MAXIS_CONFIG_HPP
13#include <yaml-cpp/yaml.h>
15#include <utils/bat/logger.hpp>
88 const std::unordered_map<short, std::string>
TrkModeMap = {
113 const std::string name);
138 virtual void GetConfig(protocol::base::VectorVariant& params)
const override;
149 virtual void GetMotorConfig(protocol::base::VectorVariant& params)
const;
151 virtual void GetMotorConfig(
const std::string motor, protocol::base::VectorVariant& params)
const;
153 virtual void SetScaleFactor(
const std::string motor,
double scale_factor);
160 std::optional<short>
GetModeIndex(
const std::string& name)
const;
161 std::optional<std::string>
GetModeStr(
const short& mode)
const;
162 bool FindMode(
const std::string& name)
const;
174 std::string prefix)
const override;
195 std::optional<int>
GetMotorIndex(
const std::string& motor)
const;
198 void GetMotorNames(std::vector<std::string>& motor_names)
const;
208 std::string
GetMotorName(
const std::string nodeid)
const;
223 log4cplus::Logger m_logger;
Device Configuration class.
Definition: deviceConfig.hpp:126
adc Configuration class
Definition: maxisConfig.hpp:103
std::string GetMotorName(const int &index) const
Definition: maxisConfig.cpp:193
bool FindMode(const std::string &name) const
Definition: maxisConfig.cpp:328
std::map< std::string, std::unique_ptr< fcf::devmgr::motor::MotorConfig > > m_motor_config_map
Maps of multi axis configuration.
Definition: maxisConfig.hpp:216
double GetNpTolerance() const
Get named position tolerance.
Definition: maxisConfig.cpp:338
void GetMotorPrefixes(std::vector< std::string > &motor_prefixes) const
Definition: maxisConfig.cpp:210
void Init()
Define configuration parameters for adc device.
Definition: maxisConfig.cpp:44
std::optional< short > GetModeIndex(const std::string &name) const
Definition: maxisConfig.cpp:301
virtual void SetScaleFactor(const std::string motor, double scale_factor)
Definition: maxisConfig.cpp:217
double GetMotorVelocity(const int axis_num) const
Definition: maxisConfig.cpp:225
std::string GetMotorPrefix(const int &index) const
Definition: maxisConfig.cpp:144
virtual ~MAxisConfig()=default
DeviceConfig destructor.
int m_num_axis
Store number of axes. The number comes from the configuration of the device.
Definition: maxisConfig.hpp:213
virtual void GetMotorConfig(protocol::base::VectorVariant ¶ms) const
Obtain the list of ADC motor configuration parameters.
Definition: maxisConfig.cpp:88
virtual void GetConfig(protocol::base::VectorVariant ¶ms) const override
Obtain the list of configuration parameters.
Definition: maxisConfig.cpp:79
virtual void GetConfigList(utils::bat::DbVector &cfg_list, std::string prefix) const override
Get configuration list.
Definition: maxisConfig.cpp:105
double GetMotorScaleFactor(const int axis_num) const
Definition: maxisConfig.cpp:254
virtual std::string GetMotorType() const
Definition: maxisConfig.cpp:133
virtual std::string GetMotorMapFile() const
Definition: maxisConfig.cpp:115
void GetMotorNames(std::vector< std::string > &motor_names) const
Definition: maxisConfig.cpp:203
std::optional< int > GetMotorIndex(const std::string &motor) const
Definition: maxisConfig.cpp:174
std::map< std::string, std::string > m_motor_prefix_map
Definition: maxisConfig.hpp:220
std::optional< std::string > GetModeStr(const short &mode) const
Definition: maxisConfig.cpp:315
DataContext class header file.
MAxisHwErrors header file.
MAxisRpcErrors header file.
MotorConfig class header file.
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:108
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:99
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:98
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:111
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:105
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:100
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:97
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:102
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:104
constexpr int SUBSTATE_OP_DISABLING
Definition: deviceConfig.hpp:107
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:103
constexpr auto SUBSTATE_OP_DISABLING_STR
Definition: deviceConfig.hpp:110
constexpr auto SUBSTATE_RESETTING_STR
Definition: maxisConfig.hpp:54
constexpr auto CI_MODES
Definition: maxisConfig.hpp:32
constexpr auto CI_DIR_SIGN
Definition: maxisConfig.hpp:29
constexpr short TRK_MODE_OFF
Definition: maxisConfig.hpp:79
constexpr auto CI_AXES
Definition: maxisConfig.hpp:27
constexpr auto SUBSTATE_ENABLING_STR
Definition: maxisConfig.hpp:55
constexpr auto CI_TRK_THRESHOLD
Definition: maxisConfig.hpp:37
constexpr auto RPC_MOVE_ANGLE
Definition: maxisConfig.hpp:40
constexpr auto LOGGER_NAME
Definition: maxisConfig.hpp:23
constexpr auto CI_MOTOR_MAP_FILE
Definition: maxisConfig.hpp:25
constexpr auto CI_LONGITUDE
Definition: maxisConfig.hpp:35
constexpr auto CI_STAT_REF
Definition: maxisConfig.hpp:30
constexpr auto RPC_TRACK_OFFSET
Definition: maxisConfig.hpp:43
constexpr int SUBSTATE_OP_PRESETTING
Definition: maxisConfig.hpp:52
constexpr short TRK_MODE_ENG
Definition: maxisConfig.hpp:78
constexpr auto SUBSTATE_OP_TRACKING_STR
Definition: maxisConfig.hpp:56
constexpr auto CI_STAT_TRACK_MODE
Definition: maxisConfig.hpp:94
constexpr int SUBSTATE_OP_TRACKING
Definition: maxisConfig.hpp:51
constexpr auto RPC_START_TRACK
Definition: maxisConfig.hpp:41
constexpr auto CI_FOCUS_SIGN
Definition: maxisConfig.hpp:28
const std::unordered_map< short, std::string > SubstateMap
Definition: maxisConfig.hpp:61
constexpr auto RPC_STOP_TRACK
Definition: maxisConfig.hpp:42
constexpr int SUBSTATE_ENABLING
Definition: maxisConfig.hpp:49
constexpr int SUBSTATE_RESETTING
Definition: maxisConfig.hpp:48
constexpr auto SUBSTATE_OP_PRESETTING_STR
Definition: maxisConfig.hpp:57
constexpr auto CI_TRK_PERIOD
Definition: maxisConfig.hpp:36
constexpr auto TRK_MODE_OFF_STR
Definition: maxisConfig.hpp:84
constexpr auto TRK_MODE_ENG_STR
Definition: maxisConfig.hpp:83
constexpr auto CI_LATITUDE
Definition: maxisConfig.hpp:34
constexpr short TRK_MODE_AUTO
Definition: maxisConfig.hpp:80
constexpr auto CI_STAT_AUTO
Definition: maxisConfig.hpp:31
const std::unordered_map< short, std::string > TrkModeMap
Definition: maxisConfig.hpp:88
constexpr auto TRK_MODE_AUTO_STR
Definition: maxisConfig.hpp:85
constexpr auto SUBSTATE_OP_MOVING_STR
Definition: motorBaseConfig.hpp:64
constexpr auto SUBSTATE_OP_STANDSTILL_STR
Definition: motorBaseConfig.hpp:63
constexpr auto SUBSTATE_OP_STOPPING_STR
Definition: motorBaseConfig.hpp:66
constexpr auto SUBSTATE_ABORTING_STR
Definition: motorBaseConfig.hpp:62
constexpr int SUBSTATE_OP_STANDSTILL
Definition: motorBaseConfig.hpp:56
constexpr int SUBSTATE_OP_STOPPING
Definition: motorBaseConfig.hpp:59
constexpr int SUBSTATE_ABORTING
Definition: motorBaseConfig.hpp:55
constexpr int SUBSTATE_OP_MOVING
Definition: motorBaseConfig.hpp:57