GNU Radio's LORA_SDR Package
utilities.h File Reference
#include <cstdint>
#include <string.h>
#include <iomanip>
#include <numeric>
#include <gnuradio/expj.h>
#include <volk/volk.h>
#include <algorithm>
Include dependency graph for utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gr
 
namespace  gr::lora_sdr
 

Macros

#define print(message)   std::cout<< message <<std::endl
 
#define RESET   "\033[0m"
 
#define RED   "\033[31m" /* Red */
 
#define MIN_SF   5
 
#define MAX_SF   12
 
#define LDRO_MAX_DURATION_MS   16
 

Typedefs

typedef double gr::lora_sdr::LLR
 Log-Likelihood Ratio type.
 

Enumerations

enum  gr::lora_sdr::Symbol_type {
  gr::lora_sdr::VOID , gr::lora_sdr::UPCHIRP , gr::lora_sdr::SYNC_WORD , gr::lora_sdr::DOWNCHIRP ,
  gr::lora_sdr::QUARTER_DOWN , gr::lora_sdr::PAYLOAD , gr::lora_sdr::UNDETERMINED
}
 
enum  gr::lora_sdr::ldro_mode { gr::lora_sdr::DISABLE , gr::lora_sdr::ENABLE , gr::lora_sdr::AUTO }
 

Functions

long gr::lora_sdr::mod (long a, long b)
 return the modulus ab between 0 and (b-1)
 
double gr::lora_sdr::double_mod (double a, long b)
 
std::vector< bool > gr::lora_sdr::int2bool (unsigned int integer, uint8_t n_bits)
 Convert an integer into a MSB first vector of bool.
 
uint32_t gr::lora_sdr::bool2int (std::vector< bool > b)
 Convert a MSB first vector of bool to a integer.
 
void gr::lora_sdr::build_upchirp (gr_complex *chirp, uint32_t id, uint8_t sf, uint8_t os_factor=1)
 Return an modulated upchirp using s_f=bw.
 
void gr::lora_sdr::build_ref_chirps (gr_complex *upchirp, gr_complex *downchirp, uint8_t sf, uint8_t os_factor=1)
 Return the reference chirps using s_f=bw.
 
int gr::lora_sdr::most_frequent (int arr[], int n)
 
std::string gr::lora_sdr::random_string (int Nbytes)
 

Macro Definition Documentation

◆ LDRO_MAX_DURATION_MS

#define LDRO_MAX_DURATION_MS   16

◆ MAX_SF

#define MAX_SF   12

◆ MIN_SF

#define MIN_SF   5

◆ print

#define print (   message)    std::cout<< message <<std::endl

◆ RED

#define RED   "\033[31m" /* Red */

◆ RESET

#define RESET   "\033[0m"