GNU Radio's LORA_SDR Package
hamming_enc_impl.h
Go to the documentation of this file.
1 #ifndef INCLUDED_LORA_HAMMING_ENC_IMPL_H
2 #define INCLUDED_LORA_HAMMING_ENC_IMPL_H
3 
4 #include <lora_sdr/hamming_enc.h>
5 
6 namespace gr {
7 namespace lora_sdr {
8 
9 class hamming_enc_impl : public hamming_enc {
10 private:
11  /**
12  * @brief Transmission coding rate
13  *
14  */
15  uint8_t m_cr;
16 
17  /**
18  * @brief Transmission spreading factor
19  *
20  */
21  uint8_t m_sf;
22 
23  /**
24  * @brief count the number of processed items in the current frame
25  *
26  */
27  int m_cnt;
28 
29 public:
30  /**
31  * @brief Construct a new hamming enc impl object
32  *
33  * @param cr : coding rate
34  * @param sf : spreading factor
35  */
36  hamming_enc_impl(uint8_t cr, uint8_t sf);
37 
38  /**
39  * @brief Destroy the hamming enc impl object
40  *
41  */
43 
44  /**
45  * @brief Main function that does the actual hamming encoding.
46  * With cr : coding rate, and sf : spreading factor
47  *
48  * @param noutput_items : number of output items
49  * @param input_items : number of input items
50  * @param output_items : number of output items
51  * @return int
52  */
53  int work(int noutput_items, gr_vector_const_void_star &input_items,
54  gr_vector_void_star &output_items);
55 };
56 
57 } // namespace lora_sdr
58 } // namespace gr
59 
60 #endif /* INCLUDED_LORA_HAMMING_ENC_IMPL_H */
hamming_enc.h
gr::lora_sdr::hamming_enc_impl::hamming_enc_impl
hamming_enc_impl(uint8_t cr, uint8_t sf)
Construct a new hamming enc impl object.
gr::lora_sdr::hamming_enc_impl::work
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Main function that does the actual hamming encoding. With cr : coding rate, and sf : spreading factor...
gr::lora_sdr::hamming_enc_impl::~hamming_enc_impl
~hamming_enc_impl()
Destroy the hamming enc impl object.
gr::lora_sdr::hamming_enc
Add hamming code to the to be sent playload. This means extra party bits are added to the payload to ...
Definition: hamming_enc.h:38
gr::lora_sdr::hamming_enc_impl
Definition: hamming_enc_impl.h:9
gr
Definition: add_crc.h:28