summaryrefslogtreecommitdiffstats
path: root/host/docs
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-01 18:03:20 -0700
committerJosh Blum <josh@joshknows.com>2011-06-01 18:03:20 -0700
commit365ab9f89eb8d5c22b02607bb3b051fd532844b8 (patch)
tree66eb8a95ff33cfa66a74fc5a990824a4be1441f4 /host/docs
parent9f8a2d036970b6756de68d374f2ba203cddb0028 (diff)
downloaduhd-365ab9f89eb8d5c22b02607bb3b051fd532844b8.tar.gz
uhd-365ab9f89eb8d5c22b02607bb3b051fd532844b8.tar.bz2
uhd-365ab9f89eb8d5c22b02607bb3b051fd532844b8.zip
uhd: pseudocode tweaks for sync docs
Diffstat (limited to 'host/docs')
-rw-r--r--host/docs/sync.rst12
1 files changed, 5 insertions, 7 deletions
diff --git a/host/docs/sync.rst b/host/docs/sync.rst
index 7e9ea11f4..152349990 100644
--- a/host/docs/sync.rst
+++ b/host/docs/sync.rst
@@ -121,25 +121,23 @@ synchronized via the 10MHz and PPS inputs, the streaming will start at exactly
the same time on both devices. The CORDICs are reset at each start-of-burst
command, so users should ensure that every start-of-burst also has a time spec set.
-For receive, a burst is started when the user issues a stream command. This stream command should have a time spec set.
-
+For receive, a burst is started when the user issues a stream command. This stream command should have a time spec set:
::
uhd::stream_cmd_t stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
- stream_cmd.num_samps = spb;
+ stream_cmd.num_samps = samps_to_recv;
stream_cmd.stream_now = false;
- stream_cmd.time_spec = uhd::time_spec_t(seconds_in_future);
+ stream_cmd.time_spec = time_to_recv;
usrp->issue_stream_cmd(stream_cmd);
-For transmit, a burst is started when the user calls send(). The metadata should have a time spec and start of burst set.
-
+For transmit, a burst is started when the user calls send(). The metadata should have a time spec and start of burst set:
::
uhd::tx_metadata_t md;
md.start_of_burst = true;
md.end_of_burst = false;
md.has_time_spec = true;
- md.time_spec = uhd::time_spec_t(time_to_send);
+ md.time_spec = time_to_send;
//send a single packet
size_t num_tx_samps = usrp->get_device()->send(