I am switching from OPC DA to OPC UA. In OPC DA the SubscribeMultipleItems method comes with a callback argument. For OPC UA the SubscribeMultipleMonitoredItems method does not come with a callback argument. How can I implement a callback for SubscribeMultipleMonitoredItems in OPC UA?
OPC DA Example:
easyDAClient1.SubscribeMultipleItems(items.ToArray(), (_, e) => {
if (e.Vtq != null && e.Vtq.HasValue)
{
String tag = e.Arguments.ItemDescriptor.ItemId.ToString();
object value = e.Vtq.Value;
itemChanged(tag, value);
}
});
OPC UA Example:
easyUAClient1.SubscribeMultipleMonitoredItems(items.ToArray());
OPC DA Example:
easyDAClient1.SubscribeMultipleItems(items.ToArray(), (_, e) => {
if (e.Vtq != null && e.Vtq.HasValue)
{
String tag = e.Arguments.ItemDescriptor.ItemId.ToString();
object value = e.Vtq.Value;
itemChanged(tag, value);
}
});
OPC UA Example:
easyUAClient1.SubscribeMultipleMonitoredItems(items.ToArray());