feat(grpc-data): A3b consumer method port — per-caller AlarmAcknowledge/AlarmConfirm gate, mapping timeout, stream serving incarnation, lease condition methods, host wiring

This commit is contained in:
Joseph Doherty
2026-11-24 17:11:05 -05:00
parent c1be5725b9
commit 28098a8d32
4 changed files with 117 additions and 2 deletions
@@ -524,8 +524,22 @@ public sealed class DataConnectionDeploymentRuntime : IAsyncDisposable
}
/// <summary>A non-owning handle with the deployed operation and resource policy.</summary>
public sealed class DataConnectionDeploymentLease : IDataConnection, IDataHistoryService, IHistoryBatchLimit, IDisposable
public sealed class DataConnectionDeploymentLease : IDataConnection, IDataHistoryService, IHistoryBatchLimit, IDataConditionMethodService, IDisposable
{
/// <summary>
/// A3b: a remote condition method through the deployed connection — needs the row's AlarmAcknowledge / AlarmConfirm
/// bit (refused unsent otherwise) and an inner connection that serves methods. The outcome is passed through untouched
/// (no post-check: once sent, an answer is the only truth about whether the origin applied it).
/// </summary>
public Task<DataConditionMethodResult> CallConditionMethodAsync(DataConditionMethodRequest request, CancellationToken cancellationToken)
{
ArgumentNullException.ThrowIfNull(request);
Check(DataConditionMethodSets.OperationFor(request.Method));
return _inner is IDataConditionMethodService methods
? methods.CallConditionMethodAsync(request, cancellationToken)
: Task.FromResult(new DataConditionMethodResult(DataWriteState.RejectedBeforeDispatch, 0x803D0000u, "The connection does not serve condition methods."));
}
/// <summary>
/// H2 remote history through the deployed connection: needs the connection row's HistoryRead bit (masked to the
/// understood set) and an inner connection that implements history; otherwise every item is unsupported.