9 #ifndef FCF_DEVMGR_DEVICE_MOTOR_BASE_IF_HPP
10 #define FCF_DEVMGR_DEVICE_MOTOR_BASE_IF_HPP
13 #include <unordered_map>
16 #include <yaml-cpp/yaml.h>
23 #include <rad/mal/publisher.hpp>
102 MotorBaseLcsIf(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config,
218 log4cplus::Logger m_logger;
225 #include "motorBaseLcsIf.ipp"
Definition: dataContext.hpp:90
Definition: deviceLcsIf.hpp:77
Motor Local Control System (LCS) Interface (IF) class.
Definition: motorBaseLcsIf.hpp:75
virtual bool IsDisabling()
Check if controller is disabling the motor.
Definition: motorBaseLcsIf.cpp:140
virtual ~MotorBaseLcsIf()
Default destructor.
Definition: motorBaseLcsIf.hpp:108
double m_mot_target_pos
Definition: motorBaseLcsIf.hpp:209
@ STAT_HW_STATUS
Definition: motorBaseLcsIf.hpp:80
@ STAT_TARGET_VEL
Definition: motorBaseLcsIf.hpp:87
@ STAT_INITIALISED
Definition: motorBaseLcsIf.hpp:88
@ STAT_STATE
Definition: motorBaseLcsIf.hpp:81
@ STAT_TARGET_POS
Definition: motorBaseLcsIf.hpp:84
@ STAT_LOCAL
Definition: motorBaseLcsIf.hpp:78
@ STAT_POS_ERROR
Definition: motorBaseLcsIf.hpp:85
@ STAT_ACTUAL_VEL
Definition: motorBaseLcsIf.hpp:86
@ STAT_MOTOR_BASE_END
Definition: motorBaseLcsIf.hpp:89
@ STAT_ERROR
Definition: motorBaseLcsIf.hpp:79
@ STAT_ACTUAL_POS
Definition: motorBaseLcsIf.hpp:83
@ STAT_SUBSTATE
Definition: motorBaseLcsIf.hpp:82
double m_mot_pos_error
Definition: motorBaseLcsIf.hpp:210
double m_mot_actual_pos
Definition: motorBaseLcsIf.hpp:205
std::string m_mot_target_name
Definition: motorBaseLcsIf.hpp:207
double m_mot_actual_enc
Definition: motorBaseLcsIf.hpp:206
void MovePos(double position, double velocity, std::string move_type=RPC_MOVE_ABS)
Definition: motorBaseLcsIf.cpp:103
bool IsInPosition() const
Check if motor is in position.
Definition: motorBaseLcsIf.cpp:208
void MoveEncRel(int encoders)
Executes the MoveRel RPC.
Definition: motorBaseLcsIf.cpp:72
void MoveRel(double position)
Executes the MoveRel RPC.
Definition: motorBaseLcsIf.cpp:46
MotorBaseLcsIf(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config, fcf::devmgr::common::DataContext &data_ctx)
MotorLcsIf constructor.
Definition: motorBaseLcsIf.cpp:21
void MoveByName(std::string namedpos)
Executes the MovePos RPC.
Definition: motorBaseLcsIf.cpp:85
std::string m_mot_actual_name
Definition: motorBaseLcsIf.hpp:208
void MoveAbs(double position)
Executes the MoveAbs RPC.
Definition: motorBaseLcsIf.cpp:33
bool m_mot_initialised
Definition: motorBaseLcsIf.hpp:214
double m_mot_actual_vel
Definition: motorBaseLcsIf.hpp:212
bool IsMoving() const
Check if motor is moving.
Definition: motorBaseLcsIf.cpp:183
bool IsStandstill() const
Check if motor is on.
Definition: motorBaseLcsIf.cpp:198
void SetTargetNamedPosition(const std::string named_position)
Definition: motorBaseLcsIf.cpp:237
double m_mot_target_vel
Definition: motorBaseLcsIf.hpp:211
double m_mot_scale
Definition: motorBaseLcsIf.hpp:213
void MoveEncAbs(int encoders)
Executes the MoveAbs RPC.
Definition: motorBaseLcsIf.cpp:59
void MoveVel(double velocity)
Executes the MoveVel RPC.
Definition: motorBaseLcsIf.cpp:148
bool IsMovingInRightDirection() const
Check if motor is moving in the right direction.
Definition: motorBaseLcsIf.cpp:222
const std::string GetTargetNamedPosition()
Definition: motorBaseLcsIf.cpp:244
DataContext class header file.
deviceLcsIf class header file.
MotorConfig class header file.
constexpr auto RPC_MOVE_ABS
Definition: motorBaseConfig.hpp:51
The DeviceControllerData struct.
Definition: deviceLcsIf.hpp:36
The MotorBaseControllerData struct.
Definition: motorBaseLcsIf.hpp:34
double GetActualPos() const
void SetTargetPos(double position)
virtual ~MotorBaseControllerData()
Definition: motorBaseLcsIf.cpp:16
void SetTargetVel(double velocity)
MotorBaseControllerData()
Definition: motorBaseLcsIf.cpp:4
double m_actual_pos
Definition: motorBaseLcsIf.hpp:53
double m_pos_error
Definition: motorBaseLcsIf.hpp:54
double m_scale_factor
Definition: motorBaseLcsIf.hpp:57
void SetPosError(double pos_error)
double m_target_pos
Definition: motorBaseLcsIf.hpp:52
virtual std::string GetSubstateStr() const
void SetActualPos(double position)
double m_target_vel
Definition: motorBaseLcsIf.hpp:56
double GetTargetPos() const
double m_actual_vel
Definition: motorBaseLcsIf.hpp:55
double GetPosError() const
void SetActualVel(double velocity)
double GetTargetVel() const
double GetActualVel() const