GNU Radio's LORA_SDR Package
err_measures_impl.h
Go to the documentation of this file.
1#ifndef INCLUDED_LORA_SDR_ERR_MEASURES_IMPL_H
2#define INCLUDED_LORA_SDR_ERR_MEASURES_IMPL_H
3
4#define GRLORA_MEASUREMENTS
5
6#include <fstream>
7#include <iostream>
9
10namespace gr {
11namespace lora_sdr {
12
14private:
15 /**
16 * @brief Vector containing the reference payload
17 *
18 */
19 std::vector<char> m_corr_payload;
20
21 /**
22 * @brief Vector containing the received payload
23 *
24 */
25 std::vector<char> m_payload;
26 /**
27 * @brief Bits errors in the frame
28 *
29 */
30 int BE;
31 /**
32 * @brief variable used to detect missing frames
33 *
34 */
35 int drop;
36
37#ifdef GRLORA_MEASUREMENTS
38 std::ofstream err_outfile;
39#endif
40 /**
41 * @brief Msg handler, will handle the incoming decoded message
42 *
43 * @param msg : decoded payload message
44 */
45 void msg_handler(pmt::pmt_t msg);
46
47 /**
48 * @brief Reference handler, input of the reference payload
49 *
50 * @param ref : reference payload to compare against
51 */
52 void ref_handler(pmt::pmt_t ref);
53
54public:
55 /**
56 * @brief Construct a new err measures impl object
57 *
58 */
60
61 /**
62 * @brief Destroy the err measures impl object
63 *
64 */
66
67 /**
68 * @brief Main function of error measurement
69 *
70 * @param noutput_items : number of output items
71 * @param input_items : input items (i.e data from dewhitening)
72 * @param output_items : output data (i.e. decode payload)
73 * @return int
74 */
75 int work(int noutput_items, gr_vector_const_void_star &input_items,
76 gr_vector_void_star &output_items);
77};
78
79} // namespace lora_sdr
80} // namespace gr
81
82#endif /* INCLUDED_LORA_SDR_ERR_MEASURES_IMPL_H */
Definition: err_measures_impl.h:13
err_measures_impl()
Construct a new err measures impl object.
~err_measures_impl()
Destroy the err measures impl object.
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Main function of error measurement.
Simple block that can count and output the number of Bit Error's (BE) ,for more information about the...
Definition: err_measures.h:37
Definition: add_crc.h:28