-
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
QUESTION - How to add args to callback function #6413
Comments
You may either use the nodeContext or the sessionContext for this. Own arguments are not possible in C. |
From the example I have seen that the callback functions should have this structure:
But I don't know exactly how I can get the data from that nodeContext pointer. Also, how UA_Server_setNodeContext() really works? Thanks in advance. |
Use
PS: All NULL-Checks are missing! |
Ok, now I've understood how it works, thanks. |
I'm trying to use a callback similar to the one in https://www.open62541.org/doc/v1.4.0/tutorial_server_datasource.html#variable-value-callback
In the example, the function afterWriteTime() is static and also doesn't need additional arguments or data. However, in my case, I need to pass extra arguments and make calls to functions. How can I do that?
Thanks in advance.
The text was updated successfully, but these errors were encountered: