8 #ifndef __LIBGPIOD_CXX_LINE_REQUEST_HPP__
9 #define __LIBGPIOD_CXX_LINE_REQUEST_HPP__
11 #if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
12 #error "Only gpiod.hpp can be included directly."
26 class edge_event_buffer;
68 explicit operator bool()
const noexcept;
217 ::std::unique_ptr<impl> _m_priv;
228 ::std::ostream& operator<<(::std::ostream& out,
const line_request& request);
::std::size_t read_edge_events(edge_event_buffer &buffer)
Read a number of edge events from this request up to the maximum capacity of the buffer.
line::value get_value(line::offset offset)
Get the value of a single requested line.
line_request & reconfigure_lines(const line_config &config)
Apply new config options to requested lines.
line::values get_values()
Get the values of all requested lines.
::std::string chip_name() const
Get the name of the chip this request was made on.
Stores the context of a set of requested GPIO lines.
::std::vector< value > values
Vector of line values.
Intermediate object storing the configuration for a line request.
value
Logical line states.
Contains a set of line config options used in line requests and reconfiguration.
void release()
Release the GPIO chip and free all associated resources.
Object into which edge events are read for better performance.
::std::vector< offset > offsets
Vector of line offsets.
bool wait_edge_events(const ::std::chrono::nanoseconds &timeout) const
Wait for edge events on any of the lines requested with edge detection enabled.
line::offsets offsets() const
Get the list of offsets of requested lines.
int fd() const
Get the file descriptor number associated with this line request.
Wrapper around unsigned int for representing line offsets.
line_request & set_values(const line::value_mappings &values)
Set the values of a subset of requested lines.
::std::vector< value_mapping > value_mappings
Vector of offset->value mappings.
line_request & set_value(line::offset offset, line::value value)
Set the value of a single requested line.
::std::size_t num_lines() const
Get the number of requested lines.