class BleLayer
Defined at line 230 of file x64-shared/gen/third_party/openweave-core/src/include/BleLayer/BleLayer.h
This class provides an interface for a single thread to drive data
either up the stack via the BleLayer platform interface functions,
or down the stack via a WeaveConnection object associated with a
BLEEndPoint.
There are two ways to associate a WeaveConnection (defined by the
WeaveMessageLayer) with a BLE connection:
First, the application can passively receive an incoming BLE connection
and hand the platform-specific BLE_CONNECTION_OBJECT that this receipt
generates to BleLayer via the corresponding platform interface function.
This causes BleLayer to wrap the BLE_CONNECTION_OBJECT in a BLEEndPoint,
and notify WeaveMessageLayer that a new BLE conneciotn has been received.
The message layer then wraps the new BLEEndPoint object in a
WeaveConnection, and hands this object to the application via the message
layer's OnConnectionReceived callback.
Second, the application can actively form an outgoing BLE connection, e.g.,
by connecting to a BLE peripheral. It then creates a new WeaveConnection
via the WeaveMessageLayer, assigns an authentication type to this
connection, and binds it to the BLE_CONNECTION_OBJECT for the new BLE
connection via WeaveConnection::ConnectBle. This function then
establishes the secure session type specified by the WeaveConnection's
authentication type member variable.
Public Members
mState
void * mAppState
BleConnectionReceivedFunct OnWeaveBleConnectReceived
Public Methods
void BleLayer ()
Public functions:
BLE_ERROR Init (BlePlatformDelegate * platformDelegate, BleApplicationDelegate * appDelegate, Weave::System::Layer * systemLayer)
BLE_ERROR Shutdown ()
BLE_ERROR NewBleEndPoint (BLEEndPoint ** retEndPoint, void * connObj, BleRole role, bool autoClose)
bool HandleSubscribeReceived (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
bool HandleSubscribeComplete (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
Call when a GATT subscribe request succeeds.
bool HandleUnsubscribeReceived (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
bool HandleUnsubscribeComplete (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
Call when a GATT unsubscribe request succeeds.
bool HandleWriteReceived (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId, PacketBuffer * pBuf)
Call when a GATT write request is received.
bool HandleIndicationReceived (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId, PacketBuffer * pBuf)
Call when a GATT indication is received.
bool HandleWriteConfirmation (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
Call when an outstanding GATT write request receives a positive receipt confirmation.
bool HandleIndicationConfirmation (void * connObj, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
Call when an oustanding GATT indication receives a positive receipt confirmation.
bool HandleReadReceived (void * connObj, void * requestContext, const WeaveBleUUID * svcId, const WeaveBleUUID * charId)
Call when a GATT read request is received.
void HandleConnectionError (void * connObj, BLE_ERROR err)
nl::Weave::System::Error ScheduleWork (nl::Weave::System::Layer::TimerCompleteFunct aComplete, void * aAppState)
Defined at line 265 of file x64-shared/gen/third_party/openweave-core/src/include/BleLayer/BleLayer.h
Enumerations
enum
| Name | Value |
|---|---|
| kState_NotInitialized | 0 |
| kState_Initialized | 1 |
Public data members:
Defined at line 239 of file x64-shared/gen/third_party/openweave-core/src/include/BleLayer/BleLayer.h
Friends
class BLEEndPoint