1 #ifndef _ROS_visualization_msgs_ImageMarker_h
2 #define _ROS_visualization_msgs_ImageMarker_h
13 namespace visualization_msgs
61 virtual int serialize(
unsigned char *outbuffer)
const
65 uint32_t length_ns = strlen(this->
ns);
66 memcpy(outbuffer + offset, &length_ns,
sizeof(uint32_t));
68 memcpy(outbuffer + offset, this->
ns, length_ns);
75 *(outbuffer + offset + 0) = (u_id.base >> (8 * 0)) & 0xFF;
76 *(outbuffer + offset + 1) = (u_id.base >> (8 * 1)) & 0xFF;
77 *(outbuffer + offset + 2) = (u_id.base >> (8 * 2)) & 0xFF;
78 *(outbuffer + offset + 3) = (u_id.base >> (8 * 3)) & 0xFF;
79 offset +=
sizeof(this->
id);
84 u_type.real = this->
type;
85 *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF;
86 *(outbuffer + offset + 1) = (u_type.base >> (8 * 1)) & 0xFF;
87 *(outbuffer + offset + 2) = (u_type.base >> (8 * 2)) & 0xFF;
88 *(outbuffer + offset + 3) = (u_type.base >> (8 * 3)) & 0xFF;
89 offset +=
sizeof(this->
type);
94 u_action.real = this->
action;
95 *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF;
96 *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF;
97 *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF;
98 *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF;
99 offset +=
sizeof(this->
action);
105 u_scale.real = this->
scale;
106 *(outbuffer + offset + 0) = (u_scale.base >> (8 * 0)) & 0xFF;
107 *(outbuffer + offset + 1) = (u_scale.base >> (8 * 1)) & 0xFF;
108 *(outbuffer + offset + 2) = (u_scale.base >> (8 * 2)) & 0xFF;
109 *(outbuffer + offset + 3) = (u_scale.base >> (8 * 3)) & 0xFF;
110 offset +=
sizeof(this->
scale);
112 *(outbuffer + offset + 0) = (this->
filled >> (8 * 0)) & 0xFF;
113 offset +=
sizeof(this->
filled);
115 *(outbuffer + offset + 0) = (this->
lifetime.
sec >> (8 * 0)) & 0xFF;
116 *(outbuffer + offset + 1) = (this->
lifetime.
sec >> (8 * 1)) & 0xFF;
117 *(outbuffer + offset + 2) = (this->
lifetime.
sec >> (8 * 2)) & 0xFF;
118 *(outbuffer + offset + 3) = (this->
lifetime.
sec >> (8 * 3)) & 0xFF;
120 *(outbuffer + offset + 0) = (this->
lifetime.
nsec >> (8 * 0)) & 0xFF;
121 *(outbuffer + offset + 1) = (this->
lifetime.
nsec >> (8 * 1)) & 0xFF;
122 *(outbuffer + offset + 2) = (this->
lifetime.
nsec >> (8 * 2)) & 0xFF;
123 *(outbuffer + offset + 3) = (this->
lifetime.
nsec >> (8 * 3)) & 0xFF;
126 *(outbuffer + offset++) = 0;
127 *(outbuffer + offset++) = 0;
128 *(outbuffer + offset++) = 0;
133 *(outbuffer + offset++) = 0;
134 *(outbuffer + offset++) = 0;
135 *(outbuffer + offset++) = 0;
147 memcpy(&length_ns, (inbuffer + offset),
sizeof(uint32_t));
149 for(
unsigned int k= offset; k< offset+length_ns; ++k){
150 inbuffer[k-1]=inbuffer[k];
152 inbuffer[offset+length_ns-1]=0;
153 this->
ns = (
char *)(inbuffer + offset-1);
160 u_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
161 u_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
162 u_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
163 u_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
164 this->
id = u_id.real;
165 offset +=
sizeof(this->
id);
171 u_type.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
172 u_type.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
173 u_type.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
174 u_type.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
175 this->
type = u_type.real;
176 offset +=
sizeof(this->
type);
182 u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
183 u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
184 u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
185 u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
186 this->
action = u_action.real;
187 offset +=
sizeof(this->
action);
194 u_scale.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
195 u_scale.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
196 u_scale.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
197 u_scale.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
198 this->
scale = u_scale.real;
199 offset +=
sizeof(this->
scale);
201 this->
filled = ((uint8_t) (*(inbuffer + offset)));
202 offset +=
sizeof(this->
filled);
204 this->
lifetime.
sec = ((uint32_t) (*(inbuffer + offset)));
205 this->
lifetime.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
206 this->
lifetime.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
207 this->
lifetime.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
209 this->
lifetime.
nsec = ((uint32_t) (*(inbuffer + offset)));
210 this->
lifetime.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
211 this->
lifetime.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
212 this->
lifetime.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
214 uint8_t points_lengthT = *(inbuffer + offset++);
223 uint8_t outline_colors_lengthT = *(inbuffer + offset++);
235 const char *
getType(){
return "visualization_msgs/ImageMarker"; };
236 const char *
getMD5(){
return "1de93c67ec8858b831025a08fbf1b35c"; };
virtual int deserialize(unsigned char *inbuffer)
Definition: ImageMarker.h:142
uint8_t filled
Definition: ImageMarker.h:27
std_msgs::ColorRGBA st_outline_colors
Definition: ImageMarker.h:34
ImageMarker()
Definition: ImageMarker.h:44
geometry_msgs::Point st_points
Definition: ImageMarker.h:31
int32_t sec
Definition: duration.h:48
Definition: ImageMarker.h:39
uint8_t outline_colors_length
Definition: ImageMarker.h:33
float scale
Definition: ImageMarker.h:25
Definition: ImageMarker.h:42
int32_t type
Definition: ImageMarker.h:22
Definition: ImageMarker.h:40
Definition: ImageMarker.h:38
std_msgs::Header header
Definition: ImageMarker.h:19
virtual int deserialize(unsigned char *inbuffer)
Definition: ColorRGBA.h:74
int32_t action
Definition: ImageMarker.h:23
std_msgs::ColorRGBA outline_color
Definition: ImageMarker.h:26
uint8_t points_length
Definition: ImageMarker.h:30
Definition: ImageMarker.h:41
geometry_msgs::Point * points
Definition: ImageMarker.h:32
Definition: ImageMarker.h:37
std_msgs::ColorRGBA * outline_colors
Definition: ImageMarker.h:35
int32_t id
Definition: ImageMarker.h:21
virtual int serialize(unsigned char *outbuffer) const
Definition: ColorRGBA.h:28
virtual int serialize(unsigned char *outbuffer) const
Definition: Point.h:26
geometry_msgs::Point position
Definition: ImageMarker.h:24
Definition: ImageMarker.h:36
Definition: duration.h:45
const char * getType()
Definition: ImageMarker.h:235
const char * getMD5()
Definition: ImageMarker.h:236
int32_t nsec
Definition: duration.h:48
Definition: ColorRGBA.h:12
virtual int serialize(unsigned char *outbuffer) const
Definition: ImageMarker.h:61
Definition: ImageMarker.h:16
const char * ns
Definition: ImageMarker.h:20
virtual int deserialize(unsigned char *inbuffer)
Definition: Point.h:35
std_msgs::ColorRGBA fill_color
Definition: ImageMarker.h:28
ros::Duration lifetime
Definition: ImageMarker.h:29