60#ifndef guWhiteboard_SENSORSTorsoJointTemps_h
61#define guWhiteboard_SENSORSTorsoJointTemps_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
73#undef guWhiteboard_SENSORSTorsoJointTemps_DEFINED
74#define guWhiteboard_SENSORSTorsoJointTemps_DEFINED
76#undef SENSORSTorsoJointTemps_DEFINED
77#define SENSORSTorsoJointTemps_DEFINED
91 void init(
float t_HeadYaw = 0.0f,
float t_HeadPitch = 0.0f,
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_LElbowRoll = 0.0f,
float t_LHipYawPitch = 0.0f,
float t_LHipRoll = 0.0f,
float t_LHipPitch = 0.0f,
float t_RHipRoll = 0.0f,
float t_RHipPitch = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_RElbowRoll = 0.0f) {
114 SENSORSTorsoJointTemps(
float t_HeadYaw = 0.0f,
float t_HeadPitch = 0.0f,
float t_LShoulderPitch = 0.0f,
float t_LShoulderRoll = 0.0f,
float t_LElbowYaw = 0.0f,
float t_LElbowRoll = 0.0f,
float t_LHipYawPitch = 0.0f,
float t_LHipRoll = 0.0f,
float t_LHipPitch = 0.0f,
float t_RHipRoll = 0.0f,
float t_RHipPitch = 0.0f,
float t_RShoulderPitch = 0.0f,
float t_RShoulderRoll = 0.0f,
float t_RElbowYaw = 0.0f,
float t_RElbowRoll = 0.0f) {
115 this->init(t_HeadYaw, t_HeadPitch, t_LShoulderPitch, t_LShoulderRoll, t_LElbowYaw, t_LElbowRoll, t_LHipYawPitch, t_LHipRoll, t_LHipPitch, t_RHipRoll, t_RHipPitch, t_RShoulderPitch, t_RShoulderRoll, t_RElbowYaw, t_RElbowRoll);
122 this->init(t_other.
HeadYaw(), t_other.
HeadPitch(), t_other.
LShoulderPitch(), t_other.
LShoulderRoll(), t_other.
LElbowYaw(), t_other.
LElbowRoll(), t_other.
LHipYawPitch(), t_other.
LHipRoll(), t_other.
LHipPitch(), t_other.
RHipRoll(), t_other.
RHipPitch(), t_other.
RShoulderPitch(), t_other.
RShoulderRoll(), t_other.
RElbowYaw(), t_other.
RElbowRoll());
129 this->init(t_other.
HeadYaw, t_other.
HeadPitch, t_other.
LShoulderPitch, t_other.
LShoulderRoll, t_other.
LElbowYaw, t_other.
LElbowRoll, t_other.
LHipYawPitch, t_other.
LHipRoll, t_other.
LHipPitch, t_other.
RHipRoll, t_other.
RHipPitch, t_other.
RShoulderPitch, t_other.
RShoulderRoll, t_other.
RElbowYaw, t_other.
RElbowRoll);
136 this->init(t_other.
HeadYaw(), t_other.
HeadPitch(), t_other.
LShoulderPitch(), t_other.
LShoulderRoll(), t_other.
LElbowYaw(), t_other.
LElbowRoll(), t_other.
LHipYawPitch(), t_other.
LHipRoll(), t_other.
LHipPitch(), t_other.
RHipRoll(), t_other.
RHipPitch(), t_other.
RShoulderPitch(), t_other.
RShoulderRoll(), t_other.
RElbowYaw(), t_other.
RElbowRoll());
144 this->init(t_other.
HeadYaw, t_other.
HeadPitch, t_other.
LShoulderPitch, t_other.
LShoulderRoll, t_other.
LElbowYaw, t_other.
LElbowRoll, t_other.
LHipYawPitch, t_other.
LHipRoll, t_other.
LHipPitch, t_other.
RHipRoll, t_other.
RHipPitch, t_other.
RShoulderPitch, t_other.
RShoulderRoll, t_other.
RElbowYaw, t_other.
RElbowRoll);
169 return !(*
this == t_other);
179 return !(*
this == t_other);
407#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
417#ifdef USE_WB_SENSORS_TORSOJOINTTEMPS_C_CONVERSION
420 std::string descr = buffer;
423 std::ostringstream ss;
424 ss <<
"HeadYaw=" << this->
HeadYaw();
438 ss <<
"LHipRoll=" << this->
LHipRoll();
442 ss <<
"RHipRoll=" << this->
RHipRoll();
458#ifdef USE_WB_SENSORS_TORSOJOINTTEMPS_C_CONVERSION
461 std::string toString = buffer;
464 std::ostringstream ss;
498#ifdef USE_WB_SENSORS_TORSOJOINTTEMPS_C_CONVERSION
503 char * str_cstr =
const_cast<char *
>(t_str.c_str());
504 size_t temp_length = strlen(str_cstr);
505 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
510 char* var_str = &var_str_buffer[0];
512 char* key = &key_buffer[0];
519 if (index == 0 && str_cstr[0] ==
'{') {
525 for (
int i = index; i < length; i++) {
527 if (bracecount == 0 && str_cstr[i] ==
'=') {
532 if (bracecount == 0 && isspace(str_cstr[i])) {
539 if (bracecount == 0 && str_cstr[i] ==
',') {
543 if (str_cstr[i] ==
'{') {
547 if (str_cstr[i] ==
'}') {
549 if (bracecount < 0) {
554 if (i == length - 1) {
558 if (endKey >= startKey && endKey - startKey < length) {
559 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
560 key[(endKey - startKey) + 1] = 0;
564 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
565 var_str[(index - startVar) + 1] = 0;
571 if (strlen(key) > 0) {
572 if (0 == strcmp(
"HeadYaw", key)) {
574 }
else if (0 == strcmp(
"HeadPitch", key)) {
576 }
else if (0 == strcmp(
"LShoulderPitch", key)) {
578 }
else if (0 == strcmp(
"LShoulderRoll", key)) {
580 }
else if (0 == strcmp(
"LElbowYaw", key)) {
582 }
else if (0 == strcmp(
"LElbowRoll", key)) {
584 }
else if (0 == strcmp(
"LHipYawPitch", key)) {
586 }
else if (0 == strcmp(
"LHipRoll", key)) {
588 }
else if (0 == strcmp(
"LHipPitch", key)) {
590 }
else if (0 == strcmp(
"RHipRoll", key)) {
592 }
else if (0 == strcmp(
"RHipPitch", key)) {
594 }
else if (0 == strcmp(
"RShoulderPitch", key)) {
596 }
else if (0 == strcmp(
"RShoulderRoll", key)) {
598 }
else if (0 == strcmp(
"RElbowYaw", key)) {
600 }
else if (0 == strcmp(
"RElbowRoll", key)) {
610 this->
set_HeadYaw(
static_cast<float>(atof(var_str)));
687 }
while(index < length);
Provides a C++ wrapper around wb_sensors_torsojointtemps.
const float & LShoulderPitch() const
SENSORSTorsoJointTemps(float t_HeadYaw=0.0f, float t_HeadPitch=0.0f, float t_LShoulderPitch=0.0f, float t_LShoulderRoll=0.0f, float t_LElbowYaw=0.0f, float t_LElbowRoll=0.0f, float t_LHipYawPitch=0.0f, float t_LHipRoll=0.0f, float t_LHipPitch=0.0f, float t_RHipRoll=0.0f, float t_RHipPitch=0.0f, float t_RShoulderPitch=0.0f, float t_RShoulderRoll=0.0f, float t_RElbowYaw=0.0f, float t_RElbowRoll=0.0f)
Create a new SENSORSTorsoJointTemps.
const float & LHipYawPitch() const
void set_RElbowRoll(const float &t_newValue)
void set_HeadPitch(const float &t_newValue)
const float & LShoulderRoll() const
bool operator!=(const SENSORSTorsoJointTemps &t_other) const
void set_RShoulderRoll(const float &t_newValue)
SENSORSTorsoJointTemps(const std::string &t_str)
String Constructor.
SENSORSTorsoJointTemps & operator=(const SENSORSTorsoJointTemps &t_other)
Copy Assignment Operator.
const float & RElbowYaw() const
SENSORSTorsoJointTemps(const SENSORSTorsoJointTemps &t_other)
Copy Constructor.
const float & LHipPitch() const
bool operator==(const SENSORSTorsoJointTemps &t_other) const
const float & RShoulderRoll() const
void set_RHipRoll(const float &t_newValue)
const float & RHipRoll() const
const float & HeadPitch() const
const float & LHipRoll() const
const float & LElbowYaw() const
void set_LHipRoll(const float &t_newValue)
void set_LShoulderRoll(const float &t_newValue)
void set_RShoulderPitch(const float &t_newValue)
void set_LHipYawPitch(const float &t_newValue)
void set_LShoulderPitch(const float &t_newValue)
const float & LElbowRoll() const
void set_HeadYaw(const float &t_newValue)
const float & HeadYaw() const
void from_string(const std::string &t_str)
const float & RElbowRoll() const
const float & RShoulderPitch() const
void set_RElbowYaw(const float &t_newValue)
void set_RHipPitch(const float &t_newValue)
void set_LElbowRoll(const float &t_newValue)
void set_LElbowYaw(const float &t_newValue)
std::string description()
SENSORSTorsoJointTemps(const struct wb_sensors_torsojointtemps &t_other)
Copy Constructor.
void set_LHipPitch(const float &t_newValue)
const float & RHipPitch() const
WHITEBOARD_POSTER_STRING_CONVERSION.
float LElbowYaw
Deg Celsius.
float RElbowYaw
Deg Celsius.
float RElbowRoll
Deg Celsius.
float LShoulderRoll
Deg Celsius.
float HeadPitch
Deg Celsius.
float LElbowRoll
Deg Celsius.
float HeadYaw
Deg Celsius.
float LHipPitch
Deg Celsius.
float RHipPitch
Deg Celsius.
float LHipYawPitch
Deg Celsius.
float RHipRoll
Deg Celsius.
float LShoulderPitch
Deg Celsius.
float RShoulderPitch
Deg Celsius.
float LHipRoll
Deg Celsius.
float RShoulderRoll
Deg Celsius.
struct wb_sensors_torsojointtemps * wb_sensors_torsojointtemps_from_string(struct wb_sensors_torsojointtemps *self, const char *str)
Convert from a string.
const char * wb_sensors_torsojointtemps_to_string(const struct wb_sensors_torsojointtemps *self, char *toString, size_t bufferSize)
Convert to a string.
const char * wb_sensors_torsojointtemps_description(const struct wb_sensors_torsojointtemps *self, char *descString, size_t bufferSize)
Convert to a description string.
#define SENSORS_TORSOJOINTTEMPS_TO_STRING_BUFFER_SIZE
#define SENSORS_TORSOJOINTTEMPS_DESC_BUFFER_SIZE