GNU Radio's DAB Package
gr::dab::crc16_bb Class Reference

crc16 is written in the last 2 bits of input vector More...

#include <crc16_bb.h>

Inheritance diagram for gr::dab::crc16_bb:
gr::dab::crc16_bb_impl

Public Types

typedef boost::shared_ptr< crc16_bbsptr
 

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...
 

Detailed Description

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)

Parameters
lengthLength of input and output vector in bytes. (default is 32 for DAB FIBs)
generatorGenerator polynom for shift register. (default is 0x1021 for DAB)
initial_stateInitial state of shift register. (default is 0xffff for DAB)

Member Typedef Documentation

◆ sptr

typedef boost::shared_ptr<crc16_bb> gr::dab::crc16_bb::sptr

Member Function Documentation

◆ make()

static sptr gr::dab::crc16_bb::make ( int  length,
uint16_t  generator,
uint16_t  initial_state 
)
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.


The documentation for this class was generated from the following file: