Notification on user type attributes

41 views
Skip to first unread message

Lajos Rancz

unread,
Sep 12, 2022, 3:46:10 AM9/12/22
to Franca
Hi!

I understand the notification semantic in the case of scalar typed attributes. If the value of the attribute is changed then a notification will be sent. But what is the semantic when a complex attribute is written? For example, I have an array, and I change only one value of it (for example the 5th). What will happen?

Regards,
Lajos

Klaus Birken

unread,
Sep 13, 2022, 2:09:24 PM9/13/22
to Franca
Hi Lajos,

the language specification does not define how the notification should look like. The minimum requirement is that a notification is sent on change without any further data. The actual notification message is an implementation detail of the underlying middleware binding. For complex attribute types, it might be useful (e.g., for performance reasons) to include "hints" in the notification data to specify which part of the attribute has changed. E.g., for array types, the actually changed index can be sent instead of a pure notification.

I currently do not remember how CommonAPI C++ does it; you could look at some generated code to find out if they already provide some optimization for notifications.

Hope that helps, regards,
Klaus

Lajos Rancz

unread,
Sep 14, 2022, 4:04:29 AM9/14/22
to Franca
Hi Klaus,

Thanks, it was exactly the question :) Do you know any C++ implementation other than CommonAPI?

Regards,
Lajos

Klaus Birken

unread,
Sep 14, 2022, 5:28:54 AM9/14/22
to Franca
I do not know about another C++ generator, but there is at least one C generator. I do not know its current state, the repo seems a bit outdated. You could check this:


There was also that one by Pavel Konopelko:

Maybe one of them can be brought back to life :-)

Lajos Rancz

unread,
Sep 14, 2022, 9:01:10 AM9/14/22
to Franca
Thank you!
Reply all
Reply to author
Forward
0 new messages