Private interface used to implement the BLE class. More...
#include <BLEInstanceBase.h>
Public Member Functions | |
BLEInstanceBase () | |
Base constructor. More... | |
virtual | ~BLEInstanceBase () |
Virtual destructor of the interface. More... | |
virtual void | processEvents ()=0 |
Process ALL pending events living in the vendor BLE subsystem. More... | |
void | signalEventsToProcess (BLE::InstanceID_t id) |
Signal to BLE that events needing processing are available. More... | |
virtual ble_error_t | init (BLE::InstanceID_t instanceID, FunctionPointerWithContext< BLE::InitializationCompleteCallbackContext * > initCallback)=0 |
Start the initialization of the vendor BLE subsystem. More... | |
virtual bool | hasInitialized (void) const =0 |
Check whether the vendor BLE subsystem has been initialized or not. More... | |
virtual ble_error_t | shutdown (void)=0 |
Shutdown the vendor BLE subsystem. More... | |
virtual const char * | getVersion (void)=0 |
Fetches a NULL terminated string representation of the underlying BLE vendor subsystem. More... | |
virtual Gap & | getGap (void)=0 |
Accessor to the vendor implementation of the Gap interface. More... | |
virtual const Gap & | getGap (void) const =0 |
Const alternative to getGap(). More... | |
virtual GattServer & | getGattServer (void)=0 |
Accessor to the vendor implementation of the GattServer interface. More... | |
virtual const GattServer & | getGattServer (void) const =0 |
A const alternative to getGattServer(). More... | |
virtual GattClient & | getGattClient (void)=0 |
Accessor to the vendor implementation of the GattClient interface. More... | |
virtual SecurityManager & | getSecurityManager (void)=0 |
Accessor to the vendor implementation of the SecurityManager interface. More... | |
virtual const SecurityManager & | getSecurityManager (void) const =0 |
A const alternative to getSecurityManager(). More... | |
virtual void | waitForEvent (void)=0 |
Process pending events present in the vendor subsystem; then, put the MCU to sleep until an external source wakes it up. More... | |
Private interface used to implement the BLE class.
The BLE class delegates all its abstract operations to an instance of this abstract class, which every vendor port of Mbed BLE shall implement.
The vendor port shall also define an implementation of the freestanding function createBLEInstance(). The BLE API uses this singleton function to gain access to a concrete implementation of this class defined in the vendor port.
Definition at line 54 of file BLEInstanceBase.h.
BLEInstanceBase | ( | ) |
Base constructor.
Definition at line 60 of file BLEInstanceBase.h.
|
virtual |
Virtual destructor of the interface.
|
pure virtual |
Accessor to the vendor implementation of the Gap interface.
|
pure virtual |
Const alternative to getGap().
|
pure virtual |
Accessor to the vendor implementation of the GattClient interface.
|
pure virtual |
Accessor to the vendor implementation of the GattServer interface.
|
pure virtual |
A const alternative to getGattServer().
|
pure virtual |
Accessor to the vendor implementation of the SecurityManager interface.
|
pure virtual |
A const alternative to getSecurityManager().
|
pure virtual |
Fetches a NULL terminated string representation of the underlying BLE vendor subsystem.
|
pure virtual |
Check whether the vendor BLE subsystem has been initialized or not.
|
pure virtual |
Start the initialization of the vendor BLE subsystem.
Calls to this function are initiated by BLE::init, instanceID identify the BLE instance which issue that call while the initCallback is used to signal asynchronously the completion of the initialization process.
[in] | instanceID | Identifier of the BLE instance requesting initialization. |
[in] | initCallback | Callback which the vendor port shall invoke when the initialization completes. |
This is an optional parameter set to NULL when not supplied.
|
pure virtual |
Process ALL pending events living in the vendor BLE subsystem.
Return once all pending events have been consumed.
|
pure virtual |
Shutdown the vendor BLE subsystem.
This operation includes purging the stack of GATT and GAP state and clearing all state from other BLE components, such as the SecurityManager. Clearing all states may be realized by a call to Gap::reset(), GattClient::reset(), GattServer::reset() and SecurityManager::reset().
BLE::init() must be called afterward to reinstantiate services and GAP state.
void signalEventsToProcess | ( | BLE::InstanceID_t | id | ) |
Signal to BLE that events needing processing are available.
The vendor port shall call this function whenever there are events ready to be processed in the internal stack or BLE subsystem. As a result of this call, the callback registered by the end user via BLE::onEventsToProcess will be invoked.
[in] | id | Identifier of the BLE instance, which does have events to ready to be processed. |