aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorWade Fife <wade.fife@ettus.com>2018-11-08 11:40:07 -0600
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-11-27 16:58:50 -0800
commit84018da8b5022d75b463dd562e2ff45a6b3ae5fc (patch)
tree2830864fc071cacc61a1f83762835b24b2a766bf /host/examples
parent9b700550c26932ffeacdfc935c8ad92c0489d4a0 (diff)
downloaduhd-84018da8b5022d75b463dd562e2ff45a6b3ae5fc.tar.gz
uhd-84018da8b5022d75b463dd562e2ff45a6b3ae5fc.tar.bz2
uhd-84018da8b5022d75b463dd562e2ff45a6b3ae5fc.zip
rfnoc: Add halt to replay API
The HALT feature allows a command that takes a long time to run to be stopped while it is in progress.
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/replay_samples_from_file.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/host/examples/replay_samples_from_file.cpp b/host/examples/replay_samples_from_file.cpp
index f9ef3cd45..a8b5d40e9 100644
--- a/host/examples/replay_samples_from_file.cpp
+++ b/host/examples/replay_samples_from_file.cpp
@@ -346,9 +346,13 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
cout << endl << "Stopping replay..." << endl;
replay_ctrl->issue_stream_cmd(stream_cmd, replay_chan);
+ // The stop takes effect after the current command has completed, so use
+ // halt to stop the command in progress and clear any queued commands.
+ replay_ctrl->play_halt(replay_chan);
+
///////////////////////////////////////////////////////////////////////////
- // Wait for the replay data to flush out
+ // Wait for any buffered replay data to finish playing out
uint16_t prev_packet_count, packet_count;