feat(siteruntime): event-driven Attributes.WriteBatchAndWaitAsync (batched DCL write + trigger + existing WaitForAttribute waiter) + compile mirror
This commit is contained in:
@@ -46,6 +46,7 @@ public class DataConnectionManagerActor : ReceiveActor
|
||||
Receive<SubscribeAlarmsRequest>(HandleRouteAlarms);
|
||||
Receive<UnsubscribeAlarmsRequest>(HandleRouteAlarms);
|
||||
Receive<WriteTagRequest>(HandleRouteWrite);
|
||||
Receive<WriteTagBatchRequest>(HandleRouteWriteBatch);
|
||||
Receive<RemoveConnectionCommand>(HandleRemoveConnection);
|
||||
Receive<GetAllHealthReports>(HandleGetAllHealthReports);
|
||||
Receive<BrowseNodeCommand>(HandleBrowse);
|
||||
@@ -141,6 +142,26 @@ public class DataConnectionManagerActor : ReceiveActor
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Routes a <see cref="WriteTagBatchRequest"/> to the child
|
||||
/// <see cref="DataConnectionActor"/> that owns the named connection — the batch
|
||||
/// counterpart of <see cref="HandleRouteWrite"/>. The manager owns only the
|
||||
/// unknown-connection failure (the same split as every other routed message);
|
||||
/// the child resolves connected/not-connected and the per-write outcomes.
|
||||
/// </summary>
|
||||
private void HandleRouteWriteBatch(WriteTagBatchRequest request)
|
||||
{
|
||||
if (_connectionActors.TryGetValue(request.ConnectionName, out var actor))
|
||||
actor.Forward(request);
|
||||
else
|
||||
{
|
||||
_log.Warning("No connection actor for {0}", request.ConnectionName);
|
||||
Sender.Tell(new WriteTagBatchResponse(
|
||||
request.CorrelationId, false,
|
||||
$"Unknown connection: {request.ConnectionName}", DateTimeOffset.UtcNow));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Routes a <see cref="BrowseNodeCommand"/> from the central UI's OPC UA
|
||||
/// Tag Browser to the child <see cref="DataConnectionActor"/> that owns the
|
||||
|
||||
Reference in New Issue
Block a user