Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
TowerRobotMoveCommand.h
00001 #ifndef _ROS_SERVICE_TowerRobotMoveCommand_h 00002 #define _ROS_SERVICE_TowerRobotMoveCommand_h 00003 #include <stdint.h> 00004 #include <string.h> 00005 #include <stdlib.h> 00006 #include "ros/msg.h" 00007 00008 namespace jsk_recognition_msgs 00009 { 00010 00011 static const char TOWERROBOTMOVECOMMAND[] = "jsk_recognition_msgs/TowerRobotMoveCommand"; 00012 00013 class TowerRobotMoveCommandRequest : public ros::Msg 00014 { 00015 public: 00016 typedef int32_t _robot_index_type; 00017 _robot_index_type robot_index; 00018 typedef int32_t _plate_index_type; 00019 _plate_index_type plate_index; 00020 typedef int32_t _from_tower_type; 00021 _from_tower_type from_tower; 00022 typedef int32_t _to_tower_type; 00023 _to_tower_type to_tower; 00024 typedef int32_t _option_command_type; 00025 _option_command_type option_command; 00026 enum { ROBOT1 = 1 }; 00027 enum { ROBOT2 = 2 }; 00028 enum { ROBOT3 = 3 }; 00029 enum { PLATE_SMALL = 1 }; 00030 enum { PLATE_MIDDLE = 2 }; 00031 enum { PLATE_LARGE = 3 }; 00032 enum { TOWER_LOWEST = 1 }; 00033 enum { TOWER_MIDDLE = 2 }; 00034 enum { TOWER_HIGHEST = 3 }; 00035 enum { TOWER_LOWEST2 = 1 }; 00036 enum { OPTION_NONE = 0 }; 00037 enum { OPTION_MOVE_INITIAL = 1 }; 00038 00039 TowerRobotMoveCommandRequest(): 00040 robot_index(0), 00041 plate_index(0), 00042 from_tower(0), 00043 to_tower(0), 00044 option_command(0) 00045 { 00046 } 00047 00048 virtual int serialize(unsigned char *outbuffer) const 00049 { 00050 int offset = 0; 00051 union { 00052 int32_t real; 00053 uint32_t base; 00054 } u_robot_index; 00055 u_robot_index.real = this->robot_index; 00056 *(outbuffer + offset + 0) = (u_robot_index.base >> (8 * 0)) & 0xFF; 00057 *(outbuffer + offset + 1) = (u_robot_index.base >> (8 * 1)) & 0xFF; 00058 *(outbuffer + offset + 2) = (u_robot_index.base >> (8 * 2)) & 0xFF; 00059 *(outbuffer + offset + 3) = (u_robot_index.base >> (8 * 3)) & 0xFF; 00060 offset += sizeof(this->robot_index); 00061 union { 00062 int32_t real; 00063 uint32_t base; 00064 } u_plate_index; 00065 u_plate_index.real = this->plate_index; 00066 *(outbuffer + offset + 0) = (u_plate_index.base >> (8 * 0)) & 0xFF; 00067 *(outbuffer + offset + 1) = (u_plate_index.base >> (8 * 1)) & 0xFF; 00068 *(outbuffer + offset + 2) = (u_plate_index.base >> (8 * 2)) & 0xFF; 00069 *(outbuffer + offset + 3) = (u_plate_index.base >> (8 * 3)) & 0xFF; 00070 offset += sizeof(this->plate_index); 00071 union { 00072 int32_t real; 00073 uint32_t base; 00074 } u_from_tower; 00075 u_from_tower.real = this->from_tower; 00076 *(outbuffer + offset + 0) = (u_from_tower.base >> (8 * 0)) & 0xFF; 00077 *(outbuffer + offset + 1) = (u_from_tower.base >> (8 * 1)) & 0xFF; 00078 *(outbuffer + offset + 2) = (u_from_tower.base >> (8 * 2)) & 0xFF; 00079 *(outbuffer + offset + 3) = (u_from_tower.base >> (8 * 3)) & 0xFF; 00080 offset += sizeof(this->from_tower); 00081 union { 00082 int32_t real; 00083 uint32_t base; 00084 } u_to_tower; 00085 u_to_tower.real = this->to_tower; 00086 *(outbuffer + offset + 0) = (u_to_tower.base >> (8 * 0)) & 0xFF; 00087 *(outbuffer + offset + 1) = (u_to_tower.base >> (8 * 1)) & 0xFF; 00088 *(outbuffer + offset + 2) = (u_to_tower.base >> (8 * 2)) & 0xFF; 00089 *(outbuffer + offset + 3) = (u_to_tower.base >> (8 * 3)) & 0xFF; 00090 offset += sizeof(this->to_tower); 00091 union { 00092 int32_t real; 00093 uint32_t base; 00094 } u_option_command; 00095 u_option_command.real = this->option_command; 00096 *(outbuffer + offset + 0) = (u_option_command.base >> (8 * 0)) & 0xFF; 00097 *(outbuffer + offset + 1) = (u_option_command.base >> (8 * 1)) & 0xFF; 00098 *(outbuffer + offset + 2) = (u_option_command.base >> (8 * 2)) & 0xFF; 00099 *(outbuffer + offset + 3) = (u_option_command.base >> (8 * 3)) & 0xFF; 00100 offset += sizeof(this->option_command); 00101 return offset; 00102 } 00103 00104 virtual int deserialize(unsigned char *inbuffer) 00105 { 00106 int offset = 0; 00107 union { 00108 int32_t real; 00109 uint32_t base; 00110 } u_robot_index; 00111 u_robot_index.base = 0; 00112 u_robot_index.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00113 u_robot_index.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00114 u_robot_index.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00115 u_robot_index.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00116 this->robot_index = u_robot_index.real; 00117 offset += sizeof(this->robot_index); 00118 union { 00119 int32_t real; 00120 uint32_t base; 00121 } u_plate_index; 00122 u_plate_index.base = 0; 00123 u_plate_index.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00124 u_plate_index.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00125 u_plate_index.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00126 u_plate_index.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00127 this->plate_index = u_plate_index.real; 00128 offset += sizeof(this->plate_index); 00129 union { 00130 int32_t real; 00131 uint32_t base; 00132 } u_from_tower; 00133 u_from_tower.base = 0; 00134 u_from_tower.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00135 u_from_tower.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00136 u_from_tower.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00137 u_from_tower.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00138 this->from_tower = u_from_tower.real; 00139 offset += sizeof(this->from_tower); 00140 union { 00141 int32_t real; 00142 uint32_t base; 00143 } u_to_tower; 00144 u_to_tower.base = 0; 00145 u_to_tower.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00146 u_to_tower.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00147 u_to_tower.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00148 u_to_tower.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00149 this->to_tower = u_to_tower.real; 00150 offset += sizeof(this->to_tower); 00151 union { 00152 int32_t real; 00153 uint32_t base; 00154 } u_option_command; 00155 u_option_command.base = 0; 00156 u_option_command.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00157 u_option_command.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00158 u_option_command.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00159 u_option_command.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00160 this->option_command = u_option_command.real; 00161 offset += sizeof(this->option_command); 00162 return offset; 00163 } 00164 00165 virtual const char * getType(){ return TOWERROBOTMOVECOMMAND; }; 00166 virtual const char * getMD5(){ return "aadba056bdce0494569ab50ecd2ec90c"; }; 00167 00168 }; 00169 00170 class TowerRobotMoveCommandResponse : public ros::Msg 00171 { 00172 public: 00173 00174 TowerRobotMoveCommandResponse() 00175 { 00176 } 00177 00178 virtual int serialize(unsigned char *outbuffer) const 00179 { 00180 int offset = 0; 00181 return offset; 00182 } 00183 00184 virtual int deserialize(unsigned char *inbuffer) 00185 { 00186 int offset = 0; 00187 return offset; 00188 } 00189 00190 virtual const char * getType(){ return TOWERROBOTMOVECOMMAND; }; 00191 virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; 00192 00193 }; 00194 00195 class TowerRobotMoveCommand { 00196 public: 00197 typedef TowerRobotMoveCommandRequest Request; 00198 typedef TowerRobotMoveCommandResponse Response; 00199 }; 00200 00201 } 00202 #endif
Generated on Mon Sep 26 2022 13:47:04 by
