feat: OPC UA address-space search plumbing — actor + comm + BrowseService (T15)

This commit is contained in:
Joseph Doherty
2026-06-18 02:51:57 -04:00
parent c00c8241b3
commit 74dd26eebd
7 changed files with 468 additions and 0 deletions
@@ -50,6 +50,7 @@ public class DataConnectionManagerActor : ReceiveActor
Receive<RemoveConnectionCommand>(HandleRemoveConnection);
Receive<GetAllHealthReports>(HandleGetAllHealthReports);
Receive<BrowseNodeCommand>(HandleBrowse);
Receive<SearchAddressSpaceCommand>(HandleSearch);
Receive<ReadTagValuesCommand>(HandleReadTagValues);
}
@@ -189,6 +190,32 @@ public class DataConnectionManagerActor : ReceiveActor
}
}
/// <summary>
/// Routes a <see cref="SearchAddressSpaceCommand"/> from the central UI's OPC
/// UA tag picker to the child <see cref="DataConnectionActor"/> that owns the
/// named connection — the address-space analogue of <see cref="HandleBrowse"/>.
/// Same split: the manager owns <see cref="BrowseFailureKind.ConnectionNotFound"/>
/// (only it knows the per-site connection set); the capability check and every
/// other failure live inside the child where the adapter is held.
/// </summary>
private void HandleSearch(SearchAddressSpaceCommand command)
{
if (_connectionActors.TryGetValue(command.ConnectionName, out var actor))
{
actor.Forward(command);
}
else
{
_log.Warning("No connection actor for {0} during search", command.ConnectionName);
Sender.Tell(new SearchAddressSpaceResult(
Array.Empty<AddressSpaceMatch>(),
CapReached: false,
new BrowseFailure(
BrowseFailureKind.ConnectionNotFound,
$"No data connection named '{command.ConnectionName}' at this site.")));
}
}
/// <summary>
/// Routes a <see cref="ReadTagValuesCommand"/> from the CentralUI's Test
/// Bindings dialog to the child <see cref="DataConnectionActor"/> that