USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
muxed_zero_copy_if.hpp
Go to the documentation of this file.
1//
2// Copyright 2016 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
13#include <stdint.h>
14#include <functional>
15
16namespace uhd { namespace transport {
17
28{
29public:
30 typedef std::shared_ptr<muxed_zero_copy_if> sptr;
31
42 typedef std::function<uint32_t(void* buff, size_t size)> stream_classifier_fn;
43
46
48 virtual zero_copy_if::sptr make_stream(const uint32_t stream_num) = 0;
49
51 virtual void remove_stream(const uint32_t stream_num) = 0;
52
54 virtual size_t get_num_dropped_frames() const = 0;
55
57 static sptr make(zero_copy_if::sptr base_xport,
58 stream_classifier_fn classify_fn,
59 size_t max_streams);
60};
61
62}} // namespace uhd::transport
Definition: muxed_zero_copy_if.hpp:28
virtual ~muxed_zero_copy_if()
virtual dtor
Definition: muxed_zero_copy_if.hpp:45
virtual void remove_stream(const uint32_t stream_num)=0
Unregister the stream number. All packets destined to the stream will be dropped.
virtual zero_copy_if::sptr make_stream(const uint32_t stream_num)=0
Make a virtual transport for the specified stream number.
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.
virtual size_t get_num_dropped_frames() const =0
Get number of frames dropped due to unregistered streams.
std::shared_ptr< muxed_zero_copy_if > sptr
Definition: muxed_zero_copy_if.hpp:30
std::function< uint32_t(void *buff, size_t size)> stream_classifier_fn
Definition: muxed_zero_copy_if.hpp:42
std::shared_ptr< zero_copy_if > sptr
Definition: zero_copy.hpp:149
Definition: build_info.hpp:12
boost::noncopyable noncopyable
Definition: noncopyable.hpp:45