USRP Hardware Driver and USRP Manual Version: 4.2.0.0
UHD and USRP Manual
bounded_buffer.hpp
Go to the documentation of this file.
1//
2// Copyright 2010-2011 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/transport/bounded_buffer.ipp> //detail
11
12namespace uhd { namespace transport {
13
21template <typename elem_type>
23{
24public:
29 bounded_buffer(size_t capacity) : _detail(capacity)
30 {
31 /* NOP */
32 }
33
40 UHD_INLINE bool push_with_haste(const elem_type& elem)
41 {
42 return _detail.push_with_haste(elem);
43 }
44
52 UHD_INLINE bool push_with_pop_on_full(const elem_type& elem)
53 {
54 return _detail.push_with_pop_on_full(elem);
55 }
56
62 UHD_INLINE void push_with_wait(const elem_type& elem)
63 {
64 return _detail.push_with_wait(elem);
65 }
66
74 UHD_INLINE bool push_with_timed_wait(const elem_type& elem, double timeout)
75 {
76 return _detail.push_with_timed_wait(elem, timeout);
77 }
78
85 UHD_INLINE bool pop_with_haste(elem_type& elem)
86 {
87 return _detail.pop_with_haste(elem);
88 }
89
95 UHD_INLINE void pop_with_wait(elem_type& elem)
96 {
97 return _detail.pop_with_wait(elem);
98 }
99
107 UHD_INLINE bool pop_with_timed_wait(elem_type& elem, double timeout)
108 {
109 return _detail.pop_with_timed_wait(elem, timeout);
110 }
111
112private:
114};
115
116}} // namespace uhd::transport
Definition: bounded_buffer.ipp:21
Definition: bounded_buffer.hpp:23
UHD_INLINE bool push_with_haste(const elem_type &elem)
Definition: bounded_buffer.hpp:40
bounded_buffer(size_t capacity)
Definition: bounded_buffer.hpp:29
UHD_INLINE bool push_with_timed_wait(const elem_type &elem, double timeout)
Definition: bounded_buffer.hpp:74
UHD_INLINE bool pop_with_timed_wait(elem_type &elem, double timeout)
Definition: bounded_buffer.hpp:107
UHD_INLINE void pop_with_wait(elem_type &elem)
Definition: bounded_buffer.hpp:95
UHD_INLINE bool pop_with_haste(elem_type &elem)
Definition: bounded_buffer.hpp:85
UHD_INLINE bool push_with_pop_on_full(const elem_type &elem)
Definition: bounded_buffer.hpp:52
UHD_INLINE void push_with_wait(const elem_type &elem)
Definition: bounded_buffer.hpp:62
#define UHD_INLINE
Definition: config.h:65
Definition: build_info.hpp:12