Loading...
Searching...
No Matches
chip-info.hpp
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl> */
#ifndef __LIBGPIOD_CXX_CHIP_INFO_HPP__
#define __LIBGPIOD_CXX_CHIP_INFO_HPP__
#if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
#error "Only gpiod.hpp can be included directly."
#endif
#include <memory>
#include <ostream>
namespace gpiod {
class chip;
class chip_info final
{
public:
chip_info(const chip_info& other);
chip_info(chip_info&& other) noexcept;
~chip_info();
chip_info& operator=(const chip_info& other);
chip_info& operator=(chip_info&& other) noexcept;
::std::string name() const noexcept;
::std::string label() const noexcept;
::std::size_t num_lines() const noexcept;
private:
chip_info();
struct impl;
::std::shared_ptr<impl> _m_priv;
friend chip;
};
::std::ostream& operator<<(::std::ostream& out, const chip_info& chip);
} /* namespace gpiod */
#endif /* __LIBGPIOD_CXX_CHIP_INFO_HPP__ */
gpiod::chip_info
Represents an immutable snapshot of GPIO chip information.
Definition chip-info.hpp:26
gpiod::chip_info::~chip_info
~chip_info()
gpiod::chip_info::num_lines
::std::size_t num_lines() const noexcept
Return the number of lines exposed by this chip.
gpiod::chip_info::label
::std::string label() const noexcept
Get the label of this GPIO chip.
gpiod::chip_info::operator=
chip_info & operator=(const chip_info &other)
Assignment operator.
gpiod::chip_info::chip_info
chip_info(chip_info &&other) noexcept
Move constructor.
gpiod::chip_info::operator=
chip_info & operator=(chip_info &&other) noexcept
Move assignment operator.
gpiod::chip_info::chip_info
chip_info(const chip_info &other)
Copy constructor.
gpiod::chip_info::name
::std::string name() const noexcept
Get the name of this GPIO chip.
gpiod::chip
Represents a GPIO chip.
Definition chip.hpp:37
gpiod
Definition chip-info.hpp:18