MotionLib  1.0.0
SamBuCa motion library
Public Types | Public Member Functions | Protected Attributes | List of all members
smc::internal::MFEAxisPositionMonitor Class Reference
Inheritance diagram for smc::internal::MFEAxisPositionMonitor:
Inheritance graph
[legend]
Collaboration diagram for smc::internal::MFEAxisPositionMonitor:
Collaboration graph
[legend]

Public Types

typedef std::shared_ptr< MFEAxisPositionMonitorShared
 
- Public Types inherited from smc::AxisPositionMonitor
enum  State { UNKNOWN , ENABLED , DISABLED , TRIGGERED }
 
typedef std::shared_ptr< AxisPositionMonitorShared
 
- Public Types inherited from smc::DeviceBase
typedef smc::DeviceType DeviceType
 
typedef std::shared_ptr< DeviceBaseShared
 

Public Member Functions

 MFEAxisPositionMonitor (const std::string &uid, const std::shared_ptr< Axis > &axis, const std::shared_ptr< PositionSensor > &position, const std::shared_ptr< MFEPlatform > &mfe)
 
std::future< units::value_tgetDifference (units::unit_t unit) const override
 Get current position difference between axis and positionSensor.
 
std::future< units::value_tgetMaxDifference (units::unit_t unit) const override
 Get max difference since monitor was enabled.
 
std::future< State > getState () const override
 Get the current device state.
 
std::future< void > setEnabled (bool enabled) override
 Enable/disable the monitor. More...
 
units::value_t lastDifference (units::unit_t unit) const override
 Get last known difference. More...
 
State lastState () const override
 Get last known state. More...
 
std::future< std::set< std::string > > listConfig () const override
 list device configuration options
 
std::future< std::string > getConfig (const std::string &name) const override
 get device configuration value More...
 
std::future< void > setConfig (const std::string &name, const std::string &value) const override
 set device configuration value More...
 
- Public Member Functions inherited from smc::AxisPositionMonitor
 AxisPositionMonitor (const std::string &address, const std::shared_ptr< Axis > &axis, const std::shared_ptr< PositionSensor > &position)
 Construct a new AxisPositionMonitor Device. More...
 
DeviceType type () const override
 Get device type. More...
 
std::shared_ptr< AxisaxisDevice () const
 
std::shared_ptr< PositionSensorpositionSensorDevice () const
 
- Public Member Functions inherited from smc::DeviceBase
DeviceId uid () const
 Get the address of device. More...
 
virtual bool canConvert (const units::Value &value, units::unit_t unit) const
 Check if unit conversion is possible in a manner specific to this device. More...
 
virtual bool convert (units::Value &value, units::unit_t unit) const
 Convert value in a manner specific to this device. More...
 
std::string toString () const
 debug and logging operation
 

Protected Attributes

std::weak_ptr< MFEPlatformm_mfe
 
- Protected Attributes inherited from smc::AxisPositionMonitor
std::weak_ptr< Axism_axis
 
std::weak_ptr< PositionSensorm_position
 
- Protected Attributes inherited from smc::DeviceBase
const std::string m_uid
 

Additional Inherited Members

- Public Attributes inherited from smc::DeviceBase
ccut::Signal< const DeviceBase::Shared & > updateSignal
 device update signal More...
 
- Protected Member Functions inherited from smc::DeviceBase
 DeviceBase (const std::string &uid)
 Construct a new ABaseDevice, linking pointer to platform object. More...
 

Detailed Description

Definition at line 33 of file MFEAxisPositionMonitor.hpp.

Member Function Documentation

◆ getConfig()

std::future< std::string > MFEAxisPositionMonitor::getConfig ( const std::string &  name) const
overridevirtual

get device configuration value

Parameters
namevalue to retrieve
Returns
the current value (yml encoded)

Reimplemented from smc::DeviceBase.

Definition at line 258 of file MFEAxisPositionMonitor.cpp.

◆ lastDifference()

units::value_t MFEAxisPositionMonitor::lastDifference ( units::unit_t  unit) const
overridevirtual

Get last known difference.

Returns
units::value_t

updateSignal is emitted whenever this value updated

Implements smc::AxisPositionMonitor.

Definition at line 185 of file MFEAxisPositionMonitor.cpp.

◆ lastState()

AxisPositionMonitor::State MFEAxisPositionMonitor::lastState ( ) const
overridevirtual

Get last known state.

Returns
State

Implements smc::AxisPositionMonitor.

Definition at line 204 of file MFEAxisPositionMonitor.cpp.

◆ setConfig()

std::future< void > MFEAxisPositionMonitor::setConfig ( const std::string &  name,
const std::string &  value 
) const
overridevirtual

set device configuration value

Parameters
namename of the configuration value to set
valuevalue to set

Reimplemented from smc::DeviceBase.

Definition at line 278 of file MFEAxisPositionMonitor.cpp.

◆ setEnabled()

std::future< void > MFEAxisPositionMonitor::setEnabled ( bool  enabled)
overridevirtual

Enable/disable the monitor.

the difference may still be monitored even if disabled

enabling a TRIGGERED monitor will re-arm it and reset its max-difference counter

Implements smc::AxisPositionMonitor.

Definition at line 141 of file MFEAxisPositionMonitor.cpp.


The documentation for this class was generated from the following files: