This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit ca34b3b
changlin.cai
[新增] Modbus TCP Master Connector + WebUI 卡片化 + Unobserved Task 修正
主要功能:
- 新增 Modbus TCP Master port 類型 — 內建 FluentModbus polling,
支援 FC 01/02/03/04,dataType bit/bits/uint16/int16/uint32/int32/float32,
scale + offset,自動重連節流,連線失敗逐步退避。
- PortData 加 ModbusConfig + ModbusRegisterMap,向後相容(nullable)。
- NetworkMessageRouter 加 InjectSynthesizedMessageAsync — 讓 Modbus poller
把組好的 id:X;reg:N 訊息餵進既有 mask + forward pipeline。
- WebUI Port 管理頁從 table 改成 card grid,含協定 badge、連線細條、
Mask tag、metadata icon 區、stats、device IDs 摘要、icon-only 操作按鈕。
- WebUI 表單加 Modbus 設定區(Slave ID / Polling 間隔 / Device ID /
Registers JSON),3 語系補上 selectAll / totalPort / sourceLabel key。
- Polling 重撈 (3 秒一次) 不再清除使用者勾選 — 重 render 前保留 checked
狀態,render 後恢復。
- 4 處 fire-and-forget task 補上 ContinueWith — 不再噴 Critical
Unobserved Task exception (TCPServer NotifyAsync、UDP SweepStaleDevices、
UDP SendAsync forward)。
工具:
- modbus_slave_sim.py — pymodbus 迷你 slave 模擬器,無需安裝 runtime,
自動產生 GrayCode + sine wave 測試資料。1 parent 8fedd7e commit ca34b3b
13 files changed
Lines changed: 812 additions & 98 deletions
File tree
- SDK/Arduino/EdgeLink/examples/tcp_sensor
- Server
- NetworkServer
- Base/Models
- Connector
- Modbus
- Router
- TCP
- Udp
- WebApi
- WebUI
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
0 commit comments