60#ifndef guWhiteboard_SENSORSLegJointSensors_h
61#define guWhiteboard_SENSORSLegJointSensors_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
73#undef guWhiteboard_SENSORSLegJointSensors_DEFINED
74#define guWhiteboard_SENSORSLegJointSensors_DEFINED
76#undef SENSORSLegJointSensors_DEFINED
77#define SENSORSLegJointSensors_DEFINED
91 void init(
float t_LKneePitch = 0.0f,
float t_LAnklePitch = 0.0f,
float t_LAnkleRoll = 0.0f,
float t_RKneePitch = 0.0f,
float t_RAnklePitch = 0.0f,
float t_RAnkleRoll = 0.0f,
float t_LHipYawPitch = 0.0f,
float t_LHipRoll = 0.0f,
float t_LHipPitch = 0.0f,
float t_RHipYawPitch = 0.0f,
float t_RHipRoll = 0.0f,
float t_RHipPitch = 0.0f) {
111 SENSORSLegJointSensors(
float t_LKneePitch = 0.0f,
float t_LAnklePitch = 0.0f,
float t_LAnkleRoll = 0.0f,
float t_RKneePitch = 0.0f,
float t_RAnklePitch = 0.0f,
float t_RAnkleRoll = 0.0f,
float t_LHipYawPitch = 0.0f,
float t_LHipRoll = 0.0f,
float t_LHipPitch = 0.0f,
float t_RHipYawPitch = 0.0f,
float t_RHipRoll = 0.0f,
float t_RHipPitch = 0.0f) {
112 this->init(t_LKneePitch, t_LAnklePitch, t_LAnkleRoll, t_RKneePitch, t_RAnklePitch, t_RAnkleRoll, t_LHipYawPitch, t_LHipRoll, t_LHipPitch, t_RHipYawPitch, t_RHipRoll, t_RHipPitch);
119 this->init(t_other.
LKneePitch(), t_other.
LAnklePitch(), t_other.
LAnkleRoll(), t_other.
RKneePitch(), t_other.
RAnklePitch(), t_other.
RAnkleRoll(), t_other.
LHipYawPitch(), t_other.
LHipRoll(), t_other.
LHipPitch(), t_other.
RHipYawPitch(), t_other.
RHipRoll(), t_other.
RHipPitch());
126 this->init(t_other.
LKneePitch, t_other.
LAnklePitch, t_other.
LAnkleRoll, t_other.
RKneePitch, t_other.
RAnklePitch, t_other.
RAnkleRoll, t_other.
LHipYawPitch, t_other.
LHipRoll, t_other.
LHipPitch, t_other.
RHipYawPitch, t_other.
RHipRoll, t_other.
RHipPitch);
133 this->init(t_other.
LKneePitch(), t_other.
LAnklePitch(), t_other.
LAnkleRoll(), t_other.
RKneePitch(), t_other.
RAnklePitch(), t_other.
RAnkleRoll(), t_other.
LHipYawPitch(), t_other.
LHipRoll(), t_other.
LHipPitch(), t_other.
RHipYawPitch(), t_other.
RHipRoll(), t_other.
RHipPitch());
141 this->init(t_other.
LKneePitch, t_other.
LAnklePitch, t_other.
LAnkleRoll, t_other.
RKneePitch, t_other.
RAnklePitch, t_other.
RAnkleRoll, t_other.
LHipYawPitch, t_other.
LHipRoll, t_other.
LHipPitch, t_other.
RHipYawPitch, t_other.
RHipRoll, t_other.
RHipPitch);
163 return !(*
this == t_other);
173 return !(*
this == t_other);
356#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
366#ifdef USE_WB_SENSORS_LEGJOINTSENSORS_C_CONVERSION
369 std::string descr = buffer;
372 std::ostringstream ss;
387 ss <<
"LHipRoll=" << this->
LHipRoll();
393 ss <<
"RHipRoll=" << this->
RHipRoll();
401#ifdef USE_WB_SENSORS_LEGJOINTSENSORS_C_CONVERSION
404 std::string toString = buffer;
407 std::ostringstream ss;
435#ifdef USE_WB_SENSORS_LEGJOINTSENSORS_C_CONVERSION
440 char * str_cstr =
const_cast<char *
>(t_str.c_str());
441 size_t temp_length = strlen(str_cstr);
442 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
447 char* var_str = &var_str_buffer[0];
449 char* key = &key_buffer[0];
456 if (index == 0 && str_cstr[0] ==
'{') {
462 for (
int i = index; i < length; i++) {
464 if (bracecount == 0 && str_cstr[i] ==
'=') {
469 if (bracecount == 0 && isspace(str_cstr[i])) {
476 if (bracecount == 0 && str_cstr[i] ==
',') {
480 if (str_cstr[i] ==
'{') {
484 if (str_cstr[i] ==
'}') {
486 if (bracecount < 0) {
491 if (i == length - 1) {
495 if (endKey >= startKey && endKey - startKey < length) {
496 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
497 key[(endKey - startKey) + 1] = 0;
501 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
502 var_str[(index - startVar) + 1] = 0;
508 if (strlen(key) > 0) {
509 if (0 == strcmp(
"LKneePitch", key)) {
511 }
else if (0 == strcmp(
"LAnklePitch", key)) {
513 }
else if (0 == strcmp(
"LAnkleRoll", key)) {
515 }
else if (0 == strcmp(
"RKneePitch", key)) {
517 }
else if (0 == strcmp(
"RAnklePitch", key)) {
519 }
else if (0 == strcmp(
"RAnkleRoll", key)) {
521 }
else if (0 == strcmp(
"LHipYawPitch", key)) {
523 }
else if (0 == strcmp(
"LHipRoll", key)) {
525 }
else if (0 == strcmp(
"LHipPitch", key)) {
527 }
else if (0 == strcmp(
"RHipYawPitch", key)) {
529 }
else if (0 == strcmp(
"RHipRoll", key)) {
531 }
else if (0 == strcmp(
"RHipPitch", key)) {
603 }
while(index < length);
Provides a C++ wrapper around wb_sensors_legjointsensors.
void set_RHipRoll(const float &t_newValue)
void set_LHipPitch(const float &t_newValue)
const float & LHipYawPitch() const
void set_RHipPitch(const float &t_newValue)
SENSORSLegJointSensors(float t_LKneePitch=0.0f, float t_LAnklePitch=0.0f, float t_LAnkleRoll=0.0f, float t_RKneePitch=0.0f, float t_RAnklePitch=0.0f, float t_RAnkleRoll=0.0f, float t_LHipYawPitch=0.0f, float t_LHipRoll=0.0f, float t_LHipPitch=0.0f, float t_RHipYawPitch=0.0f, float t_RHipRoll=0.0f, float t_RHipPitch=0.0f)
Create a new SENSORSLegJointSensors.
SENSORSLegJointSensors(const SENSORSLegJointSensors &t_other)
Copy Constructor.
const float & LAnklePitch() const
const float & RKneePitch() const
const float & RHipYawPitch() const
void set_RAnkleRoll(const float &t_newValue)
const float & RAnkleRoll() const
void set_LAnklePitch(const float &t_newValue)
void set_RAnklePitch(const float &t_newValue)
bool operator!=(const SENSORSLegJointSensors &t_other) const
const float & LKneePitch() const
void set_RHipYawPitch(const float &t_newValue)
void set_LHipRoll(const float &t_newValue)
void set_LKneePitch(const float &t_newValue)
const float & RAnklePitch() const
SENSORSLegJointSensors(const struct wb_sensors_legjointsensors &t_other)
Copy Constructor.
SENSORSLegJointSensors(const std::string &t_str)
String Constructor.
std::string description()
const float & RHipRoll() const
void set_LHipYawPitch(const float &t_newValue)
void set_RKneePitch(const float &t_newValue)
void set_LAnkleRoll(const float &t_newValue)
SENSORSLegJointSensors & operator=(const SENSORSLegJointSensors &t_other)
Copy Assignment Operator.
bool operator==(const SENSORSLegJointSensors &t_other) const
const float & LHipPitch() const
const float & LAnkleRoll() const
void from_string(const std::string &t_str)
const float & RHipPitch() const
const float & LHipRoll() const
WHITEBOARD_POSTER_STRING_CONVERSION.
float RKneePitch
pitch of the knee joint (right)
float LKneePitch
pitch of the knee joint (left)
float RHipPitch
pitch of the hip (right)
float LHipRoll
roll of the hip (left)
float LAnkleRoll
roll of the ankle joint (left)
float RAnklePitch
pitch of the ankle joint (right)
float LHipPitch
pitch of the hip (left)
float RHipRoll
roll of the hip (right)
float RAnkleRoll
roll of the ankle joint (right)
float LHipYawPitch
'yaw/pitch' of the hip.
float RHipYawPitch
'yaw/pitch' of the hip.
float LAnklePitch
pitch of the ankle joint (left)
const char * wb_sensors_legjointsensors_description(const struct wb_sensors_legjointsensors *self, char *descString, size_t bufferSize)
Convert to a description string.
const char * wb_sensors_legjointsensors_to_string(const struct wb_sensors_legjointsensors *self, char *toString, size_t bufferSize)
Convert to a string.
struct wb_sensors_legjointsensors * wb_sensors_legjointsensors_from_string(struct wb_sensors_legjointsensors *self, const char *str)
Convert from a string.
#define SENSORS_LEGJOINTSENSORS_TO_STRING_BUFFER_SIZE
#define SENSORS_LEGJOINTSENSORS_DESC_BUFFER_SIZE