peary::hal::Resource
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, usually corresponds to the name used in the schematic. |
| std::string | name() constGet the name of the resource. |
| void | setType(std::string_view type)Set the type string (e.g. VoltageRegulator) |
| std::string | type() constGet the type of the resource. |
Protected Attributes
| Name | |
|---|---|
| std::string | _name |
| std::string | _type |
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, usually corresponds to the name used in the schematic.
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
function setType
inline void setType(
std::string_view type
)
Set the type string (e.g. VoltageRegulator)
Parameters:
- type Type of this resource
function type
inline std::string type() const
Get the type of the resource.
Return: Type of the resource
Protected Attributes Documentation
variable _name
std::string _name;
variable _type
std::string _type;
Updated on 2026-01-30 at 22:01:05 +0100