libgpiod 2.1.3
Public Member Functions
gpiod::request_builder Class Referencefinal

Intermediate object storing the configuration for a line request. More...

#include <request-builder.hpp>

Public Member Functions

 request_builder (const request_builder &other)=delete
 
 request_builder (request_builder &&other) noexcept
 Move constructor. More...
 
request_builderoperator= (const request_builder &other)=delete
 
request_builderoperator= (request_builder &&other) noexcept
 Move assignment operator. More...
 
request_builderset_request_config (request_config &req_cfg)
 Set the request config for the request. More...
 
const request_configget_request_config () const noexcept
 Get the current request config. More...
 
request_builderset_consumer (const ::std::string &consumer) noexcept
 Set consumer in the request config stored by this object. More...
 
request_builderset_event_buffer_size (::std::size_t event_buffer_size) noexcept
 Set the event buffer size in the request config stored by this object. More...
 
request_builderset_line_config (line_config &line_cfg)
 Set the line config for this request. More...
 
const line_configget_line_config () const noexcept
 Get the current line config. More...
 
request_builderadd_line_settings (line::offset offset, const line_settings &settings)
 Add line settings to the line config stored by this object for a single offset. More...
 
request_builderadd_line_settings (const line::offsets &offsets, const line_settings &settings)
 Add line settings to the line config stored by this object for a set of offsets. More...
 
request_builderset_output_values (const line::values &values)
 Set output values for a number of lines in the line config stored by this object. More...
 
line_request do_request ()
 Make the line request. More...
 

Detailed Description

Intermediate object storing the configuration for a line request.

Definition at line 33 of file request-builder.hpp.

Constructor & Destructor Documentation

◆ request_builder()

gpiod::request_builder::request_builder ( request_builder &&  other)
noexcept

Move constructor.

Parameters
otherObject to be moved.

Member Function Documentation

◆ add_line_settings() [1/2]

request_builder & gpiod::request_builder::add_line_settings ( const line::offsets offsets,
const line_settings settings 
)

Add line settings to the line config stored by this object for a set of offsets.

Parameters
offsetsOffsets for which to add settings.
settingsSettings to add.
Returns
Reference to self.

◆ add_line_settings() [2/2]

request_builder & gpiod::request_builder::add_line_settings ( line::offset  offset,
const line_settings settings 
)

Add line settings to the line config stored by this object for a single offset.

Parameters
offsetOffset for which to add settings.
settingsLine settings to use.
Returns
Reference to self.

◆ do_request()

line_request gpiod::request_builder::do_request ( )

Make the line request.

Returns
New line_request object.

◆ get_line_config()

const line_config & gpiod::request_builder::get_line_config ( ) const
noexcept

Get the current line config.

Returns
Const reference to the current line config stored by this object.

◆ get_request_config()

const request_config & gpiod::request_builder::get_request_config ( ) const
noexcept

Get the current request config.

Returns
Const reference to the current request config stored by this object.

◆ operator=()

request_builder & gpiod::request_builder::operator= ( request_builder &&  other)
noexcept

Move assignment operator.

Parameters
otherObject to be moved.
Returns
Reference to self.

◆ set_consumer()

request_builder & gpiod::request_builder::set_consumer ( const ::std::string &  consumer)
noexcept

Set consumer in the request config stored by this object.

Parameters
consumerNew consumer string.
Returns
Reference to self.

◆ set_event_buffer_size()

request_builder & gpiod::request_builder::set_event_buffer_size ( ::std::size_t  event_buffer_size)
noexcept

Set the event buffer size in the request config stored by this object.

Parameters
event_buffer_sizeNew event buffer size.
Returns
Reference to self.

◆ set_line_config()

request_builder & gpiod::request_builder::set_line_config ( line_config line_cfg)

Set the line config for this request.

Parameters
line_cfgLine config to use.
Returns
Reference to self.

◆ set_output_values()

request_builder & gpiod::request_builder::set_output_values ( const line::values values)

Set output values for a number of lines in the line config stored by this object.

Parameters
valuesBuffer containing the output values.
Returns
Reference to self.

◆ set_request_config()

request_builder & gpiod::request_builder::set_request_config ( request_config req_cfg)

Set the request config for the request.

Parameters
req_cfgRequest config to use.
Returns
Reference to self.

The documentation for this class was generated from the following file: