60#ifndef guWhiteboard_GuVrTeleopVulkanControl_h 
   61#define guWhiteboard_GuVrTeleopVulkanControl_h 
   63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION 
   72#undef guWhiteboard_GuVrTeleopVulkanControl_DEFINED 
   73#define guWhiteboard_GuVrTeleopVulkanControl_DEFINED 
   75#undef GuVrTeleopVulkanControl_DEFINED 
   76#define GuVrTeleopVulkanControl_DEFINED 
  101            this->init(t_movementOptions, t_walkingOptions);
 
  142            return !(*
this == t_other);
 
  152            return !(*
this == t_other);
 
  185#ifdef WHITEBOARD_POSTER_STRING_CONVERSION 
  195#ifdef USE_WB_GU_VR_TELEOP_VULKAN_CONTROL_C_CONVERSION 
  198            std::string descr = buffer;
 
  201            std::ostringstream ss;
 
  205                    ss << 
"movementOptions=" << 
"VRResting";
 
  210                    ss << 
"movementOptions=" << 
"VRStanding";
 
  215                    ss << 
"movementOptions=" << 
"VRWalking";
 
  223                    ss << 
"walkingOptions=" << 
"NUM_VR_CONTROL_WALKING_OPTIONS";
 
  228                    ss << 
"walkingOptions=" << 
"VRMovementBack";
 
  233                    ss << 
"walkingOptions=" << 
"VRMovementForward";
 
  238                    ss << 
"walkingOptions=" << 
"VRMovementLeft";
 
  243                    ss << 
"walkingOptions=" << 
"VRMovementRight";
 
  248                    ss << 
"walkingOptions=" << 
"VRMovementRotateLeft";
 
  253                    ss << 
"walkingOptions=" << 
"VRMovementRotateRight";
 
  262#ifdef USE_WB_GU_VR_TELEOP_VULKAN_CONTROL_C_CONVERSION 
  265            std::string toString = buffer;
 
  268            std::ostringstream ss;
 
  290                    ss << 
"NUM_VR_CONTROL_WALKING_OPTIONS";
 
  295                    ss << 
"VRMovementBack";
 
  300                    ss << 
"VRMovementForward";
 
  305                    ss << 
"VRMovementLeft";
 
  310                    ss << 
"VRMovementRight";
 
  315                    ss << 
"VRMovementRotateLeft";
 
  320                    ss << 
"VRMovementRotateRight";
 
  328#ifdef USE_WB_GU_VR_TELEOP_VULKAN_CONTROL_C_CONVERSION 
  333            char * str_cstr = 
const_cast<char *
>(t_str.c_str());
 
  334            size_t temp_length = strlen(str_cstr);
 
  335            int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
 
  340            char* var_str = &var_str_buffer[0];
 
  342            char* key = &key_buffer[0];
 
  349            if (index == 0 && str_cstr[0] == 
'{') {
 
  355                for (
int i = index; i < length; i++) {
 
  357                    if (bracecount == 0 && str_cstr[i] == 
'=') {
 
  362                    if (bracecount == 0 && isspace(str_cstr[i])) {
 
  369                    if (bracecount == 0 && str_cstr[i] == 
',') {
 
  373                    if (str_cstr[i] == 
'{') {
 
  377                    if (str_cstr[i] == 
'}') {
 
  379                        if (bracecount < 0) {
 
  384                    if (i == length - 1) {
 
  388                if (endKey >= startKey && endKey - startKey < length) {
 
  389                    strncpy(key, str_cstr + startKey, 
static_cast<size_t>((endKey - startKey) + 1));
 
  390                    key[(endKey - startKey) + 1] = 0;
 
  394                strncpy(var_str, str_cstr + startVar, 
static_cast<size_t>((index - startVar) + 1));
 
  395                var_str[(index - startVar) + 1] = 0;
 
  401                if (strlen(key) > 0) {
 
  402                    if (0 == strcmp(
"movementOptions", key)) {
 
  404                    } 
else if (0 == strcmp(
"walkingOptions", key)) {
 
  414                        if (strcmp(
"VRResting", var_str) == 0) {
 
  415#pragma clang diagnostic push 
  416#pragma clang diagnostic ignored "-Wbad-function-cast" 
  418#pragma clang diagnostic pop 
  419                        } 
else if (strcmp(
"VRStanding", var_str) == 0) {
 
  420#pragma clang diagnostic push 
  421#pragma clang diagnostic ignored "-Wbad-function-cast" 
  423#pragma clang diagnostic pop 
  424                        } 
else if (strcmp(
"VRWalking", var_str) == 0) {
 
  425#pragma clang diagnostic push 
  426#pragma clang diagnostic ignored "-Wbad-function-cast" 
  428#pragma clang diagnostic pop 
  430#pragma clang diagnostic push 
  431#pragma clang diagnostic ignored "-Wbad-function-cast" 
  433#pragma clang diagnostic pop 
  439                        if (strcmp(
"NUM_VR_CONTROL_WALKING_OPTIONS", var_str) == 0) {
 
  440#pragma clang diagnostic push 
  441#pragma clang diagnostic ignored "-Wbad-function-cast" 
  443#pragma clang diagnostic pop 
  444                        } 
else if (strcmp(
"VRMovementBack", var_str) == 0) {
 
  445#pragma clang diagnostic push 
  446#pragma clang diagnostic ignored "-Wbad-function-cast" 
  448#pragma clang diagnostic pop 
  449                        } 
else if (strcmp(
"VRMovementForward", var_str) == 0) {
 
  450#pragma clang diagnostic push 
  451#pragma clang diagnostic ignored "-Wbad-function-cast" 
  453#pragma clang diagnostic pop 
  454                        } 
else if (strcmp(
"VRMovementLeft", var_str) == 0) {
 
  455#pragma clang diagnostic push 
  456#pragma clang diagnostic ignored "-Wbad-function-cast" 
  458#pragma clang diagnostic pop 
  459                        } 
else if (strcmp(
"VRMovementRight", var_str) == 0) {
 
  460#pragma clang diagnostic push 
  461#pragma clang diagnostic ignored "-Wbad-function-cast" 
  463#pragma clang diagnostic pop 
  464                        } 
else if (strcmp(
"VRMovementRotateLeft", var_str) == 0) {
 
  465#pragma clang diagnostic push 
  466#pragma clang diagnostic ignored "-Wbad-function-cast" 
  468#pragma clang diagnostic pop 
  469                        } 
else if (strcmp(
"VRMovementRotateRight", var_str) == 0) {
 
  470#pragma clang diagnostic push 
  471#pragma clang diagnostic ignored "-Wbad-function-cast" 
  473#pragma clang diagnostic pop 
  475#pragma clang diagnostic push 
  476#pragma clang diagnostic ignored "-Wbad-function-cast" 
  478#pragma clang diagnostic pop 
  486            } 
while(index < length);
 
Provides a C++ wrapper around wb_gu_vr_teleop_vulkan_control.
enum VRControlWalkingOptions & walkingOptions() const
std::string description()
GuVrTeleopVulkanControl(const std::string &t_str)
String Constructor.
void set_walkingOptions(const enum VRControlWalkingOptions &t_newValue)
enum VRControlMovementOptions & movementOptions() const
void set_movementOptions(const enum VRControlMovementOptions &t_newValue)
bool operator!=(const GuVrTeleopVulkanControl &t_other) const
GuVrTeleopVulkanControl & operator=(const GuVrTeleopVulkanControl &t_other)
Copy Assignment Operator.
GuVrTeleopVulkanControl(enum VRControlMovementOptions t_movementOptions=VRResting, enum VRControlWalkingOptions t_walkingOptions=NUM_VR_CONTROL_WALKING_OPTIONS)
Create a new GuVrTeleopVulkanControl.
GuVrTeleopVulkanControl(const struct wb_gu_vr_teleop_vulkan_control &t_other)
Copy Constructor.
enum VRControlWalkingOptions & walkingOptions()
enum VRControlMovementOptions & movementOptions()
bool operator==(const GuVrTeleopVulkanControl &t_other) const
void from_string(const std::string &t_str)
GuVrTeleopVulkanControl(const GuVrTeleopVulkanControl &t_other)
Copy Constructor.
WHITEBOARD_POSTER_STRING_CONVERSION.
enum VRControlMovementOptions movementOptions
controls the robots movement
enum VRControlWalkingOptions walkingOptions
controls the direction of high-level walk commands
const char * wb_gu_vr_teleop_vulkan_control_description(const struct wb_gu_vr_teleop_vulkan_control *self, char *descString, size_t bufferSize)
Convert to a description string.
struct wb_gu_vr_teleop_vulkan_control * wb_gu_vr_teleop_vulkan_control_from_string(struct wb_gu_vr_teleop_vulkan_control *self, const char *str)
Convert from a string.
const char * wb_gu_vr_teleop_vulkan_control_to_string(const struct wb_gu_vr_teleop_vulkan_control *self, char *toString, size_t bufferSize)
Convert to a string.
#define GU_VR_TELEOP_VULKAN_CONTROL_TO_STRING_BUFFER_SIZE
#define GU_VR_TELEOP_VULKAN_CONTROL_DESC_BUFFER_SIZE
@ NUM_VR_CONTROL_WALKING_OPTIONS