GNU Radio's LORA_SDR Package
header_impl.h
Go to the documentation of this file.
1 #ifndef INCLUDED_LORA_HEADER_IMPL_H
2 #define INCLUDED_LORA_HEADER_IMPL_H
3 
4 #include <lora_sdr/header.h>
5 
6 namespace gr {
7  namespace lora_sdr {
8 
9  class header_impl : public header
10  {
11  private:
12  bool m_impl_head; ///< indicate if the header is implicit
13  bool m_has_crc; ///< indicate the presence of a payload crc
14  uint8_t m_cr; ///< Transmission coding rate
15  uint8_t m_payload_len; ///< Payload length
16  uint m_cnt_nibbles; ///< count the processes nibbles in a frame
17  uint m_cnt_header_nibbles; ///< count the number of explicit header nibbles output
18  std::vector<uint8_t> m_header; ///< contain the header to prepend
19 
20 
21  std::vector<tag_t> m_tags;
22  void msg_handler(pmt::pmt_t message);
23 
24  public:
25  header_impl(bool impl_head, bool has_crc, uint8_t cr);
26  ~header_impl();
27 
28  void set_cr(uint8_t cr);
29  uint8_t get_cr();
30 
31 
32  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
33 
34  int general_work(int noutput_items,
35  gr_vector_int &ninput_items,
36  gr_vector_const_void_star &input_items,
37  gr_vector_void_star &output_items);
38 
39  };
40 
41  } // namespace lora
42 } // namespace gr
43 
44 #endif /* INCLUDED_LORA_HEADER_IMPL_H */
<+description of block+>
Definition: header.h:36
header_impl(bool impl_head, bool has_crc, uint8_t cr)
void set_cr(uint8_t cr)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Definition: add_crc.h:28
Definition: header_impl.h:9
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)