GNU Radio's SATNOGS Package
ax25_encoder_mb.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
4  *
5  * Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef INCLUDED_SATNOGS_AX25_ENCODER_MB_H
22 #define INCLUDED_SATNOGS_AX25_ENCODER_MB_H
23 
24 #include <satnogs/api.h>
25 #include <gnuradio/sync_block.h>
26 
27 namespace gr {
28 namespace satnogs {
29 
30 /*!
31  * \brief AX.25 encoder block that supports the legacy hardware radios.
32  *
33  * The block takes as inputs blob PMT messages and generates a byte stream.
34  * Each output byte contains only one LSB, thus the output can be directly
35  * used for FM modulation.
36  *
37  * \ingroup satnogs
38  *
39  */
40 class SATNOGS_API ax25_encoder_mb : virtual public gr::sync_block {
41 public:
42  typedef boost::shared_ptr<ax25_encoder_mb> sptr;
43 
44 
45  /**
46  * AX.25 encoder block that supports the legacy hardware radios.
47  *
48  * The block takes as inputs blob PMT messages and generates a byte stream.
49  * Each output byte contains only one LSB, thus the output can be directly
50  * used for FM modulation.
51  *
52  * @param dest_addr the destination callsign
53  * @param dest_ssid the destination SSID
54  * @param src_addr the source callsign
55  * @param src_ssid the source SSID
56  * @param preamble_len the number of times that the AX.25 synchronization flags
57  * should be repeated in front of the frame.
58  * @param postamble_len the number of times that the AX.25 synchronization flags
59  * should be repeated at the end of the frame.
60  * @param scramble if set to true, G3RUH scrambling will be performed
61  * after bit stuffing
62  */
63  static sptr
64  make(const std::string &dest_addr, uint8_t dest_ssid,
65  const std::string &src_addr,
66  uint8_t src_ssid, size_t preamble_len = 16,
67  size_t postamble_len = 16,
68  bool scramble = true);
69 };
70 
71 } // namespace satnogs
72 } // namespace gr
73 
74 #endif /* INCLUDED_SATNOGS_AX25_ENCODER_MB_H */
75 
boost::shared_ptr< ax25_encoder_mb > sptr
Definition: ax25_encoder_mb.h:42
AX.25 encoder block that supports the legacy hardware radios.
Definition: ax25_encoder_mb.h:40
Definition: amsat_duv_decoder.h:29
#define SATNOGS_API
Definition: api.h:30