1 #ifndef _ROS_rosgraph_msgs_Log_h
2 #define _ROS_rosgraph_msgs_Log_h
10 namespace rosgraph_msgs
44 virtual int serialize(
unsigned char *outbuffer)
const
52 u_level.real = this->
level;
53 *(outbuffer + offset + 0) = (u_level.base >> (8 * 0)) & 0xFF;
54 offset +=
sizeof(this->
level);
55 uint32_t length_name = strlen(this->
name);
56 memcpy(outbuffer + offset, &length_name,
sizeof(uint32_t));
58 memcpy(outbuffer + offset, this->
name, length_name);
59 offset += length_name;
60 uint32_t length_msg = strlen(this->
msg);
61 memcpy(outbuffer + offset, &length_msg,
sizeof(uint32_t));
63 memcpy(outbuffer + offset, this->
msg, length_msg);
65 uint32_t length_file = strlen(this->
file);
66 memcpy(outbuffer + offset, &length_file,
sizeof(uint32_t));
68 memcpy(outbuffer + offset, this->
file, length_file);
69 offset += length_file;
70 uint32_t length_function = strlen(this->
function);
71 memcpy(outbuffer + offset, &length_function,
sizeof(uint32_t));
73 memcpy(outbuffer + offset, this->
function, length_function);
74 offset += length_function;
75 *(outbuffer + offset + 0) = (this->
line >> (8 * 0)) & 0xFF;
76 *(outbuffer + offset + 1) = (this->
line >> (8 * 1)) & 0xFF;
77 *(outbuffer + offset + 2) = (this->
line >> (8 * 2)) & 0xFF;
78 *(outbuffer + offset + 3) = (this->
line >> (8 * 3)) & 0xFF;
79 offset +=
sizeof(this->
line);
81 *(outbuffer + offset++) = 0;
82 *(outbuffer + offset++) = 0;
83 *(outbuffer + offset++) = 0;
85 uint32_t length_topicsi = strlen(this->
topics[i]);
86 memcpy(outbuffer + offset, &length_topicsi,
sizeof(uint32_t));
88 memcpy(outbuffer + offset, this->
topics[i], length_topicsi);
89 offset += length_topicsi;
103 u_level.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
104 this->
level = u_level.real;
105 offset +=
sizeof(this->
level);
106 uint32_t length_name;
107 memcpy(&length_name, (inbuffer + offset),
sizeof(uint32_t));
109 for(
unsigned int k= offset; k< offset+length_name; ++k){
110 inbuffer[k-1]=inbuffer[k];
112 inbuffer[offset+length_name-1]=0;
113 this->
name = (
char *)(inbuffer + offset-1);
114 offset += length_name;
116 memcpy(&length_msg, (inbuffer + offset),
sizeof(uint32_t));
118 for(
unsigned int k= offset; k< offset+length_msg; ++k){
119 inbuffer[k-1]=inbuffer[k];
121 inbuffer[offset+length_msg-1]=0;
122 this->
msg = (
char *)(inbuffer + offset-1);
123 offset += length_msg;
124 uint32_t length_file;
125 memcpy(&length_file, (inbuffer + offset),
sizeof(uint32_t));
127 for(
unsigned int k= offset; k< offset+length_file; ++k){
128 inbuffer[k-1]=inbuffer[k];
130 inbuffer[offset+length_file-1]=0;
131 this->
file = (
char *)(inbuffer + offset-1);
132 offset += length_file;
133 uint32_t length_function;
134 memcpy(&length_function, (inbuffer + offset),
sizeof(uint32_t));
136 for(
unsigned int k= offset; k< offset+length_function; ++k){
137 inbuffer[k-1]=inbuffer[k];
139 inbuffer[offset+length_function-1]=0;
140 this->
function = (
char *)(inbuffer + offset-1);
141 offset += length_function;
142 this->
line = ((uint32_t) (*(inbuffer + offset)));
143 this->
line |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
144 this->
line |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
145 this->
line |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
146 offset +=
sizeof(this->
line);
147 uint8_t topics_lengthT = *(inbuffer + offset++);
149 this->
topics = (
char**)realloc(this->
topics, topics_lengthT *
sizeof(
char*));
153 uint32_t length_st_topics;
154 memcpy(&length_st_topics, (inbuffer + offset),
sizeof(uint32_t));
156 for(
unsigned int k= offset; k< offset+length_st_topics; ++k){
157 inbuffer[k-1]=inbuffer[k];
159 inbuffer[offset+length_st_topics-1]=0;
160 this->
st_topics = (
char *)(inbuffer + offset-1);
161 offset += length_st_topics;
167 const char *
getType(){
return "rosgraph_msgs/Log"; };
168 const char *
getMD5(){
return "acffd30cd6b6de30f120938c17c593fb"; };
uint8_t topics_length
Definition: Log.h:23
const char * msg
Definition: Log.h:19
const char * getType()
Definition: Log.h:167
int8_t level
Definition: Log.h:17
std_msgs::Header header
Definition: Log.h:16
virtual int deserialize(unsigned char *inbuffer)
Definition: Log.h:94
const char * function
Definition: Log.h:21
char * st_topics
Definition: Log.h:24
const char * name
Definition: Log.h:18
uint32_t line
Definition: Log.h:22
char ** topics
Definition: Log.h:25
virtual int serialize(unsigned char *outbuffer) const
Definition: Log.h:44
Log()
Definition: Log.h:32
const char * file
Definition: Log.h:20
const char * getMD5()
Definition: Log.h:168