diff --git a/CMakeLists.txt b/CMakeLists.txt index 60f7cd5..8df78dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/examples/ofdm_rx.grc b/examples/ofdm_rx.grc index 47cfb81..99f277c 100644 --- a/examples/ofdm_rx.grc +++ b/examples/ofdm_rx.grc @@ -1,6 +1,6 @@ - Fri May 3 14:41:28 2013 + Fri May 31 10:55:49 2013 options @@ -779,7 +779,7 @@ - gr_skiphead + blocks_skiphead id gr_skiphead_0 @@ -841,7 +841,7 @@ - gr_multiply_xx + blocks_multiply_xx id gr_multiply_xx_0 @@ -872,7 +872,7 @@ - gr_complex_to_mag + blocks_complex_to_mag id gr_complex_to_mag_0 @@ -895,7 +895,7 @@ - gr_file_sink + blocks_file_sink id gr_file_sink_0_1_0 @@ -930,7 +930,7 @@ - gr_vector_to_stream + blocks_vector_to_stream id gr_vector_to_stream_0_0 @@ -961,7 +961,7 @@ - gr_file_sink + blocks_file_sink id gr_file_sink_0_1 @@ -996,7 +996,7 @@ - gr_vector_to_stream + blocks_vector_to_stream id gr_vector_to_stream_0 @@ -1070,7 +1070,7 @@ - gr_file_sink + blocks_file_sink id gr_file_sink_0 @@ -1105,7 +1105,7 @@ - gr_complex_to_mag_squared + blocks_complex_to_mag_squared id gr_complex_to_mag_squared_0 @@ -1159,7 +1159,7 @@ - gr_tag_debug + blocks_tag_debug id gr_tag_debug_0 @@ -1198,7 +1198,7 @@ - gr_file_sink + blocks_file_sink id gr_file_sink_0_0 @@ -1284,7 +1284,7 @@ - gr_divide_xx + blocks_divide_xx id gr_divide_xx_0 @@ -1315,7 +1315,7 @@ - gr_stream_to_vector + blocks_stream_to_vector id gr_stream_to_vector_0 @@ -1346,7 +1346,7 @@ - gr_conjugate_cc + blocks_conjugate_cc id gr_conjugate_cc_0 @@ -1396,7 +1396,7 @@ - gr_delay + blocks_delay id gr_delay_0_0 @@ -1431,7 +1431,7 @@ - gr_delay + blocks_delay id gr_delay_0 @@ -1562,64 +1562,6 @@ 0 - - ieee802_11_ofdm_parse_mac - - id - ieee802_11_ofdm_parse_mac_0 - - - _enabled - True - - - debug - True - - - _coordinate - (1030, 857) - - - _rotation - 180 - - - - gr_socket_pdu - - id - gr_socket_pdu_0 - - - _enabled - True - - - type - "UDP_SERVER" - - - host - - - - port - 12345 - - - mtu - 10000 - - - _coordinate - (771, 833) - - - _rotation - 180 - - ieee802_1_ofdm_equalize_symbols @@ -1666,29 +1608,6 @@ 0 - - ieee802_1_ofdm_decode_mac - - id - ieee802_1_ofdm_decode_mac_0 - - - _enabled - True - - - debug - False - - - _coordinate - (1069, 729) - - - _rotation - 0 - - ieee802_1_ofdm_sync_short @@ -1724,6 +1643,87 @@ 0 + + ieee802_1_ofdm_decode_mac + + id + ieee802_1_ofdm_decode_mac_0 + + + _enabled + True + + + debug + False + + + _coordinate + (1069, 729) + + + _rotation + 0 + + + + ieee802_11_ofdm_parse_mac + + id + ieee802_11_ofdm_parse_mac_0 + + + _enabled + True + + + debug + True + + + _coordinate + (1030, 857) + + + _rotation + 180 + + + + blocks_socket_pdu + + id + gr_socket_pdu_0 + + + _enabled + True + + + type + "UDP_SERVER" + + + host + + + + port + 12345 + + + mtu + 10000 + + + _coordinate + (771, 839) + + + _rotation + 180 + + uhd_usrp_source_0 gr_skiphead_0 @@ -1874,22 +1874,22 @@ 0 0 - - ieee802_1_ofdm_decode_mac_0 - ieee802_11_ofdm_parse_mac_0 - 0 - 0 - - - ieee802_11_ofdm_parse_mac_0 - gr_socket_pdu_0 - 0 - 0 - gr_divide_xx_0 ieee802_1_ofdm_sync_short_0 0 1 + + ieee802_1_ofdm_decode_mac_0 + ieee802_11_ofdm_parse_mac_0 + out + in + + + ieee802_11_ofdm_parse_mac_0 + gr_socket_pdu_0 + out + pdus + diff --git a/include/gnuradio/ieee802_11/ofdm_decode_mac.h b/include/gnuradio/ieee802_11/ofdm_decode_mac.h index afb11a0..1e64f43 100644 --- a/include/gnuradio/ieee802_11/ofdm_decode_mac.h +++ b/include/gnuradio/ieee802_11/ofdm_decode_mac.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_DECODE_MAC_H #include -#include +#include 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: diff --git a/include/gnuradio/ieee802_11/ofdm_decode_signal.h b/include/gnuradio/ieee802_11/ofdm_decode_signal.h index c9dcc26..e11af67 100644 --- a/include/gnuradio/ieee802_11/ofdm_decode_signal.h +++ b/include/gnuradio/ieee802_11/ofdm_decode_signal.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_DECODE_SIGNAL_H #include -#include +#include 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: diff --git a/include/gnuradio/ieee802_11/ofdm_equalize_symbols.h b/include/gnuradio/ieee802_11/ofdm_equalize_symbols.h index 3c88556..21cf738 100644 --- a/include/gnuradio/ieee802_11/ofdm_equalize_symbols.h +++ b/include/gnuradio/ieee802_11/ofdm_equalize_symbols.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_EQUALIZE_SYMBOLS_H #include -#include +#include 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: diff --git a/include/gnuradio/ieee802_11/ofdm_parse_mac.h b/include/gnuradio/ieee802_11/ofdm_parse_mac.h index e48a256..2a0bb25 100644 --- a/include/gnuradio/ieee802_11/ofdm_parse_mac.h +++ b/include/gnuradio/ieee802_11/ofdm_parse_mac.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_PARSE_MAC_H #include -#include +#include 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: diff --git a/include/gnuradio/ieee802_11/ofdm_sync_long.h b/include/gnuradio/ieee802_11/ofdm_sync_long.h index 97cd010..98f2959 100644 --- a/include/gnuradio/ieee802_11/ofdm_sync_long.h +++ b/include/gnuradio/ieee802_11/ofdm_sync_long.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_SYNC_LONG_H #include -#include +#include 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: diff --git a/include/gnuradio/ieee802_11/ofdm_sync_short.h b/include/gnuradio/ieee802_11/ofdm_sync_short.h index c865b97..7979379 100644 --- a/include/gnuradio/ieee802_11/ofdm_sync_short.h +++ b/include/gnuradio/ieee802_11/ofdm_sync_short.h @@ -18,12 +18,12 @@ #define INCLUDED_GR_IEEE802_11_OFDM_SYNC_SHORT_H #include -#include +#include 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: diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 230dc71..10a7ed2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -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") ######################################################################## diff --git a/lib/ofdm_decode_mac.cc b/lib/ofdm_decode_mac.cc index 8d15171..5d9e20c 100644 --- a/lib/ofdm_decode_mac.cc +++ b/lib/ofdm_decode_mac.cc @@ -15,7 +15,7 @@ * along with this program. If not, see . */ #include -#include +#include #include #include @@ -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 tags; + std::vector 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); } diff --git a/lib/ofdm_decode_signal.cc b/lib/ofdm_decode_signal.cc index 7cb3f22..16fc6fe 100644 --- a/lib/ofdm_decode_signal.cc +++ b/lib/ofdm_decode_signal.cc @@ -15,7 +15,7 @@ * along with this program. If not, see . */ #include -#include +#include #include #include @@ -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 tags; + std::vector 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) { diff --git a/lib/ofdm_equalize_symbols.cc b/lib/ofdm_equalize_symbols.cc index fcb56fc..dbe1f37 100644 --- a/lib/ofdm_equalize_symbols.cc +++ b/lib/ofdm_equalize_symbols.cc @@ -15,7 +15,7 @@ * along with this program. If not, see . */ #include -#include +#include #include @@ -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 tags; + std::vector 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; diff --git a/lib/ofdm_parse_mac.cc b/lib/ofdm_parse_mac.cc index a0485fb..ea99b07 100644 --- a/lib/ofdm_parse_mac.cc +++ b/lib/ofdm_parse_mac.cc @@ -17,8 +17,8 @@ #include #include "ofdm_parse_mac_impl.h" -#include -#include +#include +#include #include 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)); } } diff --git a/lib/ofdm_sync_long.cc b/lib/ofdm_sync_long.cc index 457bf8d..698ab58 100644 --- a/lib/ofdm_sync_long.cc +++ b/lib/ofdm_sync_long.cc @@ -15,9 +15,9 @@ * along with this program. If not, see . */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -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> d_cor; - std::vector d_tags; + std::vector d_tags; gr::filter::kernel::fir_filter_ccc *d_fir; const bool d_debug; diff --git a/lib/ofdm_sync_short.cc b/lib/ofdm_sync_short.cc index d358348..21157a3 100644 --- a/lib/ofdm_sync_short.cc +++ b/lib/ofdm_sync_short.cc @@ -15,7 +15,7 @@ * along with this program. If not, see . */ #include -#include +#include #include @@ -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); } diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index a885777..7ffd62c 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -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}) diff --git a/swig/ieee802_11_factory.i b/swig/ieee802_11_factory.i index 71acdd8..f0a93da 100644 --- a/swig/ieee802_11_factory.i +++ b/swig/ieee802_11_factory.i @@ -17,7 +17,7 @@ %define GR_IEEE802_11_BLOCK_MAGIC2(PKG, BASE_NAME) %template(BASE_NAME ## _sptr) boost::shared_ptr; %pythoncode %{ - BASE_NAME ## _sptr.__repr__ = lambda self: "" % (self.name(), self.unique_id()) + BASE_NAME ## _sptr.__repr__ = lambda self: "" % (self.name(), self.unique_id()) BASE_NAME = BASE_NAME.make; %} %enddef