GNU Radio's LORA_SDR Package
header_decoder_impl.h
Go to the documentation of this file.
1
2#ifndef INCLUDED_LORA_HEADER_DECODER_IMPL_H
3#define INCLUDED_LORA_HEADER_DECODER_IMPL_H
4
7
8namespace gr {
9 namespace lora_sdr {
10
12 {
13 private:
14 const uint8_t header_len = 5; ///< size of the header in nibbles
15
16 bool m_impl_header;///< Specify if we use an explicit or implicit header
17 bool m_print_header; ///< print or not header information in terminal
18 uint8_t m_payload_len;///< The payload length in bytes
19 bool m_has_crc;///< Specify the usage of a payload CRC
20 uint8_t m_cr;///< Coding rate
21 uint8_t m_ldro_mode; ///< use low datarate optimisation
22
23 uint8_t header_chk; ///< The header checksum received in the header
24
25 uint32_t pay_cnt;///< The number of payload nibbles received
26 uint32_t nout;///< The number of data nibbles to output
27 bool is_header ;///< Indicate that we need to decode the header
28
29 /**
30 * \brief Reset the block variables for a new frame.
31 */
32 void new_frame_handler();
33 /**
34 * \brief publish decoding information contained in the header or provided to the block
35 */
36 void publish_frame_info(int cr, int pay_len, int crc, uint8_t ldro, int err);
37
38 public:
39 header_decoder_impl(bool impl_head, uint8_t cr, uint32_t pay_len, bool has_crc, uint8_t ldro_mode, bool print_header);
41
42 void forecast (int noutput_items, gr_vector_int &ninput_items_required);
43
44 int general_work(int noutput_items,
45 gr_vector_int &ninput_items,
46 gr_vector_const_void_star &input_items,
47 gr_vector_void_star &output_items);
48 };
49 } // namespace lora
50} // namespace gr
51
52#endif /* INCLUDED_LORA_HEADER_DECODER_IMPL_H */
Definition header_decoder_impl.h:12
header_decoder_impl(bool impl_head, uint8_t cr, uint32_t pay_len, bool has_crc, uint8_t ldro_mode, bool print_header)
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
<+description of block+>
Definition header_decoder.h:37
ldro_mode
Definition utilities.h:42
Definition add_crc.h:28