USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-g6563c537
UHD and USRP Manual
uhd::transport::muxed_zero_copy_if Class Referenceabstract

#include <uhd/transport/muxed_zero_copy_if.hpp>

Inheritance diagram for uhd::transport::muxed_zero_copy_if:

Public Types

typedef boost::shared_ptr< muxed_zero_copy_ifsptr
 
typedef boost::function< uint32_t(void *buff, size_t size)> stream_classifier_fn
 

Public Member Functions

virtual ~muxed_zero_copy_if ()
 virtual dtor More...
 
virtual zero_copy_if::sptr make_stream (const uint32_t stream_num)=0
 Make a virtual transport for the specified stream number. More...
 
virtual void remove_stream (const uint32_t stream_num)=0
 Unregister the stream number. All packets destined to the stream will be dropped. More...
 
virtual size_t get_num_dropped_frames () const =0
 Get number of frames dropped due to unregistered streams. More...
 

Static Public Member Functions

static sptr make (zero_copy_if::sptr base_xport, stream_classifier_fn classify_fn, size_t max_streams)
 Make a new demuxer from a transport and parameters. More...
 

Detailed Description

Implements a software muxed-demuxed zero-copy transport This is a wrapper around a base transport that allows creation of virtual zero_copy_if streams that are indistinguishable from physical transport streams. This class handles demuxing receive streams into the appropriate virtual streams with the given classifier function. A worker therad is spawned to handle the demuxing.

Member Typedef Documentation

◆ sptr

◆ stream_classifier_fn

typedef boost::function<uint32_t(void* buff, size_t size)> uhd::transport::muxed_zero_copy_if::stream_classifier_fn

Function to classify the stream based on the payload. The classifier must return a stream number, an arbitrary identifier for a virtual stream that is consistent with the stream number used in the make_stream and remove_stream fuctions

Parameters
buffa pointer to the payload of the frame
sizenumber of bytes in the frame payload
Returns
stream number

Constructor & Destructor Documentation

◆ ~muxed_zero_copy_if()

virtual uhd::transport::muxed_zero_copy_if::~muxed_zero_copy_if ( )
inlinevirtual

virtual dtor

Member Function Documentation

◆ get_num_dropped_frames()

virtual size_t uhd::transport::muxed_zero_copy_if::get_num_dropped_frames ( ) const
pure virtual

Get number of frames dropped due to unregistered streams.

◆ make()

static sptr uhd::transport::muxed_zero_copy_if::make ( zero_copy_if::sptr  base_xport,
stream_classifier_fn  classify_fn,
size_t  max_streams 
)
static

Make a new demuxer from a transport and parameters.

◆ make_stream()

virtual zero_copy_if::sptr uhd::transport::muxed_zero_copy_if::make_stream ( const uint32_t  stream_num)
pure virtual

Make a virtual transport for the specified stream number.

◆ remove_stream()

virtual void uhd::transport::muxed_zero_copy_if::remove_stream ( const uint32_t  stream_num)
pure virtual

Unregister the stream number. All packets destined to the stream will be dropped.


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