diff options
author | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-04-30 03:52:31 +0000 |
---|---|---|
committer | eb <eb@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-04-30 03:52:31 +0000 |
commit | 9d1423b9506c89a51a10b6119d01ce9a82a13b0c (patch) | |
tree | 186e1b20618bf805dd262572bd3b2778b767d201 /usrp/host/lib/inband/usrp_tx.cc | |
parent | 7f202514385708941073930bc6d9a5237bb89826 (diff) |
Merged features/inband-usb -r6431:8293 into trunk.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8295 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp/host/lib/inband/usrp_tx.cc')
-rw-r--r-- | usrp/host/lib/inband/usrp_tx.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usrp/host/lib/inband/usrp_tx.cc b/usrp/host/lib/inband/usrp_tx.cc index a7a5e4a894..da87775130 100644 --- a/usrp/host/lib/inband/usrp_tx.cc +++ b/usrp/host/lib/inband/usrp_tx.cc @@ -66,6 +66,10 @@ usrp_tx::initial_transition() } +/*! + * \brief Handles incoming signals to to the m-block, wihch should only ever be + * a single message: cmd-usrp-tx-write. + */ void usrp_tx::handle_message(mb_message_sptr msg) { @@ -82,6 +86,14 @@ usrp_tx::handle_message(mb_message_sptr msg) } } +/*! + * \brief Performs the actual writing of data to the USB bus, called by + * handle_message() when a cmd-usrp-tx-write signal is received. + * + * The \p data parameter is a PMT list which contains three mandatory elements, + * in the following order: an invocation handle, a channel, and a uniform vector + * of memory which contains the packets to be written to the bus. + */ void usrp_tx::write(pmt_t data) { @@ -121,7 +133,7 @@ usrp_tx::write(pmt_t data) for(int i=0; i < n_packets; i++) { if(d_disk_write) { - if(pkts[i].chan() == 0x1f) + if(pkts[i].chan() == CONTROL_CHAN) d_cs_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size()); else d_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size()); |