00001
00002 #ifndef MULTI_INTERFACE_ROAM_MESSAGE_INTERFACESTATUS_H
00003 #define MULTI_INTERFACE_ROAM_MESSAGE_INTERFACESTATUS_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "wpa_supplicant_node/Bss.h"
00018
00019 namespace multi_interface_roam
00020 {
00021 template <class ContainerAllocator>
00022 struct InterfaceStatus_ {
00023 typedef InterfaceStatus_<ContainerAllocator> Type;
00024
00025 InterfaceStatus_()
00026 : pretty_name()
00027 , interface()
00028 , state(0)
00029 , active_interface_rank(0)
00030 , goodness(0.0)
00031 , reliability(0.0)
00032 , score(0.0)
00033 , prescore(0.0)
00034 , latency(0.0)
00035 , loss(0.0)
00036 , bss()
00037 {
00038 }
00039
00040 InterfaceStatus_(const ContainerAllocator& _alloc)
00041 : pretty_name(_alloc)
00042 , interface(_alloc)
00043 , state(0)
00044 , active_interface_rank(0)
00045 , goodness(0.0)
00046 , reliability(0.0)
00047 , score(0.0)
00048 , prescore(0.0)
00049 , latency(0.0)
00050 , loss(0.0)
00051 , bss(_alloc)
00052 {
00053 }
00054
00055 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _pretty_name_type;
00056 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > pretty_name;
00057
00058 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _interface_type;
00059 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > interface;
00060
00061 typedef int8_t _state_type;
00062 int8_t state;
00063
00064 typedef int32_t _active_interface_rank_type;
00065 int32_t active_interface_rank;
00066
00067 typedef float _goodness_type;
00068 float goodness;
00069
00070 typedef float _reliability_type;
00071 float reliability;
00072
00073 typedef float _score_type;
00074 float score;
00075
00076 typedef float _prescore_type;
00077 float prescore;
00078
00079 typedef float _latency_type;
00080 float latency;
00081
00082 typedef float _loss_type;
00083 float loss;
00084
00085 typedef ::wpa_supplicant_node::Bss_<ContainerAllocator> _bss_type;
00086 ::wpa_supplicant_node::Bss_<ContainerAllocator> bss;
00087
00088 enum { STATE_NO_INTERFACE = -1 };
00089 enum { STATE_PLUGGED = 0 };
00090 enum { STATE_UP = 1 };
00091 enum { STATE_LINK = 2 };
00092 enum { STATE_LINK_ADDR = 3 };
00093 enum { STATE_ADDR = 4 };
00094 enum { STATE_PINGING = 5 };
00095
00096 private:
00097 static const char* __s_getDataType_() { return "multi_interface_roam/InterfaceStatus"; }
00098 public:
00099 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00100
00101 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00102
00103 private:
00104 static const char* __s_getMD5Sum_() { return "06c40304c1d0cdb57b32ba7783a19554"; }
00105 public:
00106 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00107
00108 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00109
00110 private:
00111 static const char* __s_getMessageDefinition_() { return "int8 STATE_NO_INTERFACE = -1 # The interface does not exist.\n\
00112 int8 STATE_PLUGGED = 0 # The interface exists.\n\
00113 int8 STATE_UP = 1 # The interface is up.\n\
00114 int8 STATE_LINK = 2 # The interface has a link.\n\
00115 int8 STATE_LINK_ADDR = 3 # The interface has a link, and the link has an address.\n\
00116 int8 STATE_ADDR = 4 # The interface has an address.\n\
00117 int8 STATE_PINGING = 5 # Ping packets are making it through.\n\
00118 \n\
00119 string pretty_name # The pretty name of the interface.\n\
00120 string interface # The name of the interface.\n\
00121 int8 state # The state (defined above).\n\
00122 int32 active_interface_rank # The rank among active interfaces (e.g. 0 for the best active interface) or -1 if inactive\n\
00123 float32 goodness # How well this interface is sending packets.\n\
00124 float32 reliability # How reliable this interface is expected to be.\n\
00125 float32 score # The score use to rank interfaces.\n\
00126 float32 prescore # The score use to rank interfaces without penalizing radios that are not active.\n\
00127 float32 latency # Latency of ping packets.\n\
00128 float32 loss # Loss of ping packets.\n\
00129 wpa_supplicant_node/Bss bss # Current BSS (for a wireless network)\n\
00130 \n\
00131 ================================================================================\n\
00132 MSG: wpa_supplicant_node/Bss\n\
00133 time stamp\n\
00134 string ssid\n\
00135 uint8[6] bssid\n\
00136 int32 frequency # In MHz\n\
00137 int16 beacon_interval\n\
00138 int16 capabilities\n\
00139 int32 quality\n\
00140 int32 noise\n\
00141 int32 level\n\
00142 SecurityProperties wpa\n\
00143 SecurityProperties rsn\n\
00144 \n\
00145 #InformationElement []ies\n\
00146 #InformationElement []beacon_ies\n\
00147 # flags\n\
00148 # tsf\n\
00149 # age\n\
00150 \n\
00151 ================================================================================\n\
00152 MSG: wpa_supplicant_node/SecurityProperties\n\
00153 string[] key_mgmt\n\
00154 string[] group\n\
00155 string[] pairwise\n\
00156 \n\
00157 "; }
00158 public:
00159 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00160
00161 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00162
00163 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00164 {
00165 ros::serialization::OStream stream(write_ptr, 1000000000);
00166 ros::serialization::serialize(stream, pretty_name);
00167 ros::serialization::serialize(stream, interface);
00168 ros::serialization::serialize(stream, state);
00169 ros::serialization::serialize(stream, active_interface_rank);
00170 ros::serialization::serialize(stream, goodness);
00171 ros::serialization::serialize(stream, reliability);
00172 ros::serialization::serialize(stream, score);
00173 ros::serialization::serialize(stream, prescore);
00174 ros::serialization::serialize(stream, latency);
00175 ros::serialization::serialize(stream, loss);
00176 ros::serialization::serialize(stream, bss);
00177 return stream.getData();
00178 }
00179
00180 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00181 {
00182 ros::serialization::IStream stream(read_ptr, 1000000000);
00183 ros::serialization::deserialize(stream, pretty_name);
00184 ros::serialization::deserialize(stream, interface);
00185 ros::serialization::deserialize(stream, state);
00186 ros::serialization::deserialize(stream, active_interface_rank);
00187 ros::serialization::deserialize(stream, goodness);
00188 ros::serialization::deserialize(stream, reliability);
00189 ros::serialization::deserialize(stream, score);
00190 ros::serialization::deserialize(stream, prescore);
00191 ros::serialization::deserialize(stream, latency);
00192 ros::serialization::deserialize(stream, loss);
00193 ros::serialization::deserialize(stream, bss);
00194 return stream.getData();
00195 }
00196
00197 ROS_DEPRECATED virtual uint32_t serializationLength() const
00198 {
00199 uint32_t size = 0;
00200 size += ros::serialization::serializationLength(pretty_name);
00201 size += ros::serialization::serializationLength(interface);
00202 size += ros::serialization::serializationLength(state);
00203 size += ros::serialization::serializationLength(active_interface_rank);
00204 size += ros::serialization::serializationLength(goodness);
00205 size += ros::serialization::serializationLength(reliability);
00206 size += ros::serialization::serializationLength(score);
00207 size += ros::serialization::serializationLength(prescore);
00208 size += ros::serialization::serializationLength(latency);
00209 size += ros::serialization::serializationLength(loss);
00210 size += ros::serialization::serializationLength(bss);
00211 return size;
00212 }
00213
00214 typedef boost::shared_ptr< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> > Ptr;
00215 typedef boost::shared_ptr< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> const> ConstPtr;
00216 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00217 };
00218 typedef ::multi_interface_roam::InterfaceStatus_<std::allocator<void> > InterfaceStatus;
00219
00220 typedef boost::shared_ptr< ::multi_interface_roam::InterfaceStatus> InterfaceStatusPtr;
00221 typedef boost::shared_ptr< ::multi_interface_roam::InterfaceStatus const> InterfaceStatusConstPtr;
00222
00223
00224 template<typename ContainerAllocator>
00225 std::ostream& operator<<(std::ostream& s, const ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> & v)
00226 {
00227 ros::message_operations::Printer< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> >::stream(s, "", v);
00228 return s;}
00229
00230 }
00231
00232 namespace ros
00233 {
00234 namespace message_traits
00235 {
00236 template<class ContainerAllocator> struct IsMessage< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> > : public TrueType {};
00237 template<class ContainerAllocator> struct IsMessage< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> const> : public TrueType {};
00238 template<class ContainerAllocator>
00239 struct MD5Sum< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> > {
00240 static const char* value()
00241 {
00242 return "06c40304c1d0cdb57b32ba7783a19554";
00243 }
00244
00245 static const char* value(const ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> &) { return value(); }
00246 static const uint64_t static_value1 = 0x06c40304c1d0cdb5ULL;
00247 static const uint64_t static_value2 = 0x7b32ba7783a19554ULL;
00248 };
00249
00250 template<class ContainerAllocator>
00251 struct DataType< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> > {
00252 static const char* value()
00253 {
00254 return "multi_interface_roam/InterfaceStatus";
00255 }
00256
00257 static const char* value(const ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> &) { return value(); }
00258 };
00259
00260 template<class ContainerAllocator>
00261 struct Definition< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> > {
00262 static const char* value()
00263 {
00264 return "int8 STATE_NO_INTERFACE = -1 # The interface does not exist.\n\
00265 int8 STATE_PLUGGED = 0 # The interface exists.\n\
00266 int8 STATE_UP = 1 # The interface is up.\n\
00267 int8 STATE_LINK = 2 # The interface has a link.\n\
00268 int8 STATE_LINK_ADDR = 3 # The interface has a link, and the link has an address.\n\
00269 int8 STATE_ADDR = 4 # The interface has an address.\n\
00270 int8 STATE_PINGING = 5 # Ping packets are making it through.\n\
00271 \n\
00272 string pretty_name # The pretty name of the interface.\n\
00273 string interface # The name of the interface.\n\
00274 int8 state # The state (defined above).\n\
00275 int32 active_interface_rank # The rank among active interfaces (e.g. 0 for the best active interface) or -1 if inactive\n\
00276 float32 goodness # How well this interface is sending packets.\n\
00277 float32 reliability # How reliable this interface is expected to be.\n\
00278 float32 score # The score use to rank interfaces.\n\
00279 float32 prescore # The score use to rank interfaces without penalizing radios that are not active.\n\
00280 float32 latency # Latency of ping packets.\n\
00281 float32 loss # Loss of ping packets.\n\
00282 wpa_supplicant_node/Bss bss # Current BSS (for a wireless network)\n\
00283 \n\
00284 ================================================================================\n\
00285 MSG: wpa_supplicant_node/Bss\n\
00286 time stamp\n\
00287 string ssid\n\
00288 uint8[6] bssid\n\
00289 int32 frequency # In MHz\n\
00290 int16 beacon_interval\n\
00291 int16 capabilities\n\
00292 int32 quality\n\
00293 int32 noise\n\
00294 int32 level\n\
00295 SecurityProperties wpa\n\
00296 SecurityProperties rsn\n\
00297 \n\
00298 #InformationElement []ies\n\
00299 #InformationElement []beacon_ies\n\
00300 # flags\n\
00301 # tsf\n\
00302 # age\n\
00303 \n\
00304 ================================================================================\n\
00305 MSG: wpa_supplicant_node/SecurityProperties\n\
00306 string[] key_mgmt\n\
00307 string[] group\n\
00308 string[] pairwise\n\
00309 \n\
00310 ";
00311 }
00312
00313 static const char* value(const ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> &) { return value(); }
00314 };
00315
00316 }
00317 }
00318
00319 namespace ros
00320 {
00321 namespace serialization
00322 {
00323
00324 template<class ContainerAllocator> struct Serializer< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> >
00325 {
00326 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00327 {
00328 stream.next(m.pretty_name);
00329 stream.next(m.interface);
00330 stream.next(m.state);
00331 stream.next(m.active_interface_rank);
00332 stream.next(m.goodness);
00333 stream.next(m.reliability);
00334 stream.next(m.score);
00335 stream.next(m.prescore);
00336 stream.next(m.latency);
00337 stream.next(m.loss);
00338 stream.next(m.bss);
00339 }
00340
00341 ROS_DECLARE_ALLINONE_SERIALIZER;
00342 };
00343 }
00344 }
00345
00346 namespace ros
00347 {
00348 namespace message_operations
00349 {
00350
00351 template<class ContainerAllocator>
00352 struct Printer< ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> >
00353 {
00354 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::multi_interface_roam::InterfaceStatus_<ContainerAllocator> & v)
00355 {
00356 s << indent << "pretty_name: ";
00357 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.pretty_name);
00358 s << indent << "interface: ";
00359 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.interface);
00360 s << indent << "state: ";
00361 Printer<int8_t>::stream(s, indent + " ", v.state);
00362 s << indent << "active_interface_rank: ";
00363 Printer<int32_t>::stream(s, indent + " ", v.active_interface_rank);
00364 s << indent << "goodness: ";
00365 Printer<float>::stream(s, indent + " ", v.goodness);
00366 s << indent << "reliability: ";
00367 Printer<float>::stream(s, indent + " ", v.reliability);
00368 s << indent << "score: ";
00369 Printer<float>::stream(s, indent + " ", v.score);
00370 s << indent << "prescore: ";
00371 Printer<float>::stream(s, indent + " ", v.prescore);
00372 s << indent << "latency: ";
00373 Printer<float>::stream(s, indent + " ", v.latency);
00374 s << indent << "loss: ";
00375 Printer<float>::stream(s, indent + " ", v.loss);
00376 s << indent << "bss: ";
00377 s << std::endl;
00378 Printer< ::wpa_supplicant_node::Bss_<ContainerAllocator> >::stream(s, indent + " ", v.bss);
00379 }
00380 };
00381
00382
00383 }
00384 }
00385
00386 #endif // MULTI_INTERFACE_ROAM_MESSAGE_INTERFACESTATUS_H
00387