|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <NvsEditModule.h>
Public Member Functions | |
| NvsEditModule () | |
| bool | init () override |
| Initializes NVS editor module state. | |
| const char * | getVersion () const override |
| Returns the module version string. | |
| uint8_t | getMenuItems (cdc::core::ModuleMenuItem *items, uint8_t maxItems) override |
| Exposes NVS editor entry in the tools menu. | |
| Public Member Functions inherited from cdc::core::ModuleBase | |
| ModuleBase (const char *name) | |
| Constructs a module base with the given module name. | |
| const char * | getName () const override |
| Returns the module name supplied to the constructor. | |
| ServiceState | getState () const override |
| Returns the current service state. | |
| bool | start () override |
| Default start() implementation performing the standard transition. | |
| void | stop () override |
| Default stop() implementation that transitions to STOPPED. | |
| Public Member Functions inherited from cdc::core::IModule | |
| virtual bool | exportBackup (cJSON *out) |
| Exports this module's data as a JSON section for the backup file. | |
| virtual BackupResult | importBackup (const cJSON *in) |
| Restores this module's data from its JSON backup section. | |
| virtual ui::IView * | getEntryView () |
| Returns the module's entry view (main view when selected from menu). | |
| virtual uint8_t | getLockScreenContextItems (LockScreenContextItem *items, uint8_t maxItems) |
| Returns the module's lock screen context menu items. | |
| virtual void | onUnlock () |
| Called when device is unlocked. | |
| virtual void | onLock () |
| Called when device is locked. | |
| virtual void | onUsbConnect () |
| Called when USB is connected. | |
| virtual void | onUsbDisconnect () |
| Called when USB is disconnected. | |
| virtual void | onTick (uint32_t nowMs) |
| Called periodically (optional tick for background work). | |
| virtual void | setSlotRange (const SlotRange &range) |
| Sets the slot range assigned by the module registry (from compile-time memory map). | |
| virtual SlotRequest | getSlotRequest () const |
| Returns slot requirements for this module (from compile-time memory map). | |
| Public Member Functions inherited from cdc::core::IService | |
| virtual | ~IService ()=default |
Additional Inherited Members | |
| Protected Attributes inherited from cdc::core::ModuleBase | |
| const char * | name_ = nullptr |
| ServiceState | state_ = ServiceState::UNINITIALIZED |
NVS Editor Module
Provides a GUI for browsing and editing NVS (Non-Volatile Storage). Privileged tool: delete actions are disabled by default and require FEATURE_NVS_EDIT=1 at build time.
Definition at line 14 of file NvsEditModule.h.
|
inline |
Definition at line 16 of file NvsEditModule.h.
References cdc::core::ModuleBase::ModuleBase().
|
overridevirtual |
Exposes NVS editor entry in the tools menu.
| items | Destination array for menu items. |
| maxItems | Capacity of items. |
Reimplemented from cdc::core::IModule.
Definition at line 543 of file NvsEditModule.cpp.
References cdc::mod_nvsedit::deleteEnabled(), cdc::core::ModuleBase::getName(), cdc::mod_nvsedit::getNvsEditorView(), cdc::core::ModuleMenuItem::getView, cdc::core::ModuleMenuItem::isVisible, cdc::core::ModuleMenuItem::label, cdc::core::ModuleMenuItem::location, cdc::core::ModuleMenuItem::moduleName, cdc::core::ModuleMenuItem::onSelect, cdc::core::ModuleMenuItem::priority, and cdc::core::TOOLS_MENU.
|
inlineoverridevirtual |
Returns the module version string.
Implements cdc::core::IModule.
Definition at line 22 of file NvsEditModule.h.
|
overridevirtual |
Initializes NVS editor module state.
Implements cdc::core::IService.
Definition at line 531 of file NvsEditModule.cpp.
References cdc::core::INITIALIZED, LOG_I, cdc::core::ModuleBase::state_, and TAG.