|
Ersa Wearable Platform
Embedded smartwatch firmware and application framework
|
#include <bluetooth.h>

Public Member Functions | |
| virtual | ~IBluetooth ()=default |
| virtual Result< void > | init ()=0 |
| virtual void | startAdvertising ()=0 |
| virtual void | stopAdvertising ()=0 |
| virtual bool | suspendForMaintenance () |
| Release radio resources before memory-intensive maintenance. | |
| virtual void | resumeAfterMaintenance () |
| Resume advertising after maintenance completes. | |
| virtual bool | isConnected () const =0 |
| virtual bool | isAdvertising () const |
| virtual uint32_t | nextWakeDelayMs (uint32_t nowMs) const |
| virtual void | tick () |
| virtual const char * | getDeviceName () const =0 |
| Return the local BLE device name. | |
| virtual const char * | getDeviceAddress () const =0 |
| virtual void | setConnectionCallback (BleConnectionCallback cb, void *userData)=0 |
BLE transport, advertising, and link-state contract.
This interface owns radio lifecycle only. Companion semantics such as calls, notifications, media, and phone time live behind ICompanionSource so another transport/provider can supply them without pretending to be this BLE stack. Driver callbacks should hand off work and avoid running UI code directly.
|
virtualdefault |
|
pure virtual |
Return a stable formatted address string owned by the backend.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
pure virtual |
Return the local BLE device name.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
pure virtual |
Initialize the controller and service transport required by the product.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
inlinevirtual |
Return advertising state when the backend can report it, else false.
Reimplemented in ersa::test::MockBluetooth, and ersa::hal::Esp32Bluetooth.
|
pure virtual |
Return current link state; this does not imply companion services are ready.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
inlinevirtual |
Return delay until the next required BLE maintenance deadline. UINT32_MAX means there is no scheduled deadline; sleep policy uses this value to choose a safe wait duration without polling continuously.
Reimplemented in ersa::hal::Esp32Bluetooth.
|
inlinevirtual |
Resume advertising after maintenance completes.
Reimplemented in ersa::hal::Esp32Bluetooth.
|
pure virtual |
Register the single BLE link-state callback; null clears it. This reports transport only. Use ICompanionSource for provider/session readiness because encrypted link-up can precede service discovery.
Implemented in ersa::hal::Esp32Bluetooth, ersa::test::MockBluetooth, and ersa::services::DummyBle.
|
pure virtual |
Begin or resume advertising; repeated calls should be safe.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
pure virtual |
Stop advertising without necessarily tearing down an established link.
Implemented in ersa::services::DummyBle, ersa::hal::Esp32Bluetooth, and ersa::test::MockBluetooth.
|
inlinevirtual |
Release radio resources before memory-intensive maintenance.
Reimplemented in ersa::hal::Esp32Bluetooth.
|
inlinevirtual |
Run bounded maintenance deferred from radio callbacks.
Reimplemented in ersa::hal::Esp32Bluetooth.