using Opc.Ua;
using Opc.Ua.Server;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
///
/// subclass that wires in the v2 .
/// Exposes the live node manager after start so callers (,
/// the fused Host's DI binding) can wrap it in a and hand
/// it to OpcUaPublishActor.
///
public sealed class OtOpcUaSdkServer : StandardServer
{
private OtOpcUaNodeManager? _otOpcUaNodeManager;
/// The custom node manager once StartAsync has called
/// . Null until the SDK has bootstrapped.
public OtOpcUaNodeManager? NodeManager => _otOpcUaNodeManager;
///
protected override MasterNodeManager CreateMasterNodeManager(
IServerInternal server, ApplicationConfiguration configuration)
{
_otOpcUaNodeManager = new OtOpcUaNodeManager(server, configuration);
return new MasterNodeManager(server, configuration, dynamicNamespaceUri: null, _otOpcUaNodeManager);
}
}