1 #ifndef _ROS_std_msgs_Header_h
2 #define _ROS_std_msgs_Header_h
27 virtual int serialize(
unsigned char *outbuffer)
const
30 *(outbuffer + offset + 0) = (this->
seq >> (8 * 0)) & 0xFF;
31 *(outbuffer + offset + 1) = (this->
seq >> (8 * 1)) & 0xFF;
32 *(outbuffer + offset + 2) = (this->
seq >> (8 * 2)) & 0xFF;
33 *(outbuffer + offset + 3) = (this->
seq >> (8 * 3)) & 0xFF;
34 offset +=
sizeof(this->
seq);
35 *(outbuffer + offset + 0) = (this->
stamp.
sec >> (8 * 0)) & 0xFF;
36 *(outbuffer + offset + 1) = (this->
stamp.
sec >> (8 * 1)) & 0xFF;
37 *(outbuffer + offset + 2) = (this->
stamp.
sec >> (8 * 2)) & 0xFF;
38 *(outbuffer + offset + 3) = (this->
stamp.
sec >> (8 * 3)) & 0xFF;
40 *(outbuffer + offset + 0) = (this->
stamp.
nsec >> (8 * 0)) & 0xFF;
41 *(outbuffer + offset + 1) = (this->
stamp.
nsec >> (8 * 1)) & 0xFF;
42 *(outbuffer + offset + 2) = (this->
stamp.
nsec >> (8 * 2)) & 0xFF;
43 *(outbuffer + offset + 3) = (this->
stamp.
nsec >> (8 * 3)) & 0xFF;
45 uint32_t length_frame_id = strlen(this->
frame_id);
46 memcpy(outbuffer + offset, &length_frame_id,
sizeof(uint32_t));
48 memcpy(outbuffer + offset, this->
frame_id, length_frame_id);
49 offset += length_frame_id;
56 this->
seq = ((uint32_t) (*(inbuffer + offset)));
57 this->
seq |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
58 this->
seq |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
59 this->
seq |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
60 offset +=
sizeof(this->
seq);
61 this->
stamp.
sec = ((uint32_t) (*(inbuffer + offset)));
62 this->
stamp.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
63 this->
stamp.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
64 this->
stamp.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
66 this->
stamp.
nsec = ((uint32_t) (*(inbuffer + offset)));
67 this->
stamp.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
68 this->
stamp.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
69 this->
stamp.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
71 uint32_t length_frame_id;
72 memcpy(&length_frame_id, (inbuffer + offset),
sizeof(uint32_t));
74 for(
unsigned int k= offset; k< offset+length_frame_id; ++k){
75 inbuffer[k-1]=inbuffer[k];
77 inbuffer[offset+length_frame_id-1]=0;
78 this->
frame_id = (
char *)(inbuffer + offset-1);
79 offset += length_frame_id;
83 const char *
getType(){
return "std_msgs/Header"; };
84 const char *
getMD5(){
return "2176decaecbce78abc3b96ef049fabed"; };
uint32_t nsec
Definition: time.h:50
uint32_t sec
Definition: time.h:50