OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

Setting MonitoringMode Opc.Ua.Client.MonitoredItem to MonitoringMode.Disabled does not stop receiving notifications for that particular monitored item #2838

Open shiladityak opened 2 weeks ago

shiladityak commented 2 weeks ago

Type of issue

Current Behavior

Trying the following code,

var subscription = new Subscription();

MonitoredItem monItem = new MonitoriedItem((uint)1);
monItem.StartNodeId = NodeId.parse("ns=2;i=1001");
monItem.AttributeId = Attributes.Value;
monItem.SamplingInterval = -1;
monItem.DisplayName = "NodeItem1";

subscription.AddItem(monItem);

Now, am trying to change MonitoringMode to Disabled,

monItem.MonitoringMode = MonitoringMode.Disabled;
subscription.ApplyChanges();

Though we have changed MonitoringMode to Disabled, still we are receiving notifications for that particular monitored items from source.

Expected Behavior

Expected behavior is that subscription should work properly and it should not receive notifications from the mentioned monitoring item.

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

No response