我正在用 C# 编写一个 OPC 代理程序。我想获取机器上localhost
或远程所有 OPC-Server 的列表。我正在使用来自 OPC Foundation V1.26 的 OPC UA .NET
我的灵感来自 Softing 的“sampleDiscovery-Programm”,现在我的服务器列表为ApplicationDescription
.
现在我想查看指定服务器的连接客户端。使用 Softing 的示例“servers_control-Programm”,我可以看到服务器的所有客户端。但是这个类的构造函数需要服务器作为StandardServer
和ApplicationConfiguration
public ServerForm(StandardServer server, ApplicationConfiguration configuration)
{
InitializeComponent();
m_server = server;
m_configuration = configuration;
this.ServerDiagnosticsCTRL.Initialize(m_server, m_configuration);
TrayIcon.Text = this.Text = m_configuration.ApplicationName;
this.Icon = TrayIcon.Icon = ConfigUtils.GetAppIcon();
}
如何将主服务器ApplicationDescription
用作标准服务器?