diff options
Diffstat (limited to 'gr-usrp2/src/rx_32fc_handler.h')
-rw-r--r-- | gr-usrp2/src/rx_32fc_handler.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gr-usrp2/src/rx_32fc_handler.h b/gr-usrp2/src/rx_32fc_handler.h index 028dfadabd..f2ce2b55df 100644 --- a/gr-usrp2/src/rx_32fc_handler.h +++ b/gr-usrp2/src/rx_32fc_handler.h @@ -27,8 +27,6 @@ #include <usrp2/copiers.h> #include <gr_complex.h> -#define RX_32FC_HANDLER_DEBUG 0 - class rx_32fc_handler : public usrp2::rx_nop_handler { gr_complex *d_dest; @@ -44,30 +42,20 @@ public: // Factory function to return a shared pointer to a new instance static sptr make(uint64_t max_samples, uint64_t max_quantum, gr_complex *dest) { - if (RX_32FC_HANDLER_DEBUG) - printf("rx_32fc_handler: max_samples=%li max_quantum=%li\n", max_samples, max_quantum); - return sptr(new rx_32fc_handler(max_samples, max_quantum, dest)); } // Invoked by USRP2 API when samples are available bool operator()(const uint32_t *items, size_t nitems, const usrp2::rx_metadata *metadata) { - if (RX_32FC_HANDLER_DEBUG) - printf("rx_32fc_handler: called with items=%zu ", nitems); - // Copy/reformat/endian swap USRP2 data to destination buffer usrp2::copy_u2_16sc_to_host_32fc(nitems, items, d_dest); d_dest += nitems; // FIXME: do something with metadata - // Determine if there is room to be called again - bool ok = rx_nop_handler::operator()(items, nitems, metadata); - if (RX_32FC_HANDLER_DEBUG) - printf("ok to call again=%i\n", ok); - - return ok; + // Call parent to determine if there is room to be called again + return rx_nop_handler::operator()(items, nitems, metadata); } ~rx_32fc_handler(); |