hairo

Dependencies:   mbed BufferedSerial

Committer:
tknara
Date:
Tue Dec 04 00:14:32 2018 +0000
Revision:
4:bcdd99711326
Parent:
0:9e9b7db60fd5
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
garyservin 0:9e9b7db60fd5 1 #ifndef _ROS_visualization_msgs_Marker_h
garyservin 0:9e9b7db60fd5 2 #define _ROS_visualization_msgs_Marker_h
garyservin 0:9e9b7db60fd5 3
garyservin 0:9e9b7db60fd5 4 #include <stdint.h>
garyservin 0:9e9b7db60fd5 5 #include <string.h>
garyservin 0:9e9b7db60fd5 6 #include <stdlib.h>
garyservin 0:9e9b7db60fd5 7 #include "ros/msg.h"
garyservin 0:9e9b7db60fd5 8 #include "std_msgs/Header.h"
garyservin 0:9e9b7db60fd5 9 #include "geometry_msgs/Pose.h"
garyservin 0:9e9b7db60fd5 10 #include "geometry_msgs/Vector3.h"
garyservin 0:9e9b7db60fd5 11 #include "std_msgs/ColorRGBA.h"
garyservin 0:9e9b7db60fd5 12 #include "ros/duration.h"
garyservin 0:9e9b7db60fd5 13 #include "geometry_msgs/Point.h"
garyservin 0:9e9b7db60fd5 14
garyservin 0:9e9b7db60fd5 15 namespace visualization_msgs
garyservin 0:9e9b7db60fd5 16 {
garyservin 0:9e9b7db60fd5 17
garyservin 0:9e9b7db60fd5 18 class Marker : public ros::Msg
garyservin 0:9e9b7db60fd5 19 {
garyservin 0:9e9b7db60fd5 20 public:
garyservin 0:9e9b7db60fd5 21 typedef std_msgs::Header _header_type;
garyservin 0:9e9b7db60fd5 22 _header_type header;
garyservin 0:9e9b7db60fd5 23 typedef const char* _ns_type;
garyservin 0:9e9b7db60fd5 24 _ns_type ns;
garyservin 0:9e9b7db60fd5 25 typedef int32_t _id_type;
garyservin 0:9e9b7db60fd5 26 _id_type id;
garyservin 0:9e9b7db60fd5 27 typedef int32_t _type_type;
garyservin 0:9e9b7db60fd5 28 _type_type type;
garyservin 0:9e9b7db60fd5 29 typedef int32_t _action_type;
garyservin 0:9e9b7db60fd5 30 _action_type action;
garyservin 0:9e9b7db60fd5 31 typedef geometry_msgs::Pose _pose_type;
garyservin 0:9e9b7db60fd5 32 _pose_type pose;
garyservin 0:9e9b7db60fd5 33 typedef geometry_msgs::Vector3 _scale_type;
garyservin 0:9e9b7db60fd5 34 _scale_type scale;
garyservin 0:9e9b7db60fd5 35 typedef std_msgs::ColorRGBA _color_type;
garyservin 0:9e9b7db60fd5 36 _color_type color;
garyservin 0:9e9b7db60fd5 37 typedef ros::Duration _lifetime_type;
garyservin 0:9e9b7db60fd5 38 _lifetime_type lifetime;
garyservin 0:9e9b7db60fd5 39 typedef bool _frame_locked_type;
garyservin 0:9e9b7db60fd5 40 _frame_locked_type frame_locked;
garyservin 0:9e9b7db60fd5 41 uint32_t points_length;
garyservin 0:9e9b7db60fd5 42 typedef geometry_msgs::Point _points_type;
garyservin 0:9e9b7db60fd5 43 _points_type st_points;
garyservin 0:9e9b7db60fd5 44 _points_type * points;
garyservin 0:9e9b7db60fd5 45 uint32_t colors_length;
garyservin 0:9e9b7db60fd5 46 typedef std_msgs::ColorRGBA _colors_type;
garyservin 0:9e9b7db60fd5 47 _colors_type st_colors;
garyservin 0:9e9b7db60fd5 48 _colors_type * colors;
garyservin 0:9e9b7db60fd5 49 typedef const char* _text_type;
garyservin 0:9e9b7db60fd5 50 _text_type text;
garyservin 0:9e9b7db60fd5 51 typedef const char* _mesh_resource_type;
garyservin 0:9e9b7db60fd5 52 _mesh_resource_type mesh_resource;
garyservin 0:9e9b7db60fd5 53 typedef bool _mesh_use_embedded_materials_type;
garyservin 0:9e9b7db60fd5 54 _mesh_use_embedded_materials_type mesh_use_embedded_materials;
garyservin 0:9e9b7db60fd5 55 enum { ARROW = 0 };
garyservin 0:9e9b7db60fd5 56 enum { CUBE = 1 };
garyservin 0:9e9b7db60fd5 57 enum { SPHERE = 2 };
garyservin 0:9e9b7db60fd5 58 enum { CYLINDER = 3 };
garyservin 0:9e9b7db60fd5 59 enum { LINE_STRIP = 4 };
garyservin 0:9e9b7db60fd5 60 enum { LINE_LIST = 5 };
garyservin 0:9e9b7db60fd5 61 enum { CUBE_LIST = 6 };
garyservin 0:9e9b7db60fd5 62 enum { SPHERE_LIST = 7 };
garyservin 0:9e9b7db60fd5 63 enum { POINTS = 8 };
garyservin 0:9e9b7db60fd5 64 enum { TEXT_VIEW_FACING = 9 };
garyservin 0:9e9b7db60fd5 65 enum { MESH_RESOURCE = 10 };
garyservin 0:9e9b7db60fd5 66 enum { TRIANGLE_LIST = 11 };
garyservin 0:9e9b7db60fd5 67 enum { ADD = 0 };
garyservin 0:9e9b7db60fd5 68 enum { MODIFY = 0 };
garyservin 0:9e9b7db60fd5 69 enum { DELETE = 2 };
garyservin 0:9e9b7db60fd5 70 enum { DELETEALL = 3 };
garyservin 0:9e9b7db60fd5 71
garyservin 0:9e9b7db60fd5 72 Marker():
garyservin 0:9e9b7db60fd5 73 header(),
garyservin 0:9e9b7db60fd5 74 ns(""),
garyservin 0:9e9b7db60fd5 75 id(0),
garyservin 0:9e9b7db60fd5 76 type(0),
garyservin 0:9e9b7db60fd5 77 action(0),
garyservin 0:9e9b7db60fd5 78 pose(),
garyservin 0:9e9b7db60fd5 79 scale(),
garyservin 0:9e9b7db60fd5 80 color(),
garyservin 0:9e9b7db60fd5 81 lifetime(),
garyservin 0:9e9b7db60fd5 82 frame_locked(0),
garyservin 0:9e9b7db60fd5 83 points_length(0), points(NULL),
garyservin 0:9e9b7db60fd5 84 colors_length(0), colors(NULL),
garyservin 0:9e9b7db60fd5 85 text(""),
garyservin 0:9e9b7db60fd5 86 mesh_resource(""),
garyservin 0:9e9b7db60fd5 87 mesh_use_embedded_materials(0)
garyservin 0:9e9b7db60fd5 88 {
garyservin 0:9e9b7db60fd5 89 }
garyservin 0:9e9b7db60fd5 90
garyservin 0:9e9b7db60fd5 91 virtual int serialize(unsigned char *outbuffer) const
garyservin 0:9e9b7db60fd5 92 {
garyservin 0:9e9b7db60fd5 93 int offset = 0;
garyservin 0:9e9b7db60fd5 94 offset += this->header.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 95 uint32_t length_ns = strlen(this->ns);
garyservin 0:9e9b7db60fd5 96 varToArr(outbuffer + offset, length_ns);
garyservin 0:9e9b7db60fd5 97 offset += 4;
garyservin 0:9e9b7db60fd5 98 memcpy(outbuffer + offset, this->ns, length_ns);
garyservin 0:9e9b7db60fd5 99 offset += length_ns;
garyservin 0:9e9b7db60fd5 100 union {
garyservin 0:9e9b7db60fd5 101 int32_t real;
garyservin 0:9e9b7db60fd5 102 uint32_t base;
garyservin 0:9e9b7db60fd5 103 } u_id;
garyservin 0:9e9b7db60fd5 104 u_id.real = this->id;
garyservin 0:9e9b7db60fd5 105 *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 106 *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 107 *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 108 *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 109 offset += sizeof(this->id);
garyservin 0:9e9b7db60fd5 110 union {
garyservin 0:9e9b7db60fd5 111 int32_t real;
garyservin 0:9e9b7db60fd5 112 uint32_t base;
garyservin 0:9e9b7db60fd5 113 } u_type;
garyservin 0:9e9b7db60fd5 114 u_type.real = this->type;
garyservin 0:9e9b7db60fd5 115 *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 116 *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 117 *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 118 *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 119 offset += sizeof(this->type);
garyservin 0:9e9b7db60fd5 120 union {
garyservin 0:9e9b7db60fd5 121 int32_t real;
garyservin 0:9e9b7db60fd5 122 uint32_t base;
garyservin 0:9e9b7db60fd5 123 } u_action;
garyservin 0:9e9b7db60fd5 124 u_action.real = this->action;
garyservin 0:9e9b7db60fd5 125 *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 126 *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 127 *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 128 *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 129 offset += sizeof(this->action);
garyservin 0:9e9b7db60fd5 130 offset += this->pose.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 131 offset += this->scale.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 132 offset += this->color.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 133 *(outbuffer + offset + 0) = (this->lifetime.sec >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 134 *(outbuffer + offset + 1) = (this->lifetime.sec >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 135 *(outbuffer + offset + 2) = (this->lifetime.sec >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 136 *(outbuffer + offset + 3) = (this->lifetime.sec >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 137 offset += sizeof(this->lifetime.sec);
garyservin 0:9e9b7db60fd5 138 *(outbuffer + offset + 0) = (this->lifetime.nsec >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 139 *(outbuffer + offset + 1) = (this->lifetime.nsec >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 140 *(outbuffer + offset + 2) = (this->lifetime.nsec >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 141 *(outbuffer + offset + 3) = (this->lifetime.nsec >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 142 offset += sizeof(this->lifetime.nsec);
garyservin 0:9e9b7db60fd5 143 union {
garyservin 0:9e9b7db60fd5 144 bool real;
garyservin 0:9e9b7db60fd5 145 uint8_t base;
garyservin 0:9e9b7db60fd5 146 } u_frame_locked;
garyservin 0:9e9b7db60fd5 147 u_frame_locked.real = this->frame_locked;
garyservin 0:9e9b7db60fd5 148 *(outbuffer + offset + 0) = (u_frame_locked.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 149 offset += sizeof(this->frame_locked);
garyservin 0:9e9b7db60fd5 150 *(outbuffer + offset + 0) = (this->points_length >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 151 *(outbuffer + offset + 1) = (this->points_length >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 152 *(outbuffer + offset + 2) = (this->points_length >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 153 *(outbuffer + offset + 3) = (this->points_length >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 154 offset += sizeof(this->points_length);
garyservin 0:9e9b7db60fd5 155 for( uint32_t i = 0; i < points_length; i++){
garyservin 0:9e9b7db60fd5 156 offset += this->points[i].serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 157 }
garyservin 0:9e9b7db60fd5 158 *(outbuffer + offset + 0) = (this->colors_length >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 159 *(outbuffer + offset + 1) = (this->colors_length >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 160 *(outbuffer + offset + 2) = (this->colors_length >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 161 *(outbuffer + offset + 3) = (this->colors_length >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 162 offset += sizeof(this->colors_length);
garyservin 0:9e9b7db60fd5 163 for( uint32_t i = 0; i < colors_length; i++){
garyservin 0:9e9b7db60fd5 164 offset += this->colors[i].serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 165 }
garyservin 0:9e9b7db60fd5 166 uint32_t length_text = strlen(this->text);
garyservin 0:9e9b7db60fd5 167 varToArr(outbuffer + offset, length_text);
garyservin 0:9e9b7db60fd5 168 offset += 4;
garyservin 0:9e9b7db60fd5 169 memcpy(outbuffer + offset, this->text, length_text);
garyservin 0:9e9b7db60fd5 170 offset += length_text;
garyservin 0:9e9b7db60fd5 171 uint32_t length_mesh_resource = strlen(this->mesh_resource);
garyservin 0:9e9b7db60fd5 172 varToArr(outbuffer + offset, length_mesh_resource);
garyservin 0:9e9b7db60fd5 173 offset += 4;
garyservin 0:9e9b7db60fd5 174 memcpy(outbuffer + offset, this->mesh_resource, length_mesh_resource);
garyservin 0:9e9b7db60fd5 175 offset += length_mesh_resource;
garyservin 0:9e9b7db60fd5 176 union {
garyservin 0:9e9b7db60fd5 177 bool real;
garyservin 0:9e9b7db60fd5 178 uint8_t base;
garyservin 0:9e9b7db60fd5 179 } u_mesh_use_embedded_materials;
garyservin 0:9e9b7db60fd5 180 u_mesh_use_embedded_materials.real = this->mesh_use_embedded_materials;
garyservin 0:9e9b7db60fd5 181 *(outbuffer + offset + 0) = (u_mesh_use_embedded_materials.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 182 offset += sizeof(this->mesh_use_embedded_materials);
garyservin 0:9e9b7db60fd5 183 return offset;
garyservin 0:9e9b7db60fd5 184 }
garyservin 0:9e9b7db60fd5 185
garyservin 0:9e9b7db60fd5 186 virtual int deserialize(unsigned char *inbuffer)
garyservin 0:9e9b7db60fd5 187 {
garyservin 0:9e9b7db60fd5 188 int offset = 0;
garyservin 0:9e9b7db60fd5 189 offset += this->header.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 190 uint32_t length_ns;
garyservin 0:9e9b7db60fd5 191 arrToVar(length_ns, (inbuffer + offset));
garyservin 0:9e9b7db60fd5 192 offset += 4;
garyservin 0:9e9b7db60fd5 193 for(unsigned int k= offset; k< offset+length_ns; ++k){
garyservin 0:9e9b7db60fd5 194 inbuffer[k-1]=inbuffer[k];
garyservin 0:9e9b7db60fd5 195 }
garyservin 0:9e9b7db60fd5 196 inbuffer[offset+length_ns-1]=0;
garyservin 0:9e9b7db60fd5 197 this->ns = (char *)(inbuffer + offset-1);
garyservin 0:9e9b7db60fd5 198 offset += length_ns;
garyservin 0:9e9b7db60fd5 199 union {
garyservin 0:9e9b7db60fd5 200 int32_t real;
garyservin 0:9e9b7db60fd5 201 uint32_t base;
garyservin 0:9e9b7db60fd5 202 } u_id;
garyservin 0:9e9b7db60fd5 203 u_id.base = 0;
garyservin 0:9e9b7db60fd5 204 u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 205 u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 206 u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 207 u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 208 this->id = u_id.real;
garyservin 0:9e9b7db60fd5 209 offset += sizeof(this->id);
garyservin 0:9e9b7db60fd5 210 union {
garyservin 0:9e9b7db60fd5 211 int32_t real;
garyservin 0:9e9b7db60fd5 212 uint32_t base;
garyservin 0:9e9b7db60fd5 213 } u_type;
garyservin 0:9e9b7db60fd5 214 u_type.base = 0;
garyservin 0:9e9b7db60fd5 215 u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 216 u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 217 u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 218 u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 219 this->type = u_type.real;
garyservin 0:9e9b7db60fd5 220 offset += sizeof(this->type);
garyservin 0:9e9b7db60fd5 221 union {
garyservin 0:9e9b7db60fd5 222 int32_t real;
garyservin 0:9e9b7db60fd5 223 uint32_t base;
garyservin 0:9e9b7db60fd5 224 } u_action;
garyservin 0:9e9b7db60fd5 225 u_action.base = 0;
garyservin 0:9e9b7db60fd5 226 u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 227 u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 228 u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 229 u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 230 this->action = u_action.real;
garyservin 0:9e9b7db60fd5 231 offset += sizeof(this->action);
garyservin 0:9e9b7db60fd5 232 offset += this->pose.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 233 offset += this->scale.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 234 offset += this->color.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 235 this->lifetime.sec = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 236 this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 237 this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 238 this->lifetime.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 239 offset += sizeof(this->lifetime.sec);
garyservin 0:9e9b7db60fd5 240 this->lifetime.nsec = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 241 this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 242 this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 243 this->lifetime.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 244 offset += sizeof(this->lifetime.nsec);
garyservin 0:9e9b7db60fd5 245 union {
garyservin 0:9e9b7db60fd5 246 bool real;
garyservin 0:9e9b7db60fd5 247 uint8_t base;
garyservin 0:9e9b7db60fd5 248 } u_frame_locked;
garyservin 0:9e9b7db60fd5 249 u_frame_locked.base = 0;
garyservin 0:9e9b7db60fd5 250 u_frame_locked.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 251 this->frame_locked = u_frame_locked.real;
garyservin 0:9e9b7db60fd5 252 offset += sizeof(this->frame_locked);
garyservin 0:9e9b7db60fd5 253 uint32_t points_lengthT = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 254 points_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 255 points_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 256 points_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 257 offset += sizeof(this->points_length);
garyservin 0:9e9b7db60fd5 258 if(points_lengthT > points_length)
garyservin 0:9e9b7db60fd5 259 this->points = (geometry_msgs::Point*)realloc(this->points, points_lengthT * sizeof(geometry_msgs::Point));
garyservin 0:9e9b7db60fd5 260 points_length = points_lengthT;
garyservin 0:9e9b7db60fd5 261 for( uint32_t i = 0; i < points_length; i++){
garyservin 0:9e9b7db60fd5 262 offset += this->st_points.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 263 memcpy( &(this->points[i]), &(this->st_points), sizeof(geometry_msgs::Point));
garyservin 0:9e9b7db60fd5 264 }
garyservin 0:9e9b7db60fd5 265 uint32_t colors_lengthT = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 266 colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 267 colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 268 colors_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 269 offset += sizeof(this->colors_length);
garyservin 0:9e9b7db60fd5 270 if(colors_lengthT > colors_length)
garyservin 0:9e9b7db60fd5 271 this->colors = (std_msgs::ColorRGBA*)realloc(this->colors, colors_lengthT * sizeof(std_msgs::ColorRGBA));
garyservin 0:9e9b7db60fd5 272 colors_length = colors_lengthT;
garyservin 0:9e9b7db60fd5 273 for( uint32_t i = 0; i < colors_length; i++){
garyservin 0:9e9b7db60fd5 274 offset += this->st_colors.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 275 memcpy( &(this->colors[i]), &(this->st_colors), sizeof(std_msgs::ColorRGBA));
garyservin 0:9e9b7db60fd5 276 }
garyservin 0:9e9b7db60fd5 277 uint32_t length_text;
garyservin 0:9e9b7db60fd5 278 arrToVar(length_text, (inbuffer + offset));
garyservin 0:9e9b7db60fd5 279 offset += 4;
garyservin 0:9e9b7db60fd5 280 for(unsigned int k= offset; k< offset+length_text; ++k){
garyservin 0:9e9b7db60fd5 281 inbuffer[k-1]=inbuffer[k];
garyservin 0:9e9b7db60fd5 282 }
garyservin 0:9e9b7db60fd5 283 inbuffer[offset+length_text-1]=0;
garyservin 0:9e9b7db60fd5 284 this->text = (char *)(inbuffer + offset-1);
garyservin 0:9e9b7db60fd5 285 offset += length_text;
garyservin 0:9e9b7db60fd5 286 uint32_t length_mesh_resource;
garyservin 0:9e9b7db60fd5 287 arrToVar(length_mesh_resource, (inbuffer + offset));
garyservin 0:9e9b7db60fd5 288 offset += 4;
garyservin 0:9e9b7db60fd5 289 for(unsigned int k= offset; k< offset+length_mesh_resource; ++k){
garyservin 0:9e9b7db60fd5 290 inbuffer[k-1]=inbuffer[k];
garyservin 0:9e9b7db60fd5 291 }
garyservin 0:9e9b7db60fd5 292 inbuffer[offset+length_mesh_resource-1]=0;
garyservin 0:9e9b7db60fd5 293 this->mesh_resource = (char *)(inbuffer + offset-1);
garyservin 0:9e9b7db60fd5 294 offset += length_mesh_resource;
garyservin 0:9e9b7db60fd5 295 union {
garyservin 0:9e9b7db60fd5 296 bool real;
garyservin 0:9e9b7db60fd5 297 uint8_t base;
garyservin 0:9e9b7db60fd5 298 } u_mesh_use_embedded_materials;
garyservin 0:9e9b7db60fd5 299 u_mesh_use_embedded_materials.base = 0;
garyservin 0:9e9b7db60fd5 300 u_mesh_use_embedded_materials.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 301 this->mesh_use_embedded_materials = u_mesh_use_embedded_materials.real;
garyservin 0:9e9b7db60fd5 302 offset += sizeof(this->mesh_use_embedded_materials);
garyservin 0:9e9b7db60fd5 303 return offset;
garyservin 0:9e9b7db60fd5 304 }
garyservin 0:9e9b7db60fd5 305
garyservin 0:9e9b7db60fd5 306 const char * getType(){ return "visualization_msgs/Marker"; };
garyservin 0:9e9b7db60fd5 307 const char * getMD5(){ return "4048c9de2a16f4ae8e0538085ebf1b97"; };
garyservin 0:9e9b7db60fd5 308
garyservin 0:9e9b7db60fd5 309 };
garyservin 0:9e9b7db60fd5 310
garyservin 0:9e9b7db60fd5 311 }
garyservin 0:9e9b7db60fd5 312 #endif