Is your enhancement proposal related to a problem? Please describe.
In TBS we don't verify that all notifications are actually sent. Since this may cause issues for remote devices (and is in fact not spec compliant), we should ensure that all notifications (or at least the latest value) is sent as notifications.
Describe the solution you'd like
Create a bitfield where each bit indicate that a specific characteristic value needs to be notified. Once a notification should be sent, the thread doing the change should set this bit, post a k_work item (or similar) and then just continue. The k_work item can then (in a separate thread) attempt to send the notification. If it fails, then it will simply try again later. If it succeeds, it will attempt the next notification, until all notifications are sent.
Is your enhancement proposal related to a problem? Please describe. In TBS we don't verify that all notifications are actually sent. Since this may cause issues for remote devices (and is in fact not spec compliant), we should ensure that all notifications (or at least the latest value) is sent as notifications.
Describe the solution you'd like Create a bitfield where each bit indicate that a specific characteristic value needs to be notified. Once a notification should be sent, the thread doing the change should set this bit, post a
k_work
item (or similar) and then just continue. Thek_work
item can then (in a separate thread) attempt to send the notification. If it fails, then it will simply try again later. If it succeeds, it will attempt the next notification, until all notifications are sent.Describe alternatives you've considered N/A
Additional context N/A