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

A IEEE 802.15.4 like decoder. More...

#include <ieee802_15_4_variant_decoder.h>

Inheritance diagram for gr::satnogs::ieee802_15_4_variant_decoder:
gr::satnogs::decoder

Public Member Functions

 ieee802_15_4_variant_decoder (const std::vector< uint8_t > &preamble, size_t preamble_threshold, const std::vector< uint8_t > &sync, size_t sync_threshold, crc::crc_t crc, whitening::whitening_sptr descrambler, bool var_len=true, size_t max_len=1024, bool drop_invalid=true, bool rs=false)
 
 ~ieee802_15_4_variant_decoder ()
 
decoder_status_t decode (const void *in, int len)
 
void reset ()
 
size_t input_multiple () const
 
- Public Member Functions inherited from gr::satnogs::decoder
int unique_id () const
 
 decoder (const std::string &name, const std::string &version, int input_item_size, size_t max_frame_len=8192)
 
virtual ~decoder ()
 
size_t max_frame_len () const
 
int sizeof_input_item () const
 
std::string name () const
 
std::string version () const
 

Static Public Member Functions

static decoder::decoder_sptr make (const std::vector< uint8_t > &preamble, size_t preamble_threshold, const std::vector< uint8_t > &sync, size_t sync_threshold, crc::crc_t crc, whitening::whitening_sptr descrambler, bool var_len=true, size_t max_len=1024, bool drop_invalid=true, bool rs=false)
 

Additional Inherited Members

- Static Public Attributes inherited from gr::satnogs::decoder
static int base_unique_id
 
- Protected Member Functions inherited from gr::satnogs::decoder
void incr_nitems_read (size_t nitems)
 
uint64_t nitems_read () const
 

Detailed Description

A IEEE 802.15.4 like decoder.

The IEEE 802.15.4 uses the well known preamble + sync word synchronization scheme. Many popular on Cubesats ICs like the Texas Instruments CC1xxx family or the AXxxxx of On Semiconductors follow this scheme. This decoder class provides a generic way to decode signals following this framing scheme.

Constructor & Destructor Documentation

◆ ieee802_15_4_variant_decoder()

gr::satnogs::ieee802_15_4_variant_decoder::ieee802_15_4_variant_decoder ( const std::vector< uint8_t > &  preamble,
size_t  preamble_threshold,
const std::vector< uint8_t > &  sync,
size_t  sync_threshold,
crc::crc_t  crc,
whitening::whitening_sptr  descrambler,
bool  var_len = true,
size_t  max_len = 1024,
bool  drop_invalid = true,
bool  rs = false 
)

◆ ~ieee802_15_4_variant_decoder()

gr::satnogs::ieee802_15_4_variant_decoder::~ieee802_15_4_variant_decoder ( )

Member Function Documentation

◆ decode()

decoder_status_t gr::satnogs::ieee802_15_4_variant_decoder::decode ( const void *  in,
int  nitems 
)
virtual

Decodes a buffer of input items contained in the in buffer. This method is called continuously by the frame_decoder. Based on the returned status data, the frame_decoder() instructs properly the GNU Radio scheduler and/or propagates decoded data.

As the number of input items may not enough to decode a frame, each decoder should keep internal state, so decoding can be accomplished after an arbitrary number of calls to this method

Parameters
inthe input items
nitemsthe number of input items contained in the in buffer
Returns
the status of the decoder after the call of this method. For more information refer to decoder_status()

Implements gr::satnogs::decoder.

◆ input_multiple()

size_t gr::satnogs::ieee802_15_4_variant_decoder::input_multiple ( ) const
virtual

Reimplemented from gr::satnogs::decoder.

◆ make()

static decoder::decoder_sptr gr::satnogs::ieee802_15_4_variant_decoder::make ( const std::vector< uint8_t > &  preamble,
size_t  preamble_threshold,
const std::vector< uint8_t > &  sync,
size_t  sync_threshold,
crc::crc_t  crc,
whitening::whitening_sptr  descrambler,
bool  var_len = true,
size_t  max_len = 1024,
bool  drop_invalid = true,
bool  rs = false 
)
static
Parameters
preamblethe preamble should be a repeated word. Note that due to AGC settling, the receiver may not receive the whole preamble. If the preamble is indeed a repeated pattern, a portion of it can be given as parameter. The block should be able to deal with this. However, a quite small subset may lead to a larger number of false alarms
preamble_thresholdthe maximum number of bits that are allowed to be wrong at the preamble
syncthe synchronization work following the preamble
sync_thresholdthe maximum number of bits that are allowed to be wrong at the synchronization word
crcthe CRC scheme to use
descramblerif set, data will be first descrambled by this descrambling method
var_lenif set to true, variable length decoding is used. Otherwise, the max_len parameter indicates the fixed frame size
max_lenthe maximum allowed decode-able frame length
rsif set, the decoder will perform RS(255,223) decoding prior the descrambling and the CRC
Returns
shared pointer of the decoder

◆ reset()

void gr::satnogs::ieee802_15_4_variant_decoder::reset ( )
virtual

Resets the internal state of the decoder to the initial defaults

Implements gr::satnogs::decoder.


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