phase 2 serial

This commit is contained in:
flower_linux
2026-06-12 18:34:49 +08:00
parent 0cf0713dc5
commit 628ccf1409
78 changed files with 2571 additions and 345 deletions

View File

@@ -0,0 +1,20 @@
{
"bindings": [
{
"bindingId": "bind_temp_01",
"edgeId": "edge01",
"physicalPointId": "edge01/phy_modbus_s1_r40001",
"logicalPointId": "EdgeDevice_01/MotorTemperature",
"scale": 0.1,
"enabled": false
},
{
"bindingId": "bind_valve_01",
"edgeId": "edge01",
"physicalPointId": "edge01/phy_modbus_s1_r40002",
"logicalPointId": "EdgeDevice_01/ValveOpening",
"scale": 1.0,
"enabled": true
}
]
}

View File

@@ -0,0 +1,19 @@
{
"opcua": {
"port": 4840,
"applicationName": "SoftBusDaemon"
},
"uplink": {
"listenHost": "127.0.0.1",
"listenPort": 9000
},
"plugins": {
"modbus": "protocol_modbus",
"canopen": "protocol_canopen"
},
"security": {
"tlsEnabled": false,
"certPath": "",
"keyPath": ""
}
}

View File

@@ -0,0 +1,37 @@
{
"site": "DemoSite",
"system": "DemoSystem",
"asset": "DemoAsset",
"devices": [
{
"logicalDeviceId": "EdgeDevice_01",
"displayName": "边缘设备01",
"points": [
{
"logicalPointId": "MotorTemperature",
"displayName": "电机温度",
"signalType": "AI",
"unit": "℃",
"range": [0, 200],
"access": "read",
"writable": false,
"opcuaNodeId": "ns=1;s=DemoSite/DemoSystem/DemoAsset/EdgeDevice_01/MotorTemperature",
"dataTopic": "data/EdgeDevice_01/MotorTemperature"
},
{
"logicalPointId": "ValveOpening",
"displayName": "阀门开度",
"signalType": "AO",
"unit": "%",
"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"
}
]
}
]
}

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"
}
]
}
]
}

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

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}"
}

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}"