1 #ifndef MARNAV_IO_NMEA_READER_HPP
2 #define MARNAV_IO_NMEA_READER_HPP
4 #include <marnav-io/device.hpp>
5 #include <marnav/nmea/sentence.hpp>
11 /// This class reads NMEA sentences from a device. Normally this would
12 /// be a serial character device (e.g. \c /dev/ttyS0 or \c /dev/ttyUSB0).
14 /// In order to use this NMEA reader, it must be subclassed.
16 /// This reader opens the device upon construction.
21 virtual ~nmea_reader();
23 nmea_reader(std::unique_ptr
<device
> && d
);
24 nmea_reader(const nmea_reader
&) = delete;
25 nmea_reader(nmea_reader
&&) = default;
27 nmea_reader
& operator=(const nmea_reader
&) = delete;
28 nmea_reader
& operator=(nmea_reader
&&) = default;
34 virtual void process_sentence(const std::string
&) = 0;
41 std::string sentence_
;
42 std::unique_ptr
<device
> dev_
; ///< Device to read data from.