This commit is contained in:
flower_linux
2026-06-11 19:00:49 +08:00
parent 710a8c2bd3
commit 0cf0713dc5
73 changed files with 2297 additions and 95 deletions

9
config/edge.json Normal file
View File

@@ -0,0 +1,9 @@
{
"edge": {
"deviceId": "EdgeDevice_01",
"daemonHost": "127.0.0.1",
"daemonPort": 9000,
"heartbeatPeriodMs": 1000,
"pointTable": "config/point_table.json"
}
}

46
config/point_table.json Normal file
View File

@@ -0,0 +1,46 @@
{
"site": "DemoSite",
"system": "DemoSystem",
"asset": "DemoAsset",
"devices": [
{
"deviceId": "EdgeDevice_01",
"stableDeviceKey": "EdgeDevice_01",
"protocol": "modbus",
"points": [
{
"pointId": "MotorTemperature",
"name": "MotorTemperature",
"displayName": "电机温度",
"signalType": "AI",
"physicalChannel": "AI_Channel_01",
"register": 40001,
"unit": "℃",
"scale": 0.1,
"range": [0, 200],
"access": "read",
"writable": false,
"opcuaNodeId": "ns=1;s=DemoSite/DemoSystem/DemoAsset/EdgeDevice_01/MotorTemperature",
"dataTopic": "data/EdgeDevice_01/MotorTemperature"
},
{
"pointId": "ValveOpening",
"name": "ValveOpening",
"displayName": "阀门开度",
"signalType": "AO",
"physicalChannel": "AO_Channel_01",
"register": 40002,
"unit": "%",
"scale": 1.0,
"range": [0, 100],
"access": "read_write",
"writable": true,
"opcuaNodeId": "ns=1;s=DemoSite/DemoSystem/DemoAsset/EdgeDevice_01/ValveOpening",
"cmdTopic": "control/cmd/EdgeDevice_01/ValveOpening/set",
"ackTopic": "control/ack/EdgeDevice_01/ValveOpening",
"dataTopic": "data/EdgeDevice_01/ValveOpening"
}
]
}
]
}

29
config/point_table.yaml Normal file
View File

@@ -0,0 +1,29 @@
# 点表配置(运行时加载 point_table.json本文件为设计文档镜像
site: DemoSite
system: DemoSystem
asset: DemoAsset
devices:
- deviceId: EdgeDevice_01
stableDeviceKey: EdgeDevice_01
protocol: modbus
points:
- pointId: MotorTemperature
displayName: 电机温度
signalType: AI
physicalChannel: AI_Channel_01
register: 40001
unit: "℃"
range: [0, 200]
access: read
dataTopic: data/EdgeDevice_01/MotorTemperature
- pointId: ValveOpening
displayName: 阀门开度
signalType: AO
physicalChannel: AO_Channel_01
register: 40002
unit: "%"
range: [0, 100]
access: read_write
cmdTopic: control/cmd/EdgeDevice_01/ValveOpening/set
ackTopic: control/ack/EdgeDevice_01/ValveOpening
dataTopic: data/EdgeDevice_01/ValveOpening

7
config/topic_rule.json Normal file
View File

@@ -0,0 +1,7 @@
{
"data": "data/{deviceId}/{pointId}",
"command": "control/cmd/{deviceId}/{pointId}/set",
"ack": "control/ack/{deviceId}/{pointId}",
"event": "event/{deviceId}/{eventType}",
"heartbeat": "system/heartbeat/{deviceId}"
}

6
config/topic_rule.yaml Normal file
View File

@@ -0,0 +1,6 @@
topicRules:
data: "data/{deviceId}/{pointId}"
command: "control/cmd/{deviceId}/{pointId}/set"
ack: "control/ack/{deviceId}/{pointId}"
event: "event/{deviceId}/{eventType}"
heartbeat: "system/heartbeat/{deviceId}"