Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JulZimmermann
Copy link
Contributor

Solution for #4318, #5701 and #5226

Copy link
Member

@jpfr jpfr left a 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,
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some documentation

Copy link
Member

@jpfr jpfr left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants