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 threshold,
45 bool callsign, bool signed_str, int encr_type,
46 std::string key, std::string seed);
47 virtual void set_debug_data (bool debug) = 0;
48 virtual void set_debug_ctrl (bool debug) = 0;
49 virtual void set_callsign (bool callsign) = 0;
50 virtual void set_threshold (float threshold) = 0;
51 virtual void set_signed (bool signed_str) = 0;
52 virtual void set_key (std::string key) = 0;
53 virtual void set_seed (std::string seed) = 0;
54 virtual void parse_raw_key_string (uint8_t * dest, const char *inp) = 0;
55 virtual void scrambler_sequence_generator () = 0;
56 virtual uint32_t scrambler_seed_calculation (int8_t subtype,
57 uint32_t key, int fn) = 0;
58
59 };
60
61 } // namespace m17
62} // namespace gr
63
64#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_seed(std::string seed)=0
virtual uint32_t scrambler_seed_calculation(int8_t subtype, uint32_t key, int fn)=0
virtual void set_callsign(bool callsign)=0
std::shared_ptr< m17_decoder > sptr
Definition m17_decoder.h:27
virtual void set_key(std::string key)=0
virtual void set_threshold(float threshold)=0
@ 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
static sptr make(bool debug_data, bool debug_ctrl, float threshold, bool callsign, bool signed_str, int encr_type, std::string key, std::string seed)
Return a shared_ptr to a new instance of m17::m17_decoder.
Definition m17_coder.h:17
Definition m17_coder.h:15