Files
iAOP/core/edge-gateway/config/gateway.example.yaml
T
yunmei 098125164d fix: 对齐技术架构补齐传输 mTLS 与结构化 JSON 日志(NFR 9 章)
架构核对发现 2 处差距,本次补齐:
- Kafka 上行支持 SSL/SASL_SSL 双向 mTLS(8.2 服务间 mTLS 边缘网关↔总线)
- 网关日志支持结构化 JSON 输出(NFR 可维护:统一日志规范)
- 配置示例与 README 验收口径同步更新
2026-08-04 15:46:09 +08:00

65 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
# 传输安全(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: "..."