1 #ifndef _ROS_rosgraph_msgs_TopicStatistics_h
2 #define _ROS_rosgraph_msgs_TopicStatistics_h
11 namespace rosgraph_msgs
50 virtual int serialize(
unsigned char *outbuffer)
const
53 uint32_t length_topic = strlen(this->
topic);
54 memcpy(outbuffer + offset, &length_topic,
sizeof(uint32_t));
56 memcpy(outbuffer + offset, this->
topic, length_topic);
57 offset += length_topic;
58 uint32_t length_node_pub = strlen(this->
node_pub);
59 memcpy(outbuffer + offset, &length_node_pub,
sizeof(uint32_t));
61 memcpy(outbuffer + offset, this->
node_pub, length_node_pub);
62 offset += length_node_pub;
63 uint32_t length_node_sub = strlen(this->
node_sub);
64 memcpy(outbuffer + offset, &length_node_sub,
sizeof(uint32_t));
66 memcpy(outbuffer + offset, this->
node_sub, length_node_sub);
67 offset += length_node_sub;
78 *(outbuffer + offset + 0) = (this->
window_stop.
sec >> (8 * 0)) & 0xFF;
79 *(outbuffer + offset + 1) = (this->
window_stop.
sec >> (8 * 1)) & 0xFF;
80 *(outbuffer + offset + 2) = (this->
window_stop.
sec >> (8 * 2)) & 0xFF;
81 *(outbuffer + offset + 3) = (this->
window_stop.
sec >> (8 * 3)) & 0xFF;
93 *(outbuffer + offset + 0) = (u_delivered_msgs.base >> (8 * 0)) & 0xFF;
94 *(outbuffer + offset + 1) = (u_delivered_msgs.base >> (8 * 1)) & 0xFF;
95 *(outbuffer + offset + 2) = (u_delivered_msgs.base >> (8 * 2)) & 0xFF;
96 *(outbuffer + offset + 3) = (u_delivered_msgs.base >> (8 * 3)) & 0xFF;
103 *(outbuffer + offset + 0) = (u_dropped_msgs.base >> (8 * 0)) & 0xFF;
104 *(outbuffer + offset + 1) = (u_dropped_msgs.base >> (8 * 1)) & 0xFF;
105 *(outbuffer + offset + 2) = (u_dropped_msgs.base >> (8 * 2)) & 0xFF;
106 *(outbuffer + offset + 3) = (u_dropped_msgs.base >> (8 * 3)) & 0xFF;
112 u_traffic.real = this->
traffic;
113 *(outbuffer + offset + 0) = (u_traffic.base >> (8 * 0)) & 0xFF;
114 *(outbuffer + offset + 1) = (u_traffic.base >> (8 * 1)) & 0xFF;
115 *(outbuffer + offset + 2) = (u_traffic.base >> (8 * 2)) & 0xFF;
116 *(outbuffer + offset + 3) = (u_traffic.base >> (8 * 3)) & 0xFF;
117 offset +=
sizeof(this->
traffic);
118 *(outbuffer + offset + 0) = (this->
period_mean.
sec >> (8 * 0)) & 0xFF;
119 *(outbuffer + offset + 1) = (this->
period_mean.
sec >> (8 * 1)) & 0xFF;
120 *(outbuffer + offset + 2) = (this->
period_mean.
sec >> (8 * 2)) & 0xFF;
121 *(outbuffer + offset + 3) = (this->
period_mean.
sec >> (8 * 3)) & 0xFF;
123 *(outbuffer + offset + 0) = (this->
period_mean.
nsec >> (8 * 0)) & 0xFF;
124 *(outbuffer + offset + 1) = (this->
period_mean.
nsec >> (8 * 1)) & 0xFF;
125 *(outbuffer + offset + 2) = (this->
period_mean.
nsec >> (8 * 2)) & 0xFF;
126 *(outbuffer + offset + 3) = (this->
period_mean.
nsec >> (8 * 3)) & 0xFF;
138 *(outbuffer + offset + 0) = (this->
period_max.
sec >> (8 * 0)) & 0xFF;
139 *(outbuffer + offset + 1) = (this->
period_max.
sec >> (8 * 1)) & 0xFF;
140 *(outbuffer + offset + 2) = (this->
period_max.
sec >> (8 * 2)) & 0xFF;
141 *(outbuffer + offset + 3) = (this->
period_max.
sec >> (8 * 3)) & 0xFF;
143 *(outbuffer + offset + 0) = (this->
period_max.
nsec >> (8 * 0)) & 0xFF;
144 *(outbuffer + offset + 1) = (this->
period_max.
nsec >> (8 * 1)) & 0xFF;
145 *(outbuffer + offset + 2) = (this->
period_max.
nsec >> (8 * 2)) & 0xFF;
146 *(outbuffer + offset + 3) = (this->
period_max.
nsec >> (8 * 3)) & 0xFF;
184 uint32_t length_topic;
185 memcpy(&length_topic, (inbuffer + offset),
sizeof(uint32_t));
187 for(
unsigned int k= offset; k< offset+length_topic; ++k){
188 inbuffer[k-1]=inbuffer[k];
190 inbuffer[offset+length_topic-1]=0;
191 this->
topic = (
char *)(inbuffer + offset-1);
192 offset += length_topic;
193 uint32_t length_node_pub;
194 memcpy(&length_node_pub, (inbuffer + offset),
sizeof(uint32_t));
196 for(
unsigned int k= offset; k< offset+length_node_pub; ++k){
197 inbuffer[k-1]=inbuffer[k];
199 inbuffer[offset+length_node_pub-1]=0;
200 this->
node_pub = (
char *)(inbuffer + offset-1);
201 offset += length_node_pub;
202 uint32_t length_node_sub;
203 memcpy(&length_node_sub, (inbuffer + offset),
sizeof(uint32_t));
205 for(
unsigned int k= offset; k< offset+length_node_sub; ++k){
206 inbuffer[k-1]=inbuffer[k];
208 inbuffer[offset+length_node_sub-1]=0;
209 this->
node_sub = (
char *)(inbuffer + offset-1);
210 offset += length_node_sub;
212 this->
window_start.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
213 this->
window_start.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
214 this->
window_start.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
217 this->
window_start.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
218 this->
window_start.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
219 this->
window_start.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
222 this->
window_stop.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
223 this->
window_stop.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
224 this->
window_stop.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
227 this->
window_stop.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
228 this->
window_stop.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
229 this->
window_stop.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
235 u_delivered_msgs.base = 0;
236 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
237 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
238 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
239 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
246 u_dropped_msgs.base = 0;
247 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
248 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
249 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
250 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
258 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
259 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
260 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
261 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
262 this->
traffic = u_traffic.real;
263 offset +=
sizeof(this->
traffic);
265 this->
period_mean.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
266 this->
period_mean.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
267 this->
period_mean.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
270 this->
period_mean.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
271 this->
period_mean.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
272 this->
period_mean.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
275 this->
period_stddev.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
276 this->
period_stddev.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
277 this->
period_stddev.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
285 this->
period_max.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
286 this->
period_max.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
287 this->
period_max.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
290 this->
period_max.
nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
291 this->
period_max.
nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
292 this->
period_max.
nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
315 this->
stamp_age_max.
sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
316 this->
stamp_age_max.
sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
317 this->
stamp_age_max.
sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
327 const char *
getType(){
return "rosgraph_msgs/TopicStatistics"; };
328 const char *
getMD5(){
return "10152ed868c5097a5e2e4a89d7daa710"; };
uint32_t nsec
Definition: time.h:50
uint32_t sec
Definition: time.h:50
const char * node_pub
Definition: TopicStatistics.h:18
virtual int serialize(unsigned char *outbuffer) const
Definition: TopicStatistics.h:50
int32_t sec
Definition: duration.h:48
ros::Duration stamp_age_max
Definition: TopicStatistics.h:30
ros::Duration period_stddev
Definition: TopicStatistics.h:26
const char * getMD5()
Definition: TopicStatistics.h:328
TopicStatistics()
Definition: TopicStatistics.h:32
Definition: TopicStatistics.h:14
ros::Duration period_max
Definition: TopicStatistics.h:27
int32_t dropped_msgs
Definition: TopicStatistics.h:23
ros::Time window_start
Definition: TopicStatistics.h:20
const char * node_sub
Definition: TopicStatistics.h:19
ros::Duration stamp_age_mean
Definition: TopicStatistics.h:28
const char * topic
Definition: TopicStatistics.h:17
Definition: duration.h:45
const char * getType()
Definition: TopicStatistics.h:327
int32_t nsec
Definition: duration.h:48
ros::Duration period_mean
Definition: TopicStatistics.h:25
int32_t traffic
Definition: TopicStatistics.h:24
ros::Duration stamp_age_stddev
Definition: TopicStatistics.h:29
virtual int deserialize(unsigned char *inbuffer)
Definition: TopicStatistics.h:181
ros::Time window_stop
Definition: TopicStatistics.h:21
int32_t delivered_msgs
Definition: TopicStatistics.h:22