21#ifndef INCLUDED_SATNOGS_AX25_DECODER_H
22#define INCLUDED_SATNOGS_AX25_DECODER_H
24#include <gnuradio/digital/lfsr.h>
79 using sptr = std::shared_ptr<ax25_decoder>;
84 bool descramble =
true,
85 bool crc_check =
true,
86 size_t max_frame_len = 512,
87 bool error_correction =
false);
113 bool promisc =
false,
114 bool descramble =
true,
115 bool crc_check =
true,
116 size_t max_frame_len = 512,
117 bool error_correction =
false);
126 typedef enum { NO_SYNC, IN_SYNC, DECODING } decoding_state_t;
132 const bool d_promisc;
133 const bool d_descramble;
134 const bool d_crc_check;
135 const size_t d_max_frame_len;
136 const bool d_error_correction;
137 decoding_state_t d_state;
140 uint8_t d_prev_bit_nrzi;
141 size_t d_received_bytes;
142 size_t d_decoded_bits;
143 digital::lfsr d_lfsr;
144 uint8_t* d_frame_buffer;
145 std::deque<uint8_t> d_bitstream;
147 uint64_t d_frame_start;
148 uint64_t d_sample_cnt;
151 void enter_sync_state();
152 void enter_decoding_state();
157 inline void decode_1b(uint8_t in);
158 bool is_frame_valid();
159 bool error_correction();
#define SATNOGS_API
Definition: api.h:19
AX.25 decoder that supports the legacy hardware radios.
Definition: ax25_decoder.h:54
ax25_decoder(const std::string &addr, uint8_t ssid, bool promisc=false, bool descramble=true, bool crc_check=true, size_t max_frame_len=512, bool error_correction=false)
decoder_status_t decode(const void *in, int len)
std::shared_ptr< ax25_decoder > sptr
Definition: ax25_decoder.h:79
static sptr make(const std::string &addr, uint8_t ssid, bool promisc=false, bool descramble=true, bool crc_check=true, size_t max_frame_len=512, bool error_correction=false)
Abstract class that provided the API for the c decoders.
Definition: decoder.h:71
class decoder_status decoder_status_t
Definition: decoder.h:56
Definition: amsat_duv_decoder.h:29