8#ifndef INCLUDED_M17_M17_DECODER_IMPL_H
9#define INCLUDED_M17_M17_DECODER_IMPL_H
26 static constexpr int PAYLOAD_BYTES = 16;
28 bool _debug_data =
false;
29 bool _debug_ctrl =
false;
30 float _sw_threshold = 2.0;
31 float _vt_threshold = 30.0;
32 bool _callsign =
false;
33 bool _signed_str =
false;
34 uint8_t _key[32] = {0};
35 uint8_t _pub_key[64] = {0};
39 uint8_t _digest[16] = {0};
40 uint8_t _sig[64] = {0};
41 uint32_t _scrambler_key = 0;
49 int8_t _aes_subtype = -1;
52 float _pld[SYM_PER_PLD];
53 uint16_t soft_bit[2 * SYM_PER_PLD];
54 uint16_t d_soft_bit[2 * SYM_PER_PLD];
55 uint16_t _expected_next_fn;
59 uint16_t lich_chunk[96];
62 uint8_t lich_chunks_rcvd = 0;
64 uint16_t enc_data[272];
65 uint8_t _stream_frame_data[16];
66 char rcvd_msg[33 * 25 + 1];
67 uint16_t _pkt_wr_offs = 0;
68 uint8_t digest[16] = {0};
74 char d_dst[12], d_src[12];
78 uint8_t _scr_bytes[16];
79 uint8_t _scrambler_pn[128];
80 uint32_t _scrambler_seed = 0;
81 int8_t _scrambler_subtype = -1;
83 const struct uECC_Curve_t *_curve = uECC_secp256r1();
87 float vt_threshold,
bool callsign,
bool signed_str,
int encr_type,
88 std::string key, std::string seed, std::string pub_key,
int undecodable_out);
90 void set_debug_data(
bool debug);
93 std::string
tag()
const;
114 void set_debug_ctrl(
bool debug);
120 void parse_raw_key_string(uint8_t *dest,
const char *inp);
127 gr_vector_int &ninput_items_required);
130 gr_vector_int &ninput_items,
131 gr_vector_const_void_star &input_items,
132 gr_vector_void_star &output_items);
void set_undecodable_out(int mode)
void set_vt_threshold(float vt_threshold)
int _key_len
Definition m17_decoder_impl.h:102
lsf_t _rx_lsf
Definition m17_decoder_impl.h:108
void set_signed(bool signed_str)
m17_decoder_impl(bool debug_data, bool debug_ctrl, float sw_threshold, float vt_threshold, bool callsign, bool signed_str, int encr_type, std::string key, std::string seed, std::string pub_key, int undecodable_out)
uint8_t _txt_used
Definition m17_decoder_impl.h:98
void text_block(const lsf_t &l)
float _rx_max_e
Definition m17_decoder_impl.h:106
int _seed_len
Definition m17_decoder_impl.h:103
bool _started
Definition m17_decoder_impl.h:104
bool _txt_done
Definition m17_decoder_impl.h:100
void set_encr_type(int encr_type)
uint8_t _txt_block[4][13]
Definition m17_decoder_impl.h:97
void set_sw_threshold(float sw_threshold)
uint32_t scrambler_seed_calculation(int8_t subtype, uint32_t key, int fn)
int _undecodable_out
Definition m17_decoder_impl.h:112
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void scrambler_sequence_generator()
void set_seed(std::string seed)
void set_pub_key(std::string arg)
void check_keys(uint16_t type)
bool _rx_lsf_seen
Definition m17_decoder_impl.h:109
void set_callsign(bool callsign)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
int _rx_frames
Definition m17_decoder_impl.h:105
void publish_fields(const std::string &text="")
std::string _rx_sig
Definition m17_decoder_impl.h:107
uint8_t _txt_have
Definition m17_decoder_impl.h:99
void set_key(std::string arg)
<+description of block+>
Definition m17_decoder.h:25
encr_t
Definition m17_decoder.h:29
@ ENCR_NONE
Definition m17_decoder.h:30
Definition codec2_decoder.h:17
Definition codec2_decoder.h:15