Object into which edge events are read for better performance.
More...
#include <edge-event-buffer.hpp>
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.
Definition at line 37 of file edge-event-buffer.hpp.
◆ edge_event_buffer() [1/2]
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/2]
Move constructor.
- Parameters
-
◆ 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=()
Move assignment operator.
- Parameters
-
- Returns
- Reference to self.
The documentation for this class was generated from the following file: