GNU Radio's LORA_SDR Package
add_crc_impl.h
Go to the documentation of this file.
1 #ifndef INCLUDED_LORA_ADD_CRC_IMPL_H
2 #define INCLUDED_LORA_ADD_CRC_IMPL_H
3 
4 
7 namespace gr {
8  namespace lora_sdr {
9 
10  class add_crc_impl : public add_crc
11  {
12  private:
13  bool m_has_crc; ///<indicate the presence of a payload CRC
14  std::vector<uint8_t> m_payload; ///< payload data
15  uint8_t m_payload_len; ///< length of the payload in Bytes
16  int m_frame_len; ///< length of the frame in number of gnuradio items
17  int m_cnt; ///< counter of the number of symbol in frame
18 
19  unsigned int crc16(unsigned int crcValue, unsigned char newByte);
20 
21  public:
22  add_crc_impl(bool has_crc);
24 
25  // Where all the action really happens
26  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
27 
28  int general_work(int noutput_items,
29  gr_vector_int &ninput_items,
30  gr_vector_const_void_star &input_items,
31  gr_vector_void_star &output_items);
32  };
33  } // namespace lora
34 } // namespace gr
35 
36 #endif /* INCLUDED_LORA_ADD_CRC_IMPL_H */
Definition: add_crc_impl.h:11
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: add_crc.h:37
Definition: add_crc.h:28