peary::hal::Resource

Base class for resources.

#include <peary/hal/Resources.hpp>

Inherited by peary::hal::AlertMonitor, peary::hal::ClockSynthesizer, peary::hal::CurrentControl, peary::hal::CurrentLimiter, peary::hal::CurrentProvider, peary::hal::E2Reader, peary::hal::E2Writer, peary::hal::Oscillator, peary::hal::PowerProvider, peary::hal::SwitchControl, peary::hal::SwitchStatus, peary::hal::TemperatureProvider, peary::hal::VoltageControl, peary::hal::VoltageProvider

Public Functions

Name
virtual ~Resource() =defaultDefault constructor.
void setName(std::string_view name)Set the name of the resource.
std::string name() constGet the name of the resource.

Protected Attributes

Name
std::string _name

Public Functions Documentation

function ~Resource

  virtual ~Resource() =default
  

Default constructor.

function setName

  inline void setName(
    std::string_view name
)
  

Set the name of the resource.

Parameters:

  • name Name to be assigned to the resource

function name

  inline std::string name() const
  

Get the name of the resource.

Return: Name of the resource

Protected Attributes Documentation

variable _name

  std::string _name;
  

Updated on 2026-01-16 at 00:29:06 +0100