7#ifndef FCF_DEVMGR_DEVICE_MOTOR_IF_HPP
8#define FCF_DEVMGR_DEVICE_MOTOR_IF_HPP
10#include <unordered_map>
12#include <yaml-cpp/yaml.h>
19#include <rad/mal/publisher.hpp>
71 double m_scale_factor {1};
73 bool m_enabled {
false};
74 bool m_locked {
false};
77 bool m_in_position {
false};
80 std::vector<bool> m_signals;
130 MotorLcsIf(std::shared_ptr<ifw::fcf::devmgr::common::IDeviceConfig> config,
171 void Listener(ifw::core::protocol::base::VectorVariant& params);
178 virtual std::string
GetRpcError(
const short error_code)
const;
191 void StorePosition(
const ifw::core::protocol::base::Variant& value,
197 int m_mot_init_step {};
198 int m_mot_init_action {};
200 short m_mot_axis_info1 {};
201 short m_mot_axis_info2 {};
202 bool m_mot_axis_ready {
false};
203 bool m_mot_axis_enable {
false};
204 bool m_mot_axis_brake {
false};
205 bool m_mot_axis_lock {
false};
206 bool m_mot_axis_inpos {
false};
207 bool m_mot_signal_lstop {
false};
208 bool m_mot_signal_lhw {
false};
209 bool m_mot_signal_ref {
false};
210 bool m_mot_signal_index {
false};
211 bool m_mot_signal_uhw {
false};
212 bool m_mot_signal_ustop {
false};
215 log4cplus::Logger m_logger;
222#include "motorLcsIf.ipp"
Definition dataContext.hpp:86
Motor Local Control System (LCS) Interface (IF) class.
Definition motorBaseLcsIf.hpp:75
@ STAT_MOTOR_BASE_END
Definition motorBaseLcsIf.hpp:90
Motor Local Control System (LCS) Interface (IF) class.
Definition motorLcsIf.hpp:97
@ STAT_MODE
Definition motorLcsIf.hpp:103
@ STAT_INIT_STEP
Definition motorLcsIf.hpp:108
@ STAT_SIGNAL_UHW
Definition motorLcsIf.hpp:114
@ STAT_AXIS_BRAKE
Definition motorLcsIf.hpp:100
@ STAT_SIGNAL_LSTOP
Definition motorLcsIf.hpp:110
@ STAT_SIGNAL_USTOP
Definition motorLcsIf.hpp:115
@ STAT_AXIS_INFO2
Definition motorLcsIf.hpp:107
@ STAT_SIGNAL_LHW
Definition motorLcsIf.hpp:111
@ STAT_AXIS_LOCK
Definition motorLcsIf.hpp:102
@ STAT_INIT_ACTION
Definition motorLcsIf.hpp:109
@ STAT_AXIS_INPOS
Definition motorLcsIf.hpp:105
@ STAT_MOTOR_END
Definition motorLcsIf.hpp:117
@ STAT_SCALE_FACTOR
Definition motorLcsIf.hpp:116
@ STAT_AXIS_READY
Definition motorLcsIf.hpp:104
@ STAT_AXIS_INFO1
Definition motorLcsIf.hpp:106
@ STAT_AXIS_ENABLE
Definition motorLcsIf.hpp:101
@ STAT_SIGNAL_REF
Definition motorLcsIf.hpp:112
@ STAT_SIGNAL_INDEX
Definition motorLcsIf.hpp:113
void StorePosition(const ifw::core::protocol::base::Variant &value, int attribute)
Store Position.
Definition motorLcsIf.cpp:329
void Listener(ifw::core::protocol::base::VectorVariant ¶ms)
Callback to manage changes on the monitored items.
Definition motorLcsIf.cpp:101
virtual std::string GetRpcError(const short error_code) const
Definition motorLcsIf.cpp:291
virtual void InitObject()
Initialize object.
Definition motorLcsIf.cpp:40
virtual void ReadStatus(MotorControllerData &status)
Read status from the controller.
Definition motorLcsIf.cpp:83
MotorLcsIf(std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > config, ifw::fcf::devmgr::common::DataContext &data_ctx)
MotorLcsIf constructor.
Definition motorLcsIf.cpp:33
virtual ~MotorLcsIf()
Default destructor.
Definition motorLcsIf.hpp:136
Motor class source file.
Definition motor.hpp:17
Signal
Definition motorConfig.hpp:122
The MotorBaseControllerData struct.
Definition motorBaseLcsIf.hpp:31
The MotorControllerData struct.
Definition motorLcsIf.hpp:31
short GetInfoData1() const
void SetLockFlag(bool flag)
double GetScaleFactor() const
void SetInfoData2(short info)
bool GetInPositionFlag() const
void SetBrakeFlag(bool flag)
void SetInPositionFlag(bool flag)
void SetEnableFlag(bool flag)
bool GetEnableFlag() const
void SetReadyFlag(bool flag)
bool GetReadyFlag() const
void SetSignalFlag(Signal signal, bool flag)
short GetInfoData2() const
void SetInfoData1(short info)
virtual ~MotorControllerData()
Definition motorLcsIf.cpp:26
bool GetBrakeFlag() const
virtual std::string GetErrorText() const
MotorControllerData()
Definition motorLcsIf.cpp:13
void SetScaleFactor(double scale)
void SetData(const MotorControllerData &data)
Definition motorLcsIf.cpp:29
bool GetSignalFlag(Signal signal) const