GNU Radio's LORA_SDR Package
interleaver_impl.h
Go to the documentation of this file.
1#ifndef INCLUDED_LORA_INTERLEAVER_IMPL_H
2#define INCLUDED_LORA_INTERLEAVER_IMPL_H
3
5// #define GRLORA_DEBUG
6
7namespace gr {
8namespace lora_sdr {
9
11private:
12 /**
13 * @brief Transmission coding rate
14 *
15 */
16 uint8_t m_cr;
17
18 /**
19 * @brief Transmission spreading factor
20 *
21 */
22 uint8_t m_sf;
23
24 /**
25 * @brief variable that counts the number of codewords
26 *
27 */
28 uint32_t cw_cnt;
29
30 /**
31 * @brief length of the frame in number of items
32 *
33 */
34 int m_frame_len;
35
36public:
37 /**
38 * @brief Construct a new interleaver impl object
39 *
40 * @param cr coding rate
41 * @param sf sampling rate
42 */
43 interleaver_impl(uint8_t cr, uint8_t sf);
44
45 /**
46 * @brief Destroy the interleaver impl object
47 *
48 */
50
51 /**
52 * @brief Standard gnuradio function to ensure a number of input items are
53 * received before continuing
54 *
55 * @param noutput_items : number of input items
56 * @param ninput_items_required : number of requires input items = 1
57 */
58 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
59
60 /**
61 * @brief Main function that does the actual computation of the interleaver.
62 *
63 *
64 * @param noutput_items : number of output items
65 * @param ninput_items : number of input items
66 * @param input_items : the data of the input items (i.e hamming encoding stage)
67 * @param output_items : output data
68 * @return int
69 */
70 int general_work(int noutput_items, gr_vector_int &ninput_items,
71 gr_vector_const_void_star &input_items,
72 gr_vector_void_star &output_items);
73};
74
75} // namespace lora_sdr
76} // namespace gr
77
78#endif /* INCLUDED_LORA_INTERLEAVER_IMPL_H */
Definition: interleaver_impl.h:10
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Standard gnuradio function to ensure a number of input items are received before continuing.
~interleaver_impl()
Destroy the interleaver impl object.
interleaver_impl(uint8_t cr, uint8_t sf)
Construct a new interleaver impl object.
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Main function that does the actual computation of the interleaver.
Interleaves the to be sent data, in order to gain more resilience against bit transmission errors For...
Definition: interleaver.h:38
Definition: add_crc.h:28