GNU Radio's SATNOGS Package
gr::satnogs::crc Class Reference

#include <crc.h>

Public Types

enum class  type {
  NONE = 0 , CRC16_AUG_CCITT , CRC16_AUG_CCITT_XOR , CRC16_CMS ,
  CRC16_HDLC , CRC16_KERMIT , CRC16_XMODEM , CRC32_C
}
 Predefined CRC types. More...
 

Static Public Member Functions

static constexpr size_t size (type t)
 
template<typename CRCType , crcpp_uint16 CRCWidth>
static constexpr size_t size (const CRC::Parameters< CRCType, CRCWidth > &t)
 
template<typename CRCType , crcpp_uint16 CRCWidth>
static size_t append (const CRC::Parameters< CRCType, CRCWidth > &t, uint8_t *out, const uint8_t *data, size_t len, bool msb=true)
 
static size_t append (type t, uint8_t *out, const uint8_t *data, size_t len, bool msb=true)
 
static bool check (type t, const uint8_t *data, size_t len, bool msb=true)
 
template<typename CRCType , crcpp_uint16 CRCWidth>
static bool check (const CRC::Parameters< CRCType, CRCWidth > &t, const uint8_t *data, size_t len, bool msb=true)
 

Detailed Description

CRC class providing a range of different CRC calculation static methods

Member Enumeration Documentation

◆ type

enum class gr::satnogs::crc::type
strong

Predefined CRC types.

Names and alias retrieved from https://reveng.sourceforge.io/crc-catalogue/

Enumerator
NONE 
CRC16_AUG_CCITT 
CRC16_AUG_CCITT_XOR 
CRC16_CMS 

XOR'd version of the CRC-16/AUG-CCITT.

CRC16_HDLC 
CRC16_KERMIT 

Alias: CRC-16/IBM-SDLC, CRC-16/ISO-HDLC, CRC-16/ISO-IEC-14443-3-B, CRC-16/X-25, CRC-B, X-25.

CRC16_XMODEM 

Alias: CRC-16/BLUETOOTH, CRC-16/CCITT, CRC-16/CCITT-TRUE, CRC-16/V-41-LSB, CRC-CCITT, KERMIT.

CRC32_C 

Alias: CRC-16/ACORN, CRC-16/LTE, CRC-16/V-41-MSB, XMODEM, ZMODEM.

Member Function Documentation

◆ append() [1/2]

template<typename CRCType , crcpp_uint16 CRCWidth>
static size_t gr::satnogs::crc::append ( const CRC::Parameters< CRCType, CRCWidth > &  t,
uint8_t *  out,
const uint8_t *  data,
size_t  len,
bool  msb = true 
)
inlinestatic

References CRC::Calculate(), i, and t.

◆ append() [2/2]

static size_t gr::satnogs::crc::append ( type  t,
uint8_t *  out,
const uint8_t *  data,
size_t  len,
bool  msb = true 
)
static

◆ check() [1/2]

template<typename CRCType , crcpp_uint16 CRCWidth>
static bool gr::satnogs::crc::check ( const CRC::Parameters< CRCType, CRCWidth > &  t,
const uint8_t *  data,
size_t  len,
bool  msb = true 
)
inlinestatic

References CRC::Calculate(), i, size(), and t.

◆ check() [2/2]

static bool gr::satnogs::crc::check ( type  t,
const uint8_t *  data,
size_t  len,
bool  msb = true 
)
static

◆ size() [1/2]

template<typename CRCType , crcpp_uint16 CRCWidth>
static constexpr size_t gr::satnogs::crc::size ( const CRC::Parameters< CRCType, CRCWidth > &  t)
inlinestaticconstexpr

◆ size() [2/2]

static constexpr size_t gr::satnogs::crc::size ( type  t)
inlinestaticconstexpr
Parameters
tthe CRC method
Returns
the size of the specified CRC in bytes

References t.

Referenced by check().


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