NMEA: detectio of the optional tag block in front of a sentence, ignoring it for...
[marnav.git] / src / marnav / nmea / vdo.cpp
blobe9ef5affbeda8c4d6c07f4f744212a08e3130076
1 #include "vdo.hpp"
3 namespace marnav
5 namespace nmea
7 MARNAV_NMEA_DEFINE_SENTENCE_PARSE_FUNC(vdo)
9 constexpr const char * vdo::TAG;
11 vdo::vdo()
12 : vdm(ID, TAG, talker_id::ais_mobile_station)
16 vdo::vdo(talker talk, fields::const_iterator first, fields::const_iterator last)
17 : vdm(ID, TAG, talk)
19 if (std::distance(first, last) != 6)
20 throw std::invalid_argument{"invalid number of fields in vdo"};
22 read_fields(first);