GNU Radio 3.3.0 C++ API
|
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>
Public Member Functions | |
virtual | ~rx_sample_handler () |
virtual bool | operator() (const uint32_t *items, size_t nitems, const rx_metadata *metadata)=0 |
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.
virtual usrp2::rx_sample_handler::~rx_sample_handler | ( | ) | [virtual] |
virtual bool usrp2::rx_sample_handler::operator() | ( | const uint32_t * | items, |
size_t | nitems, | ||
const rx_metadata * | metadata | ||
) | [pure virtual] |
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.
This is the general purpose, low level interface and relies on other functions to handle all required endian-swapping and format conversion.
Implemented in rx_16sc_handler, rx_32fc_handler, and usrp2::rx_nop_handler.