GNU Radio 3.4.0 C++ API
usrp2::rx_nop_handler Class Reference

#include <rx_nop_handler.h>

Inheritance diagram for usrp2::rx_nop_handler:

List of all members.

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

Member Typedef Documentation


Constructor & Destructor Documentation

usrp2::rx_nop_handler::rx_nop_handler ( uint64_t  max_samples,
uint64_t  max_quantum = 0 
) [inline]

Constructor

Parameters:
max_samplesMaximum number of samples to copy. Use zero for no maximum.
max_quantumMaximum 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.


Member Function Documentation

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.

Parameters:
itemspoints to the first 32-bit word of uninterpreted sample data in the frame.
nitemsis the number of entries in the frame in units of uint32_t's.
metadatais 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.

Returns:
true if the object wants to be called again with new data; false if no additional data is wanted.

Implements usrp2::rx_sample_handler.

Reimplemented in rx_16sc_handler, and rx_32fc_handler.

References has_finished_p().


Member Data Documentation


The documentation for this class was generated from the following file: