GpioPinBase Class Reference

Space-ng SDK: sol3::gpio::impl::GpioPinBase Class Reference
Space-ng SDK

#include <sol3/gpio/gpio.h>

Inheritance diagram for sol3::gpio::impl::GpioPinBase:
sol3::gpio::GpioInputPin sol3::gpio::GpioOutputPin

Public Member Functions

 GpioPinBase (GpioPinBase &&other) noexcept
 
GpioPinBaseoperator= (GpioPinBase &&other) noexcept
 
 GpioPinBase (GpioPinBase const &)=delete
 
GpioPinBaseoperator= (GpioPinBase const &)=delete
 

Protected Member Functions

 ~GpioPinBase ()
 
 GpioPinBase (GpioPinId pin, GpioPinManager *manager, int value_fd)
 Protected constructor - only derived classes can create. More...
 

Protected Attributes

GpioPinId pin_
 
GpioPinManagermanager_
 
int value_fd_
 

Friends

class GpioPinManager
 

Detailed Description

Base class for RAII GPIO pin wrappers, GpioInputPin and GpioOutputPin

This class is used to maintain a "reservation" with GpioPinManager for a particular pin to prevent other threads or contexts from invalidating the configuration while this pin is in use. Maintains an open file descriptor to the value file for the pin, for efficient reading and writing of pin values. Automatically releases the pin from GpioPinManager and closes value file when destroyed.

Constructor & Destructor Documentation

◆ GpioPinBase() [1/3]

sol3::gpio::impl::GpioPinBase::GpioPinBase ( GpioPinBase &&  other)
noexcept

◆ GpioPinBase() [2/3]

sol3::gpio::impl::GpioPinBase::GpioPinBase ( GpioPinBase const &  )
delete

◆ ~GpioPinBase()

sol3::gpio::impl::GpioPinBase::~GpioPinBase ( )
protected

◆ GpioPinBase() [3/3]

sol3::gpio::impl::GpioPinBase::GpioPinBase ( GpioPinId  pin,
GpioPinManager manager,
int  value_fd 
)
protected

Protected constructor - only derived classes can create.

Member Function Documentation

◆ operator=() [1/2]

GpioPinBase& sol3::gpio::impl::GpioPinBase::operator= ( GpioPinBase &&  other)
noexcept

◆ operator=() [2/2]

GpioPinBase& sol3::gpio::impl::GpioPinBase::operator= ( GpioPinBase const &  )
delete

Friends And Related Function Documentation

◆ GpioPinManager

friend class GpioPinManager
friend

Member Data Documentation

◆ manager_

GpioPinManager* sol3::gpio::impl::GpioPinBase::manager_
protected

◆ pin_

GpioPinId sol3::gpio::impl::GpioPinBase::pin_
protected

◆ value_fd_

int sol3::gpio::impl::GpioPinBase::value_fd_
protected

The documentation for this class was generated from the following file:
  • /workspaces/astro/sol3-sdk/cpp/sol3/gpio/gpio.h