clients/dotnet: SDK methods for AcknowledgeAlarm + QueryActiveAlarms (PR E.2) #106
Reference in New Issue
Block a user
Delete Branch "track-e2-dotnet-alarm-sdk"
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
Seventh PR of the alarms-over-gateway epic (docs/plans/alarms-over-gateway.md). Depends on PR A.1 (#104, merged) and E.1 (#105, merged).
Hand-written .NET SDK methods on top of the regenerated proto types:
MxGatewayClient.AcknowledgeAlarmAsync— routes through the existing safe-unary retry pipeline (Acks are idempotent at MxAccess), maps Unauthenticated/PermissionDenied RpcExceptions to typedMxGatewayAuthenticationException/MxGatewayAuthorizationExceptionviaGrpcMxGatewayClientTransport.MapRpcException.MxGatewayClient.QueryActiveAlarmsAsync— server-streamingIAsyncEnumerable<ActiveAlarmSnapshot>mirroring theStreamEventspattern.IMxGatewayClientTransportextended;GrpcMxGatewayClientTransportimplements both methods using the regenerated grpc client.FakeGatewayTransportextended with capture lists, exception queue, and reply / snapshot enqueue helpers.CLI version-string assertions updated for the
GatewayProtocolVersion2 → 3 bump from A.1.The CLI alarms verb (subscribe / acknowledge / query-active) is deferred to a follow-up — keeping this PR focused on the SDK surface that lmxopcua's GalaxyDriver consumes in PR B.2. The other-language SDKs (E.3-E.6) layer the same shape on the regen.
Test plan
MxGatewayClientAlarmsTests— request shape, cancellation honor (linked-token via retry pipeline), Unauthenticated mapping, streaming snapshot enumeration, filter prefix passthrough, cancellation during enumeration