Userdata inside MonitoredItem or UaClient_Subscription
Posted: 07 Nov 2017, 16:58
I am currently working with the ANSI C Client SDK. (version 1.7.0)
My software writes its value into a pointer, which is unique for each (subscribed) node.
So, for example, if a subscribed OPCUA node changes its data, It will write the latest value of the node into its corresponding pointer.
The UaClient_Subscription allows storage of this in 'user data'.
This goes fine when I create a subscription foreach node.
However, the OPCUA protocol allows me to add multiple node's into one subscription. (aka monitored items)
If I would create a MonitoredItem foreach node, (within the same subscription)
there is no 'user data' available to store my pointer into. (except one in the subscription)
This leaves us with my following questions:
- Is there any way to store 'user data' in a MonitoredItem, instead of UaClient_Subscription?
- What are the pro's and cons of using a UaClient_Subscription foreach MonitoredItem, instead of creating many UaClient_Subscriptions with one MonitoredItem in each?
All feedback is welcome.
Thanks in advance!
My software writes its value into a pointer, which is unique for each (subscribed) node.
So, for example, if a subscribed OPCUA node changes its data, It will write the latest value of the node into its corresponding pointer.
The UaClient_Subscription allows storage of this in 'user data'.
This goes fine when I create a subscription foreach node.
However, the OPCUA protocol allows me to add multiple node's into one subscription. (aka monitored items)
If I would create a MonitoredItem foreach node, (within the same subscription)
there is no 'user data' available to store my pointer into. (except one in the subscription)
This leaves us with my following questions:
- Is there any way to store 'user data' in a MonitoredItem, instead of UaClient_Subscription?
- What are the pro's and cons of using a UaClient_Subscription foreach MonitoredItem, instead of creating many UaClient_Subscriptions with one MonitoredItem in each?
All feedback is welcome.
Thanks in advance!