GNU Radio's M17 Package
m17_coder.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2025 jmfriedt.
4 *
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#ifndef INCLUDED_M17_M17_CODER_H
9#define INCLUDED_M17_M17_CODER_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_coder:virtual public gr::block
25 {
26 public:
27 typedef std::shared_ptr < m17_coder > 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_coder.
38 *
39 * To avoid accidental use of raw pointers, m17::m17_coder's
40 * constructor is in a private implementation
41 * class. m17::m17_coder::make is the public interface for
42 * creating new instances.
43 */
44 static sptr make (std::string src_id, std::string dst_id, int mode,
45 int data, int encr_type, int encr_subtype, int aes_subtype, int can,
46 std::string meta, std::string key,
47 std::string priv_key, bool debug, bool signed_str, std::string seed);
48 virtual void set_key (std::string meta) = 0;
49 virtual void set_priv_key (std::string meta) = 0;
50 virtual void set_seed (std::string dst_id) = 0;
51 virtual void set_meta (std::string meta) = 0;
52 virtual void set_src_id (std::string src_id) = 0;
53 virtual void set_dst_id (std::string dst_id) = 0;
54 virtual void set_debug (bool debug) = 0;
55 virtual void set_signed (bool signed_str) = 0;
56 virtual void set_type (int mode, int data, encr_t encr_type,
57 int encr_subtype, int can) = 0;
58 virtual void set_mode (int mode) = 0;
59 virtual void set_data (int data) = 0;
60 virtual void set_encr_type (int encr_type) = 0;
61 virtual void set_encr_subtype (int encr_subtype) = 0;
62 virtual void set_aes_subtype (int aes_subtype, int encr_type) = 0;
63 virtual void set_can (int can) = 0;
64 };
65
66 } // namespace m17
67} // namespace gr
68
69#endif /* INCLUDED_M17_M17_CODER_H */
#define M17_API
Definition api.h:19
<+description of block+>
Definition m17_coder.h:25
virtual void set_signed(bool signed_str)=0
virtual void set_encr_subtype(int encr_subtype)=0
virtual void set_key(std::string meta)=0
virtual void set_dst_id(std::string dst_id)=0
virtual void set_aes_subtype(int aes_subtype, int encr_type)=0
virtual void set_mode(int mode)=0
std::shared_ptr< m17_coder > sptr
Definition m17_coder.h:27
virtual void set_can(int can)=0
virtual void set_encr_type(int encr_type)=0
encr_t
Definition m17_coder.h:29
@ ENCR_RES
Definition m17_coder.h:33
@ ENCR_NONE
Definition m17_coder.h:30
@ ENCR_SCRAM
Definition m17_coder.h:31
@ ENCR_AES
Definition m17_coder.h:32
virtual void set_src_id(std::string src_id)=0
static sptr make(std::string src_id, std::string dst_id, int mode, int data, int encr_type, int encr_subtype, int aes_subtype, int can, std::string meta, std::string key, std::string priv_key, bool debug, bool signed_str, std::string seed)
Return a shared_ptr to a new instance of m17::m17_coder.
virtual void set_meta(std::string meta)=0
virtual void set_seed(std::string dst_id)=0
virtual void set_type(int mode, int data, encr_t encr_type, int encr_subtype, int can)=0
virtual void set_data(int data)=0
virtual void set_priv_key(std::string meta)=0
Definition m17_coder.h:17
Definition m17_coder.h:15