YARP
Yet Another Robot Platform
yarp::dev::StubImplPositionDirectRaw Class Reference

Stub implementation of IPositionControl2Raw interface. More...

#include <yarp/dev/ImplementPositionDirect.h>

+ Inheritance diagram for yarp::dev::StubImplPositionDirectRaw:

Public Member Functions

virtual ~StubImplPositionDirectRaw ()
 
bool getAxes (int *axis) override
 Get the number of controlled axes. More...
 
bool setPosition (int j, double ref) override
 Set new position for a single axis. More...
 
bool setPositions (const int n_joint, const int *joints, const double *refs) override
 Set new reference point for all axes. More...
 
bool setPositions (const double *refs) override
 Set new position for a set of axis. More...
 
- Public Member Functions inherited from yarp::dev::IPositionDirect
virtual ~IPositionDirect ()
 Destructor. More...
 
virtual bool getRefPosition (const int joint, double *ref)
 Get the last position reference for the specified axis. More...
 
virtual bool getRefPositions (double *refs)
 Get the last position reference for all axes. More...
 
virtual bool getRefPositions (const int n_joint, const int *joints, double *refs)
 Get the last position reference for the specified group of axes. More...
 

Detailed Description

Stub implementation of IPositionControl2Raw interface.

Inherit from this class if you want a stub implementation of methods in IPositionControlRaw. This class allows to gradually implement an interface; you just have to implement functions that are useful for the underlying device. Another way to see this class is as a means to convert compile time errors in runtime errors.

If you use this class please be aware that the device you are wrapping might not function properly because you missed to implement useful functionalities.

Definition at line 100 of file ImplementPositionDirect.h.

Constructor & Destructor Documentation

◆ ~StubImplPositionDirectRaw()

virtual yarp::dev::StubImplPositionDirectRaw::~StubImplPositionDirectRaw ( )
inlinevirtual

Definition at line 110 of file ImplementPositionDirect.h.

Member Function Documentation

◆ getAxes()

bool yarp::dev::StubImplPositionDirectRaw::getAxes ( int *  ax)
inlineoverridevirtual

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::IPositionDirect.

Definition at line 112 of file ImplementPositionDirect.h.

◆ setPosition()

bool yarp::dev::StubImplPositionDirectRaw::setPosition ( int  j,
double  ref 
)
inlineoverridevirtual

Set new position for a single axis.

Parameters
jjoint number
refspecifies the new ref point
Returns
true/false on success/failure

Implements yarp::dev::IPositionDirect.

Definition at line 115 of file ImplementPositionDirect.h.

◆ setPositions() [1/2]

bool yarp::dev::StubImplPositionDirectRaw::setPositions ( const double *  refs)
inlineoverridevirtual

Set new position for a set of axis.

Parameters
refsspecifies the new reference points
Returns
true/false on success/failure

Implements yarp::dev::IPositionDirect.

Definition at line 121 of file ImplementPositionDirect.h.

◆ setPositions() [2/2]

bool yarp::dev::StubImplPositionDirectRaw::setPositions ( const int  n_joint,
const int *  joints,
const double *  refs 
)
inlineoverridevirtual

Set new reference point for all axes.

Parameters
n_jointhow many joints this command is referring to
jointslist of joints controlled. The size of this array is n_joints
refsarray, new reference points, one value for each joint, the size is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 refs 10 30 40
Returns
true/false on success/failure

Implements yarp::dev::IPositionDirect.

Definition at line 118 of file ImplementPositionDirect.h.


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