YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeCalibrator Class Reference

fakeCalibrator: A fake calibrator implementation for testing purposes. More...

#include <fake/fakeCalibrator/FakeCalibrator.h>

+ Inheritance diagram for FakeCalibrator:

Public Member Functions

 FakeCalibrator ()
 Default constructor.
 
 ~FakeCalibrator ()
 Destructor.
 
virtual bool open (yarp::os::Searchable &config) override
 Open the device driver.
 
virtual bool close () override
 Close the device driver.
 
yarp::dev::ReturnValue calibrate (DeviceDriver *device) override
 Calibrate method.
 
yarp::dev::ReturnValue park (DeviceDriver *dd, bool wait=true) override
 
yarp::dev::ReturnValue quitPark () override
 
yarp::dev::ReturnValue quitCalibrate () override
 
yarp::dev::IRemoteCalibrator * getCalibratorDevice () override
 getCalibratorDevice: return the pointer stored with the setCalibratorDevice
 
yarp::dev::ReturnValue calibrateSingleJoint (int j) override
 calibrateSingleJoint: call the calibration procedure for the single joint
 
yarp::dev::ReturnValue calibrateWholePart () override
 calibrateWholePart: call the procedure for calibrating the whole device
 
yarp::dev::ReturnValue homingSingleJoint (int j) override
 homingSingleJoint: call the homing procedure for a single joint
 
yarp::dev::ReturnValue homingWholePart () override
 homingWholePart: call the homing procedure for a the whole part/device
 
yarp::dev::ReturnValue parkSingleJoint (int j, bool _wait=true) override
 parkSingleJoint(): start the parking procedure for the single joint
 
yarp::dev::ReturnValue parkWholePart () override
 parkWholePart: start the parking procedure for the whole part
 
- Public Member Functions inherited from yarp::dev::ICalibrator
virtual ~ICalibrator ()=default
 
virtual yarp::dev::ReturnValue calibrate (DeviceDriver *dd)=0
 
virtual yarp::dev::ReturnValue park (DeviceDriver *dd, bool wait=true)=0
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriver & operator= (const DeviceDriver &other)=delete
 
DeviceDriver & operator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDriver * getImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IRemoteCalibrator
 IRemoteCalibrator ()
 This interface is meant to remotize the access of the calibration device in order to allow users to remotely call the calibration procedure for a single joint or the whole device and let the calibrator do the job.
 
virtual ~IRemoteCalibrator ()=default
 
virtual yarp::dev::ReturnValue setCalibratorDevice (yarp::dev::IRemoteCalibrator *dev)
 setCalibratorDevice: store the pointer to the calibrator device.
 
virtual yarp::dev::ReturnValue isCalibratorDevicePresent (bool *isCalib)
 isCalibratorDevicePresent: check if a calibrator device has been set
 
virtual yarp::dev::ReturnValue releaseCalibratorDevice ()
 releaseCalibratorDevice: reset the internal pointer to NULL when stop using the calibrator
 
- Public Member Functions inherited from FakeCalibrator_ParamsParser
 FakeCalibrator_ParamsParser ()
 
 ~FakeCalibrator_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 Return the value (represented as a string) of the requested parameter.
 
std::string getConfiguration () const override
 Return the configuration of the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Additional Inherited Members

- Public Attributes inherited from FakeCalibrator_ParamsParser
const std::string m_device_classname = {"FakeCalibrator"}
 
const std::string m_device_name = {"fakeCalibrator"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_param1_defaultValue = {"0.0"}
 
double m_param1 = {0.0}
 

Detailed Description

fakeCalibrator: A fake calibrator implementation for testing purposes.

Parameters required by this device are shown in class: FakeCalibrator_ParamsParser

Definition at line 22 of file FakeCalibrator.h.

Constructor & Destructor Documentation

◆ FakeCalibrator()

FakeCalibrator::FakeCalibrator ( )

Default constructor.

Definition at line 20 of file FakeCalibrator.cpp.

◆ ~FakeCalibrator()

FakeCalibrator::~FakeCalibrator ( )

Destructor.

Definition at line 24 of file FakeCalibrator.cpp.

Member Function Documentation

◆ calibrate()

ReturnValue FakeCalibrator::calibrate ( DeviceDriver *  device)
override

Calibrate method.

Call this to calibrate the complete device.

Parameters
ddis a pointer to the DeviceDriver to calibrate which must implement the position control interfaces of the standard control board devices.
Returns
true if calibration was successful, false otherwise.

Definition at line 41 of file FakeCalibrator.cpp.

◆ calibrateSingleJoint()

ReturnValue FakeCalibrator::calibrateSingleJoint ( int  j)
overridevirtual

calibrateSingleJoint: call the calibration procedure for the single joint

Parameters
jjoint to be calibrated
Returns
true if calibration was successful

Implements yarp::dev::IRemoteCalibrator.

Definition at line 100 of file FakeCalibrator.cpp.

◆ calibrateWholePart()

ReturnValue FakeCalibrator::calibrateWholePart ( )
overridevirtual

calibrateWholePart: call the procedure for calibrating the whole device

Returns
true if calibration was successful

Implements yarp::dev::IRemoteCalibrator.

Definition at line 112 of file FakeCalibrator.cpp.

◆ close()

bool FakeCalibrator::close ( )
overridevirtual

Close the device driver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 35 of file FakeCalibrator.cpp.

◆ getCalibratorDevice()

yarp::dev::IRemoteCalibrator * FakeCalibrator::getCalibratorDevice ( )
overridevirtual

getCalibratorDevice: return the pointer stored with the setCalibratorDevice

Returns
yarp::dev::IRemotizableCalibrator pointer or NULL if not valid.

Reimplemented from yarp::dev::IRemoteCalibrator.

Definition at line 95 of file FakeCalibrator.cpp.

◆ homingSingleJoint()

ReturnValue FakeCalibrator::homingSingleJoint ( int  j)
overridevirtual

homingSingleJoint: call the homing procedure for a single joint

Parameters
jjoint to be calibrated
Returns
true if homing was successful, false otherwise

Implements yarp::dev::IRemoteCalibrator.

Definition at line 118 of file FakeCalibrator.cpp.

◆ homingWholePart()

ReturnValue FakeCalibrator::homingWholePart ( )
overridevirtual

homingWholePart: call the homing procedure for a the whole part/device

Returns
true if homing was successful, false otherwise

Implements yarp::dev::IRemoteCalibrator.

Definition at line 124 of file FakeCalibrator.cpp.

◆ open()

bool FakeCalibrator::open ( yarp::os::Searchable &  config)
overridevirtual

Open the device driver.

Parameters
configis a reference to a Searchable object which contains the initialization parameters.
Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 30 of file FakeCalibrator.cpp.

◆ park()

ReturnValue FakeCalibrator::park ( DeviceDriver *  dd,
bool  wait = true 
)
override

Definition at line 74 of file FakeCalibrator.cpp.

◆ parkSingleJoint()

ReturnValue FakeCalibrator::parkSingleJoint ( int  j,
bool  _wait = true 
)
overridevirtual

parkSingleJoint(): start the parking procedure for the single joint

Returns
true if successful

Implements yarp::dev::IRemoteCalibrator.

Definition at line 130 of file FakeCalibrator.cpp.

◆ parkWholePart()

ReturnValue FakeCalibrator::parkWholePart ( )
overridevirtual

parkWholePart: start the parking procedure for the whole part

Returns
true if successful

Implements yarp::dev::IRemoteCalibrator.

Definition at line 137 of file FakeCalibrator.cpp.

◆ quitCalibrate()

ReturnValue FakeCalibrator::quitCalibrate ( )
overridevirtual

Implements yarp::dev::ICalibrator.

Definition at line 85 of file FakeCalibrator.cpp.

◆ quitPark()

ReturnValue FakeCalibrator::quitPark ( )
overridevirtual

Implements yarp::dev::ICalibrator.

Definition at line 90 of file FakeCalibrator.cpp.


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