8#ifndef FCF_DEVMGR_DEVICE_MOTOR_IF_HPP
9#define FCF_DEVMGR_DEVICE_MOTOR_IF_HPP
11#include <unordered_map>
13#include <yaml-cpp/yaml.h>
20#include <rad/mal/publisher.hpp>
72 double m_scale_factor {1};
74 bool m_enabled {
false};
75 bool m_locked {
false};
78 bool m_in_position {
false};
81 std::vector<bool> m_signals;
132 MotorLcsIf(std::shared_ptr<ifw::fcf::devmgr::common::IDeviceConfig> config,
173 void Listener(
const ifw::fnd::defs::Notification& note);
180 virtual std::string
GetRpcError(
const short error_code)
const;
199 int m_mot_init_step {};
200 int m_mot_init_action {};
202 short m_mot_axis_info1 {};
203 short m_mot_axis_info2 {};
204 bool m_mot_axis_ready {
false};
205 bool m_mot_axis_enable {
false};
206 bool m_mot_axis_brake {
false};
207 bool m_mot_axis_lock {
false};
208 bool m_mot_axis_inpos {
false};
209 bool m_mot_signal_lstop {
false};
210 bool m_mot_signal_lhw {
false};
211 bool m_mot_signal_ref {
false};
212 bool m_mot_signal_index {
false};
213 bool m_mot_signal_uhw {
false};
214 bool m_mot_signal_ustop {
false};
217 log4cplus::Logger m_logger;
224#include "motorLcsIf.ipp"
Definition dataContext.hpp:86
virtual void ReadStatus(DeviceControllerData &status)
ReadStatus.
Definition deviceLcsIf.cpp:651
Motor Local Control System (LCS) Interface (IF) class.
Definition motorBaseLcsIf.hpp:77
@ STAT_MOTOR_BASE_END
Definition motorBaseLcsIf.hpp:92
@ STAT_MODE
Definition motorLcsIf.hpp:104
@ STAT_INIT_STEP
Definition motorLcsIf.hpp:109
@ STAT_SIGNAL_UHW
Definition motorLcsIf.hpp:115
@ STAT_AXIS_BRAKE
Definition motorLcsIf.hpp:101
@ STAT_SIGNAL_LSTOP
Definition motorLcsIf.hpp:111
@ STAT_SIGNAL_USTOP
Definition motorLcsIf.hpp:116
@ STAT_AXIS_INFO2
Definition motorLcsIf.hpp:108
@ STAT_SIGNAL_LHW
Definition motorLcsIf.hpp:112
@ STAT_AXIS_LOCK
Definition motorLcsIf.hpp:103
@ STAT_INIT_ACTION
Definition motorLcsIf.hpp:110
@ STAT_AXIS_INPOS
Definition motorLcsIf.hpp:106
@ STAT_MOTOR_END
Definition motorLcsIf.hpp:118
@ STAT_SCALE_FACTOR
Definition motorLcsIf.hpp:117
@ STAT_AXIS_READY
Definition motorLcsIf.hpp:105
@ STAT_AXIS_INFO1
Definition motorLcsIf.hpp:107
@ STAT_AXIS_ENABLE
Definition motorLcsIf.hpp:102
@ STAT_SIGNAL_REF
Definition motorLcsIf.hpp:113
@ STAT_SIGNAL_INDEX
Definition motorLcsIf.hpp:114
void StorePosition(const ifw::fnd::defs::Value &value, int attribute)
Store Position.
Definition motorLcsIf.cpp:327
void Listener(const ifw::fnd::defs::Notification ¬e)
Callback to manage changes on the monitored items.
Definition motorLcsIf.cpp:101
virtual std::string GetRpcError(const short error_code) const
Definition motorLcsIf.cpp:289
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:138
Motor class source file.
Definition motor.hpp:18
Signal
Definition motorConfig.hpp:122
The MotorBaseControllerData struct.
Definition motorBaseLcsIf.hpp:33
The MotorControllerData struct.
Definition motorLcsIf.hpp:32
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