Uniot Core
0.8.1
Loading...
Searching...
No Matches
uniot::RegisterManagerProxy Class Reference

#include <RegisterManagerProxy.h>

Public Member Functions

 RegisterManagerProxy (const RegisterManagerProxy &)=delete
 Copy constructor is deleted to prevent unexpected behavior.
 
void operator= (const RegisterManagerProxy &)=delete
 Assignment operator is deleted to prevent unexpected behavior.
 
 RegisterManagerProxy (const String &name, RegisterManager *reg)
 Creates a new proxy for accessing a specific named register.
 
bool getGpio (size_t index, uint8_t &outValue) const
 Gets a GPIO value from the specified index in the bound register.
 
template<typename T>
T * getObject (size_t index)
 Gets an object of the specified type from the bound register.
 

Constructor & Destructor Documentation

◆ RegisterManagerProxy() [1/2]

uniot::RegisterManagerProxy::RegisterManagerProxy ( const RegisterManagerProxy & )
delete

Copy constructor is deleted to prevent unexpected behavior.

◆ RegisterManagerProxy() [2/2]

uniot::RegisterManagerProxy::RegisterManagerProxy ( const String & name,
RegisterManager * reg )
inline

Creates a new proxy for accessing a specific named register.

Parameters
nameThe register name to bind this proxy to
regPointer to the RegisterManager instance

Member Function Documentation

◆ getGpio()

bool uniot::RegisterManagerProxy::getGpio ( size_t index,
uint8_t & outValue ) const
inline

Gets a GPIO value from the specified index in the bound register.

Parameters
indexThe index within the register to read from
outValueReference to store the read GPIO value
Return values
trueIf the value was successfully read
falseIf the value could not be read or index is invalid

◆ getObject()

template<typename T>
T * uniot::RegisterManagerProxy::getObject ( size_t index)
inline

Gets an object of the specified type from the bound register.

Template Parameters
TThe type of object to retrieve
Parameters
indexThe index within the register to get the object from
Return values
T*Pointer to the requested object or nullptr if not found

◆ operator=()

void uniot::RegisterManagerProxy::operator= ( const RegisterManagerProxy & )
delete

Assignment operator is deleted to prevent unexpected behavior.


The documentation for this class was generated from the following file: