21#ifndef INCLUDED_SATNOGS_AX25_DECODER_H
22#define INCLUDED_SATNOGS_AX25_DECODER_H
24#include <gnuradio/digital/lfsr.h>
72 using sptr = std::shared_ptr<ax25_decoder>;
76 bool descramble =
true,
77 bool crc_check =
true,
78 size_t max_frame_len = 512,
79 bool error_correction =
false);
101 bool descramble =
true,
102 bool crc_check =
true,
103 size_t max_frame_len = 512,
104 bool error_correction =
false);
113 typedef enum { NO_SYNC, IN_SYNC, DECODING } decoding_state_t;
116 const bool d_descramble;
117 const bool d_crc_check;
118 const size_t d_max_frame_len;
119 const bool d_error_correction;
120 decoding_state_t d_state;
123 uint8_t d_prev_bit_nrzi;
124 size_t d_received_bytes;
125 size_t d_decoded_bits;
126 digital::lfsr d_lfsr;
127 uint8_t* d_frame_buffer;
128 std::deque<uint8_t> d_bitstream;
130 uint64_t d_frame_start;
131 uint64_t d_sample_cnt;
134 void enter_sync_state();
135 void enter_decoding_state();
140 inline void decode_1b(uint8_t in);
141 bool is_frame_valid();
142 bool error_correction();
#define SATNOGS_API
Definition api.h:19
AX.25 decoder that supports the legacy hardware radios.
Definition ax25_decoder.h:51
decoder_status_t decode(const void *in, int len)
std::shared_ptr< ax25_decoder > sptr
Definition ax25_decoder.h:72
static sptr make(const std::string &addr, uint8_t ssid, bool descramble=true, bool crc_check=true, size_t max_frame_len=512, bool error_correction=false)
ax25_decoder(const std::string &addr, uint8_t ssid, 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