OPCFoundation / UA-.NETStandard

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

ConditionRefreshAsync always results in BadNodeIdUnknown #2854

Open berndbr opened 9 hours ago

berndbr commented 9 hours ago

Type of issue

Current Behavior

When implementing an OPC-UA client using the client SDK and adding event monitored items to subscriptions a call to ConditionRefreshAsync has no effect.

ConditionRefreshAsync internally calls the method MethodIds.ConditionType_ConditionRefresh using Session.CallAsync. This call always returns BadNodeIdInvalid. Instead the synchronous ConditionRefresh call works as expected in the same setup.

IMHO this is because the internal Session.CallAsync seems to miss the object-id parameter which is ObjectTypeIds.ConditionType in the synchronous ConditionRefresh call.

Expected Behavior

ConditionRefreshAsync should work like the ConditionRefresh call.

Steps To Reproduce

  1. Create Session
  2. Create Subscription
  3. Add a event monitored item
  4. Call ConditionRefreshAsync.

Environment

- OS: Windows 11
- Environment: VS 2022
- Runtime: .NET8
- Nuget Version: 1.5.374.126
- Component: OPCFoundation.NetStandard.Opc.Ua.Client
- Server: UA CPP Demo Server
- Client: Implementation based on OPCFoundation.NetStandard.Opc.Ua.Client

Anything else?

No response