10 #ifndef INCLUDED_DIGITAL_HEADER_FORMAT_CRC_H
11 #define INCLUDED_DIGITAL_HEADER_FORMAT_CRC_H
16 #include <boost/crc.hpp>
49 typedef std::shared_ptr<header_format_crc>
sptr;
51 const std::string& num_key_name =
"packet_num");
67 bool format(
int nbytes_in,
68 const unsigned char* input,
72 bool parse(
int nbits_in,
73 const unsigned char* input,
74 std::vector<pmt::pmt_t>& info,
75 int& nbits_processed)
override;
80 size_t header_nbits()
const override;
86 static sptr make(
const std::string& len_key_name =
"packet_len",
87 const std::string& num_key_name =
"packet_num");
93 boost::crc_optimal<8, 0x07, 0xFF, 0x00, false, false>
d_crc_impl;
96 bool header_ok()
override;
101 int header_payload()
override;