AppGlobalVar.c 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * @Author : ChenJie
  3. * @Date : 2022-01-23 13:45:09
  4. * @Version : V3.0
  5. * @LastEditors: chenjie
  6. * @LastEditTime: 2022-11-10
  7. * @Description : file content
  8. * @FilePath: \S32K146_4G\code\app\AppGlobalVar.c
  9. */
  10. /*
  11. * AppGlobalVar.c
  12. *应用层全局变量
  13. * Created on: 2022年1月19日
  14. * Author: QiXiang_CHENJIE
  15. */
  16. #include "AppGlobalVar.h"
  17. #define defaultSn "ZLTEST00000000001"
  18. #define APP_RELEASE
  19. #ifdef APP_RELEASE
  20. const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
  21. uint16 WebSitePort = 8712;
  22. #define EEP_START_SEC_VAR_INIT_8_NO_CACHEABLE
  23. #include "Eep_MemMap.h"
  24. AppConfigBody AppConfigInfo = {false, false, {defaultSn}, {0}};
  25. #define EEP_STOP_SEC_VAR_INIT_8_NO_CACHEABLE
  26. #include "Eep_MemMap.h"
  27. #else
  28. const char WebSiteName[] = "\"nas.fast-fun.cn\"";
  29. uint16 WebSitePort = 8812;
  30. #define EEP_START_SEC_VAR_INIT_8_NO_CACHEABLE
  31. #include "Eep_MemMap.h"
  32. AppConfigBody AppConfigInfo = {false, true, {defaultSn}, {0}};
  33. #define EEP_STOP_SEC_VAR_INIT_8_NO_CACHEABLE
  34. #include "Eep_MemMap.h"
  35. #endif
  36. //*全局变量*//
  37. const uint32 AppSwVersion = 0x0002010A;
  38. const uint8 DataModuleType = 0x02; // 01=NB,02-4G
  39. const uint16 HwVersion = 0x0102;
  40. const uint32 BlSwVersion = 0x00000002;
  41. const uint32 DrvSwVersion = 0x00000004;
  42. const uint8 BmsManuFacture = 0xff;
  43. const uint8 BmsInfo = 0xff;
  44. uint8 TcpbattSN[BATT_SN_LEN] = {0x31};
  45. uint8 VIN[17] = {0};
  46. volatile uint32 TimerCounter = 0; // ms单位
  47. uint32 BattTempR[4] = {0}; // ADC查询的温度R值
  48. uint16 ErrorArray[10] = {0};
  49. uint8 Fota_update_flag = 0;
  50. boolean Fota_Process_Going = false;
  51. uint8 Fota_error_flag = 0;
  52. uint8 DeviceErrNum = 0;
  53. /*GPS*/
  54. QueueHandle_t GpsDataQueueHandle;
  55. sint16 xyzData[3] = {0};
  56. /*Hal_Can*/
  57. uint8 CanIf_u8TxConfirmCnt = 0U;
  58. boolean CanIf_bTxFlag = false;
  59. uint8 CanIf_u8RxIndicationCnt = 0U;
  60. boolean CanIf_bRxFlag = false;
  61. QueueHandle_t CanRecvQueueHandle0;
  62. QueueHandle_t CanRecvQueueHandle1;
  63. QueueHandle_t CanRecvQueueHandle2;
  64. TaskHandle_t Uart_Hal_RecvTask_Handle, Uart_Hal_SendTask_Handle, MainTask_Handle, Uart0Task_Handle, CanTask_Handle, GpsTask_Handle, Uart_4G_Task_Handle;
  65. SemaphoreHandle_t sleep_mutex = NULL;
  66. bool TcpSysReboot = 0;
  67. char ImeiNum[15] = {0};
  68. char IccidNum[20] = {0};
  69. uint8 CSQValue = 0;
  70. sint8 SocketId = -1;
  71. sint8 RegChkRet = 0;
  72. char WebSiteIp[20] = {0};
  73. uint8 TcpWorkState = 0;
  74. uint16 DeviceSpeed = 0;
  75. real_T returnFreq[3][5];
  76. real_T returnP[3][5];
  77. /*以下变量均为App_CAN相关变量*/
  78. #ifdef APP_CAN_ENABLE
  79. // VCU相关
  80. uint8 vehicleStatus = 0;
  81. uint8 bmsHVOn = 0;
  82. uint8 currentGearPosition = 0;
  83. uint8 parkingBreakStatus = 0;
  84. uint8 breakingStatus = 0;
  85. uint32 ODO = 0;
  86. uint8 dcdcWorkStatus = 0;
  87. uint8 numOfChrgableSubsys = 0;
  88. uint8 chrgableSubsysCode = 0;
  89. uint16 vcuDCVol = 0;
  90. // EBC相关
  91. uint8 ebcStatus = 0;
  92. uint8 ebcAskHVOn = 0;
  93. uint8 ebcAskHVOff = 0;
  94. uint8 retainLockSignal = 0;
  95. uint8 dischargeLockSignal = 0;
  96. uint8 chargeLockSignal = 0;
  97. uint8 chargeFlag = 0;
  98. // Bcu相关
  99. UINT32 BcuInTable[28] = {
  100. 0x1801D0F3,
  101. 0x1801D8F3,
  102. 0x1880D0F3,
  103. 0x1881D0F3,
  104. 0x1882D0F3,
  105. 0x1883D0F3,
  106. 0x1884D0F3,
  107. 0x1885D0F3,
  108. 0x1886D0F3,
  109. 0x1887D0F3,
  110. 0x1888D0F3,
  111. 0x1889D0F3,
  112. 0x188AD0F3,
  113. 0x18C1D0F3,
  114. 0x18C2D0F3,
  115. 0x18E1D0F3,
  116. 0x18E2D0F3,
  117. 0x18E3D0F3,
  118. 0x18E4D0F3,
  119. 0x18E5D0F3,
  120. 0x18E6D0F3,
  121. 0x18F1D0F3,
  122. 0x18F2D0F3,
  123. 0x18F3D0F3,
  124. 0x18F4D0F3,
  125. 0x18F5D0F3,
  126. 0x18FF45F4,
  127. 0x18FFC13A,
  128. };
  129. BOOL BcuRxShortError[28];
  130. BOOL BcuRxLongError[28];
  131. UINT8 BcuRxErrorCounter[28];
  132. UINT8 BcuRxFlag[28];
  133. /************************************************************
  134. *BCU->4G解码变量存放区
  135. ************************************************************/
  136. UINT8 BMS_CellRecvFlg = 0; //电压收取标志位
  137. UINT8 canRecvFramNum[BMS_CELL_MAX_NUM/3] = {0};
  138. UINT8 BMS_ReqVIN = 0x00; // 是否请求VIN码,0:预留;1:请求VIN;2:不请求VIN;3:无效;,Re-1,Off-0,
  139. UINT8 BMS_ReqHVOff = 0x00; // 是否请求下高压,0:预留;1:请求下高压;2:不请求下高压;3:无效;,Re-1,Off-0,
  140. UINT8 BMS_ProtocolEditionH = 0x00; // 通讯协议版本高位(例 : 版本为3 .1, 则此处发3), , Re - 1, Off - 0,
  141. UINT8 BMS_ProtocolEditionL = 0x00; // 通讯协议版本低位(例 : 版本为3 .1, 则此处发1), , Re - 1, Off - 0,
  142. UINT8 BMS_CharDevNum = 0x00; // 可充电装置系统序号(BMS是整车中可充电装置系统中的第几个, 需要整车告知),1,Re-1,Off-0,
  143. UINT8 BMS_FtPosRly = 0x00; // 主正继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  144. UINT8 BMS_FtNegRly = 0x00; // 主负继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  145. UINT8 BMS_FtPosCharRly1 = 0x00; // 充正1继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  146. UINT8 BMS_FtNegCharRly1 = 0x00; // 充负1继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  147. UINT8 BMS_FtPosCharRly2 = 0x00; // 充正2继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  148. UINT8 BMS_FtNegCharRly2 = 0x00; // 充负2继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  149. UINT8 BMS_FtHeatRly1 = 0x00; // 加热1/正继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  150. UINT8 BMS_FtHeatRly2 = 0x00; // 加热2/负继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
  151. UINT8 BMS_StPosRly = 0x00; // 主正继电器状态(如继电器状态由BMS检测),0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  152. UINT8 BMS_StNegRly = 0x00; // 主负继电器状态(如继电器状态由BMS检测),0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  153. UINT8 BMS_StPreCharRly = 0x00; // 预充继电器状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  154. UINT8 BMS_StPosCharRly1 = 0x00; // 直流充正继电器1状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  155. UINT8 BMS_StNegCharRly1 = 0x00; // 直流充负继电器1状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  156. UINT8 BMS_StPosCharRly2 = 0x00; // 直流充正继电器2状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  157. UINT8 BMS_StNegCharRly2 = 0x00; // 直流充负继电器2状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
  158. UINT8 BMS_FtAuxRelayWeld = 0x00; // 附件继电器粘连故障(保留),0:正常; 1:故障,Re-1,Off-0,
  159. UINT8 BMS_BraOpenCirc = 0x00; // 支路断路故障,0:正常; 1:故障,Re-1,Off-0,
  160. UINT8 BMS_FtBackCharCurrOutLim = 0x00; // 回充电流超限报警,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
  161. UINT8 BMS_FtPosRlyOpen = 0x00; // 主正继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  162. UINT8 BMS_FtNegRlyOpen = 0x00; // 主负继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  163. UINT8 BMS_FtPosCharRly1Open = 0x00; // 直流充电正1继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  164. UINT8 BMS_FtPosCharRly2Open = 0x00; // 直流充电正2继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  165. UINT8 BMS_FtNegCharRly1Open = 0x00; // 直流充电负1继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  166. UINT8 BMS_FtNegCharRly2Open = 0x00; // 直流充电负2继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  167. UINT8 BMS_FtTMSContClose = 0x00; // 加热膜或TMS接触器无法断开报警,0:正常; 1:故障,Re-1,Off-0,
  168. UINT8 BMS_FtTMSContOpen = 0x00; // 加热膜或TMS接触器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
  169. UINT8 BMS_FtTMS = 0x00; // 热管理系统故障,0:正常; 1:故障,Re-1,Off-0,
  170. UINT8 BMS_Ft24VSpy = 0x00; // BMS 24V供电异常报警,0:正常; 1:故障,Re-1,Off-0,
  171. UINT8 BMS_FtPACKSelfProt = 0x00; // 电池包自保护报警,0:正常; 1:故障,Re-1,Off-0,
  172. UINT8 BMS_FtCharSockTempOver = 0x00; // 充电插座过温报警,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
  173. UINT8 BMS_FtTempOutCtrl = 0x00; // 热失控报警,0:正常; 1:故障,Re-1,Off-0,
  174. UINT8 BMS_StPosHeatRly = 0x00; // 加热正继电器状态,0:保留;1:开启;2:闭合;3:无效,Re-1,Off-0,
  175. UINT8 BMS_StNegHeatRly = 0x00; // 加热负继电器状态,0:保留;1:开启;2:闭合;3:无效,Re-1,Off-0,
  176. UINT8 BMS_CharSysNum = 0x00; // 可充电储能子系统总数(保留),,Re-1,Off-0,
  177. UINT8 BMS_FtCode = 0x00; // 电池系统故障码,详见附表电池系统故障码列表,Re-1,Off-0,
  178. UINT8 BMS_ST1CheckSum = 0x00; // B2V_ST1的CheckSum,Byte0=Byte1 XOR Byte2 XOR Byte3 XOR Byte4 XOR Byte5 XOR Byte6 XOR Byte7,Re-1,Off-0,
  179. UINT8 BMS_ST1Counter = 0x00; // B2V_ST1的生命信号,0~14循环,15:信号无效,Re-1,Off-0,
  180. UINT8 BMS_Mode = 0x00; // BMS当前状态,和新版协议不匹配
  181. UINT8 BMS_AuxRlySt = 0x00; // 附件继电器状态,0:开启;1:闭合;,Re-1,Off-0,
  182. UINT8 BMS_BattBalaSt = 0x00; // BMS当前均衡状态,0:未开启均衡;1:开启均衡;,Re-1,Off-0,
  183. UINT8 BMS_CharGunSt = 0x00; // 直流充电枪连接状态,0:未连接1 : 连接, Re - 1, Off - 0,
  184. UINT8 BMS_CharMode = 0x00; // BMS当前充电模式,0:预留1 : 直流充电 2 : 交流充电 3 : 其他充电, Re - 1, Off - 0,
  185. UINT8 BMS_CharSt = 0x00; // 充电状态,0:可以充电1 : 正在充电 2 : 充电结束 3 : 充电故障, Re - 1, Off - 0,
  186. UINT8 BMS_FtLvl = 0x00; // 当前最高故障等级,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
  187. UINT8 BMS_FtCellTempDiff = 0x00; // 电芯温差异常报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  188. UINT8 BMS_FtCellTempHigh = 0x00; // 电芯温度过高报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  189. UINT8 BMS_FtPACKOverVolt = 0x00; // PACK过压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  190. UINT8 BMS_FtPACKUndeVolt = 0x00; // PACK欠压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  191. UINT8 BMS_FtSOCLow = 0x00; // SOC过低报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  192. UINT8 BMS_FtCellOverVolt = 0x00; // 单体电压过高报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  193. UINT8 BMS_FtCellUndeVolt = 0x00; // 单体电压欠压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  194. UINT8 BMS_FtIns = 0x00; // 绝缘报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  195. UINT8 BMS_FtCellOverVoltDiff = 0x00; // 单体压差过大,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  196. UINT8 BMS_FtCharCurrOver = 0x00; // 充电电流过大报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  197. UINT8 BMS_FtDisCharCurrOver = 0x00; // 放电电流过大报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  198. UINT8 BMS_FtCellTempLow = 0x00; // 电芯温度过低报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  199. UINT8 BMS_FtBranVoltDifOver = 0x00; // 支路压差过大报警(存在并联支路的系统),0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  200. UINT8 BMS_FtBMSHardWare = 0x00; // BMS硬件故障,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
  201. UINT8 BMS_FtSOCHigh = 0x00; // SOC过高报警,0:正常; 1:故障,Re-1,Off-0,
  202. UINT8 BMS_FtSOCJump = 0x00; // SOC跳变报警,0:正常; 1:故障,Re-1,Off-0,
  203. UINT8 BMS_FtInCom = 0x00; // BMS内部通信故障,0:正常; 1:故障,Re-1,Off-0,
  204. UINT8 BMS_FtSysMism = 0x00; // BMS/可充电储能系统不匹配报警,0:正常; 1:故障,Re-1,Off-0,
  205. UINT8 BMS_FtHvIntLock = 0x00; // 高压互锁报警,0:正常; 1:故障,Re-1,Off-0,
  206. UINT8 BMS_FtSmoke = 0x00; // 火警探测器故障,0:正常; 1:故障,Re-1,Off-0,
  207. UINT8 BMS_FtFire = 0x00; // 电池包火灾报警,0:正常; 1:故障,Re-1,Off-0,
  208. UINT8 BMS_FtNum = 0x00; // BMS当前发生的故障总数目(包括GB32960中规定的故障数目),,Re-1,Off-0,
  209. UINT8 BMS_PackSOC = 0x00; // 电池包SOC,,Re-0.4,Off-0,
  210. UINT8 BMS_PackSOH = 0x00; // 电池包SOH,,Re-0.4,Off-0,
  211. UINT8 BMS_MaxCellTemp = 0x00; // 单体最高温度,,Re-1,Off--50,℃
  212. UINT8 BMS_MinCellTemp = 0x00; // 单体最低温度,,Re-1,Off--50,℃
  213. UINT8 BMS_AverCellTemp = 0x00; // 单体平均温度,,Re-1,Off--50,℃
  214. UINT8 BMS_MaxCellTempCSC = 0x00; // 最高温度电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
  215. UINT8 BMS_MaxCellTempNum = 0x00; // 最高温度电芯所在子系统(CSC)内温度探针编号,范围(1~255),Re-1,Off-0,
  216. UINT8 BMS_MinCellTempCSC = 0x00; // 最低温度电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
  217. UINT8 BMS_MinCellTempNum = 0x00; // 最低温度电芯所在子系统(CSC)内温度探针编号,范围(1~255),Re-1,Off-0,
  218. UINT8 BMS_MaxCellVoltCSC = 0x00; // 最高电压电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
  219. UINT8 BMS_MaxCellVoltNum = 0x00; // 最高电压电芯所在子系统(CSC)内单体编号,范围(1~255),Re-1,Off-0,
  220. UINT8 BMS_MinCellVoltCSC = 0x00; // 最低电压电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
  221. UINT8 BMS_MinCellVoltNum = 0x00; // 最低电压电芯所在子系统(CSC)内单体编号,范围(1~255),Re-1,Off-0,
  222. UINT8 BMS_InsDeteSt = 0x00; // BMS绝缘检测状态,0:停止检测;1:激活检测;,Re-1,Off-0,
  223. UINT8 BMS_FtCharInsLow = 0x00; // 充电绝缘阻值低,0:正常; 1:故障,Re-1,Off-0,
  224. UINT8 BMS_FtCurrSenr = 0x00; // 电流传感器故障,0:正常; 1:故障,Re-1,Off-0,
  225. UINT8 BMS_FtHeatingFilm = 0x00; // 加热膜加热回路故障,0:正常; 1:故障,Re-1,Off-0,
  226. UINT8 BMS_FtMainLoopPreChar = 0x00; // 主回路预充或预检故障,0:正常; 1:故障,Re-1,Off-0,
  227. UINT8 BMS_FtAuxLoopPreChar = 0x00; // 辅件回路预充或预检故障,0:正常; 1:故障,Re-1,Off-0,
  228. UINT8 BMS_FtACANLost = 0x00; // ACAN/整车CAN通讯故障,0:正常; 1:故障,Re-1,Off-0,
  229. UINT8 BMS_FtDCDC = 0x00; // BMS-DC-DC故障,0:正常; 1:故障,Re-1,Off-0,
  230. UINT8 BMS_FtSOCDif = 0x00; // SOC差异过大,0:正常; 1:故障,Re-1,Off-0,
  231. UINT8 BMS_FtCellOverDisChar = 0x00; // 电芯过放故障,0:正常; 1:故障,Re-1,Off-0,
  232. UINT8 BMS_FtCharOver = 0x00; // 车载储能装置过充报警,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
  233. UINT8 BMS_FtContDisCharCurrOverLoad = 0x00; // 持续回充过流故障,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
  234. UINT8 BMS_FtContCharCurrOverLoad = 0x00; // 持续放电过流故障,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
  235. UINT8 BMS_Gun1DCNegTemp = 0x00; // 充电口1负温感值,,Re-1,Off--40,℃
  236. UINT8 BMS_Gun1DCPosTemp = 0x00; // 充电口1正温感值,,Re-1,Off--40,℃
  237. UINT8 BMS_Gun2DCNegTemp = 0x00; // 充电口2负温感值,,Re-1,Off--40,℃
  238. UINT8 BMS_Gun2DCPosTemp = 0x00; // 充电口2正温感值,,Re-1,Off--40,℃
  239. UINT8 BMS_CurrHeatSt = 0x00; // 当前加热状态,0:未加热;1:加热中;2:预留;3:无效;,Re-1,Off-0,
  240. UINT8 BMS_CurrCoolSt = 0x00; // 当前冷却状态,0:未冷却;1:冷却中;2:预留;3:无效;,Re-1,Off-0,
  241. UINT8 BMS_FtCharCnct = 0x00; // 插枪连接信号异常,0:正常; 1:故障,Re-1,Off-0,
  242. UINT8 BMS_FtOverDisCharCurrDuringChar = 0x00; // 充电时放电电流过大,0:正常; 1:故障,Re-1,Off-0,
  243. UINT8 BMS_FtCharNTC = 0x00; // 充电插座NTC故障,0:正常; 1:故障,Re-1,Off-0,
  244. UINT8 BMS_FtELock = 0x00; // 电子锁故障,0:正常; 1:故障,Re-1,Off-0,
  245. UINT8 BMS_CellVoltFramNum = 0x00; // 单体电压帧序号,有效值1~255,Re-1,Off-0,
  246. UINT8 BMS_CellTempFramNum = 0x00; // 温度帧序号,有效值1~255,Re-1,Off-0,
  247. UINT8 BMS_CSC_Code = 0x00; // 子系统编号CSC,有效值1~255,Re-1,Off-0,
  248. UINT8 BMS_CellTemp[BMS_TEMP_MAX_NUM] = {0x00}; // 当前CSC下的第N个探针的温度,255 "Invalid" 0xFF 无效有效值 0 ~254, 单位 ℃, 范围(-50 ~204)℃, , Re - 1, Off-- 50,℃
  249. UINT8 BMS_Checksum = 0x00; // 电池编码信息1的CheckSum,Byte0=Byte1 XOR Byte2 XOR Byte3 XOR Byte4 XOR Byte5 XOR Byte6 XOR Byte7,Re-1,Off-0,
  250. UINT8 BMS_PackComp = 0x00; // 电池厂家,1:"CATL" 2:"Li Shen" 3:"MGL" 4:"SAMSUN" 5:"LG",Re-1,Off-0,
  251. UINT8 BMS_BattCodeLeng = 0x00; // 电池编码长度,0:Do not transmit this Code,Re-1,Off-0,
  252. UINT8 BMS_SN[27] = {0}; // 电池编码(SN)字符1(ASCII),,Re-1,Off-0,
  253. UINT8 BMS_BattType = 0x00; // 电池类型,1:铅酸电池; 2:镍氢电池; 3:磷酸铁锂电池; 4:锰酸锂电池; 5:钴酸锂电池; 6:三元材料电池; 7:聚合物锂离子电池; 8:钛酸锂电池; 9:超级电容; 10~13:保留; 14:燃料电池;15:保留,Re-1,Off-0,
  254. UINT8 BMS_CoolType = 0x00; // 电池冷却方式,0:其他冷却方式1 : 自然冷却 2 : 风扇冷却 3 : 水冷却, Re - 1, Off - 0,
  255. UINT8 BMS_CSC_Total = 0x00; // 电池系统中CSC总的数目,,Re-1,Off-0,
  256. UINT8 BMS_CellVoltLevel = 0x00; // 单体平台电压(非实时变化的值),有效值0~5V; 255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
  257. UINT8 BMS_CellMinVolt = 0x00; // 单体可用最低电压(非实时变化的值),有效值0~5V; 255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
  258. UINT8 BMS_CellMaxVolt = 0x00; // 单体可用最高电压(非实时变化的值),有效值0~5V; 255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
  259. UINT8 BMS_HVBranNum = 0x00; // 电池系统高压支路数,,Re-1,Off-0,
  260. UINT8 BMS_SingleHVBranchCellNum = 0x00; // 电池系统单支路电芯数,,Re-1,Off-0,
  261. UINT8 BMS_ReqMode = 0x00; // BMS请求设定模式,0:关机模式1 : 制冷模式 2 : 制热模式 3 : 自循环模式, Re - 1, Off - 0,
  262. UINT8 BMS_HVCmd = 0x00; // 高压请求,0:请求上高压1 : 请求下高压, Re - 1, Off - 0,
  263. UINT8 BMS_ChgSts = 0x00; // 充电状态,0:非充电1 : 充电, Re - 1, Off - 0,
  264. UINT8 BMS_HVRelaySts = 0x00; // BMS高压继电器状态,0:断开状态; 1:闭合状态; 2~3:无效,Re-1,Off-0,
  265. UINT8 BMS_SetTemp = 0x00; // 设定温度,,Re-1,Off--40,
  266. UINT8 BMS_Life = 0x00; // BMS生命帧,,Re-1,Off-0,
  267. UINT8 BMS_CRC = 0x00; // CRC校验值,,Re-1,Off-0,
  268. UINT8 TMS_WorkStatus = 0x00; // TMS工作状态,0:关机模式1 : 制冷模式 2 : 制热模式 3 : 自循环模式, Re - 1, Off - 0,
  269. UINT8 TMS_HVRelayST = 0x00; // TMS高压继电器状态,0:断开状态; 1:闭合状态; 2~3:无效,Re-1,Off-0,
  270. UINT8 TMS_OutletTemp = 0x00; // 出水温度(机组到电池),255:无效,Re-1,Off--40,
  271. UINT8 TMS_InletTemp = 0x00; // 回水温度(电池到机组),255:无效,Re-1,Off--40,
  272. UINT8 TMS_ErrCode = 0x00; // TMS故障码,0:无故障; 出现 1 种以上循环发送,Re-1,Off-0,
  273. UINT8 TMS_FaultLevel = 0x00; // TMS故障码等级,0:无效1 : 1级故障 2 : 2级故障 3 : 3级故障, Re - 1, Off - 0,
  274. UINT16 BMS_SoftwareVersion = 0x00; // 软件版本号:RyyyBzzz(R为软件版本、B为测试版本、正式版本不带B) ,yyy:0~254,精度1,255:无效,不显示;zzz:0~254,精度1,255:无效,不显示;
  275. UINT16 BMS_HardwareVersion = 0x00; // 硬件版本号:VyyyBzzz(V为硬件版本、B为测试版本、正式版本不带B) ,,Re-1,Off-0,
  276. UINT16 BMS_PackCurr = 0x00; // 电池包总电流,充电为负值,放电为正值,,Re-0.1,Off--1000,A
  277. UINT16 BMS_MaxCharCurr = 0x00; // 电池包最大回充电流,,Re-0.1,Off--1000,A
  278. UINT16 BMS_MaxDisCharCurr = 0x00; // 电池包最大放电电流,,Re-0.1,Off--1000,A
  279. UINT16 BMS_PosIns = 0x00; // 母线正对车体绝缘电阻,,Re-1,Off-0,KΩ
  280. UINT16 BMS_NegIns = 0x00; // 母线负对车体绝缘电阻,,Re-1,Off-0,KΩ
  281. UINT16 BMS_BattVolt = 0x00; // 电池包内侧电压,,Re-0.1,Off-0,V
  282. UINT16 BMS_LinkVolt = 0x00; // 电池包外侧电压,,Re-0.1,Off-0,V
  283. UINT16 BMS_MaxCellVolt = 0x00; // 单体最高电压值,,Re-0.001,Off-0,V
  284. UINT16 BMS_AverCellVolt = 0x00; // 电芯电压平均值,,Re-0.001,Off-0,V
  285. UINT16 BMS_MinCellVolt = 0x00; // 电芯最低电压值,,Re-0.001,Off-0,V
  286. UINT16 BMS_ContChrgCurr = 0x00; // BMS允许的持续回充电流,,Re-0.1,Off-0,A
  287. UINT16 BMS_ContDisCharCurr = 0x00; // BMS允许的持续放电电流,,Re-0.1,Off--1000,A
  288. UINT16 BMS_CharReqVolt = 0x00; // 充电所需电压(交流),,Re-0.1,Off-0,V
  289. UINT16 BMS_CharReqCurr = 0x00; // 充电所需电流(交流),,Re-0.1,Off--1000,A
  290. UINT16 BMS_SysInsRes = 0x00; // 系统绝缘电阻,,Re-1,Off-0,KΩ
  291. UINT16 BMS_MaxDisCharPwr = 0x00; // 最大允许放电功率,,Re-0.1,Off-0,kw
  292. UINT16 BMS_MaxCharPwr = 0x00; // 最大允许充电功率,,Re-0.1,Off-0,kw
  293. UINT16 BMS_ContDisCharPwr = 0x00; // BMS允许的持续放电功率,,Re-0.1,Off-0,kw
  294. UINT16 BMS_ContCharPwr = 0x00; // BMS允许的持续充电功率,,Re-0.1,Off-0,kw
  295. UINT16 BMS_InstEngyCons = 0x00; // 动力电池瞬时百公里能耗,,Re-0.1,Off-0,kwh
  296. UINT16 BMS_TotalEngyCons = 0x00; // 动力电池总/平均百公里能耗,,Re-0.1,Off-0,kwh
  297. UINT16 BMS_SOE = 0x00; // 剩余电量,,Re-0.01,Off-0,kwh
  298. UINT16 BMS_RmanCharTime = 0x00; // 剩余充电时间,,Re-1,Off-0,min
  299. UINT16 BMS_CharNum = 0x00; // 充电次数,,Re-1,Off-0,
  300. UINT16 BMS_CellVolt[BMS_CELL_MAX_NUM] = {0x00}; // 电芯的电压,65535 "Invalid" 0xFFFF 无效有效值 0 ~65534, 范围(0 ~65.534) V, Re - 0.001, Off - 0, V
  301. UINT16 BMS_BattRateCap = 0x00; // 电池包额定容量,有效值 0~65534,65535 "Signal Invalid" 无效,Re-1,Off-0,Ah
  302. UINT16 BMS_BattRateVolt = 0x00; // 电池包额定电压,有效值 0~6553.4,65535 "Signal Invalid" 无效,Re-0.1,Off-0,V
  303. UINT16 BMS_BattRateEngy = 0x00; // 电池包额定能量,有效值 0~6553.4,65535 "Signal Invalid" 无效,Re-0.1,Off-0,kWh
  304. UINT16 BMS_CellTotal = BMS_CELL_MAX_NUM; // PACK中单体电芯的总数目,,Re-1,Off-0,//
  305. UINT16 BMS_TempTotal = BMS_TEMP_MAX_NUM; // PACK中电芯温度点(探针)的总数目,,Re-1,Off-0,
  306. UINT16 BMS_SingleCharEngy = 0x00; // 单次充电kWh 数,,Re-0.1,Off-0,KWh
  307. UINT16 BMS_SingleCharCapy = 0x00; // 单次充电Ah 数,,Re-0.1,Off-0,Ah
  308. UINT16 BMS_HVVolt = 0x00; // BMS当前电压,,Re-1,Off-0,
  309. UINT16 TMS_ReqPow = 0x00; // TMS需求功率,65535:无效,Re-0.1,Off-0,Kw
  310. UINT32 BMS_TotalCharEngy = 0x00; // 累计充入kWh 数,,Re-0.1,Off-0,KWh
  311. UINT32 BMS_TotalDisCharEngy = 0x00; // 累计放出kWh 数,,Re-0.1,Off-0,KWh
  312. UINT32 BMS_TotalBackCharEngy = 0x00; // 累计动能回馈充入kWh 数,,Re-0.1,Off-0,KWh
  313. UINT32 BMS_TotalStaCharEngy = 0x00; // 累计换电站充入kWh 数,,Re-0.1,Off-0,KWh
  314. UINT32 BMS_TotalGunCharEngy = 0x00; // 累计插枪充电充入kWh 数,,Re-0.1,Off-0,KWh
  315. UINT32 BMS_TotalGunCharCapy = 0x00; // 累计插枪充电充入Ah 数,,Re-0.1,Off-0,Ah
  316. UINT32 BMS_TotalCharCapy = 0x00; // 累计充入Ah 数,,Re-0.1,Off-0,Ah
  317. UINT32 BMS_TotalDisCharCapy = 0x00; // 累计放出Ah 数,,Re-0.1,Off-0,Ah
  318. UINT32 BMS_TotalBackCharCapy = 0x00; // 累计动能回馈充入Ah 数,,Re-0.1,Off-0,Ah
  319. UINT32 BMS_TotalStaCharCapy = 0x00; // 累计换电站充入Ah 数,,Re-0.1,Off-0,Ah
  320. #endif