USRP Hardware Driver and USRP Manual: frame_buff.hpp Source File

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
frame_buff.hpp
Go to the documentation of this file.
1//
2// Copyright 2019 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <memory>
10
11namespace uhd { namespace transport {
12
16 class frame_buff
17{
18public:
24 struct deleter
25 {
26 void operator()(frame_buff*) {}
27 };
28
29 using uptr = std::unique_ptr<frame_buff, deleter>;
30
35 void* data() const
36 {
37 return _data;
38 }
39
44 size_t packet_size() const
45 {
46 return _packet_size;
47 }
48
53 void set_packet_size(size_t size)
54 {
55 _packet_size = size;
56 }
57
58protected:
60 void* _data = nullptr;
61
63 size_t _packet_size = 0;
64};
65
66}} // namespace uhd::transport
uhd::transport::frame_buff
Definition frame_buff.hpp:17
uhd::transport::frame_buff::data
void * data() const
Definition frame_buff.hpp:35
uhd::transport::frame_buff::_packet_size
size_t _packet_size
Definition frame_buff.hpp:63
uhd::transport::frame_buff::packet_size
size_t packet_size() const
Definition frame_buff.hpp:44
uhd::transport::frame_buff::uptr
std::unique_ptr< frame_buff, deleter > uptr
Definition frame_buff.hpp:29
uhd::transport::frame_buff::set_packet_size
void set_packet_size(size_t size)
Definition frame_buff.hpp:53
uhd::transport::frame_buff::_data
void * _data
Definition frame_buff.hpp:60
uhd::transport
Definition adapter_id.hpp:11
uhd
Definition build_info.hpp:12
uhd::transport::frame_buff::deleter
Definition frame_buff.hpp:25
uhd::transport::frame_buff::deleter::operator()
void operator()(frame_buff *)
Definition frame_buff.hpp:26