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

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

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