diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-21 19:34:29 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-21 19:34:29 -0700 |
commit | 19c15883a9054727c13f4eb5471cc961fe54c40d (patch) | |
tree | d6f197b0d0d9579e7684ca102f192a65adfc7abc /host/lib/usrp/usrp2 | |
parent | 90465e6bcda596b28ab823e698b078708828da0c (diff) | |
download | uhd-19c15883a9054727c13f4eb5471cc961fe54c40d.tar.gz uhd-19c15883a9054727c13f4eb5471cc961fe54c40d.tar.bz2 uhd-19c15883a9054727c13f4eb5471cc961fe54c40d.zip |
usrp2: added async event types, and common code for handling context words
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 455a30b47..9a7f34531 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -101,9 +101,6 @@ void usrp2_impl::io_impl::recv_pirate_loop( //handle a tx async report message if (if_packet_info.sid == 1 and if_packet_info.packet_type != vrt::if_packet_info_t::PACKET_TYPE_DATA){ - const boost::uint32_t *vrt_data = vrt_hdr + if_packet_info.num_header_words32; - //extract the context word (we dont know the endianness so mirror the bytes) - boost::uint32_t word0 = vrt_data[0] | uhd::byteswap(vrt_data[0]); //fill in the async metadata async_metadata_t metadata; @@ -112,7 +109,7 @@ void usrp2_impl::io_impl::recv_pirate_loop( metadata.time_spec = time_spec_t( time_t(if_packet_info.tsi), size_t(if_packet_info.tsf), mboard->get_master_clock_freq() ); - metadata.event_code = uhd::async_metadata_t::event_code_t(word0 & 0xf); + metadata.event_code = vrt_packet_handler::get_context_code<async_metadata_t::event_code_t>(vrt_hdr, if_packet_info); //print the famous U, and push the metadata into the message queue if (metadata.event_code == async_metadata_t::EVENT_CODE_UNDERFLOW) std::cerr << "U"; |