GNU Radio's DAB Package
|
crc16 is written in the last 2 bits of input vector More...
#include <crc16_bb.h>
Public Types | |
typedef std::shared_ptr< crc16_bb > | sptr |
Static Public Member Functions | |
static sptr | make (int length, uint16_t generator, uint16_t initial_state) |
Return a shared_ptr to a new instance of dab::crc16_bb. More... | |
crc16 is written in the last 2 bits of input vector
input: char vector of length length (packed bytes)
output: char vector of length length (packed bytes) with crc at last 2 bytes (overwrites last 2 bytes)
uses the crc16 function to calculate a 2 byte crc word and write it to the FIB (overwrites last 2 bytes)
length | Length of input and output vector in bytes. (default is 32 for DAB FIBs) |
generator | Generator polynom for shift register. (default is 0x1021 for DAB) |
initial_state | Initial state of shift register. (default is 0xffff for DAB) |
typedef std::shared_ptr<crc16_bb> gr::dab::crc16_bb::sptr |
|
static |
Return a shared_ptr to a new instance of dab::crc16_bb.
To avoid accidental use of raw pointers, dab::crc16_bb's constructor is in a private implementation class. dab::crc16_bb::make is the public interface for creating new instances.