start porting to 3.9
This commit is contained in:
+7
-14
@@ -1,18 +1,9 @@
|
||||
# Copyright 2011,2012,2016,2018,2019 Free Software Foundation, Inc.
|
||||
#
|
||||
# Copyright (C) 2013, 2016 Bastian Bloessl <bloessl@ccs-labs.org>
|
||||
# This file was generated by gr_modtool, a tool from the GNU Radio framework
|
||||
# This file is a part of gr-ieee802_11
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
|
||||
########################################################################
|
||||
@@ -75,7 +66,9 @@ target_link_libraries(gnuradio-ieee802_11
|
||||
gnuradio::gnuradio-blocks
|
||||
gnuradio::gnuradio-analog
|
||||
gnuradio::gnuradio-fft
|
||||
gnuradio::gnuradio-digital)
|
||||
gnuradio::gnuradio-digital
|
||||
Volk::volk
|
||||
)
|
||||
target_include_directories(gnuradio-ieee802_11
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
gr_vector_void_star& output_items);
|
||||
|
||||
private:
|
||||
boost::shared_ptr<gr::digital::constellation> d_mapping;
|
||||
std::shared_ptr<gr::digital::constellation> d_mapping;
|
||||
constellation_bpsk::sptr d_bpsk;
|
||||
constellation_qpsk::sptr d_qpsk;
|
||||
constellation_16qam::sptr d_16qam;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod) = 0;
|
||||
std::shared_ptr<gr::digital::constellation> mod) = 0;
|
||||
virtual double get_snr() = 0;
|
||||
|
||||
static const gr_complex POLARITY[127];
|
||||
|
||||
@@ -23,7 +23,7 @@ void comb::equalize(gr_complex* in,
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod)
|
||||
std::shared_ptr<gr::digital::constellation> mod)
|
||||
{
|
||||
|
||||
gr_complex pilot[4];
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod);
|
||||
std::shared_ptr<gr::digital::constellation> mod);
|
||||
double get_snr();
|
||||
|
||||
private:
|
||||
|
||||
@@ -25,7 +25,7 @@ void lms::equalize(gr_complex* in,
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod)
|
||||
std::shared_ptr<gr::digital::constellation> mod)
|
||||
{
|
||||
|
||||
if (n == 0) {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public:
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod);
|
||||
std::shared_ptr<gr::digital::constellation> mod);
|
||||
|
||||
private:
|
||||
double get_snr();
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ void ls::equalize(gr_complex* in,
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod)
|
||||
std::shared_ptr<gr::digital::constellation> mod)
|
||||
{
|
||||
|
||||
if (n == 0) {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public:
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod);
|
||||
std::shared_ptr<gr::digital::constellation> mod);
|
||||
virtual double get_snr();
|
||||
|
||||
private:
|
||||
|
||||
@@ -25,7 +25,7 @@ void sta::equalize(gr_complex* in,
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod)
|
||||
std::shared_ptr<gr::digital::constellation> mod)
|
||||
{
|
||||
|
||||
if (n == 0) {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public:
|
||||
int n,
|
||||
gr_complex* symbols,
|
||||
uint8_t* bits,
|
||||
boost::shared_ptr<gr::digital::constellation> mod);
|
||||
std::shared_ptr<gr::digital::constellation> mod);
|
||||
double get_snr();
|
||||
|
||||
private:
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
uint8_t d_deinterleaved[48];
|
||||
gr_complex symbols[48];
|
||||
|
||||
boost::shared_ptr<gr::digital::constellation> d_frame_mod;
|
||||
std::shared_ptr<gr::digital::constellation> d_frame_mod;
|
||||
constellation_bpsk::sptr d_bpsk;
|
||||
constellation_qpsk::sptr d_qpsk;
|
||||
constellation_16qam::sptr d_16qam;
|
||||
|
||||
+6
-5
@@ -19,6 +19,7 @@
|
||||
#include <gnuradio/filter/fir_filter.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <ieee802_11/sync_long.h>
|
||||
#include <volk/volk.h>
|
||||
|
||||
#include <list>
|
||||
#include <tuple>
|
||||
@@ -41,7 +42,7 @@ public:
|
||||
: block("sync_long",
|
||||
gr::io_signature::make2(2, 2, sizeof(gr_complex), sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_fir(gr::filter::kernel::fir_filter_ccc(1, LONG)),
|
||||
d_fir(gr::filter::kernel::fir_filter_ccc(LONG)),
|
||||
d_log(log),
|
||||
d_debug(debug),
|
||||
d_offset(0),
|
||||
@@ -50,10 +51,12 @@ public:
|
||||
{
|
||||
|
||||
set_tag_propagation_policy(block::TPP_DONT);
|
||||
d_correlation = gr::fft::malloc_complex(8192);
|
||||
d_correlation = (gr_complex*)volk_malloc(sizeof(gr_complex) * 8192, volk_get_alignment());
|
||||
}
|
||||
|
||||
~sync_long_impl() { gr::fft::free(d_correlation); }
|
||||
~sync_long_impl() {
|
||||
volk_free(d_correlation);
|
||||
}
|
||||
|
||||
int general_work(int noutput,
|
||||
gr_vector_int& ninput_items,
|
||||
@@ -252,7 +255,6 @@ sync_long::sptr sync_long::make(unsigned int sync_length, bool log, bool debug)
|
||||
}
|
||||
|
||||
const std::vector<gr_complex> sync_long_impl::LONG = {
|
||||
|
||||
gr_complex(-0.0455, -1.0679), gr_complex(0.3528, -0.9865),
|
||||
gr_complex(0.8594, 0.7348), gr_complex(0.1874, 0.2475),
|
||||
gr_complex(0.5309, -0.7784), gr_complex(-1.0218, -0.4897),
|
||||
@@ -285,5 +287,4 @@ const std::vector<gr_complex> sync_long_impl::LONG = {
|
||||
gr_complex(0.5309, 0.7784), gr_complex(0.1874, -0.2475),
|
||||
gr_complex(0.8594, -0.7348), gr_complex(0.3528, 0.9865),
|
||||
gr_complex(-0.0455, 1.0679), gr_complex(1.3868, -0.0000),
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user