Loading...
Searching...
No Matches
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.
| ~request_builder ()
request_builder & | operator= (const request_builder &other)=delete
request_builder & | operator= (request_builder &&other) noexcept
| Move assignment operator.
request_builder & | set_request_config (request_config &req_cfg)
| Set the request config for the request.
const request_config & | get_request_config () const noexcept
| Get the current request config.
request_builder & | set_consumer (const ::std::string &consumer) noexcept
| Set consumer in the request config stored by this object.
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.
request_builder & | set_line_config (line_config &line_cfg)
| Set the line config for this request.
const line_config & | get_line_config () const noexcept
| Get the current line config.
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.
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.
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.
line_request | do_request ()
| Make the line request.

## Detailed Description

Intermediate object storing the configuration for a line request.

## Constructor & Destructor Documentation

## request_builder() [1/2]

gpiod::request_builder::request_builder | ( | const request_builder & | other | ) |

delete

## request_builder() [2/2]

gpiod::request_builder::request_builder | ( | request_builder && | other | ) |

noexcept

Move constructor.

Parameters

  other | Object to be moved.

## ~request_builder()

gpiod::request_builder::~request_builder | ( |  | ) |

## 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

  offsets | Offsets for which to add settings.
  settings | Settings 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

  offset | Offset for which to add settings.
  settings | Line 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=() [1/2]

request_builder & gpiod::request_builder::operator= | ( | const request_builder & | other | ) |

delete

## operator=() [2/2]

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

noexcept

Move assignment operator.

Parameters

  other | Object 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

  consumer | New 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_size | New 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_cfg | Line 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

  values | Buffer 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_cfg | Request config to use.

Returns
  Reference to self.

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

- request-builder.hpp