24#ifndef INCLUDED_SATNOGS_IEEE802_15_4_VARIANT_DECODER_H
25#define INCLUDED_SATNOGS_IEEE802_15_4_VARIANT_DECODER_H
78 using sptr = std::shared_ptr<ieee802_15_4_variant_decoder>;
79 static sptr make(
const std::vector<uint8_t>& preamble,
80 size_t preamble_threshold,
81 const std::vector<uint8_t>& sync,
82 size_t sync_threshold,
83 size_t max_len = 1024);
86 size_t preamble_threshold,
87 const std::vector<uint8_t>& sync,
88 size_t sync_threshold,
89 size_t max_len = 1024);
92 static sptr make(
const std::vector<uint8_t>& preamble,
93 size_t preamble_threshold,
94 uint8_t length_field_bytes,
95 const std::vector<uint8_t>& sync,
96 size_t sync_threshold);
99 size_t preamble_threshold,
100 uint8_t length_field_bytes,
101 const std::vector<uint8_t>& sync,
102 size_t sync_threshold);
118 DECODING_GENERIC_FRAME_LEN,
124 const size_t d_preamble_len;
125 const size_t d_preamble_thrsh;
128 const size_t d_sync_len;
129 const size_t d_sync_thrsh;
130 const bool d_var_len;
132 size_t d_length_field_len;
133 decoding_state_t d_state;
135 uint64_t d_frame_start_idx;
137 size_t d_max_frame_len;
144 int search_preamble(
const uint8_t* in,
int len);
146 int search_sync(
const uint8_t* in,
int len);
148 int decode_frame_len(
const uint8_t* in);
#define SATNOGS_API
Definition api.h:19
Abstract class that provided the API for the c decoders.
Definition decoder.h:71
A IEEE 802.15.4 like decoder.
Definition ieee802_15_4_variant_decoder.h:47
size_t input_multiple() const
std::shared_ptr< ieee802_15_4_variant_decoder > sptr
Definition ieee802_15_4_variant_decoder.h:78
~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, size_t max_len=1024)
static sptr make(const std::vector< uint8_t > &preamble, size_t preamble_threshold, const std::vector< uint8_t > &sync, size_t sync_threshold, size_t max_len=1024)
decoder_status_t decode(const void *in, int len)
ieee802_15_4_variant_decoder(const std::vector< uint8_t > &preamble, size_t preamble_threshold, uint8_t length_field_bytes, const std::vector< uint8_t > &sync, size_t sync_threshold)
static sptr make(const std::vector< uint8_t > &preamble, size_t preamble_threshold, uint8_t length_field_bytes, const std::vector< uint8_t > &sync, size_t sync_threshold)
Implements a bit shift register.
Definition shift_reg.h:36
class decoder_status decoder_status_t
Definition decoder.h:56
Definition amsat_duv_decoder.h:29