feat: 大屏改为纯流式自适应布局,新增KPI带与产线动态拓扑地图

This commit is contained in:
SunYF
2026-10-28 10:10:17 +08:00
parent 1f10c3091e
commit 4d3c4e2c3a
131 changed files with 18118 additions and 1728 deletions
+14
View File
@@ -78,6 +78,20 @@ func (m *mockClient) QueryDockPallet(_ context.Context, dockCode string) (bool,
return m.dockPallet[dockCode], nil
}
// ReadMWBlock 批量读连续 MW(mock:逐地址查模拟寄存器表,缺省 0)。
func (m *mockClient) ReadMWBlock(_ context.Context, start, count int) ([]int, error) {
if start < 0 || count <= 0 || start+count > 65536 {
return nil, errors.New("非法 MW 批量读区间")
}
m.mu.RLock()
defer m.mu.RUnlock()
out := make([]int, count)
for i := 0; i < count; i++ {
out[i] = m.mw[start+i]
}
return out, nil
}
// QueryStationPallet 读工位托盘位(mock):返回置位值,默认无件。
func (m *mockClient) QueryStationPallet(_ context.Context, stationNo int) (bool, error) {
m.mu.RLock()