GNU Radio's M17 Package
m17_decoder.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2023 jmfriedt.
4 *
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#ifndef INCLUDED_M17_M17_DECODER_H
9#define INCLUDED_M17_M17_DECODER_H
10
11#include <gnuradio/block.h>
12#include <gnuradio/m17/api.h>
13
14namespace gr
15{
16 namespace m17
17 {
18
19/*!
20 * \brief <+description of block+>
21 * \ingroup m17
22 *
23 */
24 class M17_API m17_decoder:virtual public gr::block
25 {
26 public:
27 typedef std::shared_ptr < m17_decoder > sptr;
28 typedef enum
29 {
33 ENCR_RES //reserved
34 } encr_t;
35
36 /*!
37 * \brief Return a shared_ptr to a new instance of m17::m17_decoder.
38 *
39 * To avoid accidental use of raw pointers, m17::m17_decoder's
40 * constructor is in a private implementation
41 * class. m17::m17_decoder::make is the public interface for
42 * creating new instances.
43 */
44 static sptr make (bool debug_data, bool debug_ctrl, float sw_threshold,
45 float vt_threshold, bool callsign, bool signed_str, int encr_type,
46 std::string key, std::string seed, std::string pub_key = "",
47 int undecodable_out = 0);
48 virtual void set_debug_data (bool debug) = 0;
49 virtual void set_debug_ctrl (bool debug) = 0;
50 virtual void set_callsign (bool callsign) = 0;
51 virtual void set_sw_threshold (float sw_threshold) = 0;
52 virtual void set_vt_threshold (float vt_threshold) = 0;
53 virtual void set_signed (bool signed_str) = 0;
54 virtual void set_key (std::string key) = 0;
55 virtual void set_pub_key (std::string pub_key) = 0;
56 virtual void set_undecodable_out (int mode) = 0;
57 virtual void set_seed (std::string seed) = 0;
58 virtual void parse_raw_key_string (uint8_t * dest, const char *inp) = 0;
59 virtual void scrambler_sequence_generator () = 0;
60 virtual uint32_t scrambler_seed_calculation (int8_t subtype,
61 uint32_t key, int fn) = 0;
62
63 };
64
65 } // namespace m17
66} // namespace gr
67
68#endif /* INCLUDED_M17_M17_DECODER_H */
#define M17_API
Definition api.h:19
<+description of block+>
Definition m17_decoder.h:25
virtual void scrambler_sequence_generator()=0
virtual void set_signed(bool signed_str)=0
virtual void set_vt_threshold(float vt_threshold)=0
virtual void set_seed(std::string seed)=0
virtual void set_sw_threshold(float sw_threshold)=0
virtual uint32_t scrambler_seed_calculation(int8_t subtype, uint32_t key, int fn)=0
virtual void set_callsign(bool callsign)=0
virtual void set_pub_key(std::string pub_key)=0
std::shared_ptr< m17_decoder > sptr
Definition m17_decoder.h:27
virtual void set_undecodable_out(int mode)=0
virtual void set_key(std::string key)=0
static sptr make(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=0)
Return a shared_ptr to a new instance of m17::m17_decoder.
@ ENCR_RES
Definition m17_decoder.h:33
@ ENCR_SCRAM
Definition m17_decoder.h:31
@ ENCR_AES
Definition m17_decoder.h:32
@ ENCR_NONE
Definition m17_decoder.h:30
Definition codec2_decoder.h:17
Definition codec2_decoder.h:15