-
Notifications
You must be signed in to change notification settings - Fork 34
Backport fix for #496 and #361 - event clients lost after dev restart #702
Backport fix for #496 and #361 - event clients lost after dev restart #702
Conversation
Tests that event subscription is restored immediately after the device restart.
Backport of 1a07976. A new struct and a set of overloads are added to keep backward compatibility with 9.3 release.
Add test that verifies if attribute configuration event is sent to all subscribers after device restart (regardless if properties have changed).
Attribute properties may have changed during the restart. Push the event to all registered subscribers to ensure that they get updated values.
Replace range-based for with classical loop over iterator for C++03 compatibility.
8f521d5
to
6a0ee49
Compare
Overall looks good. The only thing is I would tend to believe the tool's output. |
@t-b thanks for pointing that out! I focused on binary compatibility but have not thought about source compatibility. The tool is correct, the change is ABI compatible, because function signature is mangled into symbol's name in C++ ABI. So these two overloads are separate symbols pointing to different places in the code block of the library. But, as documented in the link you referenced, any device server that does something like this, will stop compiling: auto setter = &Device::set_event_param; While these methods are intended to be internal for the library (not documented in doxygen), nothing prevents users from calling them from their device server code. Do you think we need to address this somehow? |
get_event_param & set_event_param methods are not documented in Doxygen (because under so users are not supposed to use it. |
If users are not supposed to use it we can break it ;) |
Summary of changes comparing to original commits:
to avoid changing
set_client_lib
signatureand implement a set of overloads that use the new struct
and attribute_name field instead of attr_id