summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/uhd_simple_sink.cc
diff options
context:
space:
mode:
authorJosh Blum2010-03-03 12:32:18 -0800
committerJosh Blum2010-03-03 12:32:18 -0800
commit23f6fc0f5f484380fe5f934ec97c4397d3675cb6 (patch)
treeaae98dd4e9cce11e3b406337c92a08a007761fc6 /gr-uhd/lib/uhd_simple_sink.cc
parent6d71414a0a467dc37fc903b327be22f8d0ddeade (diff)
downloadgnuradio-23f6fc0f5f484380fe5f934ec97c4397d3675cb6.tar.gz
gnuradio-23f6fc0f5f484380fe5f934ec97c4397d3675cb6.tar.bz2
gnuradio-23f6fc0f5f484380fe5f934ec97c4397d3675cb6.zip
Got the source and sink working with current uhd.
Diffstat (limited to 'gr-uhd/lib/uhd_simple_sink.cc')
-rw-r--r--gr-uhd/lib/uhd_simple_sink.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gr-uhd/lib/uhd_simple_sink.cc b/gr-uhd/lib/uhd_simple_sink.cc
index 269487f0e..01581bb76 100644
--- a/gr-uhd/lib/uhd_simple_sink.cc
+++ b/gr-uhd/lib/uhd_simple_sink.cc
@@ -66,18 +66,16 @@ int uhd_simple_sink::work(
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items
){
-
- const size_t max_samples = wax::cast<size_t>((*_dev)[uhd::DEVICE_PROP_MAX_TX_SAMPLES]);
size_t total_items_sent = 0;
- uhd::metadata_t metadata;
+ uhd::tx_metadata_t metadata;
metadata.start_of_burst = true;
- //handles fragmentation
+ //call until the input items are all sent
while(total_items_sent < size_t(noutput_items)){
size_t items_sent = _dev->send(
boost::asio::buffer(
(uint8_t *)input_items[0]+(total_items_sent*_sizeof_samp),
- std::min(max_samples, noutput_items-total_items_sent)*_sizeof_samp
+ (noutput_items-total_items_sent)*_sizeof_samp
), metadata, _type
);
total_items_sent += items_sent;