AppGlobalVar.c 22 KB

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