GNU Radio's SATNOGS Package
utils.h File Reference
#include <cstdint>
#include <cmath>
#include <cstdio>
#include <arpa/inet.h>

Go to the source code of this file.

Namespaces

 gr
 
 gr::satnogs
 

Macros

#define htonll(x)   ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
 
#define ntohll(x)   ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
 

Functions

static double gr::satnogs::mape (double ref, double estimation)
 
static unsigned int gr::satnogs::bit_count (unsigned int x)
 
static uint8_t gr::satnogs::reverse_byte (uint8_t b)
 
static uint32_t gr::satnogs::reverse_uint32_bytes (uint32_t i)
 
static uint64_t gr::satnogs::reverse_uint64_bytes (uint64_t x)
 
static uint32_t gr::satnogs::update_crc32 (uint32_t crc, const uint8_t *data, size_t len)
 
static uint32_t gr::satnogs::crc32 (const uint8_t *buf, size_t len)
 
static void gr::satnogs::print_pdu (const uint8_t *buf, size_t len)
 

Variables

static const uint8_t gr::satnogs::_bytes_reversed [256]
 

Macro Definition Documentation

◆ htonll

#define htonll (   x)    ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))

◆ ntohll

#define ntohll (   x)    ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))