ros melodic library with custom message

Dependents:   Robot_team1_QEI_Douglas Robot_team1

Committer:
florine_van
Date:
Tue Dec 03 09:39:29 2019 +0000
Revision:
3:b964e3f71102
Parent:
0:020db18a476d
Clean code and remove unused lines

Who changed what in which revision?

UserRevisionLine numberNew contents of line
scarter1 0:020db18a476d 1 #ifndef _ROS_rosgraph_msgs_TopicStatistics_h
scarter1 0:020db18a476d 2 #define _ROS_rosgraph_msgs_TopicStatistics_h
scarter1 0:020db18a476d 3
scarter1 0:020db18a476d 4 #include <stdint.h>
scarter1 0:020db18a476d 5 #include <string.h>
scarter1 0:020db18a476d 6 #include <stdlib.h>
scarter1 0:020db18a476d 7 #include "ros/msg.h"
scarter1 0:020db18a476d 8 #include "ros/time.h"
scarter1 0:020db18a476d 9 #include "ros/duration.h"
scarter1 0:020db18a476d 10
scarter1 0:020db18a476d 11 namespace rosgraph_msgs
scarter1 0:020db18a476d 12 {
scarter1 0:020db18a476d 13
scarter1 0:020db18a476d 14 class TopicStatistics : public ros::Msg
scarter1 0:020db18a476d 15 {
scarter1 0:020db18a476d 16 public:
scarter1 0:020db18a476d 17 typedef const char* _topic_type;
scarter1 0:020db18a476d 18 _topic_type topic;
scarter1 0:020db18a476d 19 typedef const char* _node_pub_type;
scarter1 0:020db18a476d 20 _node_pub_type node_pub;
scarter1 0:020db18a476d 21 typedef const char* _node_sub_type;
scarter1 0:020db18a476d 22 _node_sub_type node_sub;
scarter1 0:020db18a476d 23 typedef ros::Time _window_start_type;
scarter1 0:020db18a476d 24 _window_start_type window_start;
scarter1 0:020db18a476d 25 typedef ros::Time _window_stop_type;
scarter1 0:020db18a476d 26 _window_stop_type window_stop;
scarter1 0:020db18a476d 27 typedef int32_t _delivered_msgs_type;
scarter1 0:020db18a476d 28 _delivered_msgs_type delivered_msgs;
scarter1 0:020db18a476d 29 typedef int32_t _dropped_msgs_type;
scarter1 0:020db18a476d 30 _dropped_msgs_type dropped_msgs;
scarter1 0:020db18a476d 31 typedef int32_t _traffic_type;
scarter1 0:020db18a476d 32 _traffic_type traffic;
scarter1 0:020db18a476d 33 typedef ros::Duration _period_mean_type;
scarter1 0:020db18a476d 34 _period_mean_type period_mean;
scarter1 0:020db18a476d 35 typedef ros::Duration _period_stddev_type;
scarter1 0:020db18a476d 36 _period_stddev_type period_stddev;
scarter1 0:020db18a476d 37 typedef ros::Duration _period_max_type;
scarter1 0:020db18a476d 38 _period_max_type period_max;
scarter1 0:020db18a476d 39 typedef ros::Duration _stamp_age_mean_type;
scarter1 0:020db18a476d 40 _stamp_age_mean_type stamp_age_mean;
scarter1 0:020db18a476d 41 typedef ros::Duration _stamp_age_stddev_type;
scarter1 0:020db18a476d 42 _stamp_age_stddev_type stamp_age_stddev;
scarter1 0:020db18a476d 43 typedef ros::Duration _stamp_age_max_type;
scarter1 0:020db18a476d 44 _stamp_age_max_type stamp_age_max;
scarter1 0:020db18a476d 45
scarter1 0:020db18a476d 46 TopicStatistics():
scarter1 0:020db18a476d 47 topic(""),
scarter1 0:020db18a476d 48 node_pub(""),
scarter1 0:020db18a476d 49 node_sub(""),
scarter1 0:020db18a476d 50 window_start(),
scarter1 0:020db18a476d 51 window_stop(),
scarter1 0:020db18a476d 52 delivered_msgs(0),
scarter1 0:020db18a476d 53 dropped_msgs(0),
scarter1 0:020db18a476d 54 traffic(0),
scarter1 0:020db18a476d 55 period_mean(),
scarter1 0:020db18a476d 56 period_stddev(),
scarter1 0:020db18a476d 57 period_max(),
scarter1 0:020db18a476d 58 stamp_age_mean(),
scarter1 0:020db18a476d 59 stamp_age_stddev(),
scarter1 0:020db18a476d 60 stamp_age_max()
scarter1 0:020db18a476d 61 {
scarter1 0:020db18a476d 62 }
scarter1 0:020db18a476d 63
scarter1 0:020db18a476d 64 virtual int serialize(unsigned char *outbuffer) const
scarter1 0:020db18a476d 65 {
scarter1 0:020db18a476d 66 int offset = 0;
scarter1 0:020db18a476d 67 uint32_t length_topic = strlen(this->topic);
scarter1 0:020db18a476d 68 varToArr(outbuffer + offset, length_topic);
scarter1 0:020db18a476d 69 offset += 4;
scarter1 0:020db18a476d 70 memcpy(outbuffer + offset, this->topic, length_topic);
scarter1 0:020db18a476d 71 offset += length_topic;
scarter1 0:020db18a476d 72 uint32_t length_node_pub = strlen(this->node_pub);
scarter1 0:020db18a476d 73 varToArr(outbuffer + offset, length_node_pub);
scarter1 0:020db18a476d 74 offset += 4;
scarter1 0:020db18a476d 75 memcpy(outbuffer + offset, this->node_pub, length_node_pub);
scarter1 0:020db18a476d 76 offset += length_node_pub;
scarter1 0:020db18a476d 77 uint32_t length_node_sub = strlen(this->node_sub);
scarter1 0:020db18a476d 78 varToArr(outbuffer + offset, length_node_sub);
scarter1 0:020db18a476d 79 offset += 4;
scarter1 0:020db18a476d 80 memcpy(outbuffer + offset, this->node_sub, length_node_sub);
scarter1 0:020db18a476d 81 offset += length_node_sub;
scarter1 0:020db18a476d 82 *(outbuffer + offset + 0) = (this->window_start.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 83 *(outbuffer + offset + 1) = (this->window_start.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 84 *(outbuffer + offset + 2) = (this->window_start.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 85 *(outbuffer + offset + 3) = (this->window_start.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 86 offset += sizeof(this->window_start.sec);
scarter1 0:020db18a476d 87 *(outbuffer + offset + 0) = (this->window_start.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 88 *(outbuffer + offset + 1) = (this->window_start.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 89 *(outbuffer + offset + 2) = (this->window_start.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 90 *(outbuffer + offset + 3) = (this->window_start.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 91 offset += sizeof(this->window_start.nsec);
scarter1 0:020db18a476d 92 *(outbuffer + offset + 0) = (this->window_stop.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 93 *(outbuffer + offset + 1) = (this->window_stop.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 94 *(outbuffer + offset + 2) = (this->window_stop.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 95 *(outbuffer + offset + 3) = (this->window_stop.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 96 offset += sizeof(this->window_stop.sec);
scarter1 0:020db18a476d 97 *(outbuffer + offset + 0) = (this->window_stop.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 98 *(outbuffer + offset + 1) = (this->window_stop.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 99 *(outbuffer + offset + 2) = (this->window_stop.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 100 *(outbuffer + offset + 3) = (this->window_stop.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 101 offset += sizeof(this->window_stop.nsec);
scarter1 0:020db18a476d 102 union {
scarter1 0:020db18a476d 103 int32_t real;
scarter1 0:020db18a476d 104 uint32_t base;
scarter1 0:020db18a476d 105 } u_delivered_msgs;
scarter1 0:020db18a476d 106 u_delivered_msgs.real = this->delivered_msgs;
scarter1 0:020db18a476d 107 *(outbuffer + offset + 0) = (u_delivered_msgs.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 108 *(outbuffer + offset + 1) = (u_delivered_msgs.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 109 *(outbuffer + offset + 2) = (u_delivered_msgs.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 110 *(outbuffer + offset + 3) = (u_delivered_msgs.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 111 offset += sizeof(this->delivered_msgs);
scarter1 0:020db18a476d 112 union {
scarter1 0:020db18a476d 113 int32_t real;
scarter1 0:020db18a476d 114 uint32_t base;
scarter1 0:020db18a476d 115 } u_dropped_msgs;
scarter1 0:020db18a476d 116 u_dropped_msgs.real = this->dropped_msgs;
scarter1 0:020db18a476d 117 *(outbuffer + offset + 0) = (u_dropped_msgs.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 118 *(outbuffer + offset + 1) = (u_dropped_msgs.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 119 *(outbuffer + offset + 2) = (u_dropped_msgs.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 120 *(outbuffer + offset + 3) = (u_dropped_msgs.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 121 offset += sizeof(this->dropped_msgs);
scarter1 0:020db18a476d 122 union {
scarter1 0:020db18a476d 123 int32_t real;
scarter1 0:020db18a476d 124 uint32_t base;
scarter1 0:020db18a476d 125 } u_traffic;
scarter1 0:020db18a476d 126 u_traffic.real = this->traffic;
scarter1 0:020db18a476d 127 *(outbuffer + offset + 0) = (u_traffic.base >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 128 *(outbuffer + offset + 1) = (u_traffic.base >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 129 *(outbuffer + offset + 2) = (u_traffic.base >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 130 *(outbuffer + offset + 3) = (u_traffic.base >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 131 offset += sizeof(this->traffic);
scarter1 0:020db18a476d 132 *(outbuffer + offset + 0) = (this->period_mean.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 133 *(outbuffer + offset + 1) = (this->period_mean.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 134 *(outbuffer + offset + 2) = (this->period_mean.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 135 *(outbuffer + offset + 3) = (this->period_mean.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 136 offset += sizeof(this->period_mean.sec);
scarter1 0:020db18a476d 137 *(outbuffer + offset + 0) = (this->period_mean.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 138 *(outbuffer + offset + 1) = (this->period_mean.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 139 *(outbuffer + offset + 2) = (this->period_mean.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 140 *(outbuffer + offset + 3) = (this->period_mean.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 141 offset += sizeof(this->period_mean.nsec);
scarter1 0:020db18a476d 142 *(outbuffer + offset + 0) = (this->period_stddev.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 143 *(outbuffer + offset + 1) = (this->period_stddev.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 144 *(outbuffer + offset + 2) = (this->period_stddev.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 145 *(outbuffer + offset + 3) = (this->period_stddev.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 146 offset += sizeof(this->period_stddev.sec);
scarter1 0:020db18a476d 147 *(outbuffer + offset + 0) = (this->period_stddev.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 148 *(outbuffer + offset + 1) = (this->period_stddev.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 149 *(outbuffer + offset + 2) = (this->period_stddev.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 150 *(outbuffer + offset + 3) = (this->period_stddev.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 151 offset += sizeof(this->period_stddev.nsec);
scarter1 0:020db18a476d 152 *(outbuffer + offset + 0) = (this->period_max.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 153 *(outbuffer + offset + 1) = (this->period_max.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 154 *(outbuffer + offset + 2) = (this->period_max.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 155 *(outbuffer + offset + 3) = (this->period_max.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 156 offset += sizeof(this->period_max.sec);
scarter1 0:020db18a476d 157 *(outbuffer + offset + 0) = (this->period_max.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 158 *(outbuffer + offset + 1) = (this->period_max.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 159 *(outbuffer + offset + 2) = (this->period_max.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 160 *(outbuffer + offset + 3) = (this->period_max.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 161 offset += sizeof(this->period_max.nsec);
scarter1 0:020db18a476d 162 *(outbuffer + offset + 0) = (this->stamp_age_mean.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 163 *(outbuffer + offset + 1) = (this->stamp_age_mean.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 164 *(outbuffer + offset + 2) = (this->stamp_age_mean.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 165 *(outbuffer + offset + 3) = (this->stamp_age_mean.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 166 offset += sizeof(this->stamp_age_mean.sec);
scarter1 0:020db18a476d 167 *(outbuffer + offset + 0) = (this->stamp_age_mean.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 168 *(outbuffer + offset + 1) = (this->stamp_age_mean.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 169 *(outbuffer + offset + 2) = (this->stamp_age_mean.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 170 *(outbuffer + offset + 3) = (this->stamp_age_mean.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 171 offset += sizeof(this->stamp_age_mean.nsec);
scarter1 0:020db18a476d 172 *(outbuffer + offset + 0) = (this->stamp_age_stddev.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 173 *(outbuffer + offset + 1) = (this->stamp_age_stddev.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 174 *(outbuffer + offset + 2) = (this->stamp_age_stddev.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 175 *(outbuffer + offset + 3) = (this->stamp_age_stddev.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 176 offset += sizeof(this->stamp_age_stddev.sec);
scarter1 0:020db18a476d 177 *(outbuffer + offset + 0) = (this->stamp_age_stddev.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 178 *(outbuffer + offset + 1) = (this->stamp_age_stddev.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 179 *(outbuffer + offset + 2) = (this->stamp_age_stddev.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 180 *(outbuffer + offset + 3) = (this->stamp_age_stddev.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 181 offset += sizeof(this->stamp_age_stddev.nsec);
scarter1 0:020db18a476d 182 *(outbuffer + offset + 0) = (this->stamp_age_max.sec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 183 *(outbuffer + offset + 1) = (this->stamp_age_max.sec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 184 *(outbuffer + offset + 2) = (this->stamp_age_max.sec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 185 *(outbuffer + offset + 3) = (this->stamp_age_max.sec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 186 offset += sizeof(this->stamp_age_max.sec);
scarter1 0:020db18a476d 187 *(outbuffer + offset + 0) = (this->stamp_age_max.nsec >> (8 * 0)) & 0xFF;
scarter1 0:020db18a476d 188 *(outbuffer + offset + 1) = (this->stamp_age_max.nsec >> (8 * 1)) & 0xFF;
scarter1 0:020db18a476d 189 *(outbuffer + offset + 2) = (this->stamp_age_max.nsec >> (8 * 2)) & 0xFF;
scarter1 0:020db18a476d 190 *(outbuffer + offset + 3) = (this->stamp_age_max.nsec >> (8 * 3)) & 0xFF;
scarter1 0:020db18a476d 191 offset += sizeof(this->stamp_age_max.nsec);
scarter1 0:020db18a476d 192 return offset;
scarter1 0:020db18a476d 193 }
scarter1 0:020db18a476d 194
scarter1 0:020db18a476d 195 virtual int deserialize(unsigned char *inbuffer)
scarter1 0:020db18a476d 196 {
scarter1 0:020db18a476d 197 int offset = 0;
scarter1 0:020db18a476d 198 uint32_t length_topic;
scarter1 0:020db18a476d 199 arrToVar(length_topic, (inbuffer + offset));
scarter1 0:020db18a476d 200 offset += 4;
scarter1 0:020db18a476d 201 for(unsigned int k= offset; k< offset+length_topic; ++k){
scarter1 0:020db18a476d 202 inbuffer[k-1]=inbuffer[k];
scarter1 0:020db18a476d 203 }
scarter1 0:020db18a476d 204 inbuffer[offset+length_topic-1]=0;
scarter1 0:020db18a476d 205 this->topic = (char *)(inbuffer + offset-1);
scarter1 0:020db18a476d 206 offset += length_topic;
scarter1 0:020db18a476d 207 uint32_t length_node_pub;
scarter1 0:020db18a476d 208 arrToVar(length_node_pub, (inbuffer + offset));
scarter1 0:020db18a476d 209 offset += 4;
scarter1 0:020db18a476d 210 for(unsigned int k= offset; k< offset+length_node_pub; ++k){
scarter1 0:020db18a476d 211 inbuffer[k-1]=inbuffer[k];
scarter1 0:020db18a476d 212 }
scarter1 0:020db18a476d 213 inbuffer[offset+length_node_pub-1]=0;
scarter1 0:020db18a476d 214 this->node_pub = (char *)(inbuffer + offset-1);
scarter1 0:020db18a476d 215 offset += length_node_pub;
scarter1 0:020db18a476d 216 uint32_t length_node_sub;
scarter1 0:020db18a476d 217 arrToVar(length_node_sub, (inbuffer + offset));
scarter1 0:020db18a476d 218 offset += 4;
scarter1 0:020db18a476d 219 for(unsigned int k= offset; k< offset+length_node_sub; ++k){
scarter1 0:020db18a476d 220 inbuffer[k-1]=inbuffer[k];
scarter1 0:020db18a476d 221 }
scarter1 0:020db18a476d 222 inbuffer[offset+length_node_sub-1]=0;
scarter1 0:020db18a476d 223 this->node_sub = (char *)(inbuffer + offset-1);
scarter1 0:020db18a476d 224 offset += length_node_sub;
scarter1 0:020db18a476d 225 this->window_start.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 226 this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 227 this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 228 this->window_start.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 229 offset += sizeof(this->window_start.sec);
scarter1 0:020db18a476d 230 this->window_start.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 231 this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 232 this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 233 this->window_start.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 234 offset += sizeof(this->window_start.nsec);
scarter1 0:020db18a476d 235 this->window_stop.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 236 this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 237 this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 238 this->window_stop.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 239 offset += sizeof(this->window_stop.sec);
scarter1 0:020db18a476d 240 this->window_stop.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 241 this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 242 this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 243 this->window_stop.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 244 offset += sizeof(this->window_stop.nsec);
scarter1 0:020db18a476d 245 union {
scarter1 0:020db18a476d 246 int32_t real;
scarter1 0:020db18a476d 247 uint32_t base;
scarter1 0:020db18a476d 248 } u_delivered_msgs;
scarter1 0:020db18a476d 249 u_delivered_msgs.base = 0;
scarter1 0:020db18a476d 250 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 251 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 252 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 253 u_delivered_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 254 this->delivered_msgs = u_delivered_msgs.real;
scarter1 0:020db18a476d 255 offset += sizeof(this->delivered_msgs);
scarter1 0:020db18a476d 256 union {
scarter1 0:020db18a476d 257 int32_t real;
scarter1 0:020db18a476d 258 uint32_t base;
scarter1 0:020db18a476d 259 } u_dropped_msgs;
scarter1 0:020db18a476d 260 u_dropped_msgs.base = 0;
scarter1 0:020db18a476d 261 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 262 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 263 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 264 u_dropped_msgs.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 265 this->dropped_msgs = u_dropped_msgs.real;
scarter1 0:020db18a476d 266 offset += sizeof(this->dropped_msgs);
scarter1 0:020db18a476d 267 union {
scarter1 0:020db18a476d 268 int32_t real;
scarter1 0:020db18a476d 269 uint32_t base;
scarter1 0:020db18a476d 270 } u_traffic;
scarter1 0:020db18a476d 271 u_traffic.base = 0;
scarter1 0:020db18a476d 272 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
scarter1 0:020db18a476d 273 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 274 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 275 u_traffic.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 276 this->traffic = u_traffic.real;
scarter1 0:020db18a476d 277 offset += sizeof(this->traffic);
scarter1 0:020db18a476d 278 this->period_mean.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 279 this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 280 this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 281 this->period_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 282 offset += sizeof(this->period_mean.sec);
scarter1 0:020db18a476d 283 this->period_mean.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 284 this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 285 this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 286 this->period_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 287 offset += sizeof(this->period_mean.nsec);
scarter1 0:020db18a476d 288 this->period_stddev.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 289 this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 290 this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 291 this->period_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 292 offset += sizeof(this->period_stddev.sec);
scarter1 0:020db18a476d 293 this->period_stddev.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 294 this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 295 this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 296 this->period_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 297 offset += sizeof(this->period_stddev.nsec);
scarter1 0:020db18a476d 298 this->period_max.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 299 this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 300 this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 301 this->period_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 302 offset += sizeof(this->period_max.sec);
scarter1 0:020db18a476d 303 this->period_max.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 304 this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 305 this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 306 this->period_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 307 offset += sizeof(this->period_max.nsec);
scarter1 0:020db18a476d 308 this->stamp_age_mean.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 309 this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 310 this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 311 this->stamp_age_mean.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 312 offset += sizeof(this->stamp_age_mean.sec);
scarter1 0:020db18a476d 313 this->stamp_age_mean.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 314 this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 315 this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 316 this->stamp_age_mean.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 317 offset += sizeof(this->stamp_age_mean.nsec);
scarter1 0:020db18a476d 318 this->stamp_age_stddev.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 319 this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 320 this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 321 this->stamp_age_stddev.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 322 offset += sizeof(this->stamp_age_stddev.sec);
scarter1 0:020db18a476d 323 this->stamp_age_stddev.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 324 this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 325 this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 326 this->stamp_age_stddev.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 327 offset += sizeof(this->stamp_age_stddev.nsec);
scarter1 0:020db18a476d 328 this->stamp_age_max.sec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 329 this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 330 this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 331 this->stamp_age_max.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 332 offset += sizeof(this->stamp_age_max.sec);
scarter1 0:020db18a476d 333 this->stamp_age_max.nsec = ((uint32_t) (*(inbuffer + offset)));
scarter1 0:020db18a476d 334 this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
scarter1 0:020db18a476d 335 this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
scarter1 0:020db18a476d 336 this->stamp_age_max.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
scarter1 0:020db18a476d 337 offset += sizeof(this->stamp_age_max.nsec);
scarter1 0:020db18a476d 338 return offset;
scarter1 0:020db18a476d 339 }
scarter1 0:020db18a476d 340
scarter1 0:020db18a476d 341 const char * getType(){ return "rosgraph_msgs/TopicStatistics"; };
scarter1 0:020db18a476d 342 const char * getMD5(){ return "10152ed868c5097a5e2e4a89d7daa710"; };
scarter1 0:020db18a476d 343
scarter1 0:020db18a476d 344 };
scarter1 0:020db18a476d 345
scarter1 0:020db18a476d 346 }
scarter1 0:020db18a476d 347 #endif