From 90465e6bcda596b28ab823e698b078708828da0c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 20 Jul 2010 18:51:36 -0700 Subject: uhd: added async recv message call to device api implemented in usrp2 io impl added async metadata type --- host/lib/transport/vrt_packet_handler.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'host/lib/transport') diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index 07ad9115c..3eddcec6d 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -40,10 +40,10 @@ namespace vrt_packet_handler{ **********************************************************************/ typedef std::vector managed_recv_buffs_t; typedef boost::function get_recv_buffs_t; - typedef boost::function handle_overrun_t; + typedef boost::function handle_overflow_t; typedef boost::function vrt_unpacker_t; - static inline void handle_overrun_nop(size_t){} + static inline void handle_overflow_nop(size_t){} struct recv_state{ //width of the receiver in channels @@ -75,7 +75,7 @@ namespace vrt_packet_handler{ uhd::rx_metadata_t &metadata, double tick_rate, const vrt_unpacker_t &vrt_unpacker, - const handle_overrun_t &handle_overrun, + const handle_overflow_t &handle_overflow, size_t vrt_header_offset_words32 ){ //vrt unpack each managed buffer @@ -99,7 +99,7 @@ namespace vrt_packet_handler{ //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]); - if (word0 & uhd::rx_metadata_t::ERROR_CODE_OVERRUN) handle_overrun(i); + if (word0 & uhd::rx_metadata_t::ERROR_CODE_OVERFLOW) handle_overflow(i); metadata.error_code = uhd::rx_metadata_t::error_code_t(word0 & 0xf); //break to exit loop and store metadata below @@ -142,7 +142,7 @@ namespace vrt_packet_handler{ double tick_rate, const vrt_unpacker_t &vrt_unpacker, const get_recv_buffs_t &get_recv_buffs, - const handle_overrun_t &handle_overrun, + const handle_overflow_t &handle_overflow, size_t vrt_header_offset_words32 ){ metadata.error_code = uhd::rx_metadata_t::ERROR_CODE_NONE; @@ -157,7 +157,7 @@ namespace vrt_packet_handler{ try{ _recv1_helper( state, metadata, tick_rate, - vrt_unpacker, handle_overrun, + vrt_unpacker, handle_overflow, vrt_header_offset_words32 ); }catch(const std::exception &e){ @@ -216,7 +216,7 @@ namespace vrt_packet_handler{ double tick_rate, const vrt_unpacker_t &vrt_unpacker, const get_recv_buffs_t &get_recv_buffs, - const handle_overrun_t &handle_overrun = &handle_overrun_nop, + const handle_overflow_t &handle_overflow = &handle_overflow_nop, size_t vrt_header_offset_words32 = 0 ){ switch(recv_mode){ @@ -233,7 +233,7 @@ namespace vrt_packet_handler{ tick_rate, vrt_unpacker, get_recv_buffs, - handle_overrun, + handle_overflow, vrt_header_offset_words32 ); } @@ -253,7 +253,7 @@ namespace vrt_packet_handler{ tick_rate, vrt_unpacker, get_recv_buffs, - handle_overrun, + handle_overflow, vrt_header_offset_words32 ); if (num_samps == 0) break; //had a recv timeout or error, break loop -- cgit v1.2.3