Subscription - how to monitor multiple nodes

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
shawng
Jr. Member
Jr. Member
Posts: 1
Joined: 06 Jan 2014, 23:28

Subscription - how to monitor multiple nodes

Post by shawng »

First off, can anyone point me to some clear documentation on how to setup a subscription on a UA server? I've looked at Lesson 6 in the client tutorial and can get it to work, but this example only monitors a single node.

I'd like to create a subscription and then subsequently add additional monitored items to that subscription. Is it possible to do this, or do I create a new subscription for each monitored item?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Subscription - how to monitor multiple nodes

Post by Support Team »

Hello,

you don't have to create a new subscription for every new MonitoredItem. You can add new Items to a subscription at any time. You can just reuse the code to add a new MonitoredItem with adapted parameters from the lesson. You just must make sure that you create unique client handles for the monitored items in different createMonitoredItems calls.

If you want to delete or modify monitored items you must store the server handles returned from createMonitoredItems.

Best regards
Support Team

Post Reply