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 ()
 

Detailed Description

Definition at line 32 of file ImplementControlMode.h.

Constructor & Destructor Documentation

◆ ImplementControlMode()

ImplementControlMode::ImplementControlMode ( IControlModeRaw v)

Definition at line 19 of file ImplementControlMode.cpp.

◆ ~ImplementControlMode()

ImplementControlMode::~ImplementControlMode ( )

Definition at line 38 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 59 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 77 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 66 of file ImplementControlMode.cpp.

◆ initialize()

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

Definition at line 25 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 94 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 101 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 43 of file ImplementControlMode.cpp.


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