9#include "ble_bridged_device.h"
10#include "ble_connectivity_manager.h"
11#include "bridged_device_data_provider.h"
17 explicit BleLBSDataProvider(UpdateAttributeCallback updateCallback, InvokeCommandCallback commandCallback)
18 : BLEBridgedDeviceProvider(updateCallback, commandCallback)
23 void NotifyUpdateState(chip::ClusterId clusterId, chip::AttributeId attributeId,
void *data,
24 size_t dataSize)
override;
25 CHIP_ERROR
UpdateState(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer)
override;
28#ifdef CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE
29 static void NotifySwitchCurrentPositionAttributeChange(intptr_t context);
33 static uint8_t
GattNotifyCallback(bt_conn *conn, bt_gatt_subscribe_params *params,
const void *data,
41 bool CheckSubscriptionParameters(bt_gatt_subscribe_params *params);
44#ifdef CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE
45 uint8_t mCurrentSwitchPosition =
false;
47 uint16_t mLedCharacteristicHandle;
48 bt_gatt_write_params mGattWriteParams{};
49 uint16_t mButtonCharacteristicHandle;
51 bt_gatt_subscribe_params mGattSubscribeParams{};
53 uint8_t mGattWriteDataBuffer[
sizeof(mOnOff)];
BleLBSDataProvider(UpdateAttributeCallback updateCallback, InvokeCommandCallback commandCallback)
Definition: ble_lbs_data_provider.h:17
void NotifyUpdateState(chip::ClusterId clusterId, chip::AttributeId attributeId, void *data, size_t dataSize) override
CHIP_ERROR UpdateState(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer) override
static uint8_t GattNotifyCallback(bt_conn *conn, bt_gatt_subscribe_params *params, const void *data, uint16_t length)
static void GattWriteCallback(bt_conn *conn, uint8_t err, bt_gatt_write_params *params)
int ParseDiscoveredData(bt_gatt_dm *discoveredData) override
const bt_uuid * GetServiceUuid() override
static void NotifyOnOffAttributeChange(intptr_t context)
Definition: ble_lbs_data_provider.h:15