![]() |
|
Uniot Core
|
| 0.8.1 |
#include <AppKit.h>
Classes | |
| struct | NetworkControllerConfig |
| Configuration parameters for NetworkController. More... | |
Public Member Functions | |
| unLisp & | getLisp () |
| Get the Lisp interpreter instance. | |
| MQTTKit & | getMQTT () |
| Get the MQTT communication kit instance. | |
| const Credentials & | getCredentials () |
| Get the device credentials. | |
| bool | setWiFiCredentials (const String &ssid, const String &password) |
| Set WiFi network credentials. | |
| bool | setUserId (const String &userId) |
| Set the user identifier for device association. | |
| virtual void | pushTo (TaskScheduler &scheduler) override |
| Add all managed tasks to the scheduler. | |
| virtual void | attach () override |
| Initialize and attach all components. | |
| virtual void | registerWithBus (CoreEventBus &eventBus) override |
| Register all components with the event bus. | |
| virtual void | unregisterFromBus (CoreEventBus &eventBus) override |
| Unregister all components from the event bus. | |
| void | configureNetworkController (const NetworkControllerConfig &config) |
| Configure the NetworkController using a config structure. | |
| void | configureNetworkController (uint8_t pinBtn=UINT8_MAX, uint8_t activeLevelBtn=LOW, uint8_t pinLed=UINT8_MAX, uint8_t activeLevelLed=HIGH, uint8_t maxRebootCount=3, uint32_t rebootWindowMs=10000, bool registerLispBtn=true) |
| Configure the NetworkController with individual parameters. | |
| void | setLispEventInterceptor (LispEventInterceptor interceptor) |
| Set event interceptor for Lisp interpreter. | |
| void | publishLispEvent (const String &eventID, int32_t value) |
| Publish an event to the Lisp interpreter. | |
Public Member Functions inherited from uniot::IEventBusConnectionKit< unsigned int, int, Bytes > | |
| virtual | ~IEventBusConnectionKit () |
| Virtual destructor to ensure proper cleanup of derived classes. | |
| virtual | ~IEventBusConnectionKit () |
| Virtual destructor to ensure proper cleanup of derived classes. | |
Public Member Functions inherited from uniot::ISchedulerConnectionKit | |
| virtual | ~ISchedulerConnectionKit () |
| Virtual destructor for proper cleanup. | |
Public Member Functions inherited from uniot::Singleton< AppKit > | |
| Singleton (const Singleton &)=delete | |
| Copy constructor is deleted to prevent duplicating the singleton instance. | |
| Singleton & | operator= (const Singleton &)=delete |
| Assignment operator is deleted to prevent duplicating the singleton instance. | |
Friends | |
| class | Singleton< AppKit > |
Additional Inherited Members | |
Static Public Member Functions inherited from uniot::Singleton< AppKit > | |
| static AppKit & | getInstance () |
| Gets the singleton instance of the derived class. | |
Protected Member Functions inherited from uniot::Singleton< AppKit > | |
| Singleton ()=default | |
| Default constructor is protected to prevent instantiation outside of derived classes. | |
| ~Singleton ()=default | |
| Default destructor is protected to prevent deletion through base class pointer. | |
|
inlineoverridevirtual |
Initialize and attach all components.
Implements ISchedulerConnectionKit interface to initialize all components including primitives, network, MQTT, and device controllers.
Implements uniot::ISchedulerConnectionKit.
|
inline |
Configure the NetworkController using a config structure.
Convenience method to configure the NetworkController using a single config structure. Creates and initializes the NetworkController instance if not already configured.
| config | The NetworkControllerConfig structure containing all parameters |
|
inline |
Configure the NetworkController with individual parameters.
Creates and initializes the NetworkController instance with the specified parameters if not already configured. Also links button click events to Lisp primitives.
| pinBtn | Button pin (UINT8_MAX means not used) |
| activeLevelBtn | Active level for button (LOW or HIGH) |
| pinLed | LED pin (UINT8_MAX means not used) |
| activeLevelLed | Active level for LED (LOW or HIGH) |
| maxRebootCount | Maximum number of consecutive reboots |
| rebootWindowMs | Time window in ms for counting reboots |
|
inline |
Get the device credentials.
| Credentials& | Reference to the Credentials instance |
|
inline |
|
inline |
Get the MQTT communication kit instance.
| MQTTKit& | Reference to the MQTTKit instance |
|
inline |
|
inlineoverridevirtual |
Add all managed tasks to the scheduler.
Implements ISchedulerConnectionKit interface to register all component tasks with the provided scheduler.
| scheduler | The TaskScheduler to add tasks to |
Implements uniot::ISchedulerConnectionKit.
|
inlineoverridevirtual |
Register all components with the event bus.
Implements ICoreEventBusConnectionKit interface to register all components with the provided event bus. Opens necessary data channels and registers entities.
| eventBus | The CoreEventBus to register with |
Implements uniot::IEventBusConnectionKit< unsigned int, int, Bytes >.
|
inline |
|
inline |
Set the user identifier for device association.
| userId | User identifier string |
| bool | true if user ID was set successfully, false if empty |
Sets the owner/user ID for device identification and association. The ID is stored persistently in credentials and used for device management within the Uniot ecosystem.
|
inline |
Set WiFi network credentials.
| ssid | Network SSID to connect to |
| password | Network password (empty for open networks) |
| bool | true if credentials were set successfully, false otherwise |
Configures the WiFi credentials for network connection. The credentials are stored persistently and used for automatic network connection.
|
inlineoverridevirtual |
Unregister all components from the event bus.
Implements ICoreEventBusConnectionKit interface to unregister all components from the provided event bus. Closes data channels and unregisters entities.
| eventBus | The CoreEventBus to unregister from |
Implements uniot::IEventBusConnectionKit< unsigned int, int, Bytes >.