20 const char*
getName()
const override {
return "mod_ble_serial"; }
23 bool start()
override;
27 const char*
getVersion()
const override {
return "1.0"; }
29 void onTick(uint32_t nowMs)
override;
52 bool enabled_ =
false;
55 static constexpr size_t LABEL_BUF_SIZE = 32;
56 char labelBuf_[LABEL_BUF_SIZE] = {};
59 static constexpr const char*
NVS_NAMESPACE =
"mod_ble_serial";
62 void registerStrings();
65 void registerConsoleHooks();
66 void unregisterConsoleHooks();
70 void registerPairingCallback();
void mod_ble_serial_register()
Registers BLE serial module initializer.
Module interface that extends IService with module-specific features.
static BleSerialModule & instance()
BLE serial module lifecycle implementation.
uint8_t getMenuItems(core::ModuleMenuItem *items, uint8_t maxItems) override
Provides Bluetooth-menu item for BLE serial toggle.
bool start() override
Starts BLE serial module and optionally auto-enables service.
core::ServiceState getState() const override
void onTick(uint32_t nowMs) override
Periodic module tick hook.
void stop() override
Stops BLE serial module and deinitializes UART service when enabled.
bool init() override
Initializes BLE serial module resources and settings.
void toggle()
Toggles BLE serial service state and updates persisted setting.
const char * getVersion() const override
Returns the module version string.
const char * getName() const override