-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow a single complete callback for all monitored items in one subscription #6443
base: master
Are you sure you want to change the base?
Allow a single complete callback for all monitored items in one subscription #6443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! See the inline comments.
@@ -78,6 +82,24 @@ UA_Client_Subscriptions_create_async(UA_Client *client, | |||
UA_ClientAsyncServiceCallback callback, | |||
void *userdata, UA_UInt32 *requestId); | |||
|
|||
UA_CreateSubscriptionResponse UA_EXPORT UA_THREADSAFE | |||
UA_Client_Subscriptions_create_complete_data_change(UA_Client *client, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use snake_case_notation in the library.
Use camlCaseNotation instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the functions to UA_Client_Subscriptions_createCompleteDataChange
and UA_Client_Subscriptions_createCompleteDataChange_async
is this OK?
@@ -78,6 +82,24 @@ UA_Client_Subscriptions_create_async(UA_Client *client, | |||
UA_ClientAsyncServiceCallback callback, | |||
void *userdata, UA_UInt32 *requestId); | |||
|
|||
UA_CreateSubscriptionResponse UA_EXPORT UA_THREADSAFE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a lot more inline documentation in the header.
Please add it. What does the method do, what are intended use cases, why is it not possible to achive the same with the other API methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, cool.
Understood what you want to do.
Please rename this to UA_Client_Subscriptions_createEx.
We use this naming also in other places to denote extended versions of an API.
Furthermore it should still be possible to have detailed callbacks with each MonitoredItem. And at the same time have a global callback for the subscription.
Solution for #4318, #5701 and #5226