feat: 完成 issue #25 ① 和利时 DCS OPC 接口参数化适配

This commit is contained in:
2026-08-04 23:34:07 +08:00
parent 8dc379c479
commit 50b51d4a27
5 changed files with 283 additions and 3 deletions
+14 -3
View File
@@ -10,13 +10,24 @@ collector:
cache_limit_bytes: 536870912 # 512MB
# 协议可插拔驱动插槽(protocol 注册表见 drivers/__init__.py)
drivers:
# 和利时 DCS —— OPC UA 只读
- protocol: opcua
# 和利时 DCS —— OPC UA 只读(推荐;支持用户认证参数化,issue #25)
- protocol: hollysys
device_prefixes: ["CLF"] # 设备编号前缀路由(CLF-01, CLF-02, ...)
config:
mode: ua # ua(OPC UA)| da(OPC DA COM 接口)
endpoint: "opc.tcp://10.20.1.10:4840"
security: "None"
security: "Basic256Sha256" # None | Basic256Sha256 等安全策略
username: "iaop_read" # 和利时 UA 服务用户认证(只读账号)
password: "******"
timeout: 10
# 和利时 DCS —— OPC DA 传统接口(无 UA 服务时使用;opcNode 列写 OPC Item)
# - protocol: hollysys
# device_prefixes: ["CLF"]
# config:
# mode: da
# host: "10.20.1.10" # DCOM 主机(需 Windows + OpenOPC)
# prog_id: "Hollysys.OPCServer" # 或 cls_id 指定 CLSID
# timeout: 10
# 西门子 S7-1200 —— PLC 只读(点位 opcNode 列写 DB 地址,如 DB100.0.0)
- protocol: s7
device_prefixes: ["S7"]