feat: da测试

This commit is contained in:
2026-03-09 11:29:48 +08:00
parent 97829ad0d5
commit e8445bb286
5 changed files with 303 additions and 17 deletions

View File

@@ -16,15 +16,8 @@ import org.nl.iot.modular.iot.entity.IotConnect;
@NoArgsConstructor
@AllArgsConstructor
public class RValue {
/**
* 设备
*/
// private DeviceBO device;
/**
* 位号 - 子设备
*/
// private PointBO point;
// private String connectId;
// private String deviceCode;
/**
* 配置
*/

View File

@@ -1,5 +1,6 @@
package org.nl.iot.core.driver.protocol.opcda;
import cn.hutool.core.util.ObjectUtil;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.jinterop.dcom.common.JIException;
@@ -78,7 +79,7 @@ public class OpcDaProtocolDriverImpl implements DriverCustomService {
String host = driverConfig.get("host").getValueByClass(String.class);
String clsId = driverConfig.get("clsId").getValueByClass(String.class);
String user = driverConfig.get("username").getValueByClass(String.class);
String password = driverConfig.get("password").getValueByClass(String.class);
String password = ObjectUtil.isEmpty(driverConfig.get("password").getValue()) ? "" : driverConfig.get("password").getValueByClass(String.class);
ConnectionInformation connectionInformation = new ConnectionInformation(host, clsId, user, password);
server = new Server(connectionInformation, Executors.newSingleThreadScheduledExecutor());
try {

View File

@@ -0,0 +1,9 @@
package org.nl.iot.core.driver.service;
/**
* 自定义通信协议驱动工厂
* @author: lyd
* @date: 2026/3/2
*/
public class DriverCustomFactory {
}