phase 2 serial
This commit is contained in:
20
config/daemon/bindings_global.json
Normal file
20
config/daemon/bindings_global.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
||||
37
config/daemon/logical_points.json
Normal file
37
config/daemon/logical_points.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"edge": {
|
||||
"deviceId": "EdgeDevice_01",
|
||||
"daemonHost": "127.0.0.1",
|
||||
"daemonPort": 9000,
|
||||
"heartbeatPeriodMs": 1000,
|
||||
"pointTable": "config/point_table.json"
|
||||
}
|
||||
}
|
||||
17
config/edge/bindings_local.json
Normal file
17
config/edge/bindings_local.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"edgeId": "edge01",
|
||||
"bindings": [
|
||||
{
|
||||
"bindingId": "bind_temp_01",
|
||||
"physicalPointId": "edge01/phy_modbus_s1_r40001",
|
||||
"logicalPointId": "EdgeDevice_01/MotorTemperature",
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"bindingId": "bind_valve_01",
|
||||
"physicalPointId": "edge01/phy_modbus_s1_r40002",
|
||||
"logicalPointId": "EdgeDevice_01/ValveOpening",
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
13
config/edge/edge.json
Normal file
13
config/edge/edge.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"edge": {
|
||||
"edgeId": "edge01",
|
||||
"deviceId": "EdgeDevice_01",
|
||||
"daemonHost": "127.0.0.1",
|
||||
"daemonPort": 9000,
|
||||
"heartbeatPeriodMs": 1000,
|
||||
"uplinkReconnectPeriodMs": 5000,
|
||||
"physicalChannels": "physical_channels.json",
|
||||
"physicalDevices": "physical_devices.json",
|
||||
"bindingsLocal": "bindings_local.json"
|
||||
}
|
||||
}
|
||||
15
config/edge/physical_channels.json
Normal file
15
config/edge/physical_channels.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
"channelId": "serial_0",
|
||||
"protocol": "modbus",
|
||||
"transport": "rtu",
|
||||
"port": "/dev/ttyS3",
|
||||
"baudRate": 9600,
|
||||
"parity": "N",
|
||||
"dataBits": 8,
|
||||
"stopBits": 1,
|
||||
"pollIntervalMs": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
29
config/edge/physical_devices.json
Normal file
29
config/edge/physical_devices.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"devices": [
|
||||
{
|
||||
"physicalDeviceId": "phy_modbus_slave_1",
|
||||
"channelId": "serial_0",
|
||||
"protocol": "modbus",
|
||||
"slaveId": 1,
|
||||
"points": [
|
||||
{
|
||||
"physicalPointId": "phy_modbus_s1_r40001",
|
||||
"register": 40001,
|
||||
"function": 3,
|
||||
"scale": 0.1,
|
||||
"signalType": "AI",
|
||||
"writable": false
|
||||
},
|
||||
{
|
||||
"physicalPointId": "phy_modbus_s1_r40002",
|
||||
"register": 40002,
|
||||
"function": 3,
|
||||
"writeFunction": 6,
|
||||
"scale": 1.0,
|
||||
"signalType": "AO",
|
||||
"writable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user