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

#include <controlBoardCouplingHandler/ControlBoardCouplingHandler.h>

+ Inheritance diagram for ControlBoardCouplingHandler:

Public Member Functions

 ControlBoardCouplingHandler ()=default
 
 ControlBoardCouplingHandler (const ControlBoardCouplingHandler &)=delete
 
 ControlBoardCouplingHandler (ControlBoardCouplingHandler &&)=delete
 
ControlBoardCouplingHandleroperator= (const ControlBoardCouplingHandler &)=delete
 
ControlBoardCouplingHandleroperator= (ControlBoardCouplingHandler &&)=delete
 
 ~ControlBoardCouplingHandler () override=default
 
bool verbose () const
 Return the value of the verbose flag.
 
bool close () override
 Close the device driver by deallocating all resources and closing ports.
 
bool open (yarp::os::Searchable &prop) override
 Open the device driver.
 
bool detach () override
 Detach the object (you must have first called attach).
 
bool attach (yarp::dev::PolyDriver *poly) override
 Attach to another object.
 
bool resetEncoder (int j) override
 ControlBoard methods.
 
bool resetEncoders () override
 Reset encoders.
 
bool setEncoder (int j, double val) override
 Set the value of the encoder for a given joint.
 
bool setEncoders (const double *vals) override
 Set the value of all encoders.
 
bool getEncoder (int j, double *v) override
 Read the value of an encoder.
 
bool getEncoders (double *encs) override
 Read the position of all axes.
 
bool getEncodersTimed (double *encs, double *t) override
 Read the instantaneous acceleration of all axes.
 
bool getEncoderTimed (int j, double *v, double *t) override
 Read the instantaneous acceleration of all axes.
 
bool getEncoderSpeed (int j, double *sp) override
 Read the istantaneous speed of an axis.
 
bool getEncoderSpeeds (double *spds) override
 Read the instantaneous speed of all axes.
 
bool getEncoderAcceleration (int j, double *acc) override
 Read the instantaneous acceleration of an axis.
 
bool getEncoderAccelerations (double *accs) override
 Read the instantaneous acceleration of all axes.
 
bool getAxes (int *ax) override
 Get the number of controlled axes.
 
bool getAxisName (int j, std::string &name) override
 
bool getJointType (int j, yarp::dev::JointTypeEnum &type) override
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (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 DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IEncodersTimed
virtual ~IEncodersTimed ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IEncoders
virtual ~IEncoders ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::WrapperSingle
 ~WrapperSingle () override
 Destructor.
 
bool attachAll (const yarp::dev::PolyDriverList &drivers) final
 Attach to a list of objects.
 
bool detachAll () final
 Detach the object (you must have first called attach).
 
- Public Member Functions inherited from yarp::dev::IWrapper
virtual ~IWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IAxisInfo
virtual ~IAxisInfo ()
 Destructor.
 
- Public Member Functions inherited from ControlBoardCouplingHandler_ParamsParser
 ControlBoardCouplingHandler_ParamsParser ()
 
 ~ControlBoardCouplingHandler_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.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Additional Inherited Members

- Public Attributes inherited from ControlBoardCouplingHandler_ParamsParser
const std::string m_device_classname = {"ControlBoardCouplingHandler"}
 
const std::string m_device_name = {"controlBoardCouplingHandler"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_coupling_device_defaultValue = {""}
 
std::string m_coupling_device = {}
 

Detailed Description

Definition at line 27 of file ControlBoardCouplingHandler.h.

Constructor & Destructor Documentation

◆ ControlBoardCouplingHandler() [1/3]

ControlBoardCouplingHandler::ControlBoardCouplingHandler ( )
default

◆ ControlBoardCouplingHandler() [2/3]

ControlBoardCouplingHandler::ControlBoardCouplingHandler ( const ControlBoardCouplingHandler )
delete

◆ ControlBoardCouplingHandler() [3/3]

ControlBoardCouplingHandler::ControlBoardCouplingHandler ( ControlBoardCouplingHandler &&  )
delete

◆ ~ControlBoardCouplingHandler()

ControlBoardCouplingHandler::~ControlBoardCouplingHandler ( )
overridedefault

Member Function Documentation

◆ attach()

bool ControlBoardCouplingHandler::attach ( yarp::dev::PolyDriver driver)
overridevirtual

Attach to another object.

Parameters
driverthe polydriver that you want to attach to.
Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 55 of file ControlBoardCouplingHandler.cpp.

◆ close()

bool ControlBoardCouplingHandler::close ( )
overridevirtual

Close the device driver by deallocating all resources and closing ports.

Returns
true if successful or false otherwise.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 22 of file ControlBoardCouplingHandler.cpp.

◆ detach()

bool ControlBoardCouplingHandler::detach ( )
overridevirtual

Detach the object (you must have first called attach).

Returns
true/false on success failure.

Implements yarp::dev::IWrapper.

Definition at line 103 of file ControlBoardCouplingHandler.cpp.

◆ getAxes()

bool ControlBoardCouplingHandler::getAxes ( int ax)
overridevirtual

Get the number of controlled axes.

This command asks the number of controlled axes for the current physical interface.

Returns
the number of controlled axes.

Implements yarp::dev::IEncoders.

Definition at line 267 of file ControlBoardCouplingHandler.cpp.

◆ getAxisName()

bool ControlBoardCouplingHandler::getAxisName ( int  j,
std::string &  name 
)
overridevirtual

Implements yarp::dev::IAxisInfo.

Definition at line 281 of file ControlBoardCouplingHandler.cpp.

◆ getEncoder()

bool ControlBoardCouplingHandler::getEncoder ( int  j,
double v 
)
overridevirtual

Read the value of an encoder.

Parameters
jencoder number
vpointer to storage for the return value
Returns
true/false, upon success/failure (you knew it, uh?)

Implements yarp::dev::IEncoders.

Definition at line 139 of file ControlBoardCouplingHandler.cpp.

◆ getEncoderAcceleration()

bool ControlBoardCouplingHandler::getEncoderAcceleration ( int  j,
double spds 
)
overridevirtual

Read the instantaneous acceleration of an axis.

Parameters
jaxis number
spdspointer to the array that will contain the output

Implements yarp::dev::IEncoders.

Definition at line 233 of file ControlBoardCouplingHandler.cpp.

◆ getEncoderAccelerations()

bool ControlBoardCouplingHandler::getEncoderAccelerations ( double accs)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
accspointer to the array that will contain the output
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncoders.

Definition at line 249 of file ControlBoardCouplingHandler.cpp.

◆ getEncoders()

bool ControlBoardCouplingHandler::getEncoders ( double encs)
overridevirtual

Read the position of all axes.

Parameters
encspointer to the array that will contain the output
Returns
true/false on success/failure

Implements yarp::dev::IEncoders.

Definition at line 153 of file ControlBoardCouplingHandler.cpp.

◆ getEncoderSpeed()

bool ControlBoardCouplingHandler::getEncoderSpeed ( int  j,
double sp 
)
overridevirtual

Read the istantaneous speed of an axis.

Parameters
jaxis number
sppointer to storage for the output
Returns
true if successful, false ... otherwise.

Implements yarp::dev::IEncoders.

Definition at line 203 of file ControlBoardCouplingHandler.cpp.

◆ getEncoderSpeeds()

bool ControlBoardCouplingHandler::getEncoderSpeeds ( double spds)
overridevirtual

Read the instantaneous speed of all axes.

Parameters
spdspointer to storage for the output values
Returns
guess what? (true/false on success or failure).

Implements yarp::dev::IEncoders.

Definition at line 218 of file ControlBoardCouplingHandler.cpp.

◆ getEncodersTimed()

bool ControlBoardCouplingHandler::getEncodersTimed ( double encs,
double time 
)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
encspointer to the array that will contain the output
timepointer to the array that will contain individual timestamps
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 167 of file ControlBoardCouplingHandler.cpp.

◆ getEncoderTimed()

bool ControlBoardCouplingHandler::getEncoderTimed ( int  j,
double encs,
double time 
)
overridevirtual

Read the instantaneous acceleration of all axes.

Parameters
jaxis index
encsencoder value (pointer to)
timecorresponding timestamp (pointer to)
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 187 of file ControlBoardCouplingHandler.cpp.

◆ getJointType()

bool ControlBoardCouplingHandler::getJointType ( int  j,
yarp::dev::JointTypeEnum type 
)
overridevirtual

Reimplemented from yarp::dev::IAxisInfo.

Definition at line 291 of file ControlBoardCouplingHandler.cpp.

◆ open()

bool ControlBoardCouplingHandler::open ( yarp::os::Searchable prop)
overridevirtual

Open the device driver.

Parameters
propis a Searchable object which contains the parameters. Allowed parameters are described in the class documentation.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 27 of file ControlBoardCouplingHandler.cpp.

◆ operator=() [1/2]

ControlBoardCouplingHandler & ControlBoardCouplingHandler::operator= ( const ControlBoardCouplingHandler )
delete

◆ operator=() [2/2]

ControlBoardCouplingHandler & ControlBoardCouplingHandler::operator= ( ControlBoardCouplingHandler &&  )
delete

◆ resetEncoder()

bool ControlBoardCouplingHandler::resetEncoder ( int  j)
overridevirtual

ControlBoard methods.

Implements yarp::dev::IEncoders.

Definition at line 119 of file ControlBoardCouplingHandler.cpp.

◆ resetEncoders()

bool ControlBoardCouplingHandler::resetEncoders ( )
overridevirtual

Reset encoders.

Set the encoders value to zero

Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 124 of file ControlBoardCouplingHandler.cpp.

◆ setEncoder()

bool ControlBoardCouplingHandler::setEncoder ( int  j,
double  val 
)
overridevirtual

Set the value of the encoder for a given joint.

Parameters
jencoder number
valnew value
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 129 of file ControlBoardCouplingHandler.cpp.

◆ setEncoders()

bool ControlBoardCouplingHandler::setEncoders ( const double vals)
overridevirtual

Set the value of all encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 134 of file ControlBoardCouplingHandler.cpp.

◆ verbose()

bool ControlBoardCouplingHandler::verbose ( ) const
inline

Return the value of the verbose flag.

Returns
the verbose flag.

Definition at line 73 of file ControlBoardCouplingHandler.h.


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