GNU Radio's LORA_SDR Package
noise_est_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2020 Joachim Tapparel TCL@EPFL.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_LORA_SDR_NOISE_EST_IMPL_H
22#define INCLUDED_LORA_SDR_NOISE_EST_IMPL_H
23
24#include <lora_sdr/noise_est.h>
25#include <volk/volk.h>
26
27namespace gr {
28namespace lora_sdr {
29class noise_est_impl : public noise_est {
30private:
31 /**
32 * @brief Number of samples used for the noise estimation
33 *
34 */
35 uint32_t m_n_samples;
36
37 /**
38 * @brief Noise estimation
39 *
40 */
41 float m_noise_est;
42
43 /**
44 * @brief Indicate that the noise estimation has not been performed yet
45 *
46 */
47 bool is_first;
48
49public:
50 /**
51 * @brief Construct a new noise est impl object
52 *
53 * @param n_samples
54 */
55 noise_est_impl(uint32_t n_samples);
56 /**
57 * @brief Destroy the noise est impl object
58 *
59 */
61
62 /**
63 * @brief
64 *
65 * @param noutput_items
66 * @param input_items
67 * @param output_items
68 * @return int
69 */
70 int work(int noutput_items, gr_vector_const_void_star &input_items,
71 gr_vector_void_star &output_items);
72};
73
74} // namespace lora_sdr
75} // namespace gr
76
77#endif /* INCLUDED_LORA_SDR_NOISE_EST_IMPL_H */
Definition: noise_est_impl.h:29
noise_est_impl(uint32_t n_samples)
Construct a new noise est impl object.
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
~noise_est_impl()
Destroy the noise est impl object.
Definition: noise_est.h:37
Definition: add_crc.h:28