GNU Radio 3.3.0 C++ API
|
#include <rx_nop_handler.h>
Public Types | |
typedef boost::shared_ptr < rx_nop_handler > | sptr |
Public Member Functions | |
rx_nop_handler (uint64_t max_samples, uint64_t max_quantum=0) | |
virtual | ~rx_nop_handler () |
uint64_t | nframes () const |
Returns number of frames this copier was called with. | |
uint64_t | nsamples () const |
Returns actual number of samples copied. | |
uint64_t | max_samples () const |
Returns maximum number of samples that will be copied. | |
bool | has_errored_p () const |
bool | has_finished_p () const |
Returns true if this instance has reached the maximum number of samples. | |
virtual bool | operator() (const uint32_t *items, size_t nitems, const rx_metadata *metadata) |
Protected Attributes | |
bool | d_err |
Reimplemented in rx_16sc_handler, and rx_32fc_handler.
Constructor
max_samples | Maximum number of samples to copy. Use zero for no maximum. |
max_quantum | Maximum number of samples required to accept in one call. Use 0 to indicate no maximum. |
virtual usrp2::rx_nop_handler::~rx_nop_handler | ( | ) | [virtual] |
Destructor. Derived classes must implement their own, non-inline destructor.
bool usrp2::rx_nop_handler::has_errored_p | ( | ) | const [inline] |
Returns true if an error has occurred. Derived classes must set d_err to true when an error occurs in the () operator
References d_err.
bool usrp2::rx_nop_handler::has_finished_p | ( | ) | const [inline] |
Returns true if this instance has reached the maximum number of samples.
Referenced by operator()().
uint64_t usrp2::rx_nop_handler::max_samples | ( | ) | const [inline] |
Returns maximum number of samples that will be copied.
uint64_t usrp2::rx_nop_handler::nframes | ( | ) | const [inline] |
Returns number of frames this copier was called with.
uint64_t usrp2::rx_nop_handler::nsamples | ( | ) | const [inline] |
Returns actual number of samples copied.
virtual bool usrp2::rx_nop_handler::operator() | ( | const uint32_t * | items, |
size_t | nitems, | ||
const rx_metadata * | metadata | ||
) | [inline, virtual] |
Function operator invoked by USRP2 RX API. Derived classes must override this method but then invoke it at the start of their processing. This operator will always be called at least once.
items | points to the first 32-bit word of uninterpreted sample data in the frame. |
nitems | is the number of entries in the frame in units of uint32_t's. |
metadata | is the additional per frame data provided by the USRP2 FPGA. |
items
points to the raw sample data received off of the ethernet. The data is packed into big-endian 32-bit unsigned ints for transport, but the actual format of the data is dependent on the current configuration of the USRP2. The most common format is 16-bit I & Q, with I in the top of the 32-bit word.
Implements usrp2::rx_sample_handler.
Reimplemented in rx_16sc_handler, and rx_32fc_handler.
References has_finished_p().
bool usrp2::rx_nop_handler::d_err [protected] |
Referenced by has_errored_p().