These points are all inside a hierarchy, like so
Code: Select all
RootNode
|
|__ NodeA
| |
| |__ NodeAA
| | |
| | |__ NodeAAA
| | | |
| | | |_ NodeAAATheValue
| | |
| | |__ NodeAAB
| | |
| | |_ NodeAABTheValue
| |
| |__ NodeAB
| |
...
|__ NodeB
We've tried something like this:
Code: Select all
Subscription subscription = new Subscription(_session);
subscription.PublishingEnabled = true;
subscription.PublishingInterval = 100; //Intervalle à laquelle on veut avoir des valeurs qui remontent
subscription.DataChanged += subscription_DataChanged;
subscription.Create();
// Step 2 --------------------------------------------------
// Prepare variables to monitor as data monitored item
List<MonitoredItem> monitoredItems = new List<MonitoredItem>();
// Default is monitoring Value attributes
foreach (String variable in variables)
{
monitoredItems.Add(new DataMonitoredItem(new NodeId(variable, SelectedNamespace.Index))});
}
List<StatusCode> results = subscription.CreateMonitoredItems(monitoredItems);
// Step 4 --------------------------------------------------
// Display any errors.
for (int i = 0; i < results.Count; i++)
{
Debug += results[i].ToString() + "\n";
}
Is there some way to create a subscription to the root node? That way, we would be notified of all changes of all child nodes of all child values.
Thank you for your time!