18 #ifndef PACKETPARSER_HPP_ 19 #define PACKETPARSER_HPP_ 41 std::unique_ptr<Packet>
parse_byte(uint8_t byte);
51 WAITING_FOR_START_BYTE,
56 std::vector<uint8_t> buffer_;
57 PacketParser::State state_;
59 size_t bytes_remaining_;
61 void waiting_for_start_byte_(uint8_t byte);
62 void waiting_for_header_(uint8_t byte);
63 std::unique_ptr<Packet> waiting_for_packet_(uint8_t byte);
67 #endif // PACKETPARSER_HPP_
size_t bytes_parsed() const
PacketParser & operator=(const PacketParser &other)=delete
std::unique_ptr< Packet > parse_byte(uint8_t byte)