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

Public Types

typedef std::shared_ptr< MFEPositionSensorShared
 
- Public Types inherited from smc::PositionSensor
typedef std::shared_ptr< PositionSensorShared
 
- Public Types inherited from smc::DeviceBase
typedef smc::DeviceType DeviceType
 
typedef std::shared_ptr< DeviceBaseShared
 

Public Member Functions

 MFEPositionSensor (const std::string &uid, const std::shared_ptr< MFEPlatform > &mfe)
 
std::future< units::value_tgetPosition (units::unit_t unit) const override
 Get current position value. More...
 
std::future< void > setActualPosition (const units::value_t &value) const override
 Set the current position value. More...
 
units::value_t lastPosition (units::unit_t unit) const override
 Get last known position. 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...
 
bool canConvert (const units::Value &value, units::unit_t unit) const override
 Check if unit conversion is possible in a manner specific to this device. More...
 
bool convert (units::Value &value, units::unit_t unit) const override
 Convert value in a manner specific to this device. More...
 
- Public Member Functions inherited from smc::PositionSensor
 PositionSensor (const std::string &address)
 Construct a new POSITION Device at given location on given platform. More...
 
DeviceType type () const override
 Get device type. More...
 
- Public Member Functions inherited from smc::DeviceBase
DeviceId uid () const
 Get the address of device. More...
 
std::string toString () const
 debug and logging operation
 

Protected Attributes

std::weak_ptr< MFEPlatformm_mfe
 
- 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 37 of file MFEPositionSensor.hpp.

Member Function Documentation

◆ canConvert()

bool MFEPositionSensor::canConvert ( const units::Value value,
units::unit_t  unit 
) const
overridevirtual

Check if unit conversion is possible in a manner specific to this device.

Parameters
valueValue to check
unitUnit to check
Returns
true If conversion is possible
false If conversion is not possible

Reimplemented from smc::DeviceBase.

Definition at line 253 of file MFEPositionSensor.cpp.

Here is the call graph for this function:

◆ convert()

bool MFEPositionSensor::convert ( units::Value value,
units::unit_t  unit 
) const
overridevirtual

Convert value in a manner specific to this device.

Parameters
valueValue to convert
unitUnit to convert to
Returns
true If conversion was successful
false If conversion is not possible

Reimplemented from smc::DeviceBase.

Definition at line 263 of file MFEPositionSensor.cpp.

Here is the caller graph for this function:

◆ getConfig()

std::future< std::string > MFEPositionSensor::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 174 of file MFEPositionSensor.cpp.

◆ getPosition()

std::future< units::value_t > MFEPositionSensor::getPosition ( units::unit_t  unit) const
overridevirtual

Get current position value.

Parameters
unitunit to get position in
Returns
future<mm> Future completed with value when command executed.

Implements smc::PositionSensor.

Definition at line 45 of file MFEPositionSensor.cpp.

◆ lastPosition()

units::value_t MFEPositionSensor::lastPosition ( units::unit_t  unit) const
overridevirtual

Get last known position.

Parameters
unitunit to get position in
Returns
units::value_t

Implements smc::PositionSensor.

Definition at line 124 of file MFEPositionSensor.cpp.

◆ setActualPosition()

std::future< void > MFEPositionSensor::setActualPosition ( const units::value_t value) const
overridevirtual

Set the current position value.

Parameters
valuevalue to set

Reimplemented from smc::PositionSensor.

Definition at line 101 of file MFEPositionSensor.cpp.

◆ setConfig()

std::future< void > MFEPositionSensor::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 214 of file MFEPositionSensor.cpp.


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