00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef UBLOX_SERIALIZATION_UBLOX_MSGS_H
00030 #define UBLOX_SERIALIZATION_UBLOX_MSGS_H
00031
00032 #include <ublox/serialization.h>
00033 #include <ublox_msgs/ublox_msgs.h>
00034
00035 namespace ublox {
00036
00037 template <typename ContainerAllocator>
00038 struct Serializer<ublox_msgs::NavDGPS_<ContainerAllocator> >
00039 {
00040 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::NavDGPS_<ContainerAllocator> >::reference m)
00041 {
00042 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00043 stream.next(m.iTOW);
00044 stream.next(m.age);
00045 stream.next(m.baseId);
00046 stream.next(m.baseHealth);
00047 stream.next(m.numCh);
00048 stream.next(m.status);
00049 stream.next(m.reserved1);
00050 m.sv.resize(m.numCh);
00051 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::deserialize(stream, m.sv[i]);
00052 }
00053
00054 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::NavDGPS_<ContainerAllocator> >::param_type m)
00055 {
00056 return 16 + 12 * m.numCh;
00057 }
00058
00059 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::NavDGPS_<ContainerAllocator> >::param_type m)
00060 {
00061 ros::serialization::OStream stream(data, size);
00062 stream.next(m.iTOW);
00063 stream.next(m.age);
00064 stream.next(m.baseId);
00065 stream.next(m.baseHealth);
00066 stream.next(static_cast<typename ublox_msgs::NavDGPS_<ContainerAllocator>::_numCh_type>(m.sv.size()));
00067 stream.next(m.status);
00068 stream.next(m.reserved1);
00069 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::serialize(stream, m.sv[i]);
00070 }
00071 };
00072
00073 template <typename ContainerAllocator>
00074 struct Serializer<ublox_msgs::NavSBAS_<ContainerAllocator> >
00075 {
00076 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::NavSBAS_<ContainerAllocator> >::reference m)
00077 {
00078 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00079 stream.next(m.iTOW);
00080 stream.next(m.geo);
00081 stream.next(m.mode);
00082 stream.next(m.sys);
00083 stream.next(m.service);
00084 stream.next(m.cnt);
00085 stream.next(m.reserved0);
00086 m.sv.resize(m.cnt);
00087 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::deserialize(stream, m.sv[i]);
00088 }
00089
00090 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::NavSBAS_<ContainerAllocator> >::param_type m)
00091 {
00092 return 12 + 12 * m.cnt;
00093 }
00094
00095 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::NavSBAS_<ContainerAllocator> >::param_type m)
00096 {
00097 ros::serialization::OStream stream(data, size);
00098 stream.next(m.iTOW);
00099 stream.next(m.geo);
00100 stream.next(m.mode);
00101 stream.next(m.sys);
00102 stream.next(m.service);
00103 stream.next(static_cast<typename ublox_msgs::NavSBAS_<ContainerAllocator>::_cnt_type>(m.sv.size()));
00104 stream.next(m.reserved0);
00105 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::serialize(stream, m.sv[i]);
00106 }
00107 };
00108
00109 template <typename ContainerAllocator>
00110 struct Serializer<ublox_msgs::NavSVINFO_<ContainerAllocator> >
00111 {
00112 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::NavSVINFO_<ContainerAllocator> >::reference m)
00113 {
00114 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00115 stream.next(m.iTOW);
00116 stream.next(m.numCh);
00117 stream.next(m.globalFlags);
00118 stream.next(m.reserved2);
00119 m.sv.resize(m.numCh);
00120 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::deserialize(stream, m.sv[i]);
00121 }
00122
00123 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::NavSVINFO_<ContainerAllocator> >::param_type m)
00124 {
00125 return 8 + 12 * m.numCh;
00126 }
00127
00128 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::NavSVINFO_<ContainerAllocator> >::param_type m)
00129 {
00130 ros::serialization::OStream stream(data, size);
00131 stream.next(m.iTOW);
00132 stream.next(static_cast<typename ublox_msgs::NavSVINFO_<ContainerAllocator>::_numCh_type>(m.sv.size()));
00133 stream.next(m.globalFlags);
00134 stream.next(m.reserved2);
00135 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::serialize(stream, m.sv[i]);
00136 }
00137 };
00138
00139 template <typename ContainerAllocator>
00140 struct Serializer<ublox_msgs::RxmRAW_<ContainerAllocator> >
00141 {
00142 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::RxmRAW_<ContainerAllocator> >::reference m)
00143 {
00144 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00145 stream.next(m.iTOW);
00146 stream.next(m.week);
00147 stream.next(m.numSV);
00148 stream.next(m.reserved1);
00149 m.sv.resize(m.numSV);
00150 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::deserialize(stream, m.sv[i]);
00151 }
00152
00153 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::RxmRAW_<ContainerAllocator> >::param_type m)
00154 {
00155 return 8 + 24 * m.numSV;
00156 }
00157
00158 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::RxmRAW_<ContainerAllocator> >::param_type m)
00159 {
00160 ros::serialization::OStream stream(data, size);
00161 stream.next(m.iTOW);
00162 stream.next(m.week);
00163 stream.next(static_cast<typename ublox_msgs::RxmRAW_<ContainerAllocator>::_numSV_type>(m.sv.size()));
00164 stream.next(m.reserved1);
00165 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::serialize(stream, m.sv[i]);
00166 }
00167 };
00168
00169 template <typename ContainerAllocator>
00170 struct Serializer<ublox_msgs::RxmSVSI_<ContainerAllocator> >
00171 {
00172 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::RxmSVSI_<ContainerAllocator> >::reference m)
00173 {
00174 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00175 stream.next(m.iTOW);
00176 stream.next(m.week);
00177 stream.next(m.numVis);
00178 stream.next(m.numSV);
00179 m.sv.resize(m.numSV);
00180 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::deserialize(stream, m.sv[i]);
00181 }
00182
00183 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::RxmSVSI_<ContainerAllocator> >::param_type m)
00184 {
00185 return 8 + 6 * m.numSV;
00186 }
00187
00188 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::RxmSVSI_<ContainerAllocator> >::param_type m)
00189 {
00190 ros::serialization::OStream stream(data, size);
00191 stream.next(m.iTOW);
00192 stream.next(m.week);
00193 stream.next(m.numVis);
00194 stream.next(static_cast<typename ublox_msgs::RxmSVSI_<ContainerAllocator>::_numSV_type>(m.sv.size()));
00195 for(std::size_t i = 0; i < m.sv.size(); ++i) ros::serialization::serialize(stream, m.sv[i]);
00196 }
00197 };
00198
00199 template <typename ContainerAllocator>
00200 struct Serializer<ublox_msgs::RxmALM_<ContainerAllocator> >
00201 {
00202 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::RxmALM_<ContainerAllocator> >::reference m)
00203 {
00204 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00205 stream.next(m.svid);
00206 stream.next(m.week);
00207
00208 m.dwrd.clear();
00209 try {
00210 typename ublox_msgs::RxmALM_<ContainerAllocator>::_dwrd_type::value_type temp;
00211
00212 for(std::size_t i = 0; i < 8; ++i) {
00213 stream.next(temp);
00214 m.dwrd.push_back(temp);
00215 }
00216 } catch(ros::serialization::StreamOverrunException& e) {
00217 }
00218 }
00219
00220 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::RxmALM_<ContainerAllocator> >::param_type m)
00221 {
00222 return 8 + (4 * m.dwrd.size());
00223 }
00224
00225 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::RxmALM_<ContainerAllocator> >::param_type m)
00226 {
00227 ros::serialization::OStream stream(data, size);
00228 stream.next(m.svid);
00229 stream.next(m.week);
00230 for(std::size_t i = 0; i < m.dwrd.size(); ++i) ros::serialization::serialize(stream, m.dwrd[i]);
00231 }
00232 };
00233
00234 template <typename ContainerAllocator>
00235 struct Serializer<ublox_msgs::RxmEPH_<ContainerAllocator> >
00236 {
00237 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::RxmEPH_<ContainerAllocator> >::reference m)
00238 {
00239 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00240 stream.next(m.svid);
00241 stream.next(m.how);
00242 m.sf1d.clear();
00243 m.sf2d.clear();
00244 m.sf3d.clear();
00245
00246 try {
00247 typename ublox_msgs::RxmEPH_<ContainerAllocator>::_sf1d_type::value_type temp1;
00248 typename ublox_msgs::RxmEPH_<ContainerAllocator>::_sf2d_type::value_type temp2;
00249 typename ublox_msgs::RxmEPH_<ContainerAllocator>::_sf3d_type::value_type temp3;
00250
00251 for(std::size_t i = 0; i < 8; ++i) {
00252 stream.next(temp1);
00253 m.sf1d.push_back(temp1);
00254 }
00255 for(std::size_t i = 0; i < 8; ++i) {
00256 stream.next(temp2);
00257 m.sf2d.push_back(temp2);
00258 }
00259 for(std::size_t i = 0; i < 8; ++i) {
00260 stream.next(temp3);
00261 m.sf3d.push_back(temp3);
00262 }
00263 } catch(ros::serialization::StreamOverrunException& e) {
00264 }
00265 }
00266
00267 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::RxmEPH_<ContainerAllocator> >::param_type m)
00268 {
00269 return 8 + (4 * m.sf1d.size()) + (4 * m.sf2d.size()) + (4 * m.sf3d.size());
00270 }
00271
00272 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::RxmEPH_<ContainerAllocator> >::param_type m)
00273 {
00274 ros::serialization::OStream stream(data, size);
00275 stream.next(m.svid);
00276 stream.next(m.how);
00277 for(std::size_t i = 0; i < m.sf1d.size(); ++i) ros::serialization::serialize(stream, m.sf1d[i]);
00278 for(std::size_t i = 0; i < m.sf2d.size(); ++i) ros::serialization::serialize(stream, m.sf2d[i]);
00279 for(std::size_t i = 0; i < m.sf3d.size(); ++i) ros::serialization::serialize(stream, m.sf3d[i]);
00280 }
00281 };
00282
00284
00285 template <typename ContainerAllocator>
00286 struct Serializer<ublox_msgs::AidALM_<ContainerAllocator> >
00287 {
00288 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::AidALM_<ContainerAllocator> >::reference m)
00289 {
00290 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00291 stream.next(m.svid);
00292 stream.next(m.week);
00293
00294 m.dwrd.clear();
00295 try {
00296 typename ublox_msgs::AidALM_<ContainerAllocator>::_dwrd_type::value_type temp;
00297
00298 for(std::size_t i = 0; i < 8; ++i) {
00299 stream.next(temp);
00300 m.dwrd.push_back(temp);
00301 }
00302 } catch(ros::serialization::StreamOverrunException& e) {
00303 }
00304 }
00305
00306 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::AidALM_<ContainerAllocator> >::param_type m)
00307 {
00308 return 8 + (4 * m.dwrd.size());
00309 }
00310
00311 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::AidALM_<ContainerAllocator> >::param_type m)
00312 {
00313 ros::serialization::OStream stream(data, size);
00314 stream.next(m.svid);
00315 stream.next(m.week);
00316 for(std::size_t i = 0; i < m.dwrd.size(); ++i) ros::serialization::serialize(stream, m.dwrd[i]);
00317 }
00318 };
00319
00320 template <typename ContainerAllocator>
00321 struct Serializer<ublox_msgs::AidEPH_<ContainerAllocator> >
00322 {
00323 static void read(const uint8_t *data, uint32_t count, typename boost::call_traits<ublox_msgs::AidEPH_<ContainerAllocator> >::reference m)
00324 {
00325 ros::serialization::IStream stream(const_cast<uint8_t *>(data), count);
00326 stream.next(m.svid);
00327 stream.next(m.how);
00328 m.sf1d.clear();
00329 m.sf2d.clear();
00330 m.sf3d.clear();
00331
00332 try {
00333 typename ublox_msgs::AidEPH_<ContainerAllocator>::_sf1d_type::value_type temp1;
00334 typename ublox_msgs::AidEPH_<ContainerAllocator>::_sf2d_type::value_type temp2;
00335 typename ublox_msgs::AidEPH_<ContainerAllocator>::_sf3d_type::value_type temp3;
00336
00337 for(std::size_t i = 0; i < 8; ++i) {
00338 stream.next(temp1);
00339 m.sf1d.push_back(temp1);
00340 }
00341 for(std::size_t i = 0; i < 8; ++i) {
00342 stream.next(temp2);
00343 m.sf2d.push_back(temp2);
00344 }
00345 for(std::size_t i = 0; i < 8; ++i) {
00346 stream.next(temp3);
00347 m.sf3d.push_back(temp3);
00348 }
00349 } catch(ros::serialization::StreamOverrunException& e) {
00350 }
00351 }
00352
00353 static uint32_t serializedLength (typename boost::call_traits<ublox_msgs::AidEPH_<ContainerAllocator> >::param_type m)
00354 {
00355 return 8 + (4 * m.sf1d.size()) + (4 * m.sf2d.size()) + (4 * m.sf3d.size());
00356 }
00357
00358 static void write(uint8_t *data, uint32_t size, typename boost::call_traits<ublox_msgs::AidEPH_<ContainerAllocator> >::param_type m)
00359 {
00360 ros::serialization::OStream stream(data, size);
00361 stream.next(m.svid);
00362 stream.next(m.how);
00363 for(std::size_t i = 0; i < m.sf1d.size(); ++i) ros::serialization::serialize(stream, m.sf1d[i]);
00364 for(std::size_t i = 0; i < m.sf2d.size(); ++i) ros::serialization::serialize(stream, m.sf2d[i]);
00365 for(std::size_t i = 0; i < m.sf3d.size(); ++i) ros::serialization::serialize(stream, m.sf3d[i]);
00366 }
00367 };
00368
00369 }
00370
00371 #endif // UBLOX_SERIALIZATION_UBLOX_MSGS_H