Go to the documentation of this file.
7 #include <boost/circular_buffer.hpp>
8 #include <boost/noncopyable.hpp>
59 void addNewData(
const uint8_t* data, std::size_t length);
76 void addNewData(
const std::vector<uint8_t>& data);
Data::NavHeader getLastHeaderData(void) const
static constexpr size_t CHECKSUM_SIZE
std::set< MemoryBlockParserPtr, std::function< bool(const MemoryBlockParserPtr &, const MemoryBlockParserPtr &)> > tParsersSet
std::vector< uint8_t > lastAnswer
void addNewData(const uint8_t *data, std::size_t length)
Add new binary data to the parser internal buffer The new data can only be a part of a frame,...
Data::NavHeader::MessageType getHeaderType(boost::asio::const_buffer &buffer) const
static constexpr size_t HEADER_SIZE_V5
static constexpr size_t HEADER_SIZE_V4
Data::BinaryNav getLastNavData(void) const
static constexpr size_t HEADER_SIZE_V2
const tParsersSet extendedNavigationParsers
Data::NavHeader parseHeader(boost::asio::const_buffer &buffer) const
std::shared_ptr< MemoryBlockParser > MemoryBlockParserPtr
void compareChecksum()
Compute current frame checksum and compare with the frame checksum. If mismatch, throw std::runtime_e...
bool parseNextFrame()
Try to parse a frame from the parser internal buffer. Some binary data must have been added with the ...
const tParsersSet externalDataParsers
const std::vector< uint8_t > & getLastAnswerData(void) const
Data::NavHeader lastHeader
Parser of a STDBIN IXblue message. This is the entry point of the library. Usage of this class is as ...
static constexpr size_t HEADER_SIZE_V3
const tParsersSet navigationParsers
static constexpr size_t ANSWER_HEADER_SIZE
boost::circular_buffer< uint8_t > internalBuffer
Data::BinaryNav lastParsed
bool haveEnoughBytesToParseHeader()