Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INCLUDED_RX_32FC_HANDLER_H
00024 #define INCLUDED_RX_32FC_HANDLER_H
00025
00026 #include <usrp2/rx_nop_handler.h>
00027 #include <usrp2/copiers.h>
00028 #include <gr_complex.h>
00029
00030 class rx_32fc_handler : public usrp2::rx_nop_handler
00031 {
00032 gr_complex *d_dest;
00033
00034
00035 rx_32fc_handler(uint64_t max_samples, uint64_t max_quantum, gr_complex *dest)
00036 : rx_nop_handler(max_samples, max_quantum), d_dest(dest) {}
00037
00038 public:
00039
00040 typedef boost::shared_ptr<rx_32fc_handler> sptr;
00041
00042
00043 static sptr make(uint64_t max_samples, uint64_t max_quantum, gr_complex *dest)
00044 {
00045 return sptr(new rx_32fc_handler(max_samples, max_quantum, dest));
00046 }
00047
00048
00049 bool operator()(const uint32_t *items, size_t nitems, const usrp2::rx_metadata *metadata)
00050 {
00051
00052 usrp2::copy_u2_16sc_to_host_32fc(nitems, items, d_dest);
00053 d_dest += nitems;
00054
00055
00056
00057
00058 return rx_nop_handler::operator()(items, nitems, metadata);
00059 }
00060
00061 ~rx_32fc_handler();
00062 };
00063
00064 #endif