File tree Expand file tree Collapse file tree 4 files changed +31
-6
lines changed Expand file tree Collapse file tree 4 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,29 @@ struct GattHVXCallbackParams {
384
384
385
385
};
386
386
387
+ /* *
388
+ * Gatt Data Sent Attribute related events
389
+ *
390
+ * Used by `onDataSent`
391
+ */
392
+ struct GattDataSentCallbackParams {
393
+
394
+ /* *
395
+ * The handle of the connection that triggered the event.
396
+ */
397
+ ble::connection_handle_t connHandle;
398
+
399
+ /* *
400
+ * Attribute Handle to which the event applies
401
+ */
402
+ GattAttribute::Handle_t handle;
403
+
404
+ };
405
+
406
+ using GattUpdatesEnabledCallbackParams = GattDataSentCallbackParams;
407
+ using GattUpdatesDisabledCallbackParams = GattDataSentCallbackParams;
408
+ using GattConfirmationReceivedCallbackParams = GattDataSentCallbackParams;
409
+
387
410
namespace ble {
388
411
389
412
/* *
Original file line number Diff line number Diff line change @@ -139,17 +139,17 @@ GattServer::GattServerShutdownCallbackChain_t& GattServer::onShutdown()
139
139
140
140
void GattServer::onUpdatesEnabled (EventCallback_t callback)
141
141
{
142
- return impl->onUpdatesEnabled (callback);
142
+ impl->onUpdatesEnabled (callback);
143
143
}
144
144
145
145
void GattServer::onUpdatesDisabled (EventCallback_t callback)
146
146
{
147
- return impl->onUpdatesDisabled (callback);
147
+ impl->onUpdatesDisabled (callback);
148
148
}
149
149
150
150
void GattServer::onConfirmationReceived (EventCallback_t callback)
151
151
{
152
- return impl->onConfirmationReceived (callback);
152
+ impl->onConfirmationReceived (callback);
153
153
}
154
154
155
- } // ble
155
+ } // ble
Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ void GattServer::cccd_cb(attsCccEvt_t *evt)
950
950
GattServerEvents::GATT_EVENT_UPDATES_ENABLED :
951
951
GattServerEvents::GATT_EVENT_UPDATES_DISABLED;
952
952
953
- getInstance ().handleEvent (evt_type, evt->handle );
953
+ getInstance ().handleEvent (evt_type, evt->hdr . param , evt-> handle );
954
954
}
955
955
956
956
void GattServer::att_cb (const attEvt_t *evt)
@@ -961,7 +961,7 @@ void GattServer::att_cb(const attEvt_t *evt)
961
961
handler->onAttMtuChange (evt->hdr .param , evt->mtu );
962
962
}
963
963
} else if (evt->hdr .status == ATT_SUCCESS && evt->hdr .event == ATTS_HANDLE_VALUE_CNF) {
964
- getInstance ().handleEvent (GattServerEvents::GATT_EVENT_DATA_SENT, evt->handle );
964
+ getInstance ().handleEvent (GattServerEvents::GATT_EVENT_DATA_SENT, evt->hdr . param , evt-> handle );
965
965
}
966
966
}
967
967
@@ -1516,6 +1516,7 @@ void GattServer::handleDataReadEvent(const GattReadCallbackParams *params)
1516
1516
1517
1517
void GattServer::handleEvent (
1518
1518
GattServerEvents::gattEvent_e type,
1519
+ ble::connection_handle_t connHandle,
1519
1520
GattAttribute::Handle_t attributeHandle
1520
1521
)
1521
1522
{
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class GattServer : public PalSigningMonitor {
153
153
154
154
void handleEvent (
155
155
GattServerEvents::gattEvent_e type,
156
+ ble::connection_handle_t connHandle,
156
157
GattAttribute::Handle_t attributeHandle
157
158
);
158
159
You can’t perform that action at this time.
0 commit comments