iCub-main
Static Public Member Functions | List of all members
iCub::ctrl::helperPID Class Reference

Helper class providing useful methods to deal with pid options. More...

#include <pids.h>

+ Inheritance diagram for iCub::ctrl::helperPID:

Static Public Member Functions

static void addVectorToOption (yarp::os::Bottle &option, const char *key, const yarp::sig::Vector &val)
 Add the data contained in the specified vector to the specified bottle, using property-like form (i.e. More...
 
static bool getVectorFromOption (const yarp::os::Bottle &options, const char *key, yarp::sig::Vector &val, int &size)
 Fill the specified vector with the data associated with the specified key in the specified property-like bottle. More...
 

Detailed Description

Helper class providing useful methods to deal with pid options.

Definition at line 164 of file pids.h.

Member Function Documentation

◆ addVectorToOption()

void helperPID::addVectorToOption ( yarp::os::Bottle &  option,
const char *  key,
const yarp::sig::Vector &  val 
)
static

Add the data contained in the specified vector to the specified bottle, using property-like form (i.e.

"key-value" pairs).

Parameters
optionis the bottle to which add the data
keyis the string representing the key of the vector
valis the vector containing the data to add
Note
The resulting bottle will look like this: ... (key (value1 value2 ...))

Definition at line 137 of file pids.cpp.

◆ getVectorFromOption()

bool helperPID::getVectorFromOption ( const yarp::os::Bottle &  options,
const char *  key,
yarp::sig::Vector &  val,
int &  size 
)
static

Fill the specified vector with the data associated with the specified key in the specified property-like bottle.

If the vector size is less than the size of the data found in the bottle, the exceeding data will be discarded.

Parameters
optionsis the property-like bottle containing the data
keyis the string representing the key to look for
valis the vector to fill with the retrieved data
sizeis the number of values written in val
Note
The input bottle should look like this: ((key1 (value11 value12 ...) (key2 (value21 value22 ...) (key3 (value31 value32 ...))

Definition at line 148 of file pids.cpp.


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