Opc Da 用户名和密码

问题描述

这是我的第一篇文章,所以如果我犯了一些错误,我深表歉意。 我正在使用 Utgard opc Da Java 库连接到 opc da 服务器。 我注意到的是,为了连接到服务器,需要用户名和密码。 相反,使用 c#,只需要 url。 由于在工作中我们只使用 Java,是否有可能避免插入用户名和密码?那是因为该应用程序将安装到我们不知道任何用户凭据的多台 PC 中。 对不起,我的英语不好,任何帮助将不胜感激。 先谢谢大家

所以,我认为这是可以在短时间内解决的问题。但是,这里是我想要做的:

private final static String host = "localhost";
private final static String domain = "localhost";
private final static String user = "ramserver1";
private final static String password = "ramserver1";
private final static String clsid = "FAFA7034-4C37-401E-BA8E-7162DB0AC278";
private final static String progId = "ThermoElectron.RESULTOPCServerDA.2";
private Connectioninformation connectioninformation;
private Server server;
public String readValue;
public Group group;

public OpcConnection() throws JIException,UnkNownHostException,NotConnectedException,DuplicateGroupException {
    this.connectioninformation = new Connectioninformation();
    this.connectioninformation.setClsid(clsid);
    this.connectioninformation.setDomain(domain);
    this.connectioninformation.setHost(host);
    this.connectioninformation.setUser(user);
    this.connectioninformation.setPassword(password);
    server = new Server(this.connectioninformation,Executors.newSingleThreadScheduledExecutor());
}

基本上,我已经创建了一个类 OpcConnection:在构造函数中,我初始化了连接所需的参数。我想删除设置用户和密码的行。 关于安全性,我已将身份验证级别设置为无,如下所示: Authentication level

我缺少什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)