60#ifndef guWhiteboard_SensorsHandSensors_h
61#define guWhiteboard_SensorsHandSensors_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
72#undef guWhiteboard_SensorsHandSensors_DEFINED
73#define guWhiteboard_SensorsHandSensors_DEFINED
75#undef SensorsHandSensors_DEFINED
76#define SensorsHandSensors_DEFINED
90 void init(
bool t_LHand_Touch_Left =
true,
bool t_LHand_Touch_Back =
true,
bool t_LHand_Touch_Right =
true,
bool t_RHand_Touch_Left =
true,
bool t_RHand_Touch_Back =
true,
bool t_RHand_Touch_Right =
true) {
104 SensorsHandSensors(
bool t_LHand_Touch_Left =
true,
bool t_LHand_Touch_Back =
true,
bool t_LHand_Touch_Right =
true,
bool t_RHand_Touch_Left =
true,
bool t_RHand_Touch_Back =
true,
bool t_RHand_Touch_Right =
true) {
105 this->init(t_LHand_Touch_Left, t_LHand_Touch_Back, t_LHand_Touch_Right, t_RHand_Touch_Left, t_RHand_Touch_Back, t_RHand_Touch_Right);
150 return !(*
this == t_other);
160 return !(*
this == t_other);
253#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
263#ifdef USE_WB_SENSORS_HAND_SENSORS_C_CONVERSION
266 std::string descr = buffer;
269 std::ostringstream ss;
286#ifdef USE_WB_SENSORS_HAND_SENSORS_C_CONVERSION
289 std::string toString = buffer;
292 std::ostringstream ss;
308#ifdef USE_WB_SENSORS_HAND_SENSORS_C_CONVERSION
313 char * str_cstr =
const_cast<char *
>(t_str.c_str());
314 size_t temp_length = strlen(str_cstr);
315 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
320 char* var_str = &var_str_buffer[0];
322 char* key = &key_buffer[0];
329 if (index == 0 && str_cstr[0] ==
'{') {
335 for (
int i = index; i < length; i++) {
337 if (bracecount == 0 && str_cstr[i] ==
'=') {
342 if (bracecount == 0 && isspace(str_cstr[i])) {
349 if (bracecount == 0 && str_cstr[i] ==
',') {
353 if (str_cstr[i] ==
'{') {
357 if (str_cstr[i] ==
'}') {
359 if (bracecount < 0) {
364 if (i == length - 1) {
368 if (endKey >= startKey && endKey - startKey < length) {
369 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
370 key[(endKey - startKey) + 1] = 0;
374 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
375 var_str[(index - startVar) + 1] = 0;
381 if (strlen(key) > 0) {
382 if (0 == strcmp(
"LHand_Touch_Left", key)) {
384 }
else if (0 == strcmp(
"LHand_Touch_Back", key)) {
386 }
else if (0 == strcmp(
"LHand_Touch_Right", key)) {
388 }
else if (0 == strcmp(
"RHand_Touch_Left", key)) {
390 }
else if (0 == strcmp(
"RHand_Touch_Back", key)) {
392 }
else if (0 == strcmp(
"RHand_Touch_Right", key)) {
434 }
while(index < length);
Provides a C++ wrapper around wb_sensors_hand_sensors.
std::string description()
const bool & RHand_Touch_Back() const
bool & RHand_Touch_Right()
const bool & RHand_Touch_Left() const
void set_LHand_Touch_Right(const bool &t_newValue)
SensorsHandSensors(const struct wb_sensors_hand_sensors &t_other)
Copy Constructor.
bool operator!=(const SensorsHandSensors &t_other) const
const bool & RHand_Touch_Right() const
bool & LHand_Touch_Left()
const bool & LHand_Touch_Back() const
SensorsHandSensors(bool t_LHand_Touch_Left=true, bool t_LHand_Touch_Back=true, bool t_LHand_Touch_Right=true, bool t_RHand_Touch_Left=true, bool t_RHand_Touch_Back=true, bool t_RHand_Touch_Right=true)
Create a new SensorsHandSensors.
void set_LHand_Touch_Back(const bool &t_newValue)
void set_RHand_Touch_Left(const bool &t_newValue)
bool & LHand_Touch_Right()
void from_string(const std::string &t_str)
const bool & LHand_Touch_Right() const
SensorsHandSensors(const std::string &t_str)
String Constructor.
bool & RHand_Touch_Back()
SensorsHandSensors(const SensorsHandSensors &t_other)
Copy Constructor.
bool & LHand_Touch_Back()
SensorsHandSensors & operator=(const SensorsHandSensors &t_other)
Copy Assignment Operator.
void set_LHand_Touch_Left(const bool &t_newValue)
bool operator==(const SensorsHandSensors &t_other) const
void set_RHand_Touch_Right(const bool &t_newValue)
bool & RHand_Touch_Left()
const bool & LHand_Touch_Left() const
void set_RHand_Touch_Back(const bool &t_newValue)
WHITEBOARD_POSTER_STRING_CONVERSION.
bool RHand_Touch_Back
state of the hand capacitive sensor on the Back of Right Hand, on / off.
bool RHand_Touch_Right
state of the hand capacitive sensor on the Right side of Right Hand, on / off.
bool LHand_Touch_Right
state of the hand capacitive sensor on the Right side of Left Hand, on / off.
bool RHand_Touch_Left
state of the hand capacitive sensor on the Left side of Right Hand, on / off.
bool LHand_Touch_Left
state of the hand capacitive sensor on the Left side of Left Hand, on / off.
bool LHand_Touch_Back
state of the hand capacitive sensor on the Back of Left Hand, on / off.
const char * wb_sensors_hand_sensors_description(const struct wb_sensors_hand_sensors *self, char *descString, size_t bufferSize)
Convert to a description string.
const char * wb_sensors_hand_sensors_to_string(const struct wb_sensors_hand_sensors *self, char *toString, size_t bufferSize)
Convert to a string.
struct wb_sensors_hand_sensors * wb_sensors_hand_sensors_from_string(struct wb_sensors_hand_sensors *self, const char *str)
Convert from a string.
#define SENSORS_HAND_SENSORS_DESC_BUFFER_SIZE
#define SENSORS_HAND_SENSORS_TO_STRING_BUFFER_SIZE