Merge branch 'master' into next
This commit is contained in:
+7
-1
@@ -45,7 +45,13 @@ endif()
|
|||||||
|
|
||||||
find_package(UHD)
|
find_package(UHD)
|
||||||
if(NOT UHD_FOUND)
|
if(NOT UHD_FOUND)
|
||||||
message(FATAL_ERROR "UHD library not found.")
|
message(STATUS "UHD library not found, no support for timed TX.")
|
||||||
|
set(UHD_INCLUDE_DIRS "")
|
||||||
|
set(UHD_LIBRARY_DIRS "")
|
||||||
|
set(UHD_LIBRARIES "")
|
||||||
|
else()
|
||||||
|
message(STATUS "UHD library found.")
|
||||||
|
add_definitions(-DFOO_UHD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef FOO_UHD
|
||||||
#include <uhd/types/time_spec.hpp>
|
#include <uhd/types/time_spec.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace gr::foo;
|
using namespace gr::foo;
|
||||||
|
|
||||||
@@ -60,6 +62,7 @@ int work (int noutput_items, gr_vector_int& ninput_items,
|
|||||||
int produced = ninput_items[0] + d_pad_front + d_pad_tail;
|
int produced = ninput_items[0] + d_pad_front + d_pad_tail;
|
||||||
const pmt::pmt_t src = pmt::string_to_symbol(alias());
|
const pmt::pmt_t src = pmt::string_to_symbol(alias());
|
||||||
|
|
||||||
|
#ifdef FOO_UHD
|
||||||
if(d_delay) {
|
if(d_delay) {
|
||||||
static const pmt::pmt_t time_key = pmt::string_to_symbol("tx_time");
|
static const pmt::pmt_t time_key = pmt::string_to_symbol("tx_time");
|
||||||
struct timeval t;
|
struct timeval t;
|
||||||
@@ -73,6 +76,7 @@ int work (int noutput_items, gr_vector_int& ninput_items,
|
|||||||
);
|
);
|
||||||
add_item_tag(0, nitems_written(0), time_key, time_value, src);
|
add_item_tag(0, nitems_written(0), time_key, time_value, src);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::vector<gr::tag_t> tags;
|
std::vector<gr::tag_t> tags;
|
||||||
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0) + ninput_items[0]);
|
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0) + ninput_items[0]);
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef FOO_UHD
|
||||||
#include <uhd/types/time_spec.hpp>
|
#include <uhd/types/time_spec.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace gr::foo;
|
using namespace gr::foo;
|
||||||
|
|
||||||
@@ -53,6 +55,7 @@ packet_pad_impl::add_sob(uint64_t item) {
|
|||||||
static const pmt::pmt_t srcid = pmt::string_to_symbol(alias());
|
static const pmt::pmt_t srcid = pmt::string_to_symbol(alias());
|
||||||
add_item_tag(0, item, sob_key, value, srcid);
|
add_item_tag(0, item, sob_key, value, srcid);
|
||||||
|
|
||||||
|
#ifdef FOO_UHD
|
||||||
if(d_delay) {
|
if(d_delay) {
|
||||||
static const pmt::pmt_t time_key = pmt::string_to_symbol("tx_time");
|
static const pmt::pmt_t time_key = pmt::string_to_symbol("tx_time");
|
||||||
struct timeval t;
|
struct timeval t;
|
||||||
@@ -66,6 +69,7 @@ packet_pad_impl::add_sob(uint64_t item) {
|
|||||||
);
|
);
|
||||||
add_item_tag(0, item, time_key, time_value, srcid);
|
add_item_tag(0, item, time_key, time_value, srcid);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user