GNU Radio 3.3.0 C++ API
usrp2::rx_sample_handler Class Reference

Abstract function object called to handle received data blocks.An object derived from this class is passed to usrp2::rx_samples to process the received frames of samples. More...

#include <rx_sample_handler.h>

Inheritance diagram for usrp2::rx_sample_handler:

List of all members.

Public Member Functions

virtual ~rx_sample_handler ()
virtual bool operator() (const uint32_t *items, size_t nitems, const rx_metadata *metadata)=0

Detailed Description

Abstract function object called to handle received data blocks.

An object derived from this class is passed to usrp2::rx_samples to process the received frames of samples.


Constructor & Destructor Documentation

virtual usrp2::rx_sample_handler::~rx_sample_handler ( ) [virtual]

Member Function Documentation

virtual bool usrp2::rx_sample_handler::operator() ( const uint32_t items,
size_t  nitems,
const rx_metadata metadata 
) [pure virtual]
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.

This is the general purpose, low level interface and relies on other functions to handle all required endian-swapping and format conversion.

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

Implemented in rx_16sc_handler, rx_32fc_handler, and usrp2::rx_nop_handler.


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