From 2225b1f0727fb74e10ac5692e68e4cd48f4f62d7 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 03 三月 2025 15:02:14 +0800
Subject: [PATCH] 2025年03月03日15:02:11
---
app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java | 432 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 315 insertions(+), 117 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java
index 1b6f231..ebb0dd4 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java
@@ -1,5 +1,6 @@
package com.hdl.photovoltaic.other;
+import android.os.Build;
import android.text.TextUtils;
import com.hdl.linkpm.sdk.core.exception.HDLException;
@@ -7,8 +8,11 @@
import com.hdl.photovoltaic.internet.HttpClient;
import com.hdl.photovoltaic.listener.CloudCallBeak;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* 鏈湴json缂撳瓨閫昏緫
@@ -33,90 +37,107 @@
return sHdlESLocalJsonLogic;
}
+ /**
+ * 鑴氭湰鍦板潃鍩熷悕
+ */
+ private static final String address = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu";
+
/**
- * 銆愰�嗗彉鍣ㄣ�戣澶囧瀷鍙�
+ * 鎷兼帴鏂板湴鍧�
+ *
+ * @param fileName json鏂囦欢鍚嶇О
+ * @param deviceType 璁惧绫诲瀷锛坕nv锛宭c锛宐ms锛宐attery锛�
+ * @param deviceModel 璁惧鍨嬪彿
+ * @return 鏂板湴鍧�
*/
- public static final String deviceModel_ME_GSE_S5K = "ME-GSE-S5K";
- /**
- * 銆愯礋杞芥帶鍒朵腑蹇冦�戣澶囧瀷鍙�
- */
- public static final String deviceModel_ME_GSE_SPG63A = "ME-GSE-SPG63A";
- /**
- * 銆怋MS銆戣澶囧瀷鍙�
- */
- public static final String deviceModel_ME_GSE_BMS15K = "ME-GSE-BMS15K";
- /**
- * 銆愮數姹犲寘銆戣澶囧瀷鍙�
- */
- public static final String deviceModel_ME_GSE_B5K = "ME-GSE-B5K";
+ private String getStrJointNewUrl(String fileName, String deviceType, String deviceModel) {
+ return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/" + fileName + this.getVersion(fileName) + ".json";
+ }
+
/**
- * 鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃�
- */
- public static final String hdl_inv_ecu_quick = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/modbus_hdl_inv_ecu_quick_v1.4.2.json";
- /**
- * 鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆
- */
- public static final String hdl_lc_ecu_quick = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/lc/deviceModel/modbus_hdl_lc_ecu_quick_v1.5.0.json";
- /**
- * 閫嗗彉鍣ㄥ弬鏁伴厤缃�
- */
- public static final String hdl_inv_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/modbus_hdl_inv_ecu_v1.4.2.json";
- /**
- * 閫嗗彉鍣ㄨ鎯�-pv
- */
- public static final String hdl_inv_ecu_info_pv = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_pv_v1.4.2.json";
- /**
- * 閫嗗彉鍣ㄨ鎯�-杈撳嚭
- */
- public static final String hdl_inv_ecu_info_output = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_output_v1.4.2.json";
- /**
- * 閫嗗彉鍣ㄨ鎯�-item椤�
- */
- public static final String hdl_inv_ecu_info_item = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_item_v1.4.2.json";
- /**
- * 鑾峰彇璐熻浇鎺у埗涓績
- */
- public static final String hdl_lc_ecu_info_item = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/lc/deviceModel/modbus_hdl_lc_ecu_info_item_v1.5.0.json";
- /**
- * 鑾峰彇BMS淇℃伅
- */
- public static final String hdl_bms_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/bms/deviceModel/modbus_hdl_bms_ecu_v1.4.2.json";
- /**
- * 鐢垫睜鍖呬俊鎭�
- */
- public static final String hdl_battery_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/battery/deviceModel/modbus_hdl_battery_ecu_v1.4.2.json";
-
- /**
- * 鐢垫睜鍖�-鐢佃姱淇℃伅
- */
- public static final String hdl_battery_ecu_cell = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/battery/deviceModel/modbus_hdl_battery_ecu_cell_v1.4.2.json";
-
- /**
- * 閫嗗彉鍣ㄨ鎯�-淇″彿鐐�
- */
- public static final String hdl_inv_ecu_info_signal = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_signal_v1.4.1.json";
-
- /**
- * 鍒濆鍖栬剼鏈瑄rl
+ * 鑾峰彇鍔炵増鏈彿
*
* @return map
*/
- private Map<String, String> getUrlMap() {
+ private String getVersion(String fileName) {
+
+ Map<String, String> map = this.getFeliAndVersion();
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ if (entry.getKey().equals(fileName)) {
+ return entry.getValue();
+ }
+ }
+ return "";
+ }
+
+
+ /**
+ * 鑾峰彇json鏂囦欢鍚�,璁惧绫诲瀷锛岃澶囧瀷鍙�
+ *
+ * @return map
+ */
+ private List<String> getFileNameAndDeviceTypeAndDeviceModeList() {
//娉ㄦ剰锛堥�嗗彉鍣�:ME-GSE-S5K锛岃礋杞戒腑蹇�:ME-GSE-SPG63A锛宐ms:ME-GSE-BMS15K锛岀數姹犲寘:ME-GSE-B5K锛夎澶囧瀷鍙蜂笉涓�鏍�
+ //鎷兼帴瑙勫垯锛氭枃浠跺悕_璁惧绫诲瀷_璁惧淇″彿
+ List<String> stringList = new ArrayList<>();
+ stringList.add(FileName.hdl_lc_ecu_info_item + "%" + DeviceType.LC + "%" + DeviceModel.LC);//鑾峰彇璐熻浇鎺у埗涓績
+ stringList.add(FileName.hdl_lc_ecu_quick + "%" + DeviceType.LC + "%" + DeviceModel.LC);//鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆
+ stringList.add(FileName.hdl_inv_ecu_quick + "%" + DeviceType.INV + "%" + DeviceModel.INV);//鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃�
+ stringList.add(FileName.hdl_inv_ecu + "%" + DeviceType.INV + "%" + DeviceModel.INV);//閫嗗彉鍣ㄥ弬鏁伴厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_pv + "%" + DeviceType.INV + "%" + DeviceModel.INV);// 閫嗗彉鍣ㄨ鎯�-pv
+ stringList.add(FileName.hdl_inv_ecu_info_output + "%" + DeviceType.INV + "%" + DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-杈撳嚭
+ stringList.add(FileName.hdl_inv_ecu_info_item + "%" + DeviceType.INV + "%" + DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-item椤�
+ stringList.add(FileName.hdl_inv_ecu_info_signal + "%" + DeviceType.INV + "%" + DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-淇″彿鐐�
+ stringList.add(FileName.hdl_bms_ecu + "%" + DeviceType.BMS + "%" + DeviceModel.INV_BMS);//鑾峰彇BMS淇℃伅
+ stringList.add(FileName.hdl_battery_ecu + "%" + DeviceType.BATTERY + "%" + DeviceModel.INV_BATTERY);//鐢垫睜鍖呬俊鎭�
+ stringList.add(FileName.hdl_battery_ecu_cell + "%" + DeviceType.BATTERY + "%" + DeviceModel.INV_BATTERY);//鐢垫睜鍖�-鐢佃姱淇℃伅
+ //绂荤綉閫嗗彉鍣�
+ stringList.add(FileName.hdl_inv_ecu_quick_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_master_ecu_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_slave_ecu_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_pv_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_input_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_output_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_item_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_inv_ecu_info_signal_off + "%" + DeviceType.INV + "%" + DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_bms_ecu_off + "%" + DeviceType.BMS + "%" + DeviceModel.OFF_INV_BMS);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_bms_ecu_off + "%" + DeviceType.BATTERY + "%" + DeviceModel.OFF_INV_BATTERY);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ stringList.add(FileName.hdl_battery_ecu_cell_off + "%" + DeviceType.BATTERY + "%" + DeviceModel.OFF_INV_BATTERY);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ return stringList;
+ }
+
+ /**
+ * 鏂囦欢瀵瑰簲鐗堟湰鍙�
+ *
+ * @return map
+ */
+ private Map<String, String> getFeliAndVersion() {
Map<String, String> map = new HashMap<>();
- map.put(this.getNewUrl(hdl_lc_ecu_info_item, deviceModel_ME_GSE_SPG63A), deviceModel_ME_GSE_SPG63A);//鑾峰彇璐熻浇鎺у埗涓績
- map.put(this.getNewUrl(hdl_lc_ecu_quick, deviceModel_ME_GSE_SPG63A), deviceModel_ME_GSE_SPG63A); //鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆
- map.put(this.getNewUrl(hdl_inv_ecu_quick, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃�
- map.put(this.getNewUrl(hdl_inv_ecu, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//閫嗗彉鍣ㄥ弬鏁伴厤缃�
- map.put(this.getNewUrl(hdl_inv_ecu_info_pv, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);// 閫嗗彉鍣ㄨ鎯�-pv
- map.put(this.getNewUrl(hdl_inv_ecu_info_output, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//閫嗗彉鍣ㄨ鎯�-杈撳嚭
- map.put(this.getNewUrl(hdl_inv_ecu_info_item, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//閫嗗彉鍣ㄨ鎯�-item椤�
- map.put(this.getNewUrl(hdl_inv_ecu_info_signal, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//閫嗗彉鍣ㄨ鎯�-淇″彿鐐�
- map.put(this.getNewUrl(hdl_bms_ecu, deviceModel_ME_GSE_BMS15K), deviceModel_ME_GSE_BMS15K);//鑾峰彇BMS淇℃伅
- map.put(this.getNewUrl(hdl_battery_ecu, deviceModel_ME_GSE_B5K), deviceModel_ME_GSE_B5K);//鐢垫睜鍖呬俊鎭�
- map.put(this.getNewUrl(hdl_battery_ecu_cell, deviceModel_ME_GSE_B5K), deviceModel_ME_GSE_B5K);//鐢垫睜鍖�-鐢佃姱淇℃伅
+ map.put(FileName.hdl_lc_ecu_info_item, Version.v_1_5_0);
+ map.put(FileName.hdl_lc_ecu_quick, Version.v_1_5_0);
+ map.put(FileName.hdl_inv_ecu_quick, Version.v_1_5_1);
+ map.put(FileName.hdl_inv_ecu, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_pv, Version.v_1_4_2);
+ map.put(FileName.hdl_inv_ecu_info_output, Version.v_1_4_2);
+ map.put(FileName.hdl_inv_ecu_info_item, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_signal, Version.v_1_4_1);
+ map.put(FileName.hdl_bms_ecu, Version.v_1_4_2);
+ map.put(FileName.hdl_battery_ecu, Version.v_1_4_2);
+ map.put(FileName.hdl_battery_ecu_cell, Version.v_1_4_2);
+ //绂荤綉閫嗗彉鍣�
+ map.put(FileName.hdl_inv_ecu_quick_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_master_ecu_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_slave_ecu_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_pv_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_input_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_output_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_item_off, Version.v_1_5_2);
+ map.put(FileName.hdl_inv_ecu_info_signal_off, Version.v_1_5_2);
+ map.put(FileName.hdl_bms_ecu_off, Version.v_1_5_2);
+ map.put(FileName.hdl_battery_ecu_off, Version.v_1_5_2);
+ map.put(FileName.hdl_battery_ecu_cell_off, Version.v_1_5_2);
return map;
}
@@ -124,25 +145,34 @@
* 鍚戜簯绔幏鍙朖son銆愭墍鏈夈�戣剼鏈�
*/
public void getAllHdlESLocalJson() {
- for (Map.Entry<String, String> entry : getUrlMap().entrySet()) {
- this.getHdlESLocalJson(entry.getKey(), entry.getValue(), null);
+ for (String str : this.getFileNameAndDeviceTypeAndDeviceModeList()) {
+ String[] ary = str.split("%");
+ String fileName = ary[0];
+ String deviceType = ary[1];
+ String deviceMode = ary[2];
+ this.getHdlESLocalJson(fileName, deviceType, deviceMode, null);
}
+
}
+
/**
* 鍚戜簯绔幏鍙朖son銆愬崟涓�戣剼鏈�
*
- * @param url 鍦板潃
+ * @param fileName 鏂囦欢鍚�
+ * @param deviceType 璁惧绫诲瀷
* @param deviceModel 璁惧鍨嬪彿
*/
- public void getHdlESLocalJson(String url, String deviceModel, CloudCallBeak<String> callBeak) {
+ public void getHdlESLocalJson(String fileName, String deviceType, String deviceModel, CloudCallBeak<String> callBeak) {
+ //鎷兼帴鍦板潃
+ String url = getStrJointNewUrl(fileName, deviceType, deviceModel);
HttpClient.getInstance().requestJsonHttpGet(url, new CloudCallBeak<String>() {
@Override
- public void onSuccess(String str) {
- saveJson(url, deviceModel, str);
- HdlLogLogic.print("鑾峰彇浜戠鑴氭湰---" + url + "\r\n" + str, false);
+ public void onSuccess(String json) {
+ saveJson(fileName, deviceModel, json);
+ HdlLogLogic.print("鑾峰彇浜戠鑴氭湰---" + url + "\r\n" + json, false);
if (callBeak != null) {
- callBeak.onSuccess(str);
+ callBeak.onSuccess(json);
}
}
@@ -159,43 +189,23 @@
/**
* 璇诲彇鏈湴json鏁版嵁
*
- * @param url 鍦板潃
+ * @param fileName 鏂囦欢鍚�
* @param deviceModel 璁惧鍨嬪彿
*/
- public String readHdlESLocalJson(String url, String deviceModel) {
- return this.readJson(url, deviceModel);
+ public String readHdlESLocalJson(String fileName, String deviceModel) {
+ return this.readJson(fileName, deviceModel);
}
-
- /**
- * 澶勭悊url杩斿洖鏂扮殑url
- *
- * @param url 鍦板潃
- * @param deviceModel 璁惧绫诲瀷
- * @return 杩斿洖鍦板潃
- */
- private String getNewUrl(String url, String deviceModel) {
- return url.replace("currentLanguage", UserConfigManage.getInstance().getCurrentAppLanguage()).replace("deviceModel", deviceModel);
- }
-
/**
* 淇濆瓨json鏁版嵁
*
- * @param fileUrlOrFileName 鍦板潃鎴栬�呮枃浠跺悕
- * @param deviceModel 璁惧鍨嬪彿锛堥�嗗彉鍣紝璐熻浇涓績锛宐ms锛岀數姹犲寘锛�
- * @param json 鍐呭
+ * @param fileName 鏂囦欢鍚�
+ * @param deviceModel 璁惧鍨嬪彿锛堥�嗗彉鍣紝璐熻浇涓績锛宐ms锛岀數姹犲寘锛�
+ * @param json 鍐呭
*/
- private void saveJson(String fileUrlOrFileName, String deviceModel, String json) {
+ private void saveJson(String fileName, String deviceModel, String json) {
try {
if (TextUtils.isEmpty(json)) {
- return;
- }
- String fileName = fileUrlOrFileName;
- if (fileUrlOrFileName.contains("/")) {
- //琛ㄧず閾炬帴,鎴彇鏈�鍚庝竴涓储寮曡〃绀烘枃浠跺悕
- fileName = fileUrlOrFileName.split("/")[fileUrlOrFileName.split("/").length - 1];
- }
- if (TextUtils.isEmpty(fileName)) {
return;
}
//鑻辨枃鏂囦欢璺緞
@@ -213,16 +223,11 @@
/**
* 璇诲彇json鏁版嵁
*
- * @param fileUrlOrFileName 鍦板潃鎴栬�呮枃浠跺悕
- * @param deviceModel 璁惧鍨嬪彿锛堥�嗗彉鍣紝璐熻浇涓績锛宐ms锛岀數姹犲寘锛�
+ * @param fileName 鏂囦欢鍚�
+ * @param deviceModel 璁惧鍨嬪彿锛堥�嗗彉鍣紝璐熻浇涓績锛宐ms锛岀數姹犲寘锛�
*/
- private String readJson(String fileUrlOrFileName, String deviceModel) {
+ private String readJson(String fileName, String deviceModel) {
try {
- String fileName = fileUrlOrFileName;
- if (fileUrlOrFileName.contains("/")) {
- //琛ㄧず閾炬帴,鎴彇鏈�鍚庝竴涓储寮曡〃绀烘枃浠跺悕
- fileName = fileUrlOrFileName.split("/")[fileUrlOrFileName.split("/").length - 1];
- }
if (TextUtils.isEmpty(fileName)) {
return "";
}
@@ -238,4 +243,197 @@
}
}
+ /**
+ * Json鏁版嵁閰嶇疆鏂囦欢鍚�
+ */
+ public @interface FileName {
+
+ /**
+ * 鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃�
+ */
+ String hdl_inv_ecu_quick = "modbus_hdl_inv_ecu_quick_v";
+ /**
+ * 鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆
+ */
+ String hdl_lc_ecu_quick = "modbus_hdl_lc_ecu_quick_v";
+ /**
+ * 閫嗗彉鍣ㄥ弬鏁伴厤缃紙config锛�
+ */
+ String hdl_inv_ecu = "modbus_hdl_inv_ecu_v";
+ /**
+ * 閫嗗彉鍣ㄨ鎯�-pv
+ */
+ String hdl_inv_ecu_info_pv = "info/modbus_hdl_inv_ecu_info_pv_v";
+ /**
+ * 閫嗗彉鍣ㄨ鎯�-杈撳嚭
+ */
+ String hdl_inv_ecu_info_output = "info/modbus_hdl_inv_ecu_info_output_v";
+ /**
+ * 閫嗗彉鍣ㄨ鎯�-item椤�
+ */
+ String hdl_inv_ecu_info_item = "info/modbus_hdl_inv_ecu_info_item_v";
+ /**
+ * 鑾峰彇璐熻浇鎺у埗涓績
+ */
+ String hdl_lc_ecu_info_item = "modbus_hdl_lc_ecu_info_item_v";
+ /**
+ * 鑾峰彇BMS淇℃伅
+ */
+ String hdl_bms_ecu = "modbus_hdl_bms_ecu_v";
+ /**
+ * 鐢垫睜鍖呬俊鎭�
+ */
+ String hdl_battery_ecu = "modbus_hdl_battery_ecu_v";
+
+ /**
+ * 鐢垫睜鍖�-鐢佃姱淇℃伅
+ */
+ String hdl_battery_ecu_cell = "modbus_hdl_battery_ecu_cell_v";
+
+ /**
+ * 閫嗗彉鍣ㄨ鎯�-淇″彿鐐�
+ */
+ String hdl_inv_ecu_info_signal = "info/modbus_hdl_inv_ecu_info_signal_v";
+
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃�
+ */
+ String hdl_inv_ecu_quick_off = "modbus_hdl_inv_ecu_quick_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄤ富鏈洪厤缃�
+ */
+ String hdl_inv_master_ecu_off = "modbus_hdl_inv_master_ecu_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄤ粠鏈洪厤缃�
+ */
+ String hdl_inv_slave_ecu_off = "modbus_hdl_inv_slave_ecu_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄨ鎯呭厜浼忚緭鍏�
+ */
+ String hdl_inv_ecu_info_pv_off = "modbus_hdl_inv_ecu_info_pv_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍏�
+ */
+ String hdl_inv_ecu_info_input_off = "modbus_hdl_inv_ecu_info_input_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍑�
+ */
+ String hdl_inv_ecu_info_output_off = "modbus_hdl_inv_ecu_info_output_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄨ鎯呭熀纭�鍙傛暟
+ */
+ String hdl_inv_ecu_info_item_off = "modbus_hdl_inv_ecu_info_item_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄨ鎯呯粺璁�
+ */
+ String hdl_inv_ecu_info_signal_off = "modbus_hdl_inv_ecu_info_signal_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣˙MS璇︽儏
+ */
+ String hdl_bms_ecu_off = "modbus_hdl_bms_ecu_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄧ數姹犺鎯�
+ */
+ String hdl_battery_ecu_off = "modbus_hdl_battery_ecu_v";
+
+ /**
+ * 绂荤綉閫嗗彉鍣ㄧ數姹犵數鑺�
+ */
+ String hdl_battery_ecu_cell_off = "modbus_hdl_battery_ecu_cell_v";
+
+
+ /**
+ * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son涓枃
+ */
+ String hdl_inv_ecu_all_zh = "/zh/all_v";
+ /**
+ * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son鑻辨枃
+ */
+ String hdl_inv_ecu_all_en = "/en/all_v";
+
+ }
+
+
+ /**
+ * 鐗堟湰鍙�
+ */
+ public @interface Version {
+ String v_1_4_1 = "1.4.1";
+ String v_1_4_2 = "1.4.2";
+ String v_1_5_0 = "1.5.0";
+ String v_1_5_1 = "1.5.1";
+ String v_1_5_2 = "1.5.2";
+
+ }
+
+ /**
+ * 璁惧鍨嬪彿
+ */
+ public @interface DeviceModel {
+ /**
+ * 銆愰�嗗彉鍣ㄣ�戣澶囧瀷鍙�
+ */
+ String INV = "ME-GSE-S5K";
+ /**
+ * 銆愯礋杞芥帶鍒朵腑蹇冦�戣澶囧瀷鍙�
+ */
+ String LC = "ME-GSE-SPG63A";
+ /**
+ * 銆怋MS銆戣澶囧瀷鍙�
+ */
+ String INV_BMS = "ME-GSE-BMS15K";
+ /**
+ * 銆愮數姹犲寘銆戣澶囧瀷鍙�
+ */
+ String INV_BATTERY = "ME-GSE-B5K";
+
+
+ /**
+ * 銆愮绾块�嗗彉鍣ㄣ�戣澶囧瀷鍙�
+ */
+ String OFF_INV = "ME-GLE-S5K";
+
+ /**
+ * 銆愮缃戦�嗗彉鍣ㄨ櫄鎷烞MS銆戣澶囧瀷鍙�
+ */
+ String OFF_INV_BMS = "ME-GLE-S5K-BMS";
+ /**
+ * 銆愮缃戦�嗗彉鍣ㄧ數姹犲寘銆戣澶囧瀷鍙�
+ */
+ String OFF_INV_BATTERY = "ME-GLE-B5K";
+ }
+
+ /**
+ * 璁惧绫诲瀷
+ */
+ public @interface DeviceType {
+ /**
+ * 銆愰�嗗彉鍣ㄣ�戠被鍨�
+ */
+ String INV = "inv";
+ /**
+ * 銆愯礋杞芥帶鍒朵腑蹇冦�戠被鍨�
+ */
+ String LC = "lc";
+ /**
+ * 銆怋MS銆戠被鍨�
+ */
+ String BMS = "bms";
+ /**
+ * 銆愮數姹犲寘銆戠被鍨�
+ */
+ String BATTERY = "battery";
+
+ }
+
}
--
Gitblit v1.8.0