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

Several bit-level utility methods, frequently used in the encoding/decoding process. More...

#include <utils.h>

Static Public Member Functions

static double mape (double ref, double estimation)
 
static uint64_t htonll (uint64_t x)
 
static uint64_t ntohll (uint64_t x)
 
static uint32_t bit_count (uint32_t x)
 
static uint8_t reverse_byte (uint8_t b)
 
static uint32_t reverse_uint32_bytes (uint32_t i)
 
static uint64_t reverse_uint64_bytes (uint64_t x)
 
static void print_pdu (const uint8_t *buf, size_t len)
 
template<class T , class U , bool S>
static size_t packed_to_unpacked (T out, const U in, size_t len=0)
 
template<class T , class U , bool S>
static size_t unpacked_to_packed (T out, const U in, size_t len=0)
 

Detailed Description

Several bit-level utility methods, frequently used in the encoding/decoding process.

Member Function Documentation

◆ bit_count()

static uint32_t gr::satnogs::utils::bit_count ( uint32_t  x)
static

◆ htonll()

static uint64_t gr::satnogs::utils::htonll ( uint64_t  x)
static

◆ mape()

static double gr::satnogs::utils::mape ( double  ref,
double  estimation 
)
static

◆ ntohll()

static uint64_t gr::satnogs::utils::ntohll ( uint64_t  x)
static

◆ packed_to_unpacked()

template<class T , class U , bool S>
static size_t gr::satnogs::utils::packed_to_unpacked ( out,
const U  in,
size_t  len = 0 
)
inlinestatic

Template function that unpack the bits of the list-like object with numbers in

Parameters
outthe list with the unpacked bits
inthe list with the packed bits
lenthe size of the in
Returns
the size of the out

References utils_helper< T, U, S >::packed_to_unpacked().

◆ print_pdu()

static void gr::satnogs::utils::print_pdu ( const uint8_t *  buf,
size_t  len 
)
static

◆ reverse_byte()

static uint8_t gr::satnogs::utils::reverse_byte ( uint8_t  b)
static

◆ reverse_uint32_bytes()

static uint32_t gr::satnogs::utils::reverse_uint32_bytes ( uint32_t  i)
static

◆ reverse_uint64_bytes()

static uint64_t gr::satnogs::utils::reverse_uint64_bytes ( uint64_t  x)
static

◆ unpacked_to_packed()

template<class T , class U , bool S>
static size_t gr::satnogs::utils::unpacked_to_packed ( out,
const U  in,
size_t  len = 0 
)
inlinestatic

Template function that pack the bits of the list-like object with numbers in

Parameters
outthe list with the packed bits
inthe list with the unpacked bits
lenthe size of the in
Returns
the size of the out

References utils_helper< T, U, S >::unpacked_to_packed().


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