60#ifndef guWhiteboard_SensorsFootSensors_h
61#define guWhiteboard_SensorsFootSensors_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
73#undef guWhiteboard_SensorsFootSensors_DEFINED
74#define guWhiteboard_SensorsFootSensors_DEFINED
76#undef SensorsFootSensors_DEFINED
77#define SensorsFootSensors_DEFINED
91 void init(
float t_LFoot_FSR_FrontLeft = 0.0f,
float t_LFoot_FSR_FrontRight = 0.0f,
float t_LFoot_FSR_RearLeft = 0.0f,
float t_LFoot_FSR_RearRight = 0.0f,
float t_LFoot_FSR_CenterOfPressure_X = 0.0f,
float t_LFoot_FSR_CenterOfPressure_Y = 0.0f,
float t_LFoot_FSR_TotalWeight = 0.0f,
float t_RFoot_FSR_FrontLeft = 0.0f,
float t_RFoot_FSR_FrontRight = 0.0f,
float t_RFoot_FSR_RearLeft = 0.0f,
float t_RFoot_FSR_RearRight = 0.0f,
float t_RFoot_FSR_CenterOfPressure_X = 0.0f,
float t_RFoot_FSR_CenterOfPressure_Y = 0.0f,
float t_RFoot_FSR_TotalWeight = 0.0f,
bool t_LFoot_Bumper_Left =
true,
bool t_LFoot_Bumper_Right =
true,
bool t_RFoot_Bumper_Left =
true,
bool t_RFoot_Bumper_Right =
true) {
117 SensorsFootSensors(
float t_LFoot_FSR_FrontLeft = 0.0f,
float t_LFoot_FSR_FrontRight = 0.0f,
float t_LFoot_FSR_RearLeft = 0.0f,
float t_LFoot_FSR_RearRight = 0.0f,
float t_LFoot_FSR_CenterOfPressure_X = 0.0f,
float t_LFoot_FSR_CenterOfPressure_Y = 0.0f,
float t_LFoot_FSR_TotalWeight = 0.0f,
float t_RFoot_FSR_FrontLeft = 0.0f,
float t_RFoot_FSR_FrontRight = 0.0f,
float t_RFoot_FSR_RearLeft = 0.0f,
float t_RFoot_FSR_RearRight = 0.0f,
float t_RFoot_FSR_CenterOfPressure_X = 0.0f,
float t_RFoot_FSR_CenterOfPressure_Y = 0.0f,
float t_RFoot_FSR_TotalWeight = 0.0f,
bool t_LFoot_Bumper_Left =
true,
bool t_LFoot_Bumper_Right =
true,
bool t_RFoot_Bumper_Left =
true,
bool t_RFoot_Bumper_Right =
true) {
118 this->init(t_LFoot_FSR_FrontLeft, t_LFoot_FSR_FrontRight, t_LFoot_FSR_RearLeft, t_LFoot_FSR_RearRight, t_LFoot_FSR_CenterOfPressure_X, t_LFoot_FSR_CenterOfPressure_Y, t_LFoot_FSR_TotalWeight, t_RFoot_FSR_FrontLeft, t_RFoot_FSR_FrontRight, t_RFoot_FSR_RearLeft, t_RFoot_FSR_RearRight, t_RFoot_FSR_CenterOfPressure_X, t_RFoot_FSR_CenterOfPressure_Y, t_RFoot_FSR_TotalWeight, t_LFoot_Bumper_Left, t_LFoot_Bumper_Right, t_RFoot_Bumper_Left, t_RFoot_Bumper_Right);
125 this->init(t_other.
LFoot_FSR_FrontLeft(), t_other.
LFoot_FSR_FrontRight(), t_other.
LFoot_FSR_RearLeft(), t_other.
LFoot_FSR_RearRight(), t_other.
LFoot_FSR_CenterOfPressure_X(), t_other.
LFoot_FSR_CenterOfPressure_Y(), t_other.
LFoot_FSR_TotalWeight(), t_other.
RFoot_FSR_FrontLeft(), t_other.
RFoot_FSR_FrontRight(), t_other.
RFoot_FSR_RearLeft(), t_other.
RFoot_FSR_RearRight(), t_other.
RFoot_FSR_CenterOfPressure_X(), t_other.
RFoot_FSR_CenterOfPressure_Y(), t_other.
RFoot_FSR_TotalWeight(), t_other.
LFoot_Bumper_Left(), t_other.
LFoot_Bumper_Right(), t_other.
RFoot_Bumper_Left(), t_other.
RFoot_Bumper_Right());
132 this->init(t_other.
LFoot_FSR_FrontLeft, t_other.
LFoot_FSR_FrontRight, t_other.
LFoot_FSR_RearLeft, t_other.
LFoot_FSR_RearRight, t_other.
LFoot_FSR_CenterOfPressure_X, t_other.
LFoot_FSR_CenterOfPressure_Y, t_other.
LFoot_FSR_TotalWeight, t_other.
RFoot_FSR_FrontLeft, t_other.
RFoot_FSR_FrontRight, t_other.
RFoot_FSR_RearLeft, t_other.
RFoot_FSR_RearRight, t_other.
RFoot_FSR_CenterOfPressure_X, t_other.
RFoot_FSR_CenterOfPressure_Y, t_other.
RFoot_FSR_TotalWeight, t_other.
LFoot_Bumper_Left, t_other.
LFoot_Bumper_Right, t_other.
RFoot_Bumper_Left, t_other.
RFoot_Bumper_Right);
139 this->init(t_other.
LFoot_FSR_FrontLeft(), t_other.
LFoot_FSR_FrontRight(), t_other.
LFoot_FSR_RearLeft(), t_other.
LFoot_FSR_RearRight(), t_other.
LFoot_FSR_CenterOfPressure_X(), t_other.
LFoot_FSR_CenterOfPressure_Y(), t_other.
LFoot_FSR_TotalWeight(), t_other.
RFoot_FSR_FrontLeft(), t_other.
RFoot_FSR_FrontRight(), t_other.
RFoot_FSR_RearLeft(), t_other.
RFoot_FSR_RearRight(), t_other.
RFoot_FSR_CenterOfPressure_X(), t_other.
RFoot_FSR_CenterOfPressure_Y(), t_other.
RFoot_FSR_TotalWeight(), t_other.
LFoot_Bumper_Left(), t_other.
LFoot_Bumper_Right(), t_other.
RFoot_Bumper_Left(), t_other.
RFoot_Bumper_Right());
147 this->init(t_other.
LFoot_FSR_FrontLeft, t_other.
LFoot_FSR_FrontRight, t_other.
LFoot_FSR_RearLeft, t_other.
LFoot_FSR_RearRight, t_other.
LFoot_FSR_CenterOfPressure_X, t_other.
LFoot_FSR_CenterOfPressure_Y, t_other.
LFoot_FSR_TotalWeight, t_other.
RFoot_FSR_FrontLeft, t_other.
RFoot_FSR_FrontRight, t_other.
RFoot_FSR_RearLeft, t_other.
RFoot_FSR_RearRight, t_other.
RFoot_FSR_CenterOfPressure_X, t_other.
RFoot_FSR_CenterOfPressure_Y, t_other.
RFoot_FSR_TotalWeight, t_other.
LFoot_Bumper_Left, t_other.
LFoot_Bumper_Right, t_other.
RFoot_Bumper_Left, t_other.
RFoot_Bumper_Right);
175 return !(*
this == t_other);
185 return !(*
this == t_other);
458#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
468#ifdef USE_WB_SENSORS_FOOT_SENSORS_C_CONVERSION
471 std::string descr = buffer;
474 std::ostringstream ss;
515#ifdef USE_WB_SENSORS_FOOT_SENSORS_C_CONVERSION
518 std::string toString = buffer;
521 std::ostringstream ss;
561#ifdef USE_WB_SENSORS_FOOT_SENSORS_C_CONVERSION
566 char * str_cstr =
const_cast<char *
>(t_str.c_str());
567 size_t temp_length = strlen(str_cstr);
568 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
573 char* var_str = &var_str_buffer[0];
575 char* key = &key_buffer[0];
582 if (index == 0 && str_cstr[0] ==
'{') {
588 for (
int i = index; i < length; i++) {
590 if (bracecount == 0 && str_cstr[i] ==
'=') {
595 if (bracecount == 0 && isspace(str_cstr[i])) {
602 if (bracecount == 0 && str_cstr[i] ==
',') {
606 if (str_cstr[i] ==
'{') {
610 if (str_cstr[i] ==
'}') {
612 if (bracecount < 0) {
617 if (i == length - 1) {
621 if (endKey >= startKey && endKey - startKey < length) {
622 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
623 key[(endKey - startKey) + 1] = 0;
627 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
628 var_str[(index - startVar) + 1] = 0;
634 if (strlen(key) > 0) {
635 if (0 == strcmp(
"LFoot_FSR_FrontLeft", key)) {
637 }
else if (0 == strcmp(
"LFoot_FSR_FrontRight", key)) {
639 }
else if (0 == strcmp(
"LFoot_FSR_RearLeft", key)) {
641 }
else if (0 == strcmp(
"LFoot_FSR_RearRight", key)) {
643 }
else if (0 == strcmp(
"LFoot_FSR_CenterOfPressure_X", key)) {
645 }
else if (0 == strcmp(
"LFoot_FSR_CenterOfPressure_Y", key)) {
647 }
else if (0 == strcmp(
"LFoot_FSR_TotalWeight", key)) {
649 }
else if (0 == strcmp(
"RFoot_FSR_FrontLeft", key)) {
651 }
else if (0 == strcmp(
"RFoot_FSR_FrontRight", key)) {
653 }
else if (0 == strcmp(
"RFoot_FSR_RearLeft", key)) {
655 }
else if (0 == strcmp(
"RFoot_FSR_RearRight", key)) {
657 }
else if (0 == strcmp(
"RFoot_FSR_CenterOfPressure_X", key)) {
659 }
else if (0 == strcmp(
"RFoot_FSR_CenterOfPressure_Y", key)) {
661 }
else if (0 == strcmp(
"RFoot_FSR_TotalWeight", key)) {
663 }
else if (0 == strcmp(
"LFoot_Bumper_Left", key)) {
665 }
else if (0 == strcmp(
"LFoot_Bumper_Right", key)) {
667 }
else if (0 == strcmp(
"RFoot_Bumper_Left", key)) {
669 }
else if (0 == strcmp(
"RFoot_Bumper_Right", key)) {
771 }
while(index < length);