summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-10 14:37:34 -0800
committerJosh Blum <josh@joshknows.com>2011-03-10 14:37:34 -0800
commit09149bbf7d28f67e68d65f7ba153ccd31ae48e5b (patch)
tree93e2be732f3d5ca2e0eb2b3d528b08ccea97c6a3 /host/examples
parent0336db128e38bd99d69e192189a63ba6d3d3e36b (diff)
downloaduhd-09149bbf7d28f67e68d65f7ba153ccd31ae48e5b.tar.gz
uhd-09149bbf7d28f67e68d65f7ba153ccd31ae48e5b.tar.bz2
uhd-09149bbf7d28f67e68d65f7ba153ccd31ae48e5b.zip
usrp1: safe destruction for usrp1 device
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/rx_timed_samples.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index 630b4a7a9..a9d19dbe8 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -133,6 +133,16 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
num_acc_samps += num_rx_samps;
} done_loop:
+ std::cout << "disconnect now!!!!!!!!\n";
+ sleep(3);
+
+ try{
+ usrp.reset();
+ }
+ catch(...){
+ std::cout << "error caught \n";
+ }
+
//finished
std::cout << std::endl << "Done!" << std::endl << std::endl;