Skip to content

Updated callback event handlers for new parameter lists #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions BLE_GattServer/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ class ClockService {
/**
* Handler called when a notification or an indication has been sent.
*/
void when_data_sent(unsigned count)
void when_data_sent(GattDataSentCallbackParams params)
{
printf("sent %u updates\r\n", count);
printf("notification/indication sent for handle %d, connection handle: %u\r\n",
params.handle, params.connHandle);
}

/**
Expand Down Expand Up @@ -167,9 +168,10 @@ class ClockService {
*
* @param handle Handle of the characteristic value affected by the change.
*/
void when_update_enabled(GattAttribute::Handle_t handle)
void when_update_enabled(GattUpdatesEnabledCallbackParams params)
{
printf("update enabled on handle %d\r\n", handle);
printf("update enabled on handle %d, connection handle: %u\r\n",
params.handle, params.connHandle);
}

/**
Expand All @@ -178,9 +180,10 @@ class ClockService {
*
* @param handle Handle of the characteristic value affected by the change.
*/
void when_update_disabled(GattAttribute::Handle_t handle)
void when_update_disabled(GattUpdatesDisabledCallbackParams params)
{
printf("update disabled on handle %d\r\n", handle);
printf("update disabled on handle %d, connection handle: %u\r\n",
params.handle, params.connHandle);
}

/**
Expand All @@ -189,9 +192,10 @@ class ClockService {
* @param handle Handle of the characteristic value that has emitted the
* indication.
*/
void when_confirmation_received(GattAttribute::Handle_t handle)
void when_confirmation_received(GattConfirmationReceivedCallbackParams params)
{
printf("confirmation received on handle %d\r\n", handle);
printf("confirmation received on handle %d, connection handle: %u\r\n",
params.handle, params.connHandle);
}

/**
Expand Down