fix(otopcua): log+document discovered-node materialise message
This commit is contained in:
@@ -58,6 +58,9 @@ public sealed class OpcUaPublishActor : ReceiveActor, IWithTimers
|
|||||||
public sealed record RebuildAddressSpace(CorrelationId Correlation, DeploymentId? DeploymentId = null);
|
public sealed record RebuildAddressSpace(CorrelationId Correlation, DeploymentId? DeploymentId = null);
|
||||||
|
|
||||||
/// <summary>Inject driver-discovered nodes (FixedTree) under an equipment at runtime (post-connect).</summary>
|
/// <summary>Inject driver-discovered nodes (FixedTree) under an equipment at runtime (post-connect).</summary>
|
||||||
|
/// <param name="EquipmentRootNodeId">The OPC UA NodeId of the equipment root folder to inject the
|
||||||
|
/// discovered nodes under (e.g. "EQ-3686c0272279"); also the node the NodeAdded model-change is
|
||||||
|
/// announced under.</param>
|
||||||
public sealed record MaterialiseDiscoveredNodes(
|
public sealed record MaterialiseDiscoveredNodes(
|
||||||
string EquipmentRootNodeId,
|
string EquipmentRootNodeId,
|
||||||
IReadOnlyList<DiscoveredFolder> Folders,
|
IReadOnlyList<DiscoveredFolder> Folders,
|
||||||
@@ -399,10 +402,17 @@ public sealed class OpcUaPublishActor : ReceiveActor, IWithTimers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Forwards driver-discovered (FixedTree) nodes to the applier so they are injected under
|
/// <summary>Forwards driver-discovered (FixedTree) nodes to the applier so they are injected under
|
||||||
/// the equipment at runtime. No-op when no applier is wired (dev/Mac/legacy seam), matching the
|
/// the equipment at runtime. No-op (logged) when no applier is wired (dev/Mac/legacy seam), matching the
|
||||||
/// optional-applier tolerance of <see cref="HandleRebuild"/>.</summary>
|
/// optional-applier tolerance of <see cref="HandleRebuild"/>.</summary>
|
||||||
private void HandleMaterialiseDiscovered(MaterialiseDiscoveredNodes msg)
|
private void HandleMaterialiseDiscovered(MaterialiseDiscoveredNodes msg)
|
||||||
=> _applier?.MaterialiseDiscoveredNodes(msg.EquipmentRootNodeId, msg.Folders, msg.Variables);
|
{
|
||||||
|
if (_applier is null)
|
||||||
|
{
|
||||||
|
_log.Debug("OpcUaPublish: no applier wired — discarding MaterialiseDiscoveredNodes for {Equipment}", msg.EquipmentRootNodeId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_applier.MaterialiseDiscoveredNodes(msg.EquipmentRootNodeId, msg.Folders, msg.Variables);
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleServiceLevelChanged(ServiceLevelChanged msg)
|
private void HandleServiceLevelChanged(ServiceLevelChanged msg)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user