USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
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 
11 namespace uhd { namespace transport {
12 
17 {
18 public:
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 
58 protected:
60  void* _data = nullptr;
61 
63  size_t _packet_size = 0;
64 };
65 
66 }} // namespace uhd::transport
uhd::transport::frame_buff::deleter::operator()
void operator()(frame_buff *)
Definition: frame_buff.hpp:26
uhd::transport::frame_buff::_packet_size
size_t _packet_size
Definition: frame_buff.hpp:63
uhd::transport::frame_buff::set_packet_size
void set_packet_size(size_t size)
Definition: frame_buff.hpp:53
uhd::transport::frame_buff::uptr
std::unique_ptr< frame_buff, deleter > uptr
Definition: frame_buff.hpp:29
uhd::transport::frame_buff::deleter
Definition: frame_buff.hpp:24
uhd::transport::frame_buff::data
void * data() const
Definition: frame_buff.hpp:35
uhd
Definition: build_info.hpp:12
uhd::transport::frame_buff
Definition: frame_buff.hpp:16
uhd::transport::frame_buff::_data
void * _data
Definition: frame_buff.hpp:60
uhd::transport::frame_buff::packet_size
size_t packet_size() const
Definition: frame_buff.hpp:44