feat(server): inbound operator-write pipeline — OnWriteValue authz gate + node-write router
This commit is contained in:
@@ -36,6 +36,26 @@ public sealed class OtOpcUaSdkServer : StandardServer
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wire the reverse-path sink for inbound operator writes to writable equipment-tag nodes onto the
|
||||
/// created <see cref="OtOpcUaNodeManager"/>. The host calls this after start with a fire-and-forget
|
||||
/// lambda that kicks off a bounded <c>Ask</c> of the local <c>DriverHostActor</c>
|
||||
/// (<c>RouteNodeWrite</c>) and logs failures from a continuation — it must NOT block, because the
|
||||
/// handler runs under the node-manager <c>Lock</c> (mirrors <see cref="SetAlarmCommandRouter"/>).
|
||||
/// No-op (returns <c>false</c>) when the node manager has not been created yet, so the caller can
|
||||
/// detect a too-early call.
|
||||
/// </summary>
|
||||
/// <param name="router">The router invoked by the writable node's <c>OnWriteValue</c> handler once the
|
||||
/// <c>WriteOperate</c> gate passes; may be <c>null</c> to clear it.</param>
|
||||
/// <returns><c>true</c> when the router was set on a live node manager; <c>false</c> when no node
|
||||
/// manager exists yet.</returns>
|
||||
public bool SetNodeWriteRouter(Action<string, object?>? router)
|
||||
{
|
||||
if (_otOpcUaNodeManager is null) return false;
|
||||
_otOpcUaNodeManager.NodeWriteRouter = router;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override MasterNodeManager CreateMasterNodeManager(
|
||||
IServerInternal server, ApplicationConfiguration configuration)
|
||||
|
||||
Reference in New Issue
Block a user