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

Stub implementation of IPositionControlRaw interface. More...

#include <yarp/dev/ImplementPositionControl.h>

+ Inheritance diagram for yarp::dev::StubImplPositionControlRaw:

Public Member Functions

virtual ~StubImplPositionControlRaw ()
 
bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool positionMoveRaw (int j, double ref) override
 Set new reference point for a single axis. More...
 
bool positionMoveRaw (const int n_joint, const int *joints, const double *refs) override
 Set new reference point for a subset of joints. More...
 
bool positionMoveRaw (const double *refs) override
 Set new reference point for all axes. More...
 
bool relativeMoveRaw (int j, double delta) override
 Set relative position. More...
 
bool relativeMoveRaw (const int n_joint, const int *joints, const double *refs) override
 Set relative position for a subset of joints. More...
 
bool relativeMoveRaw (const double *deltas) override
 Set relative position, all joints. More...
 
bool checkMotionDoneRaw (int j, bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool checkMotionDoneRaw (const int n_joint, const int *joints, bool *flags) override
 Check if the current trajectory is terminated. More...
 
bool checkMotionDoneRaw (bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool setRefSpeedRaw (int j, double sp) override
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. More...
 
bool setRefSpeedsRaw (const int n_joint, const int *joints, const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefSpeedsRaw (const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefAccelerationRaw (int j, double acc) override
 Set reference acceleration for a joint. More...
 
bool setRefAccelerationsRaw (const int n_joint, const int *joints, const double *accs) override
 Set reference acceleration on all joints. More...
 
bool setRefAccelerationsRaw (const double *accs) override
 Set reference acceleration on all joints. More...
 
bool getRefSpeedRaw (int j, double *ref) override
 Get reference speed for a joint. More...
 
bool getRefSpeedsRaw (const int n_joint, const int *joints, double *spds) override
 Get reference speed of all joints. More...
 
bool getRefSpeedsRaw (double *spds) override
 Get reference speed of all joints. More...
 
bool getRefAccelerationRaw (int j, double *acc) override
 Get reference acceleration for a joint. More...
 
bool getRefAccelerationsRaw (const int n_joint, const int *joints, double *accs) override
 Get reference acceleration for a joint. More...
 
bool getRefAccelerationsRaw (double *accs) override
 Get reference acceleration of all joints. More...
 
bool stopRaw (int j) override
 Stop motion, single joint. More...
 
bool stopRaw (const int n_joint, const int *joints) override
 Stop motion for subset of joints. More...
 
bool stopRaw () override
 Stop motion, multiple joints. More...
 
bool getTargetPositionRaw (const int joint, double *ref) override
 Get the last position reference for the specified axis. More...
 
bool getTargetPositionsRaw (double *refs) override
 Get the last position reference for all axes. More...
 
bool getTargetPositionsRaw (const int n_joint, const int *joints, double *refs) override
 Get the last position reference for the specified group of axes. More...
 
- Public Member Functions inherited from yarp::dev::IPositionControlRaw
virtual ~IPositionControlRaw ()
 Destructor. More...
 

Detailed Description

Stub implementation of IPositionControlRaw 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 128 of file ImplementPositionControl.h.

Constructor & Destructor Documentation

◆ ~StubImplPositionControlRaw()

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

Definition at line 138 of file ImplementPositionControl.h.

Member Function Documentation

◆ checkMotionDoneRaw() [1/3]

bool yarp::dev::StubImplPositionControlRaw::checkMotionDoneRaw ( bool *  flag)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
flagis a pointer to return value ("and" of all joints)
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControlRaw.

Definition at line 167 of file ImplementPositionControl.h.

◆ checkMotionDoneRaw() [2/3]

bool yarp::dev::StubImplPositionControlRaw::checkMotionDoneRaw ( const int  n_joint,
const int *  joints,
bool *  flags 
)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jointspointer to the array of joint numbers
flagtrue if the trajectory is terminated, false otherwise (a single value which is the 'and' of all joints')
Returns
true/false if network communication went well.

Implements yarp::dev::IPositionControlRaw.

Definition at line 164 of file ImplementPositionControl.h.

◆ checkMotionDoneRaw() [3/3]

bool yarp::dev::StubImplPositionControlRaw::checkMotionDoneRaw ( int  j,
bool *  flag 
)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jis the axis number
flagis a pointer to return value
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControlRaw.

Definition at line 161 of file ImplementPositionControl.h.

◆ getAxes()

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

Get the number of controlled axes.

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

Parameters
axstorage to return param
Returns
true/false.

Implements yarp::dev::IPositionControlRaw.

Definition at line 140 of file ImplementPositionControl.h.

◆ getRefAccelerationRaw()

bool yarp::dev::StubImplPositionControlRaw::getRefAccelerationRaw ( int  j,
double *  acc 
)
inlineoverridevirtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jjoint number
accpointer to storage for the return value
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 197 of file ImplementPositionControl.h.

◆ getRefAccelerationsRaw() [1/2]

bool yarp::dev::StubImplPositionControlRaw::getRefAccelerationsRaw ( const int  n_joint,
const int *  joints,
double *  accs 
)
inlineoverridevirtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jointspointer to the array of joint numbers
accspointer to the array that will store the acceleration values
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 200 of file ImplementPositionControl.h.

◆ getRefAccelerationsRaw() [2/2]

bool yarp::dev::StubImplPositionControlRaw::getRefAccelerationsRaw ( double *  accs)
inlineoverridevirtual

Get reference acceleration of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
accspointer to the array that will store the acceleration values.
Returns
true/false on success or failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 203 of file ImplementPositionControl.h.

◆ getRefSpeedRaw()

bool yarp::dev::StubImplPositionControlRaw::getRefSpeedRaw ( int  j,
double *  ref 
)
inlineoverridevirtual

Get reference speed for a joint.

Returns the speed used to generate the trajectory profile.

Parameters
jjoint number
refpointer to storage for the return value
Returns
true/false on success or failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 188 of file ImplementPositionControl.h.

◆ getRefSpeedsRaw() [1/2]

bool yarp::dev::StubImplPositionControlRaw::getRefSpeedsRaw ( const int  n_joint,
const int *  joints,
double *  spds 
)
inlineoverridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array that will store the speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 191 of file ImplementPositionControl.h.

◆ getRefSpeedsRaw() [2/2]

bool yarp::dev::StubImplPositionControlRaw::getRefSpeedsRaw ( double *  spds)
inlineoverridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
spdspointer to the array that will store the speed values.

Implements yarp::dev::IPositionControlRaw.

Definition at line 194 of file ImplementPositionControl.h.

◆ getTargetPositionRaw()

bool yarp::dev::StubImplPositionControlRaw::getTargetPositionRaw ( const int  joint,
double *  ref 
)
inlineoverridevirtual

Get the last position reference for the specified axis.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented from yarp::dev::IPositionControlRaw.

Definition at line 215 of file ImplementPositionControl.h.

◆ getTargetPositionsRaw() [1/2]

bool yarp::dev::StubImplPositionControlRaw::getTargetPositionsRaw ( const int  n_joint,
const int *  joints,
double *  refs 
)
inlineoverridevirtual

Get the last position reference for the specified group of axes.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented from yarp::dev::IPositionControlRaw.

Definition at line 221 of file ImplementPositionControl.h.

◆ getTargetPositionsRaw() [2/2]

bool yarp::dev::StubImplPositionControlRaw::getTargetPositionsRaw ( double *  refs)
inlineoverridevirtual

Get the last position reference for all axes.

This is the dual of PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented from yarp::dev::IPositionControlRaw.

Definition at line 218 of file ImplementPositionControl.h.

◆ positionMoveRaw() [1/3]

bool yarp::dev::StubImplPositionControlRaw::positionMoveRaw ( const double *  refs)
inlineoverridevirtual

Set new reference point for all axes.

Parameters
refsarray, new reference points.
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 149 of file ImplementPositionControl.h.

◆ positionMoveRaw() [2/3]

bool yarp::dev::StubImplPositionControlRaw::positionMoveRaw ( const int  n_joint,
const int *  joints,
const double *  refs 
)
inlineoverridevirtual

Set new reference point for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifies the new reference points
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 146 of file ImplementPositionControl.h.

◆ positionMoveRaw() [3/3]

bool yarp::dev::StubImplPositionControlRaw::positionMoveRaw ( int  j,
double  ref 
)
inlineoverridevirtual

Set new reference point for a single axis.

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

Implements yarp::dev::IPositionControlRaw.

Definition at line 143 of file ImplementPositionControl.h.

◆ relativeMoveRaw() [1/3]

bool yarp::dev::StubImplPositionControlRaw::relativeMoveRaw ( const double *  deltas)
inlineoverridevirtual

Set relative position, all joints.

Parameters
deltaspointer to the relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 158 of file ImplementPositionControl.h.

◆ relativeMoveRaw() [2/3]

bool yarp::dev::StubImplPositionControlRaw::relativeMoveRaw ( const int  n_joint,
const int *  joints,
const double *  deltas 
)
inlineoverridevirtual

Set relative position for a subset of joints.

Parameters
jointspointer to the array of joint numbers
deltaspointer to the array of relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 155 of file ImplementPositionControl.h.

◆ relativeMoveRaw() [3/3]

bool yarp::dev::StubImplPositionControlRaw::relativeMoveRaw ( int  j,
double  delta 
)
inlineoverridevirtual

Set relative position.

The command is relative to the current position of the axis.

Parameters
jjoint axis number
deltarelative command
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 152 of file ImplementPositionControl.h.

◆ setRefAccelerationRaw()

bool yarp::dev::StubImplPositionControlRaw::setRefAccelerationRaw ( int  j,
double  acc 
)
inlineoverridevirtual

Set reference acceleration for a joint.

This value is used during the trajectory generation.

Parameters
jjoint number
accacceleration value
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 179 of file ImplementPositionControl.h.

◆ setRefAccelerationsRaw() [1/2]

bool yarp::dev::StubImplPositionControlRaw::setRefAccelerationsRaw ( const double *  accs)
inlineoverridevirtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
accspointer to the array of acceleration values
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 185 of file ImplementPositionControl.h.

◆ setRefAccelerationsRaw() [2/2]

bool yarp::dev::StubImplPositionControlRaw::setRefAccelerationsRaw ( const int  n_joint,
const int *  joints,
const double *  accs 
)
inlineoverridevirtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
jointspointer to the array of joint numbers
accspointer to the array with acceleration values
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 182 of file ImplementPositionControl.h.

◆ setRefSpeedRaw()

bool yarp::dev::StubImplPositionControlRaw::setRefSpeedRaw ( int  j,
double  sp 
)
inlineoverridevirtual

Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.

Parameters
jjoint number
spspeed value
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 170 of file ImplementPositionControl.h.

◆ setRefSpeedsRaw() [1/2]

bool yarp::dev::StubImplPositionControlRaw::setRefSpeedsRaw ( const double *  spds)
inlineoverridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
spdspointer to the array of speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 176 of file ImplementPositionControl.h.

◆ setRefSpeedsRaw() [2/2]

bool yarp::dev::StubImplPositionControlRaw::setRefSpeedsRaw ( const int  n_joint,
const int *  joints,
const double *  spds 
)
inlineoverridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array with speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 173 of file ImplementPositionControl.h.

◆ stopRaw() [1/3]

bool yarp::dev::StubImplPositionControlRaw::stopRaw ( )
inlineoverridevirtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 212 of file ImplementPositionControl.h.

◆ stopRaw() [2/3]

bool yarp::dev::StubImplPositionControlRaw::stopRaw ( const int  n_joint,
const int *  joints 
)
inlineoverridevirtual

Stop motion for subset of joints.

Parameters
jointspointer to the array of joint numbers
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 209 of file ImplementPositionControl.h.

◆ stopRaw() [3/3]

bool yarp::dev::StubImplPositionControlRaw::stopRaw ( int  j)
inlineoverridevirtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implements yarp::dev::IPositionControlRaw.

Definition at line 206 of file ImplementPositionControl.h.


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