USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
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
17{
18public:
24 struct deleter
25 {
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
Definition: frame_buff.hpp:17
void * data() const
Definition: frame_buff.hpp:35
size_t _packet_size
Definition: frame_buff.hpp:63
size_t packet_size() const
Definition: frame_buff.hpp:44
std::unique_ptr< frame_buff, deleter > uptr
Definition: frame_buff.hpp:29
void set_packet_size(size_t size)
Definition: frame_buff.hpp:53
void * _data
Definition: frame_buff.hpp:60
Definition: build_info.hpp:12
Definition: frame_buff.hpp:25
void operator()(frame_buff *)
Definition: frame_buff.hpp:26