GNU Radio's LORA Package
|
Classes | |
class | channelizer |
<+description of block+> More... | |
class | channelizer_impl |
class | controller |
class | controller_impl |
class | debugger |
class | decoder |
<+description of block+> More... | |
class | decoder_impl |
Return the DecoderState as string for debugging purposes. More... | |
class | message_file_sink |
<+description of block+> More... | |
class | message_file_sink_impl |
class | message_socket_sink |
Sink for messages, sent to socket. More... | |
class | message_socket_sink_impl |
class | message_socket_source |
Message socket source block , using UDP. More... | |
class | message_socket_source_impl |
Enumerations | |
enum class | DecoderState { DETECT , SYNC , FIND_SFD , PAUSE , DECODE_HEADER , DECODE_PAYLOAD , STOP } |
DecoderState : Each state the LoRa decoder can be in. More... | |
Functions | |
int32_t | wrap_index (int32_t i, int32_t n) |
Wrap indices Python-like, i.e. array[wrap_index(-1, array_length)] gets the last element. More... | |
template<class T > | |
T | clamp (const T d, const T min, const T max) |
Clamp given value in the given range. More... | |
uint32_t | rotl (uint32_t bits, uint32_t count=1u, const uint32_t size=8u) |
Rotate the given bits to the left and return the result. More... | |
template<typename T > | |
std::string | to_bin (const T v, const uint32_t bitwidth) |
Return the v represented in a binary string. More... | |
template<typename T > | |
void | print_vector_bin (std::ostream &out, const std::vector< T > &v, const std::string &prefix, const int element_len_bits) |
Append the data in a given vector to an output stream with a comma delimiter. More... | |
bool | check_parity_string (const std::string &word, const bool even=true) |
Check whether the parity of the given binary string is even. More... | |
bool | check_parity (uint64_t word, const bool even=true) |
Check whether the parity of the given uint64_t is even. See https://graphics.stanford.edu/~seander/bithacks.html for more. More... | |
uint32_t | select_bits (const uint32_t data, const uint8_t *indices, const uint8_t n) |
Select the bits in data given by the indices in *indices . More... | |
uint8_t | bit (const uint8_t v, const uint8_t i) |
Select a single bit from the given byte. More... | |
uint8_t | pack_byte (const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d, const uint8_t e, const uint8_t f, const uint8_t g, const uint8_t h) |
Pack the given 8 bits in a byte with: hgfe dcba More... | |
uint8_t | pack_nibble (const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d) |
Pack the given 4 bits in a nibble with: dcba More... | |
uint8_t | hamming_encode_soft (const uint8_t v) |
Encode the given word with standard Hamming(7,4) and return a byte with the set parity bits. More... | |
void | swap_nibbles (uint8_t *array, uint32_t length) |
Swap nibbles of a byte array. More... | |
static uint8_t | hamming_decode_soft_byte (uint8_t v) |
Hamming(8,4) decoding by constructing a Syndrome matrix LUT for XORing on parity errors. More... | |
template<typename T > | |
void | print_vector (std::ostream &out, const T *v, const std::string &prefix, const int size, const int element_len_bits) |
template<typename T > | |
void | print_vector_hex (std::ostream &out, const T *v, const uint32_t size, bool endline, bool print_ascii) |
template<typename T > | |
void | print_interleave_matrix (std::ostream &out, const std::vector< T > &v, const uint32_t sf) |
bool | header_checksum (const uint8_t *header) |
uint32_t | dissect_packet (const void **header, uint32_t header_size, const uint8_t *buffer, uint32_t offset) |
uint32_t | build_packet (uint8_t *buffer, uint32_t offset, const void *header, uint32_t header_size) |
Variables | |
static std::vector< std::string > | term_colors |
const uint8_t | prng_header [] |
const uint8_t | prng_payload_cr56 [] |
const uint8_t | prng_payload_cr78 [] |
|
strong |
|
inline |
Select a single bit from the given byte.
v | The byte to select from. |
i | The index to select the bit from starting from the LSB. |
Referenced by hamming_decode_soft_byte(), and hamming_encode_soft().
|
inline |
|
inline |
Check whether the parity of the given uint64_t is even.
See https://graphics.stanford.edu/~seander/bithacks.html for more.
word | The uint64_t to check. |
even | Check for even (true ) or uneven (false ) parity. |
|
inline |
Check whether the parity of the given binary string is even.
word | The string to check. |
even | Check for even (true ) or uneven (false ) parity. |
|
inline |
Clamp given value in the given range.
T | The type of variable to clamp. d , min and max must be of this type. |
d | The value to clamp. |
min | The lower bound of the range. |
max | The upper bound of the range. |
|
inline |
|
inlinestatic |
Hamming(8,4) decoding by constructing a Syndrome matrix LUT for XORing on parity errors.
DEPRECATED
v | The byte to decode. |
References bit(), and pack_nibble().
|
inline |
Encode the given word with standard Hamming(7,4) and return a byte with the set parity bits.
v | The nibble to encode. |
References bit(), and pack_byte().
|
inline |
|
inline |
Pack the given 8 bits in a byte with: hgfe dcba
a-h | The bits to pack with the LSB first. |
Referenced by hamming_encode_soft().
|
inline |
Pack the given 4 bits in a nibble with: dcba
a-d | The bits to pack with the LSB first. |
Referenced by hamming_decode_soft_byte().
|
inline |
References term_colors, to_bin(), and wrap_index().
|
inline |
References to_bin().
|
inline |
Append the data in a given vector to an output stream with a comma delimiter.
T | The type of variable to append. |
out | The output stream to append to. |
v | The vector containing the data to append. |
prefix | A prefix to include before appending the data. |
element_len_bits | The length in bits of the data in v . |
References to_bin().
|
inline |
|
inline |
Rotate the given bits to the left and return the result.
bits | The value to rotate. |
count | The amount of bits to rotate (shift to left and add to right). |
size | The size in bits used in bits . e.g. 1 byte given => size = 8 e.g. only 6 bits in use => size = 6, and all bits higher than (1 << size-1) will be zeroed. |
|
inline |
Select the bits in data given by the indices in *indices
.
data | The data to select bits from. |
*indices | Array with the indices to select. |
n | The amount of indices. |
|
inline |
Swap nibbles of a byte array.
array | Array of uint8_t bytes |
length | Length of the array |
|
inline |
Return the v
represented in a binary string.
T | The type of variable to convert. |
v | The value to convert. |
bitwidth | The length in bits of the given variable v . |
Referenced by print_interleave_matrix(), print_vector(), and print_vector_bin().
|
inline |
Wrap indices Python-like, i.e. array[wrap_index(-1, array_length)] gets the last element.
i | Index of array |
n | Length of array |
Referenced by print_interleave_matrix().
const uint8_t gr::lora::prng_header[] |
Header whitening sequence
const uint8_t gr::lora::prng_payload_cr56[] |
Whitening sequence
const uint8_t gr::lora::prng_payload_cr78[] |
|
static |
Referenced by print_interleave_matrix().