10#ifndef INCLUDED_LORA_SDR_FRAME_DETECTOR_THRESHOLD_IMPL_H
11#define INCLUDED_LORA_SDR_FRAME_DETECTOR_THRESHOLD_IMPL_H
12#include <gnuradio/io_signature.h>
36 enum State { FIND_PREAMBLE, SEND_PREAMBLE, SEND_FRAME, SEND_END_FRAME };
54 uint32_t m_samples_per_symbol;
72 std::vector<gr_complex> m_downchirp;
78 std::vector<gr_complex> m_dechirped;
84 std::vector<gr_complex> cx_out;
96 std::vector<float>::iterator m_max_it;
102 std::vector<float> m_dfts_mag;
126 std::vector<gr_complex> buffer;
157 int m_inter_frame_padding;
170 double m_symbols_per_second;
176 uint32_t m_samp_rate;
189 std::vector<gr_complex> m_temp;
191 std::vector<float> avg_ratio;
200 std::vector <tag_t> m_tags_vector;
206 bool m_detected_tag_begin;
212 bool m_detected_tag_end;
218 u_int32_t m_end_offset;
224 u_int32_t m_begin_offset;
226 u_int32_t m_begin_store;
231 std::ofstream file_ratio;
241 int32_t get_symbol_val(
const gr_complex *input);
250 bool check_in_frame(
const gr_complex *input);
258 float calc_power(
const gr_complex *input);
266 void set_power(
const gr_complex *input);
293 void forecast(
int noutput_items, gr_vector_int &ninput_items_required);
306 gr_vector_const_void_star &input_items,
307 gr_vector_void_star &output_items);
Definition: frame_detector_threshold_impl.h:26
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
frame_detector_threshold_impl(uint8_t sf, uint32_t samp_rate, uint32_t bw, float threshold)
Construct a new frame detector impl object.
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
General work function. Main gnuradio function that does the heavy lifting.
~frame_detector_threshold_impl()
Destroy the frame detector impl object.
LoRa frame detector threshold, this block detects a LoRa frames using a preamble detection to find th...
Definition: frame_detector_threshold.h:28
Definition: _kiss_fft_guts.h:22