2026-08-04 15:32:16 +08:00
|
|
|
|
# iAOP 边缘采集网关 —— 模板配置示例(Template-Ti 一期:氯化车间/海绵钛)
|
|
|
|
|
|
# 换行业模板时只需修改本文件 + 点位字典 CSV,网关代码零改动。
|
|
|
|
|
|
collector:
|
|
|
|
|
|
# 采集周期(毫秒):600 点位 1Hz 即 1000
|
|
|
|
|
|
interval_ms: 1000
|
|
|
|
|
|
# 背压保护:spool 待上行记录上限,超过则丢弃新样本并计入丢失率
|
|
|
|
|
|
max_pending: 100000
|
|
|
|
|
|
# 本地缓存目录(断点续传落盘位置)
|
|
|
|
|
|
spool_dir: "./spool"
|
|
|
|
|
|
cache_limit_bytes: 536870912 # 512MB
|
|
|
|
|
|
# 协议可插拔驱动插槽(protocol 注册表见 drivers/__init__.py)
|
|
|
|
|
|
drivers:
|
|
|
|
|
|
# 和利时 DCS —— OPC UA 只读
|
|
|
|
|
|
- protocol: opcua
|
|
|
|
|
|
device_prefixes: ["CLF"] # 设备编号前缀路由(CLF-01, CLF-02, ...)
|
|
|
|
|
|
config:
|
|
|
|
|
|
endpoint: "opc.tcp://10.20.1.10:4840"
|
|
|
|
|
|
security: "None"
|
|
|
|
|
|
timeout: 10
|
|
|
|
|
|
# 西门子 S7-1200 —— PLC 只读(点位 opcNode 列写 DB 地址,如 DB100.0.0)
|
|
|
|
|
|
- protocol: s7
|
|
|
|
|
|
device_prefixes: ["S7"]
|
|
|
|
|
|
config:
|
|
|
|
|
|
ip: "10.20.1.20"
|
|
|
|
|
|
rack: 0
|
|
|
|
|
|
slot: 1
|
|
|
|
|
|
# 称重仪表(Modbus RTU)
|
|
|
|
|
|
- protocol: weighing
|
|
|
|
|
|
device_prefixes: ["W"]
|
|
|
|
|
|
config:
|
|
|
|
|
|
mode: modbus
|
|
|
|
|
|
mode_tcp: false
|
|
|
|
|
|
port: "COM3"
|
|
|
|
|
|
baudrate: 9600
|
|
|
|
|
|
slave_id: 1
|
|
|
|
|
|
# 能源表(Modbus TCP)
|
|
|
|
|
|
- protocol: energy
|
|
|
|
|
|
device_prefixes: ["E"]
|
|
|
|
|
|
config:
|
|
|
|
|
|
mode: modbus
|
|
|
|
|
|
host: "10.20.1.30"
|
|
|
|
|
|
port: 502
|
|
|
|
|
|
slave_id: 1
|
|
|
|
|
|
# 兜底:未匹配任何前缀的点位(本地联调用 simulator;现场部署删除此项)
|
|
|
|
|
|
- protocol: simulator
|
|
|
|
|
|
device_prefixes: []
|
|
|
|
|
|
config:
|
|
|
|
|
|
seed: 2026
|
|
|
|
|
|
|
|
|
|
|
|
kafka:
|
|
|
|
|
|
bootstrap_servers: "10.20.0.10:9092"
|
|
|
|
|
|
topic_prefix: "iaop.ti-cl4" # 模板化 topic:{prefix}.{device_id}.points
|
|
|
|
|
|
batch_size: 500
|
2026-08-04 15:46:09 +08:00
|
|
|
|
# 传输安全(NFR 9 章:服务间 mTLS,边缘网关↔总线双向认证)。
|
|
|
|
|
|
# 现场部署必须开启;本地联调可保持 PLAINTEXT。
|
|
|
|
|
|
security:
|
|
|
|
|
|
protocol: SSL # PLAINTEXT | SSL | SASL_SSL
|
|
|
|
|
|
ca_location: "/etc/iaop/certs/ca.crt"
|
|
|
|
|
|
cert_location: "/etc/iaop/certs/gateway.crt"
|
|
|
|
|
|
key_location: "/etc/iaop/certs/gateway.key"
|
|
|
|
|
|
# protocol: SASL_SSL 时追加:
|
|
|
|
|
|
# sasl_mechanism: "PLAIN"
|
|
|
|
|
|
# sasl_username: "edge-gateway"
|
|
|
|
|
|
# sasl_password: "..."
|