#pragma once #include #include enum class EAlertType { SYS = 1, // 系统告警 USER = 2, // 用户告警 DEVICE = 3, // 设备告警 }; enum class EDeviceType { //1 变压器 0 //2 配电柜 0 //3 电表 1 //4 门禁 0 //5 空调 0 //6 照明 0 //7 消防 0 //8 光照监测设备 0 //9 风速监测设备 0 //10 温湿度监测设备 0 //11 烟感监测设备 0 //12 水浸传感器 0 //13 视频监控 4 //14 冷机 0 //15 网关 0 //100 储能预制舱 1 EMS = 101,//101 EMS 1 PCS = 102, //102 PCS 1 PCU = 103, //103 PCU 1 BMS = 104, //104 BMS 1 BCU = 105, //105 BCU 1 //106 充电桩 2 //107 充电枪 2 //108 集中器 2 //109 光伏板 3 //110 风力发电机 3 }; struct RegAddrUnit { std::string key; std::string datatype; std::string name; std::string remark; int ratio {1}; int alert {0}; RegAddrUnit() {} RegAddrUnit(std::string key, std::string datatype, int alert, std::string name, std::string remark) : key(key), datatype(datatype), alert(alert), name(name), remark(remark) { } }; class REGAddr { public: static std::map> s_mapReg; static void load(std::string filename); static std::map* getRegMap(std::string name); };