[opcuaclient] OpcUaClient — Honor server OperationLimits #333
Reference in New Issue
Block a user
Delete Branch "auto/opcuaclient/3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Honors the upstream server's
OperationLimitsso batch Read/Write calls don't triggerBadTooManyOperationson capacity-constrained UA servers.OperationLimitsCacherecord (4 nullable uints — null/0 = no limit).EnsureOperationLimitsFetchedAsynclazily callsSession.FetchOperationLimitsAsynconce on the first batch op. Normalizes the spec sentinel0→null.ChunkBy<T>(IReadOnlyList<T>, uint?)helper yieldsArraySegment<T>slices. null/0/oversize cap → single slice (unchanged single SDK call).ReadAsync(MaxNodesPerRead) andWriteAsync(MaxNodesPerWrite). Per-chunkindexMapkeeps result-index alignment correct across slices.OnReconnectComplete(so capability changes across a reconnect window are picked up) and inShutdownAsync.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Tests— 104 / 104 passed (9 new inOpcUaClientOperationLimitsTests: 12-tag/cap-5 = 5+5+2, null-cap and zero-cap no-chunk, cap≥input, cap=1, exact match, empty input, cache record shape, pre-init null state)🤖 Auto-generated by the Mode-B execution loop. Closes #275.
Closes #275