From e20160b7cc480176ba629ebfbe9fb073963c25d3 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sat, 19 Jun 2010 11:27:56 -0700 Subject: gr-usrp2: implement start_streaming_at(usrp2::fpga_timestamp time) This new method on usrp2.sink_* causes the first TX sample data to be sent at the FPGA clock time specified, with all further data immediately following. u = usrp2.sink_32fc() # or 16sc ...configure sink here... u.sync_to_pps() ...delay a second for PPS to have happened u.start_streaming_at(int(100e6)) # start TX stream one second later ...start flowgraph here... If this function is not called, all transmit data will be sent immediately (the prior behavior). --- gr-usrp2/src/usrp2_sink_base.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gr-usrp2/src/usrp2_sink_base.cc') diff --git a/gr-usrp2/src/usrp2_sink_base.cc b/gr-usrp2/src/usrp2_sink_base.cc index ce473f236..c9b34a54a 100644 --- a/gr-usrp2/src/usrp2_sink_base.cc +++ b/gr-usrp2/src/usrp2_sink_base.cc @@ -36,7 +36,9 @@ usrp2_sink_base::usrp2_sink_base(const char *name, : usrp2_base(name, input_signature, gr_make_io_signature(0, 0, 0), - ifc, mac) + ifc, mac), + d_should_wait(false), + d_tx_time(0) { // NOP } @@ -155,3 +157,10 @@ bool usrp2_sink_base::read_gpio(uint16_t *value) { return d_u2->read_gpio(usrp2::GPIO_TX_BANK, value); } + +bool usrp2_sink_base::start_streaming_at(usrp2::fpga_timestamp time) +{ + d_should_wait = true; + d_tx_time = time; + return true; +} -- cgit