iCub-main
iCub::ctrl::helperPID Class Reference

#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

 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
 option is the bottle to which add the data key is the string representing the key of the vector val is 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
 options is the property-like bottle containing the data key is the string representing the key to look for val is the vector to fill with the retrieved data size is 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:
• icub-main/src/libraries/ctrlLib/include/iCub/ctrl/pids.h
• icub-main/src/libraries/ctrlLib/src/pids.cpp