Updated
This commit is contained in:
1 parent
2c5b69bf2c
commit
22dee59f47
132 files changed
+19653
-7192
No files matched your search
@@ -0,0 +1,44 @@
|
||||
using EonaCat.Connections.OpcUa.Infrastructure;
|
||||
using EonaCat.Connections.OpcUa.Models;
|
||||
using Opc.Ua;
|
||||
using Opc.Ua.Server;
|
||||
|
||||
namespace EonaCat.Connections.OpcUa.Server;
|
||||
|
||||
internal sealed class EonaCatOpcUaServer : StandardServer
|
||||
{
|
||||
private readonly string _namespaceUri;
|
||||
private readonly IReadOnlyCollection<OpcUaNodeDefinition> _nodes;
|
||||
private readonly IReadOnlyCollection<OpcUaMethodDefinition> _methods;
|
||||
|
||||
public EonaCatOpcUaServer(
|
||||
string namespaceUri,
|
||||
IReadOnlyCollection<OpcUaNodeDefinition> nodes,
|
||||
IReadOnlyCollection<OpcUaMethodDefinition> methods)
|
||||
: base(OpcUaRuntime.Telemetry)
|
||||
{
|
||||
_namespaceUri = namespaceUri;
|
||||
_nodes = nodes;
|
||||
_methods = methods;
|
||||
}
|
||||
|
||||
public OpcUaAddressSpace? AddressSpace { get; private set; }
|
||||
|
||||
protected override MasterNodeManager CreateMasterNodeManager(
|
||||
IServerInternal server,
|
||||
ApplicationConfiguration configuration)
|
||||
{
|
||||
AddressSpace = new OpcUaAddressSpace(server, configuration, _namespaceUri, _nodes, _methods);
|
||||
return new MasterNodeManager(server, configuration, null, AddressSpace);
|
||||
}
|
||||
|
||||
protected override ServerProperties LoadServerProperties() => new()
|
||||
{
|
||||
ManufacturerName = "EonaCat",
|
||||
ProductName = "EonaCat Generic OPC UA Server",
|
||||
ProductUri = "urn:EonaCat:Connector:OpcUa",
|
||||
SoftwareVersion = Utils.GetAssemblySoftwareVersion(),
|
||||
BuildNumber = Utils.GetAssemblyBuildNumber(),
|
||||
BuildDate = Utils.GetAssemblyTimestamp()
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user