mbed-os-examples / Mbed OS mbed-os-example-ble-GattServer

Dependents:   mbed-os-example-ble-GattServer_ECG

Embed: (wiki syntax)

« Back to documentation index

BLEProcess Class Reference

BLEProcess Class Reference

Handle initialization adn shutdown of the BLE Instance. More...

#include <BLEProcess.h>

Public Member Functions

 BLEProcess (events::EventQueue &event_queue, BLE &ble_interface)
 Construct a BLEProcess from an event queue and a ble interface.
void on_init (mbed::Callback< void(BLE &, events::EventQueue &)> cb)
 Subscription to the ble interface initialization event.
bool start ()
 Initialize the ble interface, configure it and start advertising.
void stop ()
 Close existing connections and stop the process.

Detailed Description

Handle initialization adn shutdown of the BLE Instance.

Setup advertising payload and manage advertising state. Delegate to GattClientProcess once the connection is established.

Definition at line 39 of file BLEProcess.h.


Constructor & Destructor Documentation

BLEProcess ( events::EventQueue &  event_queue,
BLE &  ble_interface 
)

Construct a BLEProcess from an event queue and a ble interface.

Call start() to initiate ble processing.

Definition at line 46 of file BLEProcess.h.


Member Function Documentation

void on_init ( mbed::Callback< void(BLE &, events::EventQueue &)>  cb )

Subscription to the ble interface initialization event.

Parameters:
[in]cbThe callback object that will be called when the ble interface is initialized.

Definition at line 63 of file BLEProcess.h.

bool start (  )

Initialize the ble interface, configure it and start advertising.

Definition at line 71 of file BLEProcess.h.

void stop (  )

Close existing connections and stop the process.

Definition at line 99 of file BLEProcess.h.