#include <RegisterManager.h>
|
| | RegisterManager () |
| | Default constructor.
|
| |
| | RegisterManager (RegisterManager const &)=delete |
| | Copy constructor is deleted to prevent unexpected behavior.
|
| |
| void | operator= (RegisterManager const &)=delete |
| | Assignment operator is deleted to prevent unexpected behavior.
|
| |
| template<typename... Args> |
| void | setDigitalInput (uint8_t first, Args... args) |
| | Sets one or more pins as digital inputs.
|
| |
| template<typename... Args> |
| void | setDigitalOutput (uint8_t first, Args... args) |
| | Sets one or more pins as digital outputs.
|
| |
| template<typename... Args> |
| void | setAnalogInput (uint8_t first, Args... args) |
| | Sets one or more pins as analog inputs.
|
| |
| template<typename... Args> |
| void | setAnalogOutput (uint8_t first, Args... args) |
| | Sets one or more pins as analog outputs.
|
| |
| bool | link (const String &name, RecordPtr link, uint32_t id=FOURCC(____)) |
| | Links an object to a named register.
|
| |
| bool | getGpio (const String &name, size_t index, uint8_t &outValue) const |
| | Gets a GPIO value from a named register.
|
| |
| template<typename T> |
| T * | getObject (const String &name, size_t index) |
| | Gets an object of the specified type from a named register.
|
| |
| size_t | getRegisterLength (const String &name) const |
| | Gets the number of elements in the specified named register.
|
| |
| void | serializeRegisters (CBORObject &obj) |
| | Serializes all registers (GPIO and Object) to a CBOR object.
|
| |
◆ RegisterManager() [1/2]
| uniot::RegisterManager::RegisterManager |
( |
| ) |
|
|
inline |
◆ RegisterManager() [2/2]
Copy constructor is deleted to prevent unexpected behavior.
◆ getGpio()
| bool uniot::RegisterManager::getGpio |
( |
const String & | name, |
|
|
size_t | index, |
|
|
uint8_t & | outValue ) const |
|
inline |
Gets a GPIO value from a named register.
- Parameters
-
| name | The register name to read from |
| index | The index within the register to read |
| outValue | Reference to store the read GPIO value |
- Return values
-
| true | If the value was successfully read |
| false | If the value could not be read or parameters are invalid |
◆ getObject()
template<typename T>
| T * uniot::RegisterManager::getObject |
( |
const String & | name, |
|
|
size_t | index ) |
|
inline |
Gets an object of the specified type from a named register.
- Template Parameters
-
| T | The type of object to retrieve |
- Parameters
-
| name | The register name to read from |
| index | The index within the register to get the object from |
- Return values
-
| T* | Pointer to the requested object or nullptr if not found |
◆ getRegisterLength()
| size_t uniot::RegisterManager::getRegisterLength |
( |
const String & | name | ) |
const |
|
inline |
Gets the number of elements in the specified named register.
Checks both GPIO and Object registers for the specified name.
- Parameters
-
| name | The register name to check |
- Return values
-
| size_t | The number of elements in the register, or 0 if not found |
◆ link()
| bool uniot::RegisterManager::link |
( |
const String & | name, |
|
|
RecordPtr | link, |
|
|
uint32_t | id = FOURCC(____) ) |
|
inline |
Links an object to a named register.
- Parameters
-
| name | The register name to link the object to |
| link | Pointer to the object to link |
| id | Optional identifier for the object (default: FOURCC(____) |
- Return values
-
| true | If the link operation was successful |
| false | If the link operation failed |
◆ operator=()
Assignment operator is deleted to prevent unexpected behavior.
◆ serializeRegisters()
| void uniot::RegisterManager::serializeRegisters |
( |
CBORObject & | obj | ) |
|
|
inline |
Serializes all registers (GPIO and Object) to a CBOR object.
GPIO registers are serialized as arrays of values. Object registers are serialized as arrays of their identifiers.
- Parameters
-
| obj | The CBOR object to serialize the registers into |
◆ setAnalogInput()
template<typename... Args>
| void uniot::RegisterManager::setAnalogInput |
( |
uint8_t | first, |
|
|
Args... | args ) |
|
inline |
Sets one or more pins as analog inputs.
- Template Parameters
-
| Args | Variadic template for multiple pin numbers |
- Parameters
-
| first | The first pin to configure |
| args | Additional pins to configure |
◆ setAnalogOutput()
template<typename... Args>
| void uniot::RegisterManager::setAnalogOutput |
( |
uint8_t | first, |
|
|
Args... | args ) |
|
inline |
Sets one or more pins as analog outputs.
- Template Parameters
-
| Args | Variadic template for multiple pin numbers |
- Parameters
-
| first | The first pin to configure |
| args | Additional pins to configure |
◆ setDigitalInput()
template<typename... Args>
| void uniot::RegisterManager::setDigitalInput |
( |
uint8_t | first, |
|
|
Args... | args ) |
|
inline |
Sets one or more pins as digital inputs.
- Template Parameters
-
| Args | Variadic template for multiple pin numbers |
- Parameters
-
| first | The first pin to configure |
| args | Additional pins to configure |
◆ setDigitalOutput()
template<typename... Args>
| void uniot::RegisterManager::setDigitalOutput |
( |
uint8_t | first, |
|
|
Args... | args ) |
|
inline |
Sets one or more pins as digital outputs.
- Template Parameters
-
| Args | Variadic template for multiple pin numbers |
- Parameters
-
| first | The first pin to configure |
| args | Additional pins to configure |
The documentation for this class was generated from the following file: