updating code to work with gnuradio pre-release 3.7
This commit is contained in:
+6
-10
@@ -82,15 +82,11 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
|
||||
########################################################################
|
||||
# Find gnuradio build dependencies
|
||||
########################################################################
|
||||
find_package(Gruel)
|
||||
find_package(GnuradioCore)
|
||||
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS PMT FILTER FFT)
|
||||
find_package(Gnuradio)
|
||||
|
||||
if(NOT GRUEL_FOUND)
|
||||
message(FATAL_ERROR "Gruel required to compile IEEE802-15-4")
|
||||
endif()
|
||||
|
||||
if(NOT GNURADIO_CORE_FOUND)
|
||||
message(FATAL_ERROR "GnuRadio Core required to compile IEEE802-15-4")
|
||||
if(NOT GNURADIO_RUNTIME_FOUND)
|
||||
message(FATAL_ERROR "GnuRadio Runtime required to compile IEEE802-15-4")
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
@@ -101,13 +97,13 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GRUEL_INCLUDE_DIRS}
|
||||
${GNURADIO_CORE_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${Boost_LIBRARY_DIRS}
|
||||
${GRUEL_LIBRARY_DIRS}
|
||||
${GNURADIO_CORE_LIBRARY_DIRS}
|
||||
${GNURADIO_RUNTIME_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(GR_IEEE802_11_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_DECODE_MAC_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_decode_mac : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_decode_mac : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_DECODE_SIGNAL_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_decode_signal : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_decode_signal : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_EQUALIZE_SYMBOLS_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_equalize_symbols : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_equalize_symbols : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_PARSE_MAC_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_parse_mac : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_parse_mac : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_SYNC_LONG_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_sync_long : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_sync_long : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
#define INCLUDED_GR_IEEE802_11_OFDM_SYNC_SHORT_H
|
||||
|
||||
#include <gnuradio/ieee802_11/api.h>
|
||||
#include <gnuradio/gr_block.h>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
namespace gr {
|
||||
namespace ieee802_11 {
|
||||
|
||||
class GR_IEEE802_11_API ofdm_sync_short : virtual public gr_block
|
||||
class GR_IEEE802_11_API ofdm_sync_short : virtual public gr::block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
+4
-3
@@ -31,12 +31,13 @@ list(APPEND gr_ieee802_11_sources
|
||||
|
||||
list(APPEND gr_ieee802_11_libs
|
||||
${Boost_LIBRARIES}
|
||||
${GRUEL_LIBRARIES}
|
||||
${GNURADIO_CORE_LIBRARIES}
|
||||
${GNURADIO_RUNTIME_LIBRARIES}
|
||||
${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_FFT_LIBRARIES}
|
||||
)
|
||||
|
||||
add_library(gnuradio-ieee802_11 SHARED ${gr_ieee802_11_sources})
|
||||
target_link_libraries(gnuradio-ieee802_11 ${gr_ieee802_11_libs} itpp gnuradio-fft gnuradio-filter)
|
||||
target_link_libraries(gnuradio-ieee802_11 ${gr_ieee802_11_libs} itpp)
|
||||
set_target_properties(gnuradio-ieee802_11 PROPERTIES DEFINE_SYMBOL "gnuradio_ieee802_11_EXPORTS")
|
||||
|
||||
########################################################################
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gnuradio/ieee802_11/ofdm_decode_mac.h>
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <itpp/itcomm.h>
|
||||
|
||||
#include <iostream>
|
||||
@@ -173,9 +173,9 @@ class ofdm_decode_mac_impl : public ofdm_decode_mac {
|
||||
#define dout d_debug && std::cout
|
||||
|
||||
public:
|
||||
ofdm_decode_mac_impl(bool debug) : gr_block("ofdm_decode_mac",
|
||||
gr_make_io_signature(1, 1, 48 * sizeof(gr_complex)),
|
||||
gr_make_io_signature(0, 0, 0)),
|
||||
ofdm_decode_mac_impl(bool debug) : gr::block("ofdm_decode_mac",
|
||||
gr::io_signature::make(1, 1, 48 * sizeof(gr_complex)),
|
||||
gr::io_signature::make(0, 0, 0)),
|
||||
d_debug(debug),
|
||||
ofdm(BPSK_1_2),
|
||||
tx(ofdm, 0) {
|
||||
@@ -194,7 +194,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
|
||||
int i = 0;
|
||||
|
||||
std::vector<gr_tag_t> tags;
|
||||
std::vector<gr::tag_t> tags;
|
||||
const uint64_t nread = this->nitems_read(0);
|
||||
|
||||
dout << "Decode MAC: input " << ninput_items[0] << std::endl;
|
||||
@@ -202,12 +202,12 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
while(i < ninput_items[0]) {
|
||||
|
||||
get_tags_in_range(tags, 0, nread + i * 48, nread + (i + 1) * 48 - 1,
|
||||
pmt::pmt_string_to_symbol("ofdm_start"));
|
||||
pmt::string_to_symbol("ofdm_start"));
|
||||
|
||||
if(tags.size()) {
|
||||
pmt::pmt_t tuple = tags[0].value;
|
||||
int len_data = pmt::pmt_to_uint64(pmt::pmt_car(tuple));
|
||||
int encoding = pmt::pmt_to_uint64(pmt::pmt_cdr(tuple));
|
||||
int len_data = pmt::to_uint64(pmt::car(tuple));
|
||||
int encoding = pmt::to_uint64(pmt::cdr(tuple));
|
||||
|
||||
ofdm = ofdm_param((ENCODING)encoding);
|
||||
tx = tx_param(ofdm, len_data);
|
||||
@@ -251,7 +251,7 @@ void decode() {
|
||||
print_output();
|
||||
|
||||
// skip service field
|
||||
pmt::pmt_t blob = pmt::pmt_make_blob(out_bytes + 2, tx.psdu_size);
|
||||
pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, tx.psdu_size);
|
||||
message_port_pub(pmt::mp("out"), blob);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gnuradio/ieee802_11/ofdm_decode_signal.h>
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <itpp/itcomm.h>
|
||||
@@ -29,15 +29,15 @@ class ofdm_decode_signal_impl : public ofdm_decode_signal {
|
||||
#define dout d_debug && std::cout
|
||||
|
||||
public:
|
||||
ofdm_decode_signal_impl(bool debug) : gr_block("ofdm_decode_signal",
|
||||
gr_make_io_signature(1, 1, 48 * sizeof(gr_complex)),
|
||||
gr_make_io_signature(1, 1, 48 * sizeof(gr_complex))),
|
||||
ofdm_decode_signal_impl(bool debug) : gr::block("ofdm_decode_signal",
|
||||
gr::io_signature::make(1, 1, 48 * sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, 48 * sizeof(gr_complex))),
|
||||
d_debug(debug),
|
||||
d_copy_symbols(0) {
|
||||
|
||||
decoded_bits.set_size(24);
|
||||
set_relative_rate(1);
|
||||
set_tag_propagation_policy(gr_block::TPP_DONT);
|
||||
set_tag_propagation_policy(gr::block::TPP_DONT);
|
||||
}
|
||||
|
||||
~ofdm_decode_signal_impl(){
|
||||
@@ -53,7 +53,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
int i = 0;
|
||||
int o = 0;
|
||||
|
||||
std::vector<gr_tag_t> tags;
|
||||
std::vector<gr::tag_t> tags;
|
||||
const uint64_t nread = nitems_read(0);
|
||||
|
||||
dout << "Decode Signal: input " << ninput_items[0]
|
||||
@@ -62,7 +62,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
while((i < ninput_items[0]) && (o < noutput_items)) {
|
||||
|
||||
get_tags_in_range(tags, 0, nread + i * 48, nread + (i + 1) * 48 - 1,
|
||||
pmt::pmt_string_to_symbol("ofdm_start"));
|
||||
pmt::string_to_symbol("ofdm_start"));
|
||||
|
||||
if(tags.size()) {
|
||||
for(int n = 0; n < 48; n++) {
|
||||
@@ -76,10 +76,10 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
if(print_signal()) {
|
||||
|
||||
add_item_tag(0, nitems_written(0) + o * 48,
|
||||
pmt::pmt_string_to_symbol("ofdm_start"),
|
||||
pmt::pmt_cons(pmt::pmt_from_uint64(d_len),
|
||||
pmt::pmt_from_uint64(d_encoding)),
|
||||
pmt::pmt_string_to_symbol(name()));
|
||||
pmt::string_to_symbol("ofdm_start"),
|
||||
pmt::cons(pmt::from_uint64(d_len),
|
||||
pmt::from_uint64(d_encoding)),
|
||||
pmt::string_to_symbol(name()));
|
||||
}
|
||||
|
||||
} else if(d_copy_symbols) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gnuradio/ieee802_11/ofdm_equalize_symbols.h>
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -27,9 +27,9 @@ class ofdm_equalize_symbols_impl : public ofdm_equalize_symbols {
|
||||
#define dout d_debug && std::cout
|
||||
|
||||
public:
|
||||
ofdm_equalize_symbols_impl(bool debug) : gr_block("ofdm_equalize_symbols",
|
||||
gr_make_io_signature(1, 1, 64 * sizeof(gr_complex)),
|
||||
gr_make_io_signature(1, 1, 48 * sizeof(gr_complex))),
|
||||
ofdm_equalize_symbols_impl(bool debug) : gr::block("ofdm_equalize_symbols",
|
||||
gr::io_signature::make(1, 1, 64 * sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, 48 * sizeof(gr_complex))),
|
||||
d_debug(debug) {
|
||||
|
||||
set_relative_rate(1);
|
||||
@@ -48,7 +48,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
int noutput = noutput_items;
|
||||
int i = 0;
|
||||
|
||||
std::vector<gr_tag_t> tags;
|
||||
std::vector<gr::tag_t> tags;
|
||||
const uint64_t nread = nitems_read(0);
|
||||
|
||||
dout << "SYMBOLS: input " << ninput_items[0] << " output " << noutput_items << std::endl;
|
||||
@@ -56,7 +56,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
while((i < ninput_items[0]) && (i < noutput)) {
|
||||
|
||||
get_tags_in_range(tags, 0, nread + i * 64, nread + (i + 1) * 64 - 1,
|
||||
pmt::pmt_string_to_symbol("ofdm_start"));
|
||||
pmt::string_to_symbol("ofdm_start"));
|
||||
|
||||
if(tags.size()) {
|
||||
index = 0;
|
||||
|
||||
+15
-15
@@ -17,8 +17,8 @@
|
||||
#include <gnuradio/ieee802_11/ofdm_parse_mac.h>
|
||||
#include "ofdm_parse_mac_impl.h"
|
||||
|
||||
#include <gr_io_signature.h>
|
||||
#include <gr_block_detail.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <gnuradio/block_detail.h>
|
||||
#include <string>
|
||||
|
||||
using namespace gr::ieee802_11;
|
||||
@@ -30,9 +30,9 @@ class ofdm_parse_mac_impl : public ofdm_parse_mac {
|
||||
public:
|
||||
|
||||
ofdm_parse_mac_impl(bool debug) :
|
||||
gr_block("ofdm_parse_mac",
|
||||
gr_make_io_signature (0, 0, 0),
|
||||
gr_make_io_signature (0, 0, 0)),
|
||||
gr::block("ofdm_parse_mac",
|
||||
gr::io_signature::make (0, 0, 0),
|
||||
gr::io_signature::make (0, 0, 0)),
|
||||
d_debug(debug) {
|
||||
|
||||
message_port_register_out(pmt::mp("out"));
|
||||
@@ -82,16 +82,16 @@ unsigned int crc32(const char *buf, int len) {
|
||||
|
||||
void parse(pmt::pmt_t msg) {
|
||||
|
||||
if(pmt::pmt_is_eof_object(msg)) {
|
||||
if(pmt::is_eof_object(msg)) {
|
||||
message_port_pub(pmt::mp("out"), pmt::PMT_EOF);
|
||||
detail().get()->set_done(true);
|
||||
return;
|
||||
}
|
||||
|
||||
assert(pmt::pmt_is_blob(msg));
|
||||
assert(pmt::is_blob(msg));
|
||||
|
||||
int data_len = pmt::pmt_blob_length(msg);
|
||||
mac_header *h = (mac_header*)pmt::pmt_blob_data(msg);
|
||||
int data_len = pmt::blob_length(msg);
|
||||
mac_header *h = (mac_header*)pmt::blob_data(msg);
|
||||
|
||||
dout << std::endl << "new mac frame (length " << data_len << ")" << std::endl;
|
||||
dout << "=========================================" << std::endl;
|
||||
@@ -125,7 +125,7 @@ void parse(pmt::pmt_t msg) {
|
||||
break;
|
||||
}
|
||||
|
||||
bool crc = check_crc((char*)pmt::pmt_blob_data(msg), data_len);
|
||||
bool crc = check_crc((char*)pmt::blob_data(msg), data_len);
|
||||
dout << "crc ";
|
||||
dout << (crc ? "correct" : "wrong") << std::endl;
|
||||
|
||||
@@ -134,21 +134,21 @@ void parse(pmt::pmt_t msg) {
|
||||
return;
|
||||
}
|
||||
|
||||
char *frame = (char*)pmt::pmt_blob_data(msg);
|
||||
char *frame = (char*)pmt::blob_data(msg);
|
||||
frame[data_len - 4] = '\n';
|
||||
|
||||
// DATA
|
||||
if((((h->frame_control) >> 2) & 63) == 2) {
|
||||
print_ascii(frame + 24, data_len - 24 - 4);
|
||||
pmt::pmt_t payload = pmt::pmt_make_blob(frame + 24, data_len - 24 - 3);
|
||||
pmt::pmt_t payload = pmt::make_blob(frame + 24, data_len - 24 - 3);
|
||||
|
||||
message_port_pub(pmt::mp("out"), pmt::pmt_cons(pmt::PMT_NIL, payload));
|
||||
message_port_pub(pmt::mp("out"), pmt::cons(pmt::PMT_NIL, payload));
|
||||
// QoS Data
|
||||
} else if((((h->frame_control) >> 2) & 63) == 34) {
|
||||
print_ascii(frame + 26, data_len - 26 - 4);
|
||||
pmt::pmt_t payload = pmt::pmt_make_blob(frame + 26, data_len - 26 - 3);
|
||||
pmt::pmt_t payload = pmt::make_blob(frame + 26, data_len - 26 - 3);
|
||||
|
||||
message_port_pub(pmt::mp("out"), pmt::pmt_cons(pmt::PMT_NIL, payload));
|
||||
message_port_pub(pmt::mp("out"), pmt::cons(pmt::PMT_NIL, payload));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gnuradio/ieee802_11/ofdm_sync_long.h>
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <filter/fir_filter.h>
|
||||
#include <fft/fft.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <gnuradio/filter/fir_filter.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
|
||||
#include <list>
|
||||
#include <tuple>
|
||||
@@ -31,9 +31,9 @@ class ofdm_sync_long_impl : public ofdm_sync_long {
|
||||
#define dout d_debug && std::cout
|
||||
|
||||
public:
|
||||
ofdm_sync_long_impl(unsigned int sync_lenght, unsigned int freq_est, bool debug) : gr_block("ofdm_sync_long",
|
||||
gr_make_io_signature2(2, 2, sizeof(gr_complex), sizeof(gr_complex)),
|
||||
gr_make_io_signature(1, 1, sizeof(gr_complex))),
|
||||
ofdm_sync_long_impl(unsigned int sync_lenght, unsigned int freq_est, bool debug) : gr::block("ofdm_sync_long",
|
||||
gr::io_signature::make2(2, 2, sizeof(gr_complex), sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_debug(debug),
|
||||
d_offset(0),
|
||||
d_freq_est(0),
|
||||
@@ -41,7 +41,7 @@ ofdm_sync_long_impl(unsigned int sync_lenght, unsigned int freq_est, bool debug)
|
||||
SYNC_LENGTH(sync_lenght),
|
||||
FREQ_EST(freq_est) {
|
||||
|
||||
set_tag_propagation_policy(gr_block::TPP_DONT);
|
||||
set_tag_propagation_policy(gr::block::TPP_DONT);
|
||||
d_fir = new gr::filter::kernel::fir_filter_ccc(1, LONG);
|
||||
d_correlation = gr::fft::malloc_complex(8192);
|
||||
}
|
||||
@@ -68,9 +68,9 @@ int general_work (int noutput, gr_vector_int& ninput_items,
|
||||
const unsigned int nread = nitems_read(0);
|
||||
get_tags_in_range(d_tags, 0, nread, nread + ninput);
|
||||
if (d_tags.size()) {
|
||||
std::sort(d_tags.begin(), d_tags.end(), gr_tag_t::offset_compare);
|
||||
std::sort(d_tags.begin(), d_tags.end(), gr::tag_t::offset_compare);
|
||||
|
||||
const gr_tag_t &tag = d_tags.front();
|
||||
const gr::tag_t &tag = d_tags.front();
|
||||
const uint64_t offset = tag.offset;
|
||||
|
||||
if(offset > nread) {
|
||||
@@ -125,9 +125,9 @@ int general_work (int noutput, gr_vector_int& ninput_items,
|
||||
if(rel == 16) {
|
||||
assert(o == 0);
|
||||
add_item_tag(0, nitems_written(0) + o,
|
||||
pmt::pmt_string_to_symbol("ofdm_start"),
|
||||
pmt::string_to_symbol("ofdm_start"),
|
||||
pmt::PMT_T,
|
||||
pmt::pmt_string_to_symbol(name()));
|
||||
pmt::string_to_symbol(name()));
|
||||
}
|
||||
|
||||
out[o] = in_delayed[i] * exp(gr_complex(0, d_offset * arg(d_freq_est) / 16));
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
gr_complex d_freq_est;
|
||||
gr_complex *d_correlation;
|
||||
std::list<std::tuple<double, int>> d_cor;
|
||||
std::vector<gr_tag_t> d_tags;
|
||||
std::vector<gr::tag_t> d_tags;
|
||||
gr::filter::kernel::fir_filter_ccc *d_fir;
|
||||
|
||||
const bool d_debug;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gnuradio/ieee802_11/ofdm_sync_short.h>
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -27,9 +27,9 @@ class ofdm_sync_short_impl : public ofdm_sync_short {
|
||||
|
||||
public:
|
||||
ofdm_sync_short_impl(double threshold, unsigned int max_samples,
|
||||
unsigned int min_plateau, bool debug) : gr_block("ofdm_sync_short",
|
||||
gr_make_io_signature2(2, 2, sizeof(gr_complex), sizeof(float)),
|
||||
gr_make_io_signature(1, 1, sizeof(gr_complex))),
|
||||
unsigned int min_plateau, bool debug) : gr::block("ofdm_sync_short",
|
||||
gr::io_signature::make2(2, 2, sizeof(gr_complex), sizeof(float)),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_debug(debug),
|
||||
d_state(SEARCH),
|
||||
d_plateau(0),
|
||||
@@ -37,7 +37,7 @@ ofdm_sync_short_impl(double threshold, unsigned int max_samples,
|
||||
MIN_PLATEAU(min_plateau),
|
||||
d_threshold(threshold) {
|
||||
|
||||
set_tag_propagation_policy(gr_block::TPP_DONT);
|
||||
set_tag_propagation_policy(gr::block::TPP_DONT);
|
||||
}
|
||||
|
||||
~ofdm_sync_short_impl(){
|
||||
@@ -110,9 +110,9 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
|
||||
void insert_tag(uint64_t item) {
|
||||
dout << "SYNC SHORT: insert ofdm_start at: " << item << std::endl;
|
||||
|
||||
const pmt::pmt_t key = pmt::pmt_string_to_symbol("ofdm_start");
|
||||
const pmt::pmt_t key = pmt::string_to_symbol("ofdm_start");
|
||||
const pmt::pmt_t value = pmt::PMT_T;
|
||||
const pmt::pmt_t srcid = pmt::pmt_string_to_symbol(name());
|
||||
const pmt::pmt_t srcid = pmt::string_to_symbol(name());
|
||||
add_item_tag(0, item, key, value, srcid);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ set(GR_SWIG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
foreach(incdir ${GNURADIO_CORE_INCLUDE_DIRS})
|
||||
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/swig)
|
||||
foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
|
||||
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
||||
endforeach(incdir)
|
||||
|
||||
foreach(incdir ${GRUEL_INCLUDE_DIRS})
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
%define GR_IEEE802_11_BLOCK_MAGIC2(PKG, BASE_NAME)
|
||||
%template(BASE_NAME ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>;
|
||||
%pythoncode %{
|
||||
BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
|
||||
BASE_NAME ## _sptr.__repr__ = lambda self: "<gr::block %s (%d)>" % (self.name(), self.unique_id())
|
||||
BASE_NAME = BASE_NAME.make;
|
||||
%}
|
||||
%enddef
|
||||
|
||||
Reference in New Issue
Block a user