8#ifndef FCF_DEVMGR_DEVICE_MAXIS_IF_HPP
9#define FCF_DEVMGR_DEVICE_MAXIS_IF_HPP
11#include <unordered_map>
13#include <yaml-cpp/yaml.h>
45 std::map<std::string, fcf::devmgr::motor::MotorControllerData> m_motors;
81 MAxisLcsIf(std::shared_ptr<ifw::fcf::devmgr::common::IDeviceConfig> config,
112 void MoveAbs(
int axis_id,
double position,
double velocity, ::fcfif::MotorPosUnit unit = ::fcfif::MotorPosUnit::UU);
120 void MoveRel(
int axis_id,
double position,
double velocity, ::fcfif::MotorPosUnit unit = ::fcfif::MotorPosUnit::UU);
127 void MoveEncAbs(
int axis_id,
long int encoders);
134 void MoveEncRel(
int axis_id,
long int encoders);
145 void MoveVel(
int axis_id,
double velocity);
153 void MoveAxes(
const std::vector<double>& positions);
207 void Listener(
const ifw::fnd::defs::Notification& note);
214 virtual std::string
GetRpcError(
const short error_code)
const;
270 const ifw::fnd::defs::Value& value,
274 const ifw::fnd::defs::Value& value,
277 void MovePos(
int axis_id,
double position,
double velocity,
280 std::pair<std::string, std::string>
GetObjectInfo(
const std::string& map_value)
const;
284 std::vector<std::string> m_monitor_track_vector;
289 std::unique_ptr<elt::configng::CiiConfigDocument> m_motor_map_doc;
290 short m_track_mode {};
292 std::map<std::string, fcf::devmgr::motor::MotorControllerData> m_motors_status;
295 log4cplus::Logger m_logger;
300#include "maxisLcsIf.ipp"
Definition dataContext.hpp:86
Definition deviceLcsIf.hpp:91
virtual void ReadStatus(DeviceControllerData &status)
ReadStatus.
Definition deviceLcsIf.cpp:651
bool AreAllInPosition() const
Check whether all motors are in position.
Definition maxisLcsIf.cpp:561
virtual void ReadStatus(MAxisControllerData &status)
Read status from the controller.
Definition maxisLcsIf.cpp:506
void UpdateTargetPositions(const std::vector< double > &positions)
UpdateTargetPositions.
Definition maxisLcsIf.cpp:295
std::pair< std::string, std::string > GetObjectInfo(const std::string &map_value) const
Definition maxisLcsIf.cpp:493
std::string GetMotorMapValue(std::string motor, std::string category, std::string key)
GetMotorMapValue.
Definition maxisLcsIf.cpp:471
void ReadConfig()
Read the configuration.
void MoveAbs(int axis_id, double position, double velocity, ::fcfif::MotorPosUnit unit=::fcfif::MotorPosUnit::UU)
Executes the MoveAbs RPC.
Definition maxisLcsIf.cpp:310
virtual void Init()
Executes the Init RPC.
Definition maxisLcsIf.cpp:171
void MoveAxesByName(std::string namedpos)
Definition maxisLcsIf.cpp:423
virtual void InitObject()
Initialize object.
Definition maxisLcsIf.cpp:78
void LoadConfig()
Load the YAML configuration.
std::optional< double > GetTargetInUserUnits(int axis_id, double value)
GetTargetInUserUnits.
Definition maxisLcsIf.cpp:239
void MoveRel(int axis_id, double position, double velocity, ::fcfif::MotorPosUnit unit=::fcfif::MotorPosUnit::UU)
Executes the MoveRel RPC.
Definition maxisLcsIf.cpp:333
void UpdateTargetPosition(int axis_id, double position, std::string move_type)
UpdateTargetPosition.
Definition maxisLcsIf.cpp:275
void MoveVel(int axis_id, double velocity)
Executes the MoveVel RPC.
Definition maxisLcsIf.cpp:379
virtual void AddCustomAttributes()
Add custom attributes.
Definition maxisLcsIf.cpp:161
MAxisLcsIf(std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > config, ifw::fcf::devmgr::common::DataContext &data_ctx)
adcLcsIf constructor.
Definition maxisLcsIf.cpp:69
bool IsInPosition(const std::string &axis_name) const
IsInPosition.
Definition maxisLcsIf.cpp:540
virtual std::string GetRpcError(const short error_code) const
Definition maxisLcsIf.cpp:592
void MoveEncAbs(int axis_id, long int encoders)
Move a motor in absolute encoder units.
Definition maxisLcsIf.cpp:355
bool IsStandstill() const
IsStandstill.
Definition maxisLcsIf.cpp:582
bool IsMoving() const
IsMoving.
Definition maxisLcsIf.cpp:525
void Listener(const ifw::fnd::defs::Notification ¬e)
Callback to manage changes on the monitored items.
Definition maxisLcsIf.cpp:621
void StoreMotorPosition(const std::string nodeid_prefix, const ifw::fnd::defs::Value &value, int attribute)
Publish Position.
Definition maxisLcsIf.cpp:741
void MoveEncRel(int axis_id, long int encoders)
Move a motor in relative encoder units.
Definition maxisLcsIf.cpp:367
void StoreMotorAttribute(const std::string nodeid_prefix, const ifw::fnd::defs::Value &value, int attribute)
Definition maxisLcsIf.cpp:682
void MovePos(int axis_id, double position, double velocity, std::string move_type=ifw::fcf::devmgr::motor::RPC_MOVE_ABS)
Definition maxisLcsIf.cpp:399
virtual ~MAxisLcsIf()
Default destructor.
Definition maxisLcsIf.hpp:87
void MoveAxes(const std::vector< double > &positions)
MoveAxes.
Definition maxisLcsIf.cpp:442
MAxis class header file.
Definition maxis.hpp:18
std::vector< std::pair< std::string, unsigned int > > VectorAttributes
Definition maxisLcsIf.hpp:21
constexpr auto RPC_MOVE_ABS
Definition motorBaseConfig.hpp:45
The DeviceControllerData struct.
Definition deviceLcsIf.hpp:49
The adcControllerData struct.
Definition maxisLcsIf.hpp:29
void GetMotorNames(std::vector< std::string > &motor_vector)
void SetData(const MAxisControllerData &data)
Definition maxisLcsIf.cpp:65
virtual ~MAxisControllerData()
Definition maxisLcsIf.cpp:62
virtual std::string GetErrorText() const
MAxisControllerData()
Definition maxisLcsIf.cpp:56
void AddMotor(const std::string motor, const fcf::devmgr::motor::MotorControllerData motor_data)
virtual std::string GetSubstateStr() const
fcf::devmgr::motor::MotorControllerData GetMotor(std::string motor) const
The MotorControllerData struct.
Definition motorLcsIf.hpp:32