7#ifndef YARP_DEV_CONTROLBOARDHELPERS_H
8#define YARP_DEV_CONTROLBOARDHELPERS_H
15#ifndef DOXYGEN_SHOULD_SKIP_THIS
32#define POINTERCHECK(comp,vec) if (vec==nullptr) { yCError(comp,"vec is nullptr"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
33#define JOINTIDCHECK(comp,j) if (!castToMapper(m_helper)->checkAxisId(j)) { yCError(comp,"joint id out of bound"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
34#define JOINTSIDCHECK(comp,n_joints, joints) if (!castToMapper(m_helper)->checkAxesIds(n_joints, joints)) { yCError(comp,"joint id out of bound"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
36#define JOINTSIDVECCHECK(comp,joints) if (!castToMapper(m_helper)->checkAxesIds(joints)) { yCError(comp,"joint id out of bound"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
37#define VECCHECK_SET_ALL(comp,vec) if (vec.size() != castToMapper(m_helper)->axes()) { yCError(comp,"vector size does not match number of joints"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
38#define VECCHECK_GET_ALL(comp,vec) if (vec.size() != castToMapper(m_helper)->axes()) { vec.resize(castToMapper(m_helper)->axes());}
39#define VECCHECK_SET_SOME(comp,jointsvec,datavec) JOINTSIDVECCHECK(comp,jointsvec) if (datavec.size() != jointsvec.size()) { yCError(comp,"vector size does not match number of joints"); return yarp::dev::ReturnValue::return_code::return_value_error_input_out_of_bounds;}
40#define VECCHECK_GET_SOME(comp,jointsvec,datavec) JOINTSIDVECCHECK(comp,jointsvec) if (datavec.size() != jointsvec.size()) { datavec.resize(jointsvec.size());}
constexpr yarp::conf::vocab32_t VOCAB_FAILED
contains the definition of a Vector type
@ return_value_error_generic
Method was successfully executed.
A simple collection of objects that can be described and transmitted in a portable way.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
virtual yarp::conf::vocab32_t asVocab32() const
Get 32 bit vocabulary identifier as an integer.
virtual bool isVocab32() const
Checks if value is a 32bit vocabulary identifier.