Object into which edge events are read for better performance.
More...
#include <edge-event-buffer.hpp>
|
using | const_iterator = ::std::vector< edge_event >::const_iterator |
| Constant iterator for iterating over edge events stored in the buffer.
|
|
Object into which edge events are read for better performance.
The edge_event_buffer allows reading edge_event objects into an existing buffer which improves the performance by avoiding needless memory allocations.
◆ const_iterator
Constant iterator for iterating over edge events stored in the buffer.
◆ edge_event_buffer() [1/3]
gpiod::edge_event_buffer::edge_event_buffer |
( |
::std::size_t |
capacity = 64 | ) |
|
|
explicit |
Constructor. Creates a new edge event buffer with given capacity.
- Parameters
-
capacity | Capacity of the new buffer. |
◆ edge_event_buffer() [2/3]
◆ edge_event_buffer() [3/3]
Move constructor.
- Parameters
-
◆ ~edge_event_buffer()
gpiod::edge_event_buffer::~edge_event_buffer |
( |
| ) |
|
◆ begin()
Get a constant iterator to the first edge event currently stored in the buffer.
- Returns
- Constant iterator to the first element.
◆ capacity()
::std::size_t gpiod::edge_event_buffer::capacity |
( |
| ) |
const |
|
noexcept |
Maximum capacity of the buffer.
- Returns
- Buffer capacity.
◆ end()
Get a constant iterator to the element after the last edge event in the buffer.
- Returns
- Constant iterator to the element after the last edge event.
◆ get_event()
const edge_event & gpiod::edge_event_buffer::get_event |
( |
unsigned int |
index | ) |
const |
Get the constant reference to the edge event at given index.
- Parameters
-
index | Index of the event in the buffer. |
- Returns
- Constant reference to the edge event.
◆ num_events()
::std::size_t gpiod::edge_event_buffer::num_events |
( |
| ) |
const |
Get the number of edge events currently stored in the buffer.
- Returns
- Number of edge events in the buffer.
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Reference to self.
The documentation for this class was generated from the following file: