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

#include <yarp/dev/ImplementControlMode.h>

+ Inheritance diagram for yarp::dev::ImplementControlMode:

Public Member Functions

bool initialize (int k, const int *amap)
 
bool uninitialize ()
 
 ImplementControlMode (IControlModeRaw *v)
 
 ~ImplementControlMode ()
 
bool getControlMode (int j, int *f) override
 Get the current control mode. More...
 
bool getControlModes (int *modes) override
 Get the current control mode (multiple joints). More...
 
bool getControlModes (const int n_joint, const int *joints, int *modes) override
 Get the current control mode for a subset of axes. More...
 
bool setControlMode (const int j, const int mode) override
 Set the current control mode. More...
 
bool setControlModes (const int n_joint, const int *joints, int *modes) override
 Set the current control mode for a subset of axes. More...
 
bool setControlModes (int *modes) override
 Set the current control mode (multiple joints). More...
 
- Public Member Functions inherited from yarp::dev::IControlMode
virtual ~IControlMode ()
 
virtual bool getControlMode (int j, int *mode)=0
 Get the current control mode. More...
 
virtual bool getControlModes (int *modes)=0
 Get the current control mode (multiple joints). More...
 
virtual bool getControlModes (const int n_joint, const int *joints, int *modes)=0
 Get the current control mode for a subset of axes. More...
 
virtual bool setControlMode (const int j, const int mode)=0
 Set the current control mode. More...
 
virtual bool setControlModes (const int n_joint, const int *joints, int *modes)=0
 Set the current control mode for a subset of axes. More...
 
virtual bool setControlModes (int *modes)=0
 Set the current control mode (multiple joints). More...
 

Detailed Description

Definition at line 23 of file ImplementControlMode.h.

Constructor & Destructor Documentation

◆ ImplementControlMode()

ImplementControlMode::ImplementControlMode ( IControlModeRaw v)

Definition at line 16 of file ImplementControlMode.cpp.

◆ ~ImplementControlMode()

ImplementControlMode::~ImplementControlMode ( )

Definition at line 36 of file ImplementControlMode.cpp.

Member Function Documentation

◆ getControlMode()

bool ImplementControlMode::getControlMode ( int  j,
int *  mode 
)
overridevirtual

Get the current control mode.

Parameters
jjoint number
modea vocab of the current control mode for joint j.
Returns
: true/false success failure.

Implements yarp::dev::IControlMode.

Definition at line 57 of file ImplementControlMode.cpp.

◆ getControlModes() [1/2]

bool ImplementControlMode::getControlModes ( const int  n_joint,
const int *  joints,
int *  modes 
)
overridevirtual

Get the current control mode for a subset of axes.

Parameters
n_jointshow many joints this command is referring to
jointslist of joint numbers, the size of this array is n_joints
modesarray containing the new controlmodes, 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 modes VOCAB_CM_POSITION VOCAB_CM_VELOCITY VOCAB_CM_POSITION
Returns
true/false success failure.

Implements yarp::dev::IControlMode.

Definition at line 75 of file ImplementControlMode.cpp.

◆ getControlModes() [2/2]

bool ImplementControlMode::getControlModes ( int *  modes)
overridevirtual

Get the current control mode (multiple joints).

Parameters
modesa vector containing vocabs for the current control modes of the joints.
Returns
: true/false success failure.

Implements yarp::dev::IControlMode.

Definition at line 64 of file ImplementControlMode.cpp.

◆ initialize()

bool ImplementControlMode::initialize ( int  k,
const int *  amap 
)

Definition at line 22 of file ImplementControlMode.cpp.

◆ setControlMode()

bool ImplementControlMode::setControlMode ( const int  j,
const int  mode 
)
overridevirtual

Set the current control mode.

Parameters
jjoint number
modea vocab of the desired control mode for joint j.
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implements yarp::dev::IControlMode.

Definition at line 93 of file ImplementControlMode.cpp.

◆ setControlModes() [1/2]

bool ImplementControlMode::setControlModes ( const int  n_joint,
const int *  joints,
int *  modes 
)
overridevirtual

Set the current control mode for a subset of axes.

Parameters
n_jointshow many joints this command is referring to
jointslist of joint numbers, the size of this array is n_joints
modesarray containing the new controlmodes, 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 modes VOCAB_CM_POSITION VOCAB_CM_VELOCITY VOCAB_CM_POSITION
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implements yarp::dev::IControlMode.

Definition at line 100 of file ImplementControlMode.cpp.

◆ setControlModes() [2/2]

bool ImplementControlMode::setControlModes ( int *  modes)
overridevirtual

Set the current control mode (multiple joints).

Parameters
modesa vector containing vocabs for the desired control modes of the joints.
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implements yarp::dev::IControlMode.

Definition at line 118 of file ImplementControlMode.cpp.

◆ uninitialize()

bool ImplementControlMode::uninitialize ( )

Definition at line 41 of file ImplementControlMode.cpp.


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