@jnrs/lingshu-smart 3.1.6 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,8 @@ export declare class AppController {
19
19
  private animationsEnabled;
20
20
  private alarmHighlights;
21
21
  private hostExtensions;
22
+ /** 设备注册表快照:key 为画布图层 id(layerId),value 为注册表中该设备的数据(点击设备时从 rawData.device 读取) */
23
+ private deviceRegistrySnapshot;
22
24
  constructor(options?: IContainer);
23
25
  start(): void;
24
26
  destroy(): void;
@@ -35,6 +37,24 @@ export declare class AppController {
35
37
  * @returns 实际复位的模型数量
36
38
  */
37
39
  resetAllModels(): number;
40
+ /**
41
+ * 按设备标识定位模型实例列表:
42
+ * 1. 业务标识(编辑器「业务数据配置」rawData.id)→ businessMap;
43
+ * 2. 未命中时回退画布 ID(图层 id)→ modelsMap(须 className 一致)。
44
+ * 该顺序与代理器下发 device_id 的优先级(设备类型标识 → 业务标识 → 画布 ID)配套使用。
45
+ */
46
+ resolveDeviceModels(className: string, id: string): ModelAbs[];
47
+ /**
48
+ * 同步「设备注册表」快照到画布模型业务数据:
49
+ * 传入 layerId → 注册表设备记录(null 表示清除),写入模型 config.rawData.device,
50
+ * 点击设备时可在回调的 layer.rawData.device / data.rawData.device 中读取到该设备注册表数据。
51
+ */
52
+ setDeviceRegistrySnapshot(entries: Array<{
53
+ layerId: string;
54
+ device: Record<string, unknown> | null;
55
+ }>): void;
56
+ /** 将快照写入指定模型的 rawData.device(无快照时移除) */
57
+ private applyDeviceRegistrySnapshotTo;
38
58
  /**
39
59
  * 复位单个业务设备(device_init 全量覆盖语义:缺省字段重置为默认值,见文档第七章)
40
60
  * @param className 设备类型(EnumModel 值)