ros melodic library with custom message

Dependents:   Robot_team1_QEI_Douglas Robot_team1

Committer:
scarter1
Date:
Wed Oct 30 14:59:49 2019 +0000
Revision:
0:020db18a476d
melodic library;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
scarter1 0:020db18a476d 1 #ifndef _ROS_SERVICE_SetLinkProperties_h
scarter1 0:020db18a476d 2 #define _ROS_SERVICE_SetLinkProperties_h
scarter1 0:020db18a476d 3 #include <stdint.h>
scarter1 0:020db18a476d 4 #include <string.h>
scarter1 0:020db18a476d 5 #include <stdlib.h>
scarter1 0:020db18a476d 6 #include "ros/msg.h"
scarter1 0:020db18a476d 7 #include "geometry_msgs/Pose.h"
scarter1 0:020db18a476d 8
scarter1 0:020db18a476d 9 namespace gazebo_msgs
scarter1 0:020db18a476d 10 {
scarter1 0:020db18a476d 11
scarter1 0:020db18a476d 12 static const char SETLINKPROPERTIES[] = "gazebo_msgs/SetLinkProperties";
scarter1 0:020db18a476d 13
scarter1 0:020db18a476d 14 class SetLinkPropertiesRequest : public ros::Msg
scarter1 0:020db18a476d 15 {
scarter1 0:020db18a476d 16 public:
scarter1 0:020db18a476d 17 typedef const char* _link_name_type;
scarter1 0:020db18a476d 18 _link_name_type link_name;
scarter1 0:020db18a476d 19 typedef geometry_msgs::Pose _com_type;
scarter1 0:020db18a476d 20 _com_type com;
scarter1 0:020db18a476d 21 typedef bool _gravity_mode_type;
scarter1 0:020db18a476d 22 _gravity_mode_type gravity_mode;
scarter1 0:020db18a476d 23 typedef double _mass_type;
scarter1 0:020db18a476d 24 _mass_type mass;
scarter1 0:020db18a476d 25 typedef double _ixx_type;
scarter1 0:020db18a476d 26 _ixx_type ixx;
scarter1 0:020db18a476d 27 typedef double _ixy_type;
scarter1 0:020db18a476d 28 _ixy_type ixy;
scarter1 0:020db18a476d 29 typedef double _ixz_type;
scarter1 0:020db18a476d 30 _ixz_type ixz;
scarter1 0:020db18a476d 31 typedef double _iyy_type;
scarter1 0:020db18a476d 32 _iyy_type iyy;
scarter1 0:020db18a476d 33 typedef double _iyz_type;
scarter1 0:020db18a476d 34 _iyz_type iyz;
scarter1 0:020db18a476d 35 typedef double _izz_type;
scarter1 0:020db18a476d 36 _izz_type izz;
scarter1 0:020db18a476d 37
scarter1 0:020db18a476d 38 SetLinkPropertiesRequest():
scarter1 0:020db18a476d 39 link_name(""),
scarter1 0:020db18a476d 40 com(),
scarter1 0:020db18a476d 41 gravity_mode(0),
scarter1 0:020db18a476d 42 mass(0),
scarter1 0:020db18a476d 43 ixx(0),
scarter1 0:020db18a476d 44 ixy(0),
scarter1 0:020db18a476d 45 ixz(0),
scarter1 0:020db18a476d 46 iyy(0),
scarter1 0:020db18a476d 47 iyz(0),
scarter1 0:020db18a476d 48 izz(0)
scarter1 0:020db18a476d 49 {
scarter1 0:020db18a476d 50 }
scarter1 0:020db18a476d 51
scarter1 0:020db18a476d 52 virtual int serialize(unsigned char *outbuffer) const
scarter1 0:020db18a476d 53 {
scarter1 0:020db18a476d 54 int offset = 0;
scarter1 0:020db18a476d 55 uint32_t length_link_name = strlen(this->link_name);
scarter1 0:020db18a476d 56 varToArr(outbuffer + offset, length_link_name);
scarter1 0:020db18a476d 57 offset += 4;
scarter1 0:020db18a476d 58 memcpy(outbuffer + offset, this->link_name, length_link_name);
scarter1 0:020db18a476d 59 offset += length_link_name;
scarter1 0:020db18a476d 60 offset += this->com.serialize(outbuffer + offset);
scarter1 0:020db18a476d 61 union {
scarter1 0:020db18a476d 62 bool real;
scarter1 0:020db18a476d 63 uint8_t base;
scarter1 0:020db18a476d 64 } u_gravity_mode;
scarter1 0:020db18a476d 65 u_gravity_mode.real = this->gravity_mode;
scarter1 0:020db18a476d 66 *(outbuffer + offset + 0) = (u_gravity_mode.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 67 offset += sizeof(this->gravity_mode);
scarter1 0:020db18a476d 68 union {
scarter1 0:020db18a476d 69 double real;
scarter1 0:020db18a476d 70 uint64_t base;
scarter1 0:020db18a476d 71 } u_mass;
scarter1 0:020db18a476d 72 u_mass.real = this->mass;
scarter1 0:020db18a476d 73 *(outbuffer + offset + 0) = (u_mass.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 74 *(outbuffer + offset + 1) = (u_mass.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 75 *(outbuffer + offset + 2) = (u_mass.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 76 *(outbuffer + offset + 3) = (u_mass.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 77 *(outbuffer + offset + 4) = (u_mass.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 78 *(outbuffer + offset + 5) = (u_mass.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 79 *(outbuffer + offset + 6) = (u_mass.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 80 *(outbuffer + offset + 7) = (u_mass.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 81 offset += sizeof(this->mass);
scarter1 0:020db18a476d 82 union {
scarter1 0:020db18a476d 83 double real;
scarter1 0:020db18a476d 84 uint64_t base;
scarter1 0:020db18a476d 85 } u_ixx;
scarter1 0:020db18a476d 86 u_ixx.real = this->ixx;
scarter1 0:020db18a476d 87 *(outbuffer + offset + 0) = (u_ixx.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 88 *(outbuffer + offset + 1) = (u_ixx.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 89 *(outbuffer + offset + 2) = (u_ixx.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 90 *(outbuffer + offset + 3) = (u_ixx.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 91 *(outbuffer + offset + 4) = (u_ixx.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 92 *(outbuffer + offset + 5) = (u_ixx.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 93 *(outbuffer + offset + 6) = (u_ixx.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 94 *(outbuffer + offset + 7) = (u_ixx.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 95 offset += sizeof(this->ixx);
scarter1 0:020db18a476d 96 union {
scarter1 0:020db18a476d 97 double real;
scarter1 0:020db18a476d 98 uint64_t base;
scarter1 0:020db18a476d 99 } u_ixy;
scarter1 0:020db18a476d 100 u_ixy.real = this->ixy;
scarter1 0:020db18a476d 101 *(outbuffer + offset + 0) = (u_ixy.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 102 *(outbuffer + offset + 1) = (u_ixy.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 103 *(outbuffer + offset + 2) = (u_ixy.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 104 *(outbuffer + offset + 3) = (u_ixy.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 105 *(outbuffer + offset + 4) = (u_ixy.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 106 *(outbuffer + offset + 5) = (u_ixy.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 107 *(outbuffer + offset + 6) = (u_ixy.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 108 *(outbuffer + offset + 7) = (u_ixy.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 109 offset += sizeof(this->ixy);
scarter1 0:020db18a476d 110 union {
scarter1 0:020db18a476d 111 double real;
scarter1 0:020db18a476d 112 uint64_t base;
scarter1 0:020db18a476d 113 } u_ixz;
scarter1 0:020db18a476d 114 u_ixz.real = this->ixz;
scarter1 0:020db18a476d 115 *(outbuffer + offset + 0) = (u_ixz.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 116 *(outbuffer + offset + 1) = (u_ixz.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 117 *(outbuffer + offset + 2) = (u_ixz.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 118 *(outbuffer + offset + 3) = (u_ixz.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 119 *(outbuffer + offset + 4) = (u_ixz.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 120 *(outbuffer + offset + 5) = (u_ixz.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 121 *(outbuffer + offset + 6) = (u_ixz.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 122 *(outbuffer + offset + 7) = (u_ixz.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 123 offset += sizeof(this->ixz);
scarter1 0:020db18a476d 124 union {
scarter1 0:020db18a476d 125 double real;
scarter1 0:020db18a476d 126 uint64_t base;
scarter1 0:020db18a476d 127 } u_iyy;
scarter1 0:020db18a476d 128 u_iyy.real = this->iyy;
scarter1 0:020db18a476d 129 *(outbuffer + offset + 0) = (u_iyy.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 130 *(outbuffer + offset + 1) = (u_iyy.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 131 *(outbuffer + offset + 2) = (u_iyy.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 132 *(outbuffer + offset + 3) = (u_iyy.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 133 *(outbuffer + offset + 4) = (u_iyy.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 134 *(outbuffer + offset + 5) = (u_iyy.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 135 *(outbuffer + offset + 6) = (u_iyy.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 136 *(outbuffer + offset + 7) = (u_iyy.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 137 offset += sizeof(this->iyy);
scarter1 0:020db18a476d 138 union {
scarter1 0:020db18a476d 139 double real;
scarter1 0:020db18a476d 140 uint64_t base;
scarter1 0:020db18a476d 141 } u_iyz;
scarter1 0:020db18a476d 142 u_iyz.real = this->iyz;
scarter1 0:020db18a476d 143 *(outbuffer + offset + 0) = (u_iyz.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 144 *(outbuffer + offset + 1) = (u_iyz.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 145 *(outbuffer + offset + 2) = (u_iyz.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 146 *(outbuffer + offset + 3) = (u_iyz.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 147 *(outbuffer + offset + 4) = (u_iyz.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 148 *(outbuffer + offset + 5) = (u_iyz.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 149 *(outbuffer + offset + 6) = (u_iyz.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 150 *(outbuffer + offset + 7) = (u_iyz.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 151 offset += sizeof(this->iyz);
scarter1 0:020db18a476d 152 union {
scarter1 0:020db18a476d 153 double real;
scarter1 0:020db18a476d 154 uint64_t base;
scarter1 0:020db18a476d 155 } u_izz;
scarter1 0:020db18a476d 156 u_izz.real = this->izz;
scarter1 0:020db18a476d 157 *(outbuffer + offset + 0) = (u_izz.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 158 *(outbuffer + offset + 1) = (u_izz.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 159 *(outbuffer + offset + 2) = (u_izz.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 160 *(outbuffer + offset + 3) = (u_izz.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 161 *(outbuffer + offset + 4) = (u_izz.base >> (8 * 4)) & 0xFF;
scarter1 0:020db18a476d 162 *(outbuffer + offset + 5) = (u_izz.base >> (8 * 5)) & 0xFF;
scarter1 0:020db18a476d 163 *(outbuffer + offset + 6) = (u_izz.base >> (8 * 6)) & 0xFF;
scarter1 0:020db18a476d 164 *(outbuffer + offset + 7) = (u_izz.base >> (8 * 7)) & 0xFF;
scarter1 0:020db18a476d 165 offset += sizeof(this->izz);
scarter1 0:020db18a476d 166 return offset;
scarter1 0:020db18a476d 167 }
scarter1 0:020db18a476d 168
scarter1 0:020db18a476d 169 virtual int deserialize(unsigned char *inbuffer)
scarter1 0:020db18a476d 170 {
scarter1 0:020db18a476d 171 int offset = 0;
scarter1 0:020db18a476d 172 uint32_t length_link_name;
scarter1 0:020db18a476d 173 arrToVar(length_link_name, (inbuffer + offset));
scarter1 0:020db18a476d 174 offset += 4;
scarter1 0:020db18a476d 175 for(unsigned int k= offset; k< offset+length_link_name; ++k){
scarter1 0:020db18a476d 176 inbuffer[k-1]=inbuffer[k];
scarter1 0:020db18a476d 177 }
scarter1 0:020db18a476d 178 inbuffer[offset+length_link_name-1]=0;
scarter1 0:020db18a476d 179 this->link_name = (char *)(inbuffer + offset-1);
scarter1 0:020db18a476d 180 offset += length_link_name;
scarter1 0:020db18a476d 181 offset += this->com.deserialize(inbuffer + offset);
scarter1 0:020db18a476d 182 union {
scarter1 0:020db18a476d 183 bool real;
scarter1 0:020db18a476d 184 uint8_t base;
scarter1 0:020db18a476d 185 } u_gravity_mode;
scarter1 0:020db18a476d 186 u_gravity_mode.base = 0;
scarter1 0:020db18a476d 187 u_gravity_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 188 this->gravity_mode = u_gravity_mode.real;
scarter1 0:020db18a476d 189 offset += sizeof(this->gravity_mode);
scarter1 0:020db18a476d 190 union {
scarter1 0:020db18a476d 191 double real;
scarter1 0:020db18a476d 192 uint64_t base;
scarter1 0:020db18a476d 193 } u_mass;
scarter1 0:020db18a476d 194 u_mass.base = 0;
scarter1 0:020db18a476d 195 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 196 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 197 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 198 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 199 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 200 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 201 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 202 u_mass.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 203 this->mass = u_mass.real;
scarter1 0:020db18a476d 204 offset += sizeof(this->mass);
scarter1 0:020db18a476d 205 union {
scarter1 0:020db18a476d 206 double real;
scarter1 0:020db18a476d 207 uint64_t base;
scarter1 0:020db18a476d 208 } u_ixx;
scarter1 0:020db18a476d 209 u_ixx.base = 0;
scarter1 0:020db18a476d 210 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 211 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 212 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 213 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 214 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 215 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 216 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 217 u_ixx.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 218 this->ixx = u_ixx.real;
scarter1 0:020db18a476d 219 offset += sizeof(this->ixx);
scarter1 0:020db18a476d 220 union {
scarter1 0:020db18a476d 221 double real;
scarter1 0:020db18a476d 222 uint64_t base;
scarter1 0:020db18a476d 223 } u_ixy;
scarter1 0:020db18a476d 224 u_ixy.base = 0;
scarter1 0:020db18a476d 225 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 226 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 227 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 228 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 229 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 230 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 231 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 232 u_ixy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 233 this->ixy = u_ixy.real;
scarter1 0:020db18a476d 234 offset += sizeof(this->ixy);
scarter1 0:020db18a476d 235 union {
scarter1 0:020db18a476d 236 double real;
scarter1 0:020db18a476d 237 uint64_t base;
scarter1 0:020db18a476d 238 } u_ixz;
scarter1 0:020db18a476d 239 u_ixz.base = 0;
scarter1 0:020db18a476d 240 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 241 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 242 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 243 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 244 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 245 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 246 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 247 u_ixz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 248 this->ixz = u_ixz.real;
scarter1 0:020db18a476d 249 offset += sizeof(this->ixz);
scarter1 0:020db18a476d 250 union {
scarter1 0:020db18a476d 251 double real;
scarter1 0:020db18a476d 252 uint64_t base;
scarter1 0:020db18a476d 253 } u_iyy;
scarter1 0:020db18a476d 254 u_iyy.base = 0;
scarter1 0:020db18a476d 255 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 256 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 257 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 258 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 259 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 260 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 261 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 262 u_iyy.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 263 this->iyy = u_iyy.real;
scarter1 0:020db18a476d 264 offset += sizeof(this->iyy);
scarter1 0:020db18a476d 265 union {
scarter1 0:020db18a476d 266 double real;
scarter1 0:020db18a476d 267 uint64_t base;
scarter1 0:020db18a476d 268 } u_iyz;
scarter1 0:020db18a476d 269 u_iyz.base = 0;
scarter1 0:020db18a476d 270 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 271 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 272 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 273 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 274 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 275 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 276 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 277 u_iyz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 278 this->iyz = u_iyz.real;
scarter1 0:020db18a476d 279 offset += sizeof(this->iyz);
scarter1 0:020db18a476d 280 union {
scarter1 0:020db18a476d 281 double real;
scarter1 0:020db18a476d 282 uint64_t base;
scarter1 0:020db18a476d 283 } u_izz;
scarter1 0:020db18a476d 284 u_izz.base = 0;
scarter1 0:020db18a476d 285 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 286 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 287 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 288 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 289 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
scarter1 0:020db18a476d 290 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
scarter1 0:020db18a476d 291 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
scarter1 0:020db18a476d 292 u_izz.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
scarter1 0:020db18a476d 293 this->izz = u_izz.real;
scarter1 0:020db18a476d 294 offset += sizeof(this->izz);
scarter1 0:020db18a476d 295 return offset;
scarter1 0:020db18a476d 296 }
scarter1 0:020db18a476d 297
scarter1 0:020db18a476d 298 const char * getType(){ return SETLINKPROPERTIES; };
scarter1 0:020db18a476d 299 const char * getMD5(){ return "68ac74a4be01b165bc305b5ccdc45e91"; };
scarter1 0:020db18a476d 300
scarter1 0:020db18a476d 301 };
scarter1 0:020db18a476d 302
scarter1 0:020db18a476d 303 class SetLinkPropertiesResponse : public ros::Msg
scarter1 0:020db18a476d 304 {
scarter1 0:020db18a476d 305 public:
scarter1 0:020db18a476d 306 typedef bool _success_type;
scarter1 0:020db18a476d 307 _success_type success;
scarter1 0:020db18a476d 308 typedef const char* _status_message_type;
scarter1 0:020db18a476d 309 _status_message_type status_message;
scarter1 0:020db18a476d 310
scarter1 0:020db18a476d 311 SetLinkPropertiesResponse():
scarter1 0:020db18a476d 312 success(0),
scarter1 0:020db18a476d 313 status_message("")
scarter1 0:020db18a476d 314 {
scarter1 0:020db18a476d 315 }
scarter1 0:020db18a476d 316
scarter1 0:020db18a476d 317 virtual int serialize(unsigned char *outbuffer) const
scarter1 0:020db18a476d 318 {
scarter1 0:020db18a476d 319 int offset = 0;
scarter1 0:020db18a476d 320 union {
scarter1 0:020db18a476d 321 bool real;
scarter1 0:020db18a476d 322 uint8_t base;
scarter1 0:020db18a476d 323 } u_success;
scarter1 0:020db18a476d 324 u_success.real = this->success;
scarter1 0:020db18a476d 325 *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 326 offset += sizeof(this->success);
scarter1 0:020db18a476d 327 uint32_t length_status_message = strlen(this->status_message);
scarter1 0:020db18a476d 328 varToArr(outbuffer + offset, length_status_message);
scarter1 0:020db18a476d 329 offset += 4;
scarter1 0:020db18a476d 330 memcpy(outbuffer + offset, this->status_message, length_status_message);
scarter1 0:020db18a476d 331 offset += length_status_message;
scarter1 0:020db18a476d 332 return offset;
scarter1 0:020db18a476d 333 }
scarter1 0:020db18a476d 334
scarter1 0:020db18a476d 335 virtual int deserialize(unsigned char *inbuffer)
scarter1 0:020db18a476d 336 {
scarter1 0:020db18a476d 337 int offset = 0;
scarter1 0:020db18a476d 338 union {
scarter1 0:020db18a476d 339 bool real;
scarter1 0:020db18a476d 340 uint8_t base;
scarter1 0:020db18a476d 341 } u_success;
scarter1 0:020db18a476d 342 u_success.base = 0;
scarter1 0:020db18a476d 343 u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 344 this->success = u_success.real;
scarter1 0:020db18a476d 345 offset += sizeof(this->success);
scarter1 0:020db18a476d 346 uint32_t length_status_message;
scarter1 0:020db18a476d 347 arrToVar(length_status_message, (inbuffer + offset));
scarter1 0:020db18a476d 348 offset += 4;
scarter1 0:020db18a476d 349 for(unsigned int k= offset; k< offset+length_status_message; ++k){
scarter1 0:020db18a476d 350 inbuffer[k-1]=inbuffer[k];
scarter1 0:020db18a476d 351 }
scarter1 0:020db18a476d 352 inbuffer[offset+length_status_message-1]=0;
scarter1 0:020db18a476d 353 this->status_message = (char *)(inbuffer + offset-1);
scarter1 0:020db18a476d 354 offset += length_status_message;
scarter1 0:020db18a476d 355 return offset;
scarter1 0:020db18a476d 356 }
scarter1 0:020db18a476d 357
scarter1 0:020db18a476d 358 const char * getType(){ return SETLINKPROPERTIES; };
scarter1 0:020db18a476d 359 const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; };
scarter1 0:020db18a476d 360
scarter1 0:020db18a476d 361 };
scarter1 0:020db18a476d 362
scarter1 0:020db18a476d 363 class SetLinkProperties {
scarter1 0:020db18a476d 364 public:
scarter1 0:020db18a476d 365 typedef SetLinkPropertiesRequest Request;
scarter1 0:020db18a476d 366 typedef SetLinkPropertiesResponse Response;
scarter1 0:020db18a476d 367 };
scarter1 0:020db18a476d 368
scarter1 0:020db18a476d 369 }
scarter1 0:020db18a476d 370 #endif