1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.zhitan.config.opc;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
/**
 * OPC UA配置类
 */
@Data
@Component
@ConfigurationProperties(prefix = "opc")
public class OpcConfig {
    /**
     * OPC UA服务器地址
     */
    private String serverUrl;
    
    /**
     * 用户名
     */
    private String username;
    
    /**
     * 密码
     */
    private String password;
    
    /**
     * 是否启用
     */
    private boolean enable;
    
    /**
     * 采集间隔(毫秒)
     */
    private long scanRate = 5000;
    
    /**
     * 连接超时时间(毫秒)
     */
    private int connectionTimeout = 10000;
    
    /**
     * 节点列表,格式为:名称=节点ID
     */
    private String[] nodes;
}