Loading...
Searching...
No Matches
request-config.hpp
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski <brgl@bgdev.pl> */
#ifndef __LIBGPIOD_CXX_REQUEST_CONFIG_HPP__
#define __LIBGPIOD_CXX_REQUEST_CONFIG_HPP__
#if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
#error "Only gpiod.hpp can be included directly."
#endif
#include <cstddef>
#include <iostream>
#include <memory>
#include <string>
#include "line.hpp"
namespace gpiod {
class chip;
class request_config final
{
public:
request_config();
request_config(const request_config& other) = delete;
request_config(request_config&& other) noexcept;
~request_config();
request_config& operator=(request_config&& other) noexcept;
request_config& set_consumer(const ::std::string& consumer) noexcept;
::std::string consumer() const noexcept;
request_config& set_event_buffer_size(::std::size_t event_buffer_size) noexcept;
::std::size_t event_buffer_size() const noexcept;
private:
struct impl;
::std::shared_ptr<impl> _m_priv;
request_config& operator=(const request_config& other);
friend request_builder;
};
::std::ostream& operator<<(::std::ostream& out, const request_config& config);
} /* namespace gpiod */
#endif /* __LIBGPIOD_CXX_REQUEST_CONFIG_HPP__ */
gpiod::chip
Represents a GPIO chip.
Definition chip.hpp:37
gpiod::request_config
Stores a set of options passed to the kernel when making a line request.
Definition request-config.hpp:31
gpiod::request_config::consumer
::std::string consumer() const noexcept
Get the consumer name.
gpiod::request_config::request_config
request_config()
Constructor.
gpiod::request_config::operator=
request_config & operator=(request_config &&other) noexcept
Move assignment operator.
gpiod::request_config::request_config
request_config(request_config &&other) noexcept
Move constructor.
gpiod::request_config::set_consumer
request_config & set_consumer(const ::std::string &consumer) noexcept
Set the consumer name.
gpiod::request_config::set_event_buffer_size
request_config & set_event_buffer_size(::std::size_t event_buffer_size) noexcept
Set the size of the kernel event buffer.
gpiod::request_config::~request_config
~request_config()
gpiod::request_config::request_config
request_config(const request_config &other)=delete
gpiod::request_config::event_buffer_size
::std::size_t event_buffer_size() const noexcept
Get the edge event buffer size from this request config.
line.hpp
gpiod
Definition chip-info.hpp:18