package com.dcs.hnyz.cache;

import com.dcs.hnyz.domain.vo.EquipmentParamFormVO;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * CacheCenter
 * 缓存中心
 * @author: hmy
 * @date: 2025/5/29 17:40
 */
public class CacheCenter {

    /**
     * key: 页面ID
     * value: 大设备 - 小设备列表映射
     */
    public static final Map<String, Map<String, List<String>>> pageDeviceGroupMap = new ConcurrentHashMap<>();

    /**
     * key: 小设备编码
     * value: 小设备对应的寄存器code列表
     */
    public static final Map<String, List<String>> deviceToRegistersMap = new ConcurrentHashMap<>();

    /**
     * key: 寄存器code
     * value: 实时数据（WebSocket推送更新）
     */
    public static Map<String, EquipmentParamFormVO> registerNowDataMap = new ConcurrentHashMap<>();

    private CacheCenter() {}// 防止实例化

}

