30 #ifndef UBLOX_SERIALIZATION_UBLOX_MSGS_H 31 #define UBLOX_SERIALIZATION_UBLOX_MSGS_H 49 template <
typename ContainerAllocator>
51 typedef boost::call_traits<ublox_msgs::CfgDAT_<ContainerAllocator> >
53 static void read(
const uint8_t *data, uint32_t count,
54 typename CallTraits::reference m) {
56 stream.
next(m.datumNum);
57 stream.
next(m.datumName);
75 static void write(uint8_t *data, uint32_t size,
76 typename CallTraits::param_type m) {
94 template <
typename ContainerAllocator>
96 typedef ublox_msgs::CfgGNSS_<ContainerAllocator>
Msg;
99 static void read(
const uint8_t *data, uint32_t count,
100 typename CallTraits::reference m) {
102 stream.
next(m.msgVer);
103 stream.
next(m.numTrkChHw);
104 stream.
next(m.numTrkChUse);
105 stream.
next(m.numConfigBlocks);
106 m.blocks.resize(m.numConfigBlocks);
107 for(std::size_t i = 0; i < m.blocks.size(); ++i)
112 return 4 + 8 * m.numConfigBlocks;
115 static void write(uint8_t *data, uint32_t size,
116 typename CallTraits::param_type m) {
117 if(m.blocks.size() != m.numConfigBlocks) {
118 ROS_ERROR(
"CfgGNSS numConfigBlocks must equal blocks size");
121 stream.
next(m.msgVer);
122 stream.
next(m.numTrkChHw);
123 stream.
next(m.numTrkChUse);
125 static_cast<typename Msg::_numConfigBlocks_type>(m.blocks.size()));
126 for(std::size_t i = 0; i < m.blocks.size(); ++i)
134 template <
typename ContainerAllocator>
136 typedef boost::call_traits<ublox_msgs::CfgINF_<ContainerAllocator> >
139 static void read(
const uint8_t *data, uint32_t count,
140 typename CallTraits::reference m) {
142 int num_blocks = count / 10;
143 m.blocks.resize(num_blocks);
144 for(std::size_t i = 0; i < num_blocks; ++i)
149 return 10 * m.blocks.size();
152 static void write(uint8_t *data, uint32_t size,
153 typename CallTraits::param_type m) {
155 for(std::size_t i = 0; i < m.blocks.size(); ++i)
163 template <
typename ContainerAllocator>
165 typedef boost::call_traits<ublox_msgs::Inf_<ContainerAllocator> >
CallTraits;
167 static void read(
const uint8_t *data, uint32_t count,
168 typename CallTraits::reference m) {
171 for (
int i = 0; i < count; ++i)
179 static void write(uint8_t *data, uint32_t size,
180 typename CallTraits::param_type m) {
182 for(std::size_t i = 0; i < m.str.size(); ++i)
190 template <
typename ContainerAllocator>
192 typedef ublox_msgs::MonVER_<ContainerAllocator>
Msg;
195 static void read(
const uint8_t *data, uint32_t count,
196 typename CallTraits::reference m) {
198 stream.
next(m.swVersion);
199 stream.
next(m.hwVersion);
202 int N = (count - 40) / 30;
203 m.extension.reserve(N);
204 typename Msg::_extension_type::value_type ext;
205 for (
int i = 0; i < N; i++) {
208 m.extension.push_back(ext);
213 return 40 + (30 * m.extension.size());
216 static void write(uint8_t *data, uint32_t size,
217 typename CallTraits::param_type m) {
219 stream.
next(m.swVersion);
220 stream.
next(m.hwVersion);
221 for(std::size_t i = 0; i < m.extension.size(); ++i)
229 template <
typename ContainerAllocator>
231 typedef ublox_msgs::NavDGPS_<ContainerAllocator>
Msg;
234 static void read(
const uint8_t *data, uint32_t count,
235 typename CallTraits::reference m) {
239 stream.
next(m.baseId);
240 stream.
next(m.baseHealth);
241 stream.
next(m.numCh);
242 stream.
next(m.status);
243 stream.
next(m.reserved1);
244 m.sv.resize(m.numCh);
245 for(std::size_t i = 0; i < m.sv.size(); ++i)
250 return 16 + 12 * m.numCh;
253 static void write(uint8_t *data, uint32_t size,
254 typename CallTraits::param_type m) {
255 if(m.sv.size() != m.numCh) {
256 ROS_ERROR(
"NavDGPS numCh must equal sv size");
261 stream.
next(m.baseId);
262 stream.
next(m.baseHealth);
263 stream.
next(static_cast<typename Msg::_numCh_type>(m.sv.size()));
264 stream.
next(m.status);
265 stream.
next(m.reserved1);
266 for(std::size_t i = 0; i < m.sv.size(); ++i)
275 template <
typename ContainerAllocator>
277 typedef ublox_msgs::NavSBAS_<ContainerAllocator>
Msg;
280 static void read(
const uint8_t *data, uint32_t count,
281 typename CallTraits::reference m) {
287 stream.
next(m.service);
289 stream.
next(m.reserved0);
291 for(std::size_t i = 0; i < m.sv.size(); ++i)
296 return 12 + 12 * m.cnt;
299 static void write(uint8_t *data, uint32_t size,
300 typename CallTraits::param_type m) {
301 if(m.sv.size() != m.cnt) {
302 ROS_ERROR(
"NavSBAS cnt must equal sv size");
309 stream.
next(m.service);
310 stream.
next(static_cast<typename Msg::_cnt_type>(m.sv.size()));
311 stream.
next(m.reserved0);
312 for(std::size_t i = 0; i < m.sv.size(); ++i)
320 template <
typename ContainerAllocator>
322 typedef ublox_msgs::NavSAT_<ContainerAllocator>
Msg;
325 static void read(
const uint8_t *data, uint32_t count,
326 typename CallTraits::reference m) {
329 stream.
next(m.version);
330 stream.
next(m.numSvs);
331 stream.
next(m.reserved0);
332 m.sv.resize(m.numSvs);
333 for(std::size_t i = 0; i < m.sv.size(); ++i)
338 return 8 + 12 * m.numSvs;
341 static void write(uint8_t *data, uint32_t size,
342 typename CallTraits::param_type m) {
343 if(m.sv.size() != m.numSvs) {
344 ROS_ERROR(
"NavSAT numSvs must equal sv size");
348 stream.
next(m.version);
349 stream.
next(static_cast<typename Msg::_numSvs_type>(m.sv.size()));
350 stream.
next(m.reserved0);
351 for(std::size_t i = 0; i < m.sv.size(); ++i)
359 template <
typename ContainerAllocator>
361 typedef ublox_msgs::NavSVINFO_<ContainerAllocator>
Msg;
364 static void read(
const uint8_t *data, uint32_t count,
365 typename CallTraits::reference m) {
368 stream.
next(m.numCh);
369 stream.
next(m.globalFlags);
370 stream.
next(m.reserved2);
371 m.sv.resize(m.numCh);
372 for(std::size_t i = 0; i < m.sv.size(); ++i)
377 return 8 + 12 * m.numCh;
380 static void write(uint8_t *data, uint32_t size,
381 typename CallTraits::param_type m) {
382 if(m.sv.size() != m.numCh) {
383 ROS_ERROR(
"NavSVINFO numCh must equal sv size");
387 stream.
next(static_cast<typename Msg::_numCh_type>(m.sv.size()));
388 stream.
next(m.globalFlags);
389 stream.
next(m.reserved2);
390 for(std::size_t i = 0; i < m.sv.size(); ++i)
398 template <
typename ContainerAllocator>
400 typedef ublox_msgs::RxmRAW_<ContainerAllocator>
Msg;
403 static void read(
const uint8_t *data, uint32_t count,
404 typename CallTraits::reference m) {
406 stream.
next(m.rcvTOW);
408 stream.
next(m.numSV);
409 stream.
next(m.reserved1);
410 m.sv.resize(m.numSV);
411 for(std::size_t i = 0; i < m.sv.size(); ++i)
416 return 8 + 24 * m.numSV;
419 static void write(uint8_t *data, uint32_t size,
420 typename CallTraits::param_type m) {
421 if(m.sv.size() != m.numSV) {
422 ROS_ERROR(
"RxmRAW numSV must equal sv size");
425 stream.
next(m.rcvTOW);
427 stream.
next(static_cast<typename Msg::_numSV_type>(m.sv.size()));
428 stream.
next(m.reserved1);
429 for(std::size_t i = 0; i < m.sv.size(); ++i)
437 template <
typename ContainerAllocator>
439 typedef ublox_msgs::RxmRAWX_<ContainerAllocator>
Msg;
442 static void read(
const uint8_t *data, uint32_t count,
443 typename CallTraits::reference m) {
445 stream.
next(m.rcvTOW);
447 stream.
next(m.leapS);
448 stream.
next(m.numMeas);
449 stream.
next(m.recStat);
450 stream.
next(m.version);
451 stream.
next(m.reserved1);
452 m.meas.resize(m.numMeas);
453 for(std::size_t i = 0; i < m.meas.size(); ++i)
458 return 16 + 32 * m.numMeas;
461 static void write(uint8_t *data, uint32_t size,
462 typename CallTraits::param_type m) {
463 if(m.meas.size() != m.numMeas) {
464 ROS_ERROR(
"RxmRAWX numMeas must equal meas size");
467 stream.
next(m.rcvTOW);
469 stream.
next(m.leapS);
470 stream.
next(static_cast<typename Msg::_numMeas_type>(m.meas.size()));
471 stream.
next(m.recStat);
472 stream.
next(m.version);
473 stream.
next(m.reserved1);
474 for(std::size_t i = 0; i < m.meas.size(); ++i)
482 template <
typename ContainerAllocator>
484 typedef ublox_msgs::RxmSFRBX_<ContainerAllocator>
Msg;
487 static void read(
const uint8_t *data, uint32_t count,
488 typename CallTraits::reference m) {
490 stream.
next(m.gnssId);
492 stream.
next(m.reserved0);
493 stream.
next(m.freqId);
494 stream.
next(m.numWords);
496 stream.
next(m.version);
497 stream.
next(m.reserved1);
498 m.dwrd.resize(m.numWords);
499 for(std::size_t i = 0; i < m.dwrd.size(); ++i)
504 return 8 + 4 * m.numWords;
507 static void write(uint8_t *data, uint32_t size,
508 typename CallTraits::param_type m) {
509 if(m.dwrd.size() != m.numWords) {
510 ROS_ERROR(
"RxmSFRBX numWords must equal dwrd size");
513 stream.
next(m.gnssId);
515 stream.
next(m.reserved0);
516 stream.
next(m.freqId);
517 stream.
next(static_cast<typename Msg::_numWords_type>(m.dwrd.size()));
519 stream.
next(m.version);
520 stream.
next(m.reserved1);
521 for(std::size_t i = 0; i < m.dwrd.size(); ++i)
529 template <
typename ContainerAllocator>
531 typedef ublox_msgs::RxmSVSI_<ContainerAllocator>
Msg;
534 static void read(
const uint8_t *data, uint32_t count,
535 typename CallTraits::reference m) {
539 stream.
next(m.numVis);
540 stream.
next(m.numSV);
541 m.sv.resize(m.numSV);
542 for(std::size_t i = 0; i < m.sv.size(); ++i)
547 return 8 + 6 * m.numSV;
550 static void write(uint8_t *data, uint32_t size,
551 typename CallTraits::param_type m) {
552 if(m.sv.size() != m.numSV) {
553 ROS_ERROR(
"RxmSVSI numSV must equal sv size");
558 stream.
next(m.numVis);
559 stream.
next(static_cast<typename Msg::_numSV_type>(m.sv.size()));
560 for(std::size_t i = 0; i < m.sv.size(); ++i)
568 template <
typename ContainerAllocator>
570 typedef ublox_msgs::RxmALM_<ContainerAllocator>
Msg;
573 static void read(
const uint8_t *data, uint32_t count,
574 typename CallTraits::reference m) {
581 typename Msg::_dwrd_type::value_type temp;
583 for(std::size_t i = 0; i < 8; ++i) {
585 m.dwrd.push_back(temp);
591 return 8 + (4 * m.dwrd.size());
594 static void write(uint8_t *data, uint32_t size,
595 typename CallTraits::param_type m) {
599 for(std::size_t i = 0; i < m.dwrd.size(); ++i)
607 template <
typename ContainerAllocator>
610 typedef ublox_msgs::RxmEPH_<ContainerAllocator>
Msg;
613 static void read(
const uint8_t *data, uint32_t count,
614 typename CallTraits::reference m) {
623 typename Msg::_sf1d_type::value_type temp1;
624 typename Msg::_sf2d_type::value_type temp2;
625 typename Msg::_sf3d_type::value_type temp3;
628 for(std::size_t i = 0; i < 8; ++i) {
630 m.sf1d.push_back(temp1);
633 for(std::size_t i = 0; i < 8; ++i) {
635 m.sf2d.push_back(temp2);
638 for(std::size_t i = 0; i < 8; ++i) {
640 m.sf3d.push_back(temp3);
646 return 8 + (4 * m.sf1d.size()) + (4 * m.sf2d.size()) + (4 * m.sf3d.size());
649 static void write(uint8_t *data, uint32_t size,
650 typename CallTraits::param_type m) {
654 for(std::size_t i = 0; i < m.sf1d.size(); ++i)
656 for(std::size_t i = 0; i < m.sf2d.size(); ++i)
658 for(std::size_t i = 0; i < m.sf3d.size(); ++i)
666 template <
typename ContainerAllocator>
668 typedef ublox_msgs::AidALM_<ContainerAllocator>
Msg;
671 static void read(
const uint8_t *data, uint32_t count,
672 typename CallTraits::reference m) {
679 typename Msg::_dwrd_type::value_type temp;
681 for(std::size_t i = 0; i < 8; ++i) {
683 m.dwrd.push_back(temp);
689 return 8 + (4 * m.dwrd.size());
692 static void write(uint8_t *data, uint32_t size,
693 typename CallTraits::param_type m) {
697 for(std::size_t i = 0; i < m.dwrd.size(); ++i)
705 template <
typename ContainerAllocator>
708 typedef ublox_msgs::AidEPH_<ContainerAllocator>
Msg;
711 static void read(
const uint8_t *data, uint32_t count,
712 typename CallTraits::reference m) {
721 typename Msg::_sf1d_type::value_type temp1;
722 typename Msg::_sf2d_type::value_type temp2;
723 typename Msg::_sf3d_type::value_type temp3;
725 for(std::size_t i = 0; i < 8; ++i) {
727 m.sf1d.push_back(temp1);
730 for(std::size_t i = 0; i < 8; ++i) {
732 m.sf2d.push_back(temp2);
735 for(std::size_t i = 0; i < 8; ++i) {
737 m.sf3d.push_back(temp3);
743 return 8 + (4 * m.sf1d.size()) + (4 * m.sf2d.size()) + (4 * m.sf3d.size());
746 static void write(uint8_t *data, uint32_t size,
747 typename CallTraits::param_type m) {
751 for(std::size_t i = 0; i < m.sf1d.size(); ++i)
753 for(std::size_t i = 0; i < m.sf2d.size(); ++i)
755 for(std::size_t i = 0; i < m.sf3d.size(); ++i)
764 template <
typename ContainerAllocator>
766 typedef boost::call_traits<ublox_msgs::EsfMEAS_<ContainerAllocator> >
769 static void read(
const uint8_t *data, uint32_t count,
770 typename CallTraits::reference m) {
772 stream.
next(m.timeTag);
773 stream.
next(m.flags);
776 bool calib_valid = m.flags & m.FLAGS_CALIB_T_TAG_VALID;
777 int data_size = (count - (calib_valid ? 12 : 8)) / 4;
779 m.data.resize(data_size);
780 for(std::size_t i = 0; i < data_size; ++i)
784 m.calibTtag.resize(1);
790 return 4 + 8 * m.data.size() + 4 * m.calibTtag.size();
793 static void write(uint8_t *data, uint32_t size,
794 typename CallTraits::param_type m) {
796 stream.
next(m.timeTag);
797 stream.
next(m.flags);
799 for(std::size_t i = 0; i < m.data.size(); ++i)
801 for(std::size_t i = 0; i < m.calibTtag.size(); ++i)
809 template <
typename ContainerAllocator>
811 typedef boost::call_traits<ublox_msgs::EsfRAW_<ContainerAllocator> >
814 static void read(
const uint8_t *data, uint32_t count,
815 typename CallTraits::reference m) {
817 stream.
next(m.reserved0);
819 int num_blocks = (count - 4) / 8;
820 m.blocks.resize(num_blocks);
821 for(std::size_t i = 0; i < num_blocks; ++i)
827 return 4 + 8 * m.blocks.size();
830 static void write(uint8_t *data, uint32_t size,
831 typename CallTraits::param_type m) {
833 stream.
next(m.reserved0);
834 for(std::size_t i = 0; i < m.blocks.size(); ++i)
842 template <
typename ContainerAllocator>
844 typedef ublox_msgs::EsfSTATUS_<ContainerAllocator>
Msg;
847 static void read(
const uint8_t *data, uint32_t count,
848 typename CallTraits::reference m) {
851 stream.
next(m.version);
852 stream.
next(m.fusionMode);
853 stream.
next(m.reserved2);
854 stream.
next(m.numSens);
855 m.sens.resize(m.numSens);
856 for(std::size_t i = 0; i < m.sens.size(); ++i)
861 return 16 + 4 * m.numSens;
864 static void write(uint8_t *data, uint32_t size,
865 typename CallTraits::param_type m) {
866 if(m.sens.size() != m.numSens) {
867 ROS_ERROR(
"Writing EsfSTATUS message: numSens must equal size of sens");
871 stream.
next(m.version);
872 stream.
next(m.fusionMode);
873 stream.
next(m.reserved2);
874 stream.
next(static_cast<typename Msg::_numSens_type>(m.sens.size()));
875 for(std::size_t i = 0; i < m.sens.size(); ++i)
883 #endif // UBLOX_SERIALIZATION_UBLOX_MSGS_H boost::call_traits< ublox_msgs::CfgDAT_< ContainerAllocator > > CallTraits
static uint32_t serializedLength(typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
static uint32_t serializedLength(typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
ublox_msgs::NavSBAS_< ContainerAllocator > Msg
boost::call_traits< Msg > CallTraits
ublox_msgs::RxmRAW_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
ublox_msgs::NavSAT_< ContainerAllocator > Msg
ublox_msgs::NavDGPS_< ContainerAllocator > Msg
ublox_msgs::RxmSFRBX_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
boost::call_traits< Msg > CallTraits
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
ublox_msgs::RxmSVSI_< ContainerAllocator > Msg
ublox_msgs::EsfSTATUS_< ContainerAllocator > Msg
boost::call_traits< Msg > CallTraits
static uint32_t serializedLength(typename CallTraits::param_type m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
ublox_msgs::MonVER_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
boost::call_traits< Msg > CallTraits
ublox_msgs::AidALM_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static uint32_t serializedLength(typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
ROS_FORCE_INLINE void next(T &t)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
boost::call_traits< ublox_msgs::EsfRAW_< ContainerAllocator > > CallTraits
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
boost::call_traits< Msg > CallTraits
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
ublox_msgs::AidEPH_< ContainerAllocator > Msg
boost::call_traits< Msg > CallTraits
boost::call_traits< Msg > CallTraits
void serialize(Stream &stream, const T &t)
static uint32_t serializedLength(typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
ublox_msgs::RxmEPH_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
ublox_msgs::CfgGNSS_< ContainerAllocator > Msg
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
ublox_msgs::RxmRAWX_< ContainerAllocator > Msg
ublox_msgs::NavSVINFO_< ContainerAllocator > Msg
static uint32_t serializedLength(typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
boost::call_traits< ublox_msgs::EsfMEAS_< ContainerAllocator > > CallTraits
boost::call_traits< Msg > CallTraits
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static uint32_t serializedLength(typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
ROS_FORCE_INLINE void next(const T &t)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
boost::call_traits< ublox_msgs::Inf_< ContainerAllocator > > CallTraits
static uint32_t serializedLength(typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
ublox_msgs::RxmALM_< ContainerAllocator > Msg
static uint32_t serializedLength(typename CallTraits::param_type m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
void deserialize(Stream &stream, T &t)
static void read(const uint8_t *data, uint32_t count, typename CallTraits::reference m)
static void write(uint8_t *data, uint32_t size, typename CallTraits::param_type m)
static uint32_t serializedLength(typename CallTraits::param_type m)
boost::call_traits< Msg > CallTraits
boost::call_traits< ublox_msgs::CfgINF_< ContainerAllocator > > CallTraits