00001
00002 #ifndef NETWORK_MONITOR_UDP_MESSAGE_UDPMONITOR_H
00003 #define NETWORK_MONITOR_UDP_MESSAGE_UDPMONITOR_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014
00015 namespace network_monitor_udp
00016 {
00017 template <class ContainerAllocator>
00018 struct UdpMonitor_ : public ros::Message
00019 {
00020 typedef UdpMonitor_<ContainerAllocator> Type;
00021
00022 UdpMonitor_()
00023 : header()
00024 , server_host()
00025 , server_port(0)
00026 , source_interface()
00027 , packet_rate(0.0)
00028 , packet_size(0)
00029 , latency_bin_limits()
00030 , latency_bin_values()
00031 , average_latency_fresh(0.0)
00032 , loss_fresh(0.0)
00033 , average_latency_all(0.0)
00034 {
00035 }
00036
00037 UdpMonitor_(const ContainerAllocator& _alloc)
00038 : header(_alloc)
00039 , server_host(_alloc)
00040 , server_port(0)
00041 , source_interface(_alloc)
00042 , packet_rate(0.0)
00043 , packet_size(0)
00044 , latency_bin_limits(_alloc)
00045 , latency_bin_values(_alloc)
00046 , average_latency_fresh(0.0)
00047 , loss_fresh(0.0)
00048 , average_latency_all(0.0)
00049 {
00050 }
00051
00052 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00053 ::std_msgs::Header_<ContainerAllocator> header;
00054
00055 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _server_host_type;
00056 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > server_host;
00057
00058 typedef uint32_t _server_port_type;
00059 uint32_t server_port;
00060
00061 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _source_interface_type;
00062 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > source_interface;
00063
00064 typedef float _packet_rate_type;
00065 float packet_rate;
00066
00067 typedef uint32_t _packet_size_type;
00068 uint32_t packet_size;
00069
00070 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _latency_bin_limits_type;
00071 std::vector<float, typename ContainerAllocator::template rebind<float>::other > latency_bin_limits;
00072
00073 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _latency_bin_values_type;
00074 std::vector<float, typename ContainerAllocator::template rebind<float>::other > latency_bin_values;
00075
00076 typedef float _average_latency_fresh_type;
00077 float average_latency_fresh;
00078
00079 typedef float _loss_fresh_type;
00080 float loss_fresh;
00081
00082 typedef float _average_latency_all_type;
00083 float average_latency_all;
00084
00085
00086 ROS_DEPRECATED uint32_t get_latency_bin_limits_size() const { return (uint32_t)latency_bin_limits.size(); }
00087 ROS_DEPRECATED void set_latency_bin_limits_size(uint32_t size) { latency_bin_limits.resize((size_t)size); }
00088 ROS_DEPRECATED void get_latency_bin_limits_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->latency_bin_limits; }
00089 ROS_DEPRECATED void set_latency_bin_limits_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->latency_bin_limits = vec; }
00090 ROS_DEPRECATED uint32_t get_latency_bin_values_size() const { return (uint32_t)latency_bin_values.size(); }
00091 ROS_DEPRECATED void set_latency_bin_values_size(uint32_t size) { latency_bin_values.resize((size_t)size); }
00092 ROS_DEPRECATED void get_latency_bin_values_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->latency_bin_values; }
00093 ROS_DEPRECATED void set_latency_bin_values_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->latency_bin_values = vec; }
00094 private:
00095 static const char* __s_getDataType_() { return "network_monitor_udp/UdpMonitor"; }
00096 public:
00097 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00098
00099 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00100
00101 private:
00102 static const char* __s_getMD5Sum_() { return "61e78eeecffb9257ae40ca291408f8cc"; }
00103 public:
00104 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00105
00106 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00107
00108 private:
00109 static const char* __s_getMessageDefinition_() { return "Header header\n\
00110 \n\
00111 # Summary of the client settings\n\
00112 string server_host\n\
00113 uint32 server_port\n\
00114 string source_interface\n\
00115 float32 packet_rate\n\
00116 uint32 packet_size\n\
00117 \n\
00118 # Proportion of packets that have latencies within a bin. The first bin\n\
00119 # starts at zero, bins end at the value in latency_bin_values. \n\
00120 # len(latency_bin_values) = len(latency_bin_limits) + 1\n\
00121 float32[] latency_bin_limits\n\
00122 float32[] latency_bin_values\n\
00123 \n\
00124 # Average latency in seconds and loss rate (between 0 and 1) for packets\n\
00125 # that fall within one of the bins.\n\
00126 float32 average_latency_fresh\n\
00127 float32 loss_fresh\n\
00128 \n\
00129 # Average latency in seconds for all\n\
00130 # received packets, including very old ones.\n\
00131 float32 average_latency_all\n\
00132 \n\
00133 ================================================================================\n\
00134 MSG: std_msgs/Header\n\
00135 # Standard metadata for higher-level stamped data types.\n\
00136 # This is generally used to communicate timestamped data \n\
00137 # in a particular coordinate frame.\n\
00138 # \n\
00139 # sequence ID: consecutively increasing ID \n\
00140 uint32 seq\n\
00141 #Two-integer timestamp that is expressed as:\n\
00142 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00143 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00144 # time-handling sugar is provided by the client library\n\
00145 time stamp\n\
00146 #Frame this data is associated with\n\
00147 # 0: no frame\n\
00148 # 1: global frame\n\
00149 string frame_id\n\
00150 \n\
00151 "; }
00152 public:
00153 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00154
00155 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00156
00157 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00158 {
00159 ros::serialization::OStream stream(write_ptr, 1000000000);
00160 ros::serialization::serialize(stream, header);
00161 ros::serialization::serialize(stream, server_host);
00162 ros::serialization::serialize(stream, server_port);
00163 ros::serialization::serialize(stream, source_interface);
00164 ros::serialization::serialize(stream, packet_rate);
00165 ros::serialization::serialize(stream, packet_size);
00166 ros::serialization::serialize(stream, latency_bin_limits);
00167 ros::serialization::serialize(stream, latency_bin_values);
00168 ros::serialization::serialize(stream, average_latency_fresh);
00169 ros::serialization::serialize(stream, loss_fresh);
00170 ros::serialization::serialize(stream, average_latency_all);
00171 return stream.getData();
00172 }
00173
00174 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00175 {
00176 ros::serialization::IStream stream(read_ptr, 1000000000);
00177 ros::serialization::deserialize(stream, header);
00178 ros::serialization::deserialize(stream, server_host);
00179 ros::serialization::deserialize(stream, server_port);
00180 ros::serialization::deserialize(stream, source_interface);
00181 ros::serialization::deserialize(stream, packet_rate);
00182 ros::serialization::deserialize(stream, packet_size);
00183 ros::serialization::deserialize(stream, latency_bin_limits);
00184 ros::serialization::deserialize(stream, latency_bin_values);
00185 ros::serialization::deserialize(stream, average_latency_fresh);
00186 ros::serialization::deserialize(stream, loss_fresh);
00187 ros::serialization::deserialize(stream, average_latency_all);
00188 return stream.getData();
00189 }
00190
00191 ROS_DEPRECATED virtual uint32_t serializationLength() const
00192 {
00193 uint32_t size = 0;
00194 size += ros::serialization::serializationLength(header);
00195 size += ros::serialization::serializationLength(server_host);
00196 size += ros::serialization::serializationLength(server_port);
00197 size += ros::serialization::serializationLength(source_interface);
00198 size += ros::serialization::serializationLength(packet_rate);
00199 size += ros::serialization::serializationLength(packet_size);
00200 size += ros::serialization::serializationLength(latency_bin_limits);
00201 size += ros::serialization::serializationLength(latency_bin_values);
00202 size += ros::serialization::serializationLength(average_latency_fresh);
00203 size += ros::serialization::serializationLength(loss_fresh);
00204 size += ros::serialization::serializationLength(average_latency_all);
00205 return size;
00206 }
00207
00208 typedef boost::shared_ptr< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > Ptr;
00209 typedef boost::shared_ptr< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> const> ConstPtr;
00210 };
00211 typedef ::network_monitor_udp::UdpMonitor_<std::allocator<void> > UdpMonitor;
00212
00213 typedef boost::shared_ptr< ::network_monitor_udp::UdpMonitor> UdpMonitorPtr;
00214 typedef boost::shared_ptr< ::network_monitor_udp::UdpMonitor const> UdpMonitorConstPtr;
00215
00216
00217 template<typename ContainerAllocator>
00218 std::ostream& operator<<(std::ostream& s, const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> & v)
00219 {
00220 ros::message_operations::Printer< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> >::stream(s, "", v);
00221 return s;}
00222
00223 }
00224
00225 namespace ros
00226 {
00227 namespace message_traits
00228 {
00229 template<class ContainerAllocator>
00230 struct MD5Sum< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > {
00231 static const char* value()
00232 {
00233 return "61e78eeecffb9257ae40ca291408f8cc";
00234 }
00235
00236 static const char* value(const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> &) { return value(); }
00237 static const uint64_t static_value1 = 0x61e78eeecffb9257ULL;
00238 static const uint64_t static_value2 = 0xae40ca291408f8ccULL;
00239 };
00240
00241 template<class ContainerAllocator>
00242 struct DataType< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > {
00243 static const char* value()
00244 {
00245 return "network_monitor_udp/UdpMonitor";
00246 }
00247
00248 static const char* value(const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> &) { return value(); }
00249 };
00250
00251 template<class ContainerAllocator>
00252 struct Definition< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > {
00253 static const char* value()
00254 {
00255 return "Header header\n\
00256 \n\
00257 # Summary of the client settings\n\
00258 string server_host\n\
00259 uint32 server_port\n\
00260 string source_interface\n\
00261 float32 packet_rate\n\
00262 uint32 packet_size\n\
00263 \n\
00264 # Proportion of packets that have latencies within a bin. The first bin\n\
00265 # starts at zero, bins end at the value in latency_bin_values. \n\
00266 # len(latency_bin_values) = len(latency_bin_limits) + 1\n\
00267 float32[] latency_bin_limits\n\
00268 float32[] latency_bin_values\n\
00269 \n\
00270 # Average latency in seconds and loss rate (between 0 and 1) for packets\n\
00271 # that fall within one of the bins.\n\
00272 float32 average_latency_fresh\n\
00273 float32 loss_fresh\n\
00274 \n\
00275 # Average latency in seconds for all\n\
00276 # received packets, including very old ones.\n\
00277 float32 average_latency_all\n\
00278 \n\
00279 ================================================================================\n\
00280 MSG: std_msgs/Header\n\
00281 # Standard metadata for higher-level stamped data types.\n\
00282 # This is generally used to communicate timestamped data \n\
00283 # in a particular coordinate frame.\n\
00284 # \n\
00285 # sequence ID: consecutively increasing ID \n\
00286 uint32 seq\n\
00287 #Two-integer timestamp that is expressed as:\n\
00288 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00289 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00290 # time-handling sugar is provided by the client library\n\
00291 time stamp\n\
00292 #Frame this data is associated with\n\
00293 # 0: no frame\n\
00294 # 1: global frame\n\
00295 string frame_id\n\
00296 \n\
00297 ";
00298 }
00299
00300 static const char* value(const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> &) { return value(); }
00301 };
00302
00303 template<class ContainerAllocator> struct HasHeader< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > : public TrueType {};
00304 template<class ContainerAllocator> struct HasHeader< const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> > : public TrueType {};
00305 }
00306 }
00307
00308 namespace ros
00309 {
00310 namespace serialization
00311 {
00312
00313 template<class ContainerAllocator> struct Serializer< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> >
00314 {
00315 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00316 {
00317 stream.next(m.header);
00318 stream.next(m.server_host);
00319 stream.next(m.server_port);
00320 stream.next(m.source_interface);
00321 stream.next(m.packet_rate);
00322 stream.next(m.packet_size);
00323 stream.next(m.latency_bin_limits);
00324 stream.next(m.latency_bin_values);
00325 stream.next(m.average_latency_fresh);
00326 stream.next(m.loss_fresh);
00327 stream.next(m.average_latency_all);
00328 }
00329
00330 ROS_DECLARE_ALLINONE_SERIALIZER;
00331 };
00332 }
00333 }
00334
00335 namespace ros
00336 {
00337 namespace message_operations
00338 {
00339
00340 template<class ContainerAllocator>
00341 struct Printer< ::network_monitor_udp::UdpMonitor_<ContainerAllocator> >
00342 {
00343 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::network_monitor_udp::UdpMonitor_<ContainerAllocator> & v)
00344 {
00345 s << indent << "header: ";
00346 s << std::endl;
00347 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00348 s << indent << "server_host: ";
00349 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.server_host);
00350 s << indent << "server_port: ";
00351 Printer<uint32_t>::stream(s, indent + " ", v.server_port);
00352 s << indent << "source_interface: ";
00353 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.source_interface);
00354 s << indent << "packet_rate: ";
00355 Printer<float>::stream(s, indent + " ", v.packet_rate);
00356 s << indent << "packet_size: ";
00357 Printer<uint32_t>::stream(s, indent + " ", v.packet_size);
00358 s << indent << "latency_bin_limits[]" << std::endl;
00359 for (size_t i = 0; i < v.latency_bin_limits.size(); ++i)
00360 {
00361 s << indent << " latency_bin_limits[" << i << "]: ";
00362 Printer<float>::stream(s, indent + " ", v.latency_bin_limits[i]);
00363 }
00364 s << indent << "latency_bin_values[]" << std::endl;
00365 for (size_t i = 0; i < v.latency_bin_values.size(); ++i)
00366 {
00367 s << indent << " latency_bin_values[" << i << "]: ";
00368 Printer<float>::stream(s, indent + " ", v.latency_bin_values[i]);
00369 }
00370 s << indent << "average_latency_fresh: ";
00371 Printer<float>::stream(s, indent + " ", v.average_latency_fresh);
00372 s << indent << "loss_fresh: ";
00373 Printer<float>::stream(s, indent + " ", v.loss_fresh);
00374 s << indent << "average_latency_all: ";
00375 Printer<float>::stream(s, indent + " ", v.average_latency_all);
00376 }
00377 };
00378
00379
00380 }
00381 }
00382
00383 #endif // NETWORK_MONITOR_UDP_MESSAGE_UDPMONITOR_H
00384