Browse Source

北奔直连协议更改

CHENJIE-PC\QiXiang_CHENJIE 2 years ago
parent
commit
cd8a5c17c8

+ 1 - 1
HardwareLib/HardwareLib.h

@@ -144,7 +144,7 @@ uint16 ATDDrv_GetChanResult(uint8 idxChanUB); //
 
 #define _DIN_INDEX_READYSENSOR1 11 //对应接插件XK6,落座传感器1,高有效
 #define _DIN_INDEX_READYSENSOR2 10 //对应接插件XK7,落座传感器2,高有效
-#define _DIN_INDEX_PLUGHVLOCK 12   //对应接插件XK3,接插件互锁1,高有效
+#define _DIN_INDEX_PLUGHVLOCK 12   //对应接插件XK3,接插件互锁1,高有效,整车放电接插件
 void DINDrv_SetChanThres(uint8 idxChanUB, uint8 stOpenLvlUB, uint16 uThresUW);
 uint8 DINDrv_GetChanState(uint8 idxChanUB); //得到上述通道开关状态
 //********************************************************************************************

+ 35 - 32
System/Vehicle/AppFunc.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-12-15 10:40:06
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-01-11 18:14:41
+ * @LastEditTime : 2022-05-09 16:20:39
  * @Description  : AppFunc
  * @FilePath     : \VehicleControl\VehicleControl\src\System\Vehicle\AppFunc.c
  */
@@ -27,111 +27,114 @@ void LockAndUnlockCtrl()
 	static uint16 battSwpeModeCounter = 0;
 	if (ebcd_flg_ebcManCtrlEn) //手动控制使能
 	{
-		if (ebcd_flg_ebcManCtrlMode==1)//循环控制模式
+		if (ebcd_flg_ebcManCtrlMode == 1) //循环控制模式
 		{
-			if(ebcd_st_lockSensor==1)//处于锁紧状态,传感器判定一个
+			if (ebcd_st_lockSensor == 1) //处于锁紧状态,传感器判定一个
 			{
 				LockDelay = LockDelay + 10;
-				if(LockDelay>LockDelayTime)//锁紧状态超时就解锁
+				if (LockDelay > LockDelayTime) //锁紧状态超时就解锁
 				{
 					ManuControlTimes++;
 					LockDelay = 0;
 					CtrlFlg = Unlock;
 				}
 			}
-			else if(ebcd_st_unlockSensor==1)//处于解锁状态,传感器判定一个
+			else if (ebcd_st_unlockSensor == 1) //处于解锁状态,传感器判定一个
 			{
 				UnlockDelay = UnlockDelay + 10;
-				if(UnlockDelay>UnlockDelayTime)
+				if (UnlockDelay > UnlockDelayTime)
 				{
 					UnlockDelay = 0;
 					CtrlFlg = Lock;
 				}
 			}
 		}
-		else if(ebcd_flg_ebcManCtrlMode==2)//控制锁紧
+		else if (ebcd_flg_ebcManCtrlMode == 2) //控制锁紧
 		{
 			CtrlFlg = Lock;
 		}
-		else if(ebcd_flg_ebcManCtrlMode==3)//控制解锁
+		else if (ebcd_flg_ebcManCtrlMode == 3) //控制解锁
 		{
 			CtrlFlg = Unlock;
 		}
 	}
 	else //正常工作模式
 	{
-		switch(ebcd_st_ebcWork)
+		switch (ebcd_st_ebcWork)
 		{
-		case DriveMode://行车状态,自动进入,默认状态
+		case DriveMode: //行车状态,自动进入,默认状态
 		{
-			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL,0);//行车状态换电指示灯关闭
-			if(bled_flg_handShake==1)
+			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 0); //行车状态换电指示灯关闭
+			if (bled_flg_handShake == 1)
 			{
-				ebcd_st_ebcWork = CommuMode;//进入通讯状态
+				ebcd_st_ebcWork = CommuMode; //进入通讯状态
 				bled_flg_handShake = 0;
 				break;
 			}
 			break;
 		}
-		case CommuMode://通讯状态,握手才能进入
+		case CommuMode: //通讯状态,握手才能进入
 		{
 			BleConCounter = BleConCounter + 10;
-			if((BleConCounter%1000)<500)//换电指示灯闪烁
+			if ((BleConCounter % 1000) < 500) //换电指示灯闪烁
 			{
-				PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL,1);
+				PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 1);
 			}
 			else
 			{
-				PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL,0);
+				PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 0);
 			}
 
-			if(BleConCounter>=60*1000||bled_flg_backToDrv == 1)
+			if (BleConCounter >= 60 * 1000 || bled_flg_backToDrv == 1)
 			{
-				ebcd_st_ebcWork = DriveMode;//切换到行车状态
+				ebcd_st_ebcWork = DriveMode; //切换到行车状态
 				BleConCounter = 0;
 				bled_flg_backToDrv = 0;
 				break;
 			}
-			else if(BattCD_stWakeupU.B.bLogic==0 && BattCD_stWakeupU.B.bWkpSig1==1)
+			else if (BattCD_stWakeupU.B.bLogic == 0 && BattCD_stWakeupU.B.bWkpSig1 == 1)
 			{
-				ebcd_st_ebcWork = SwapMode;//切换到换电状态
+				ebcd_st_ebcWork = SwapMode; //切换到换电状态
 				BleConCounter = 0;
 				break;
 			}
-			if(bled_st_dataTrans==1)
+			if (bled_st_dataTrans == 1)
 			{
 				BleConCounter = 0;
 				bled_st_dataTrans = 0;
 			}
 			break;
 		}
-		case SwapMode://换电状态
+		case SwapMode: //换电状态
 		{
-			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL,1);//换电状态换电指示灯常亮
+			PSwtDrv_Interface(_PSWT_INDEX_EBCLEDCONTROL, 1); //换电状态换电指示灯常亮
 			battSwpeModeCounter = battSwpeModeCounter + 10;
-			if(bled_flg_swapBattDone==1)
+			if (bled_flg_swapBattDone == 1)
 			{
+				ebcd_Nr_swapBatt++;
+				ebcd_Nr_swapSucBatt++;
 				bled_flg_swapBattDone = 0;
 				ebcd_st_ebcWork = CommuMode; //切换到通讯状态
 				break;
 			}
-			else if(battSwpeModeCounter>=60*1000)
+			else if (battSwpeModeCounter >= 60 * 1000)
 			{
-				battSwpeModeCounter = DriveMode;//切换到行车状态
+				ebcd_Nr_swapBatt++;
+				battSwpeModeCounter = DriveMode; //切换到行车状态
 				ebcd_st_ebcWork = 0;
 				break;
 			}
-			if(bled_st_dataTrans==1)
+			if (bled_st_dataTrans == 1)
 			{
 				battSwpeModeCounter = 0;
 				bled_st_dataTrans = 0;
 			}
-			if(bled_flg_unlockCmdForce)
+			if (bled_flg_unlockCmdForce)
 			{
 				CtrlFlg = Unlock;
 				bled_flg_unlockCmdForce = 0;
 			}
-			if(bled_flg_lockCmdForce)
+			if (bled_flg_lockCmdForce)
 			{
 				CtrlFlg = Lock;
 				bled_flg_lockCmdForce = 0;
@@ -142,7 +145,7 @@ void LockAndUnlockCtrl()
 	}
 
 	//锁紧解锁执行
-	if(CtrlFlg)
+	if (CtrlFlg)
 	{
 		UnlockCtrl();
 	}
@@ -275,7 +278,7 @@ void GetAIOValue(void)
 
 	AirPressureTemp_Vol = ATDDrv_GetChanResult(_ATD_INDEX_AIRPRESSURE);
 	AirPressureTemp_Vol = (uint16)(AirPressureTemp_Vol * 1000 / 4095.0);
-	Test_LockPressure = AirPressureTemp_Vol;//锁紧力测试变量
+	Test_LockPressure = AirPressureTemp_Vol; //锁紧力测试变量
 	/*气压数据转换*/
 	AirPressureTemp_Vol = MAX(AirPressureTemp_Vol, 500);
 	AirPressureTemp_Vol = MIN(AirPressureTemp_Vol, 4500);

File diff suppressed because it is too large
+ 286 - 983
System/Vehicle/Communication/BcuCanProtocolFunc.c


+ 0 - 1
System/Vehicle/Communication/BcuCanProtocolFunc.h

@@ -11,5 +11,4 @@
 void BcuDecodeFunction(UINT32 ID, UINT8 *rawData);
 void BcuRxDiagnose(void);
 void BcuRxMsgSetInvalidValue(UINT32 ID);
-//组码函数
 void BcuEncodeFunction(UINT32 ID, UINT8 *rawData);

+ 290 - 292
System/Vehicle/Communication/BleCanProtocolFunc.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-12-20 14:47:39
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-12-29 16:33:32
+ * @LastEditTime : 2022-05-09 17:13:09
  * @Description  : file content
  * @FilePath     : \VehicleControl\VehicleControl\src\System\Vehicle\Communication\BleCanProtocolFunc.c
  */
@@ -20,7 +20,7 @@
  * @param {uint8} CmdIdx
  * @return {*}
  */
-void Can2ProtocolCode(uint8 CmdIdx,uint8 DataIdx,uint8 Byte0Num,uint32 *InnerCanID,uint8 *Data)
+void Can2ProtocolCode(uint8 CmdIdx, uint8 DataIdx, uint8 Byte0Num, uint32 *InnerCanID, uint8 *Data)
 {
     uint8 BlePwrControl;       //蓝牙电源开关控制  FF-关闭,0A-打开
     uint8 BlePwrControl_Flag;  //蓝牙电源开关控制使能  00-不控制,01-控制
@@ -34,7 +34,7 @@ void Can2ProtocolCode(uint8 CmdIdx,uint8 DataIdx,uint8 Byte0Num,uint32 *InnerCan
     {
     case 0x00: // ebc->ble数据传输通道
     {
-        Can2DataCode(DataIdx, Byte0Num,Data);
+        Can2DataCode(DataIdx, Byte0Num, Data);
         *InnerCanID = 0x1CEE0000;
         break;
     }
@@ -141,7 +141,7 @@ void Can2ProtocolCode(uint8 CmdIdx,uint8 DataIdx,uint8 Byte0Num,uint32 *InnerCan
  * @param {*}
  * @return {*}
  */
-void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
+void Can2DataCode(uint8 DataIdx, uint8 Byte0Num, uint8 Data[])
 {
     switch (DataIdx)
     {
@@ -163,8 +163,9 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
         {
         case 0x21:
         {
-            vcud_st_keyOn = 0;        // TBD
+            vcud_st_keyOn = BattCD_stWakeupU.B.bLogic;
             bcud_st_bcuTmsLiquid = 0; // TBD
+            ebcd_flg_pluginLockSig = m_flg_HVlock1 && m_flg_HVlock2;
             Data[0] = Byte0Num;
             Data[1] = ebcd_st_unlockSensor;
             Data[2] = ebcd_st_lockSensor;
@@ -177,6 +178,7 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
         }
         case 0x22:
         {
+            ebcd_st_pluginLockSig = (m_flg_HVlock2 << 2) || (m_flg_HVlock1 << 1) || (m_flg_HVlock1 << 1);
             Data[0] = Byte0Num;
             Data[1] = 0x00;
             Data[2] = 0x00;
@@ -254,16 +256,16 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
     }
     case 0x03: //主机数据类型3的应答 共5条
     {
-        vcud_st_handbrake = HandbrakeSts;
-        vcud_st_footbrake = (BrakePedal > 0);
-        vcud_st_gear = GearPos;
-        vcud_st_vcuComun = (VCU_Life != 0xFF);
-        vcud_st_carStart = VehSts;
-        vcud_st_Steer = 0x00; // TBD
-        vcud_M_accDrv = VCU_TotalDistance * 10;
-        if (EBC_VinMsgFlag == 0x07)
+        vcud_st_handbrake = VCU_St_ParkBrakeSw;
+        vcud_st_footbrake = (VCU_St_BrakePedal > 0);
+        vcud_st_gear = VCU_St_Gear;
+        vcud_st_vcuComun = (VcuRxLongError[0] != 1);
+        vcud_st_carStart = VCU_State_Veh;
+        vcud_st_Steer = 0x00;   // TBD
+        vcud_M_accDrv = 0 * 10; // TBD
+        if (VCU_St_VinRecv == 0x07)
         {
-            memcpy(vcuv_Num_vin, VCU_VIN, 17);
+            memcpy(vcuv_Num_vin, VCU_Num_VIN, 17);
         }
         switch (Byte0Num)
         {
@@ -334,40 +336,36 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
     }
     case 0x04: //主机数据类型4的应答 共16条
     {
-        bcud_st_bcuComun = (BMS1_Life != 0xFF);
-        bcud_pct_bcuSoh = BMS2_SOH;
-        bcud_V_battU = BMS2_PackInsideVolt;
-        if (BMS1_SysSts == 2)
+        bcud_st_bcuComun = (BcuRxLongError[4] != 0x01);
+        bcud_pct_bcuSoh = BMS_PackSOH;
+        bcud_V_battU = BMS_BattVolt;
+        if (BMS_Mode == 2)
         {
-            bcud_st_hvWork = 0;
-        }
-        else if (BMS1_SysSts == 0 || BMS1_SysSts == 1)
-        {
-            bcud_st_hvWork = 1;
+            bcud_st_hvWork = 2;
         }
-        else if (BMS1_SysSts == 3)
+        else if (BMS_Mode == 1)
         {
-            bcud_st_hvWork = 2;
+            bcud_st_hvWork = 0;
         }
         else
         {
             bcud_st_hvWork = 3;
         }
-        bcud_st_bcuMainRelay = BMS1_MainPosRelaySt;
-        bcud_pct_soc = (UINT16)(BMS2_SOC * 4);
-        memcpy(bcuv_Num_battSn, BMS_SN_SysCode, sizeof(BMS_SN_SysCode));
-        bcud_Q_snglChrg = BMS19_SingleChargeAh;
-        bcud_E_snglChrg = BMS19_SingleChargeKwh;
-        bcud_Q_accRecovry = BMS16_TotalEneryECOChargeAh;
-        bcud_E_accRecovry = BMS16_TotalEneryECOChargeKwh;
-        bcud_Q_accSwapBatt = BMS17_TotalStationChargeAh;
-        bcud_E_accSwapBatt = BMS17_TotalStationChargeKwh;
-        bcud_Q_accPlugInChrg = BMS18_TotalPoleChargeAh;
-        bcud_E_accPlugInChrg = BMS18_TotalPoleChargeKwh;
-        bcud_Q_accDischrg = BMS14_TotalDischargeAh;
-        bcud_E_accDischrg = BMS14_TotalDischargeAh;
-        bcud_Q_accChrg = BMS18_TotalPoleChargeAh;
-        bcud_E_accChrg = BMS15_TotalChargeKwh;
+        bcud_st_bcuMainRelay = BMS_StPosRly;
+        bcud_pct_soc = (UINT16)(BMS_PackSOC * 4);
+        memcpy(bcuv_Num_battSn, BMS_SN, sizeof(BMS_SN));
+        bcud_Q_snglChrg = BMS_SingleCharCapy;
+        bcud_E_snglChrg = BMS_SingleCharEngy;
+        bcud_Q_accRecovry = BMS_TotalBackCharCapy;
+        bcud_E_accRecovry = BMS_TotalBackCharEngy;
+        bcud_Q_accSwapBatt = BMS_TotalStaCharCapy;
+        bcud_E_accSwapBatt = BMS_TotalStaCharEngy;
+        bcud_Q_accPlugInChrg = BMS_TotalGunCharCapy;
+        bcud_E_accPlugInChrg = BMS_TotalGunCharEngy;
+        bcud_Q_accDischrg = BMS_TotalDisCharCapy;
+        bcud_E_accDischrg = BMS_TotalDisCharEngy;
+        bcud_Q_accChrg = BMS_TotalCharCapy;
+        bcud_E_accChrg = BMS_TotalCharEngy;
         switch (Byte0Num)
         {
         case 0x40:
@@ -565,7 +563,7 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
         default:
             break;
         }
-    break;
+        break;
     }
     case 0x05:
     {
@@ -597,7 +595,7 @@ void Can2DataCode(uint8 DataIdx, uint8 Byte0Num,uint8 Data[])
  * @param {uint8} CmdIdx
  * @return {*}
  */
-void Can2ProtocolDecode(uint32 Can2ID,uint8 Data[])
+void Can2ProtocolDecode(uint32 Can2ID, uint8 Data[])
 {
     switch (Can2ID)
     {
@@ -616,22 +614,22 @@ void Can2ProtocolDecode(uint32 Can2ID,uint8 Data[])
     }
     case 0x1CEF0002:
     {
-        if (Data[0] == 0x01 && Data[1]==0x01)
+        if (Data[0] == 0x01 && Data[1] == 0x01)
         {
             bled_flg_bleConn = 1;
             bled_flg_bleDisconn = 0;
         }
-        else if(Data[0] == 0x01 && Data[1]==0x02)
+        else if (Data[0] == 0x01 && Data[1] == 0x02)
         {
             bled_flg_bleConn = 0;
             bled_flg_bleDisconn = 1;
         }
         break;
     }
-    case 0x1C00ECEA://UDS检测ID
+    case 0x1C00ECEA: // UDS检测ID
     {
-    	Uds_Service(Data);
-    	break;
+        Uds_Service(Data);
+        break;
     }
     default:
         break;
@@ -646,7 +644,7 @@ void Can2DataDecode(uint8 Data[])
 {
     uint8 CmdIndex = Data[0];
     ebcd_st_toBleAns = CmdIndex;
-    ebcd_flg_Can2SendEnbale = TRUE;//所有的信息均立即回复
+    ebcd_flg_Can2SendEnbale = TRUE; //所有的信息均立即回复
     switch (CmdIndex)
     {
     case 0x01: //心跳数据,为了维持通讯
@@ -756,261 +754,261 @@ void Can2DataDecode(uint8 Data[])
     {
         bled_flg_safeStopCmd = 1;
         break;
-    }//新增需要改数组
+    } //新增需要改数组
     default:
         break;
     }
 }
-static uint8 udsMode = 0;//uds 模式
+static uint8 udsMode = 0; // uds 模式
 uint32 EbcAppSw = 0x00000101;
 void Uds_Service(uint8 *Data)
 {
-	UdsAnsType UdsAns;
-	memset((uint8 *)&UdsAns,0x00,sizeof(UdsAns));
-	UdsAns.UdsSer = *(Data+0);
-	UdsAns.UdsSubSer = *(Data+1);
-	switch(UdsAns.UdsSer)
-	{
-	case 0x10://模式选择
-	{
-		if(*(Data+1)==0x01)
-		{
-			udsMode = 1;
-			UdsPosAns(UdsAns);
-		}
-		else if(*(Data+1)==0x02)
-		{
-			if(udsMode==1||udsMode==2)
-			{
-				udsMode = 2;
-				UdsPosAns(UdsAns);
-			}
-			else
-			{
-				udsMode = 0;
-				UdsNegAns(UdsAns);
-			}
-		}
-		else
-		{
-			udsMode = 0;
-			UdsNegAns(UdsAns);
-		}
-		break;
-	}
-	case 0x22://查询
-	{
-		if(udsMode==2)
-		{
-			switch(UdsAns.UdsSubSer)
-			{
-			case 0x01://版本号查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = EbcAppSw>>24;
-				UdsAns.Data2 = EbcAppSw>>16;
-				UdsAns.Data3 = EbcAppSw>>8;
-				UdsAns.Data4 = EbcAppSw;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x02://解锁状态查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ebcd_st_unlockSensor;
-				UdsAns.Data2 = 0x00;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x03://锁紧状态查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ebcd_st_lockSensor;
-				UdsAns.Data2 = 0x00;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x04://落座状态查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ebcd_st_pedstSensor;
-				UdsAns.Data2 = 0x00;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x05://互锁状态查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ((m_flg_HVlock1&0x01)<<1)|(m_flg_HVlock2&0x01);
-				UdsAns.Data2 = 0x00;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x06://气压值查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ebcd_P_airSensor;
-				UdsAns.Data2 = 0x00;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x07://锁紧压力查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = Test_LockPressure>>8;
-				UdsAns.Data2 = Test_LockPressure;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x08://锁紧次数查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ManuControlTimes>>8;
-				UdsAns.Data2 = ManuControlTimes;
-				UdsAns.Data3 = 0x00;
-				UdsAns.Data4 = 0x00;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x09://温度数据查询
-			{
-				UdsAns.Seq = 0;
-				UdsAns.Data1 = ebcd_T_plugin[0];
-				UdsAns.Data2 = ebcd_T_plugin[1];
-				UdsAns.Data3 = ebcd_T_plugin[2];
-				UdsAns.Data4 = ebcd_T_plugin[3];
-				UdsPosAns(UdsAns);
-				break;
-			}
-			default:
-				UdsNegAns(UdsAns);
-				break;
-			}
-		}
-		else
-		{
-			UdsNegAns(UdsAns);
-		}
-		break;
-	}
-	case 0x27://控制
-	{
-		if(udsMode==2)
-		{
-			switch(UdsAns.UdsSubSer)
-			{
-			case 0x01://循环测试开启
-			{
-				ebcd_flg_ebcManCtrlEn = 1;
-				ebcd_flg_ebcManCtrlMode = 1;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x02:
-			{
-				ebcd_flg_ebcManCtrlEn = 1;
-				ebcd_flg_ebcManCtrlMode = 2;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			case 0x03:
-			{
-				ebcd_flg_ebcManCtrlEn = 1;
-				ebcd_flg_ebcManCtrlMode = 3;
-				UdsPosAns(UdsAns);
-				break;
-			}
-			default:
-				UdsNegAns(UdsAns);
-				break;
-			}
-		}
-		else
-		{
-			UdsNegAns(UdsAns);
-		}
-		break;
-	}
-	case 0x2E://写入
-	{
-		if(udsMode==2)
-		{
-			switch(UdsAns.UdsSubSer)
-			{
-			case 0x01:
-			{
-				LockDelayTime = (*(Data+4)<<8)|*(Data+5);
-				UdsPosAns(UdsAns);
-				EEPROMDrv_bSaveInstantUB = 1;
-				break;
-			}
-			case 0x02:
-			{
-				UnlockDelayTime = (*(Data+4)<<8)|*(Data+5);
-				UdsPosAns(UdsAns);
-				EEPROMDrv_bSaveInstantUB = 1;
-				break;
-			}
-			default:
-				UdsNegAns(UdsAns);
-				break;
-			}
-		}
-		else
-		{
-			UdsNegAns(UdsAns);
-		}
-		break;
-	}
-	default:
-		break;
-	}
+    UdsAnsType UdsAns;
+    memset((uint8 *)&UdsAns, 0x00, sizeof(UdsAns));
+    UdsAns.UdsSer = *(Data + 0);
+    UdsAns.UdsSubSer = *(Data + 1);
+    switch (UdsAns.UdsSer)
+    {
+    case 0x10: //模式选择
+    {
+        if (*(Data + 1) == 0x01)
+        {
+            udsMode = 1;
+            UdsPosAns(UdsAns);
+        }
+        else if (*(Data + 1) == 0x02)
+        {
+            if (udsMode == 1 || udsMode == 2)
+            {
+                udsMode = 2;
+                UdsPosAns(UdsAns);
+            }
+            else
+            {
+                udsMode = 0;
+                UdsNegAns(UdsAns);
+            }
+        }
+        else
+        {
+            udsMode = 0;
+            UdsNegAns(UdsAns);
+        }
+        break;
+    }
+    case 0x22: //查询
+    {
+        if (udsMode == 2)
+        {
+            switch (UdsAns.UdsSubSer)
+            {
+            case 0x01: //版本号查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = EbcAppSw >> 24;
+                UdsAns.Data2 = EbcAppSw >> 16;
+                UdsAns.Data3 = EbcAppSw >> 8;
+                UdsAns.Data4 = EbcAppSw;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x02: //解锁状态查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ebcd_st_unlockSensor;
+                UdsAns.Data2 = 0x00;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x03: //锁紧状态查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ebcd_st_lockSensor;
+                UdsAns.Data2 = 0x00;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x04: //落座状态查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ebcd_st_pedstSensor;
+                UdsAns.Data2 = 0x00;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x05: //互锁状态查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ((m_flg_HVlock1 & 0x01) << 1) | (m_flg_HVlock2 & 0x01);
+                UdsAns.Data2 = 0x00;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x06: //气压值查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ebcd_P_airSensor;
+                UdsAns.Data2 = 0x00;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x07: //锁紧压力查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = Test_LockPressure >> 8;
+                UdsAns.Data2 = Test_LockPressure;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x08: //锁紧次数查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ManuControlTimes >> 8;
+                UdsAns.Data2 = ManuControlTimes;
+                UdsAns.Data3 = 0x00;
+                UdsAns.Data4 = 0x00;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x09: //温度数据查询
+            {
+                UdsAns.Seq = 0;
+                UdsAns.Data1 = ebcd_T_plugin[0];
+                UdsAns.Data2 = ebcd_T_plugin[1];
+                UdsAns.Data3 = ebcd_T_plugin[2];
+                UdsAns.Data4 = ebcd_T_plugin[3];
+                UdsPosAns(UdsAns);
+                break;
+            }
+            default:
+                UdsNegAns(UdsAns);
+                break;
+            }
+        }
+        else
+        {
+            UdsNegAns(UdsAns);
+        }
+        break;
+    }
+    case 0x27: //控制
+    {
+        if (udsMode == 2)
+        {
+            switch (UdsAns.UdsSubSer)
+            {
+            case 0x01: //循环测试开启
+            {
+                ebcd_flg_ebcManCtrlEn = 1;
+                ebcd_flg_ebcManCtrlMode = 1;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x02:
+            {
+                ebcd_flg_ebcManCtrlEn = 1;
+                ebcd_flg_ebcManCtrlMode = 2;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            case 0x03:
+            {
+                ebcd_flg_ebcManCtrlEn = 1;
+                ebcd_flg_ebcManCtrlMode = 3;
+                UdsPosAns(UdsAns);
+                break;
+            }
+            default:
+                UdsNegAns(UdsAns);
+                break;
+            }
+        }
+        else
+        {
+            UdsNegAns(UdsAns);
+        }
+        break;
+    }
+    case 0x2E: //写入
+    {
+        if (udsMode == 2)
+        {
+            switch (UdsAns.UdsSubSer)
+            {
+            case 0x01:
+            {
+                LockDelayTime = (*(Data + 4) << 8) | *(Data + 5);
+                UdsPosAns(UdsAns);
+                EEPROMDrv_bSaveInstantUB = 1;
+                break;
+            }
+            case 0x02:
+            {
+                UnlockDelayTime = (*(Data + 4) << 8) | *(Data + 5);
+                UdsPosAns(UdsAns);
+                EEPROMDrv_bSaveInstantUB = 1;
+                break;
+            }
+            default:
+                UdsNegAns(UdsAns);
+                break;
+            }
+        }
+        else
+        {
+            UdsNegAns(UdsAns);
+        }
+        break;
+    }
+    default:
+        break;
+    }
 }
 void UdsPosAns(UdsAnsType UdsAnsData)
 {
-	MCANDrv_infoMsgS_TYPE infoMsgS;
-	infoMsgS.infoConfS.infoMsgParU.B.CAN=2;
-	infoMsgS.infoConfS.infoMsgParU.B.DIR = _MCAN_DIR_TX;
-	infoMsgS.infoConfS.infoMsgParU.B.DLC = 8;
-	infoMsgS.infoConfS.infoMsgParU.B.IDE = _MCAN_IDE_EXT;
-	infoMsgS.infoConfS.infoMsgIDUI = 0x1C00EAECUL;
-	infoMsgS.datMsgUBA[0] = 0x78;
-	infoMsgS.datMsgUBA[1] = UdsAnsData.UdsSer;
-	infoMsgS.datMsgUBA[2] = UdsAnsData.UdsSubSer;
-	infoMsgS.datMsgUBA[3] = UdsAnsData.Seq;
-	infoMsgS.datMsgUBA[4] = UdsAnsData.Data1;
-	infoMsgS.datMsgUBA[5] = UdsAnsData.Data2;
-	infoMsgS.datMsgUBA[6] = UdsAnsData.Data3;
-	infoMsgS.datMsgUBA[7] = UdsAnsData.Data4;
-	MCANDrv_SendMsg(infoMsgS);
+    MCANDrv_infoMsgS_TYPE infoMsgS;
+    infoMsgS.infoConfS.infoMsgParU.B.CAN = 2;
+    infoMsgS.infoConfS.infoMsgParU.B.DIR = _MCAN_DIR_TX;
+    infoMsgS.infoConfS.infoMsgParU.B.DLC = 8;
+    infoMsgS.infoConfS.infoMsgParU.B.IDE = _MCAN_IDE_EXT;
+    infoMsgS.infoConfS.infoMsgIDUI = 0x1C00EAECUL;
+    infoMsgS.datMsgUBA[0] = 0x78;
+    infoMsgS.datMsgUBA[1] = UdsAnsData.UdsSer;
+    infoMsgS.datMsgUBA[2] = UdsAnsData.UdsSubSer;
+    infoMsgS.datMsgUBA[3] = UdsAnsData.Seq;
+    infoMsgS.datMsgUBA[4] = UdsAnsData.Data1;
+    infoMsgS.datMsgUBA[5] = UdsAnsData.Data2;
+    infoMsgS.datMsgUBA[6] = UdsAnsData.Data3;
+    infoMsgS.datMsgUBA[7] = UdsAnsData.Data4;
+    MCANDrv_SendMsg(infoMsgS);
 }
 void UdsNegAns(UdsAnsType UdsAnsData)
 {
-	MCANDrv_infoMsgS_TYPE infoMsgS;
-	infoMsgS.infoConfS.infoMsgParU.B.CAN=2;
-	infoMsgS.infoConfS.infoMsgParU.B.DIR = _MCAN_DIR_TX;
-	infoMsgS.infoConfS.infoMsgParU.B.DLC = 8;
-	infoMsgS.infoConfS.infoMsgParU.B.IDE = _MCAN_IDE_EXT;
-	infoMsgS.infoConfS.infoMsgIDUI = 0x1C00EAECUL;
-	infoMsgS.datMsgUBA[0] = 0x7F;
-	infoMsgS.datMsgUBA[1] = UdsAnsData.UdsSer;
-	infoMsgS.datMsgUBA[2] = UdsAnsData.UdsSubSer;
-	infoMsgS.datMsgUBA[3] = 0x00;
-	infoMsgS.datMsgUBA[4] = 0x00;
-	infoMsgS.datMsgUBA[5] = 0x00;
-	infoMsgS.datMsgUBA[6] = 0x00;
-	infoMsgS.datMsgUBA[7] = 0x00;
-	MCANDrv_SendMsg(infoMsgS);
+    MCANDrv_infoMsgS_TYPE infoMsgS;
+    infoMsgS.infoConfS.infoMsgParU.B.CAN = 2;
+    infoMsgS.infoConfS.infoMsgParU.B.DIR = _MCAN_DIR_TX;
+    infoMsgS.infoConfS.infoMsgParU.B.DLC = 8;
+    infoMsgS.infoConfS.infoMsgParU.B.IDE = _MCAN_IDE_EXT;
+    infoMsgS.infoConfS.infoMsgIDUI = 0x1C00EAECUL;
+    infoMsgS.datMsgUBA[0] = 0x7F;
+    infoMsgS.datMsgUBA[1] = UdsAnsData.UdsSer;
+    infoMsgS.datMsgUBA[2] = UdsAnsData.UdsSubSer;
+    infoMsgS.datMsgUBA[3] = 0x00;
+    infoMsgS.datMsgUBA[4] = 0x00;
+    infoMsgS.datMsgUBA[5] = 0x00;
+    infoMsgS.datMsgUBA[6] = 0x00;
+    infoMsgS.datMsgUBA[7] = 0x00;
+    MCANDrv_SendMsg(infoMsgS);
 }

+ 9 - 5
System/Vehicle/Communication/CANNet.c

@@ -85,12 +85,13 @@ void CANNet_Init(void)
 // CAN0接收消息处理函数 VCU
 void CANNet_RecvMsgCAN0(MCANDrv_infoMsgS_TYPE infoMsgS)
 {
-	VcuDecodeFunction(infoMsgS.infoConfS.infoMsgIDUI, infoMsgS.datMsgUBA);
+	//直连状态下,CAN0空置,连接CAN1
 }
 // CAN1接收消息处理函数
 void CANNet_RecvMsgCAN1(MCANDrv_infoMsgS_TYPE infoMsgS)
 {
 	BcuDecodeFunction(infoMsgS.infoConfS.infoMsgIDUI, infoMsgS.datMsgUBA);
+	VcuDecodeFunction(infoMsgS.infoConfS.infoMsgIDUI, infoMsgS.datMsgUBA);
 }
 /*备注,CAN2接收报文时,需要配置接收报文的MO号,如果不配置,将进入不了CAN中断*/
 void CANNet_RecvMsgCAN2(MCANDrv_infoMsgS_TYPE infoMsgS)
@@ -100,6 +101,7 @@ void CANNet_RecvMsgCAN2(MCANDrv_infoMsgS_TYPE infoMsgS)
 //发送消息管理
 void CAN0Net_Manage1ms(void)
 {
+	/*
 	static UINT32 Can0TimerCounter = 0;
 	static UINT8 VcuIDIdx = 0;
 	MCANDrv_infoMsgS_TYPE infoMsgS;
@@ -126,27 +128,29 @@ void CAN0Net_Manage1ms(void)
 	{
 		Can0TimerCounter = Can0TimerCounter + 1;
 	}
+	*/
 }
 void CAN1Net_Manage1ms(void)
 {
+
 	static UINT32 Can1TimerCounter = 0;
 	static UINT8 BcuIDIdx = 0;
 	static BOOL BcuChkFlg = FALSE;
 	MCANDrv_infoMsgS_TYPE infoMsgS;
 	if (Can1TimerCounter % 100 == 0)
 	{
-		if (Can1TimerCounter % (Ebc2BcuOutTable[BcuIDIdx][1]) == 0)
+		if (Can1TimerCounter % (EbcOutTable[BcuIDIdx][1]) == 0)
 		{
-			CANNet_infoMsgTxConfSA[1].infoMsgIDUI = Ebc2BcuOutTable[BcuIDIdx][0];
+			CANNet_infoMsgTxConfSA[1].infoMsgIDUI = EbcOutTable[BcuIDIdx][0];
 			infoMsgS.infoConfS = CANNet_infoMsgTxConfSA[1];
 			memset(infoMsgS.datMsgUBA, 0x00, 8);
-			BcuEncodeFunction(Ebc2BcuOutTable[BcuIDIdx][0], &(infoMsgS.datMsgUBA[0]));
+			BcuEncodeFunction(EbcOutTable[BcuIDIdx][0], &(infoMsgS.datMsgUBA[0]));
 			MCANDrv_SendMsg(infoMsgS);
 		}
 		BcuIDIdx++;
 		BcuChkFlg = FALSE;
 	}
-	if (BcuIDIdx >= (sizeof(Ebc2BcuOutTable) / 8))
+	if (BcuIDIdx >= (sizeof(EbcOutTable) / 8))
 	{
 		BcuIDIdx = 0;
 		BcuChkFlg = TRUE;

+ 286 - 633
System/Vehicle/Communication/CanVar.c

@@ -6,613 +6,281 @@
  *      Author: QiXiang_CHENJIE
  */
 #include "CanVar.h"
-UINT32 BcuInTable[130] = {
-	0x1801EFF4,
-	0x1801FBF4,
-	0x1802FBF4,
-	0x1803FBF4,
-	0x1804FBF4,
-	0x1805FBF4,
-	0x1806FBF4,
-	0x1807FBF4,
-	0x1808FBF4,
-	0x1809FBF4,
-	0x180AFBF4,
-	0x180BFBF4,
-	0x180CFBF4,
-	0x180DFBF4,
-	0x180EFBF4,
-	0x180FFBF4,
-	0x1810FBF4,
-	0x1811FBF4,
-	0x1812FBF4,
-	0x1813FBF4,
-	0x1814FBF4,
-	0x1815FBF4,
-	0x1816FBF4,
-	0x1817FBF4,
-	0x1818FBF4,
-	0x1819FBF4,
-	0x181AFBF4,
-	0x181BFBF4,
-	0x181CFBF4,
-	0x181DFBF4,
-	0x181EFBF4,
-	0x181FFBF4,
-	0x1820FBF4,
-	0x1821FBF4,
-	0x1822FBF4,
-	0x1823FBF4,
-	0x1824FBF4,
-	0x1825FBF4,
-	0x1826FBF4,
-	0x1827FBF4,
-	0x1828FBF4,
-	0x1829FBF4,
-	0x182AFBF4,
-	0x182BFBF4,
-	0x182CFBF4,
-	0x182DFBF4,
-	0x182EFBF4,
-	0x182FFBF4,
-	0x1830FBF4,
-	0x1831FBF4,
-	0x1832FBF4,
-	0x1833FBF4,
-	0x1834FBF4,
-	0x1835FBF4,
-	0x1836FBF4,
-	0x1837FBF4,
-	0x1838FBF4,
-	0x1839FBF4,
-	0x183AFBF4,
-	0x183BFBF4,
-	0x183CFBF4,
-	0x183DFBF4,
-	0x183EFBF4,
-	0x183FFBF4,
-	0x1840FBF4,
-	0x1841FBF4,
-	0x1842FBF4,
-	0x1843FBF4,
-	0x1844FBF4,
-	0x1845FBF4,
-	0x1846FBF4,
-	0x1847FBF4,
-	0x1848FBF4,
-	0x1849FBF4,
-	0x184AFBF4,
-	0x184BFBF4,
-	0x184CFBF4,
-	0x184DFBF4,
-	0x184EFBF4,
-	0x184FFBF4,
-	0x1850FBF4,
-	0x1851FBF4,
-	0x1852FBF4,
-	0x1853FBF4,
-	0x1854FBF4,
-	0x1855FBF4,
-	0x1856FBF4,
-	0x1857FBF4,
-	0x1858FBF4,
-	0x1859FBF4,
-	0x185AFBF4,
-	0x185BFBF4,
-	0x185CFBF4,
-	0x185DFBF4,
-	0x185EFBF4,
-	0x185FFBF4,
-	0x1860FBF4,
-	0x1881EFF4,
-	0x1882EFF4,
-	0x1883EFF4,
-	0x1884EFF4,
-	0x1885EFF4,
-	0x1886EFF4,
-	0x1887EFF4,
-	0x1888EFF4,
-	0x1889EFF4,
-	0x18A0FBF4,
-	0x18A1FBF4,
-	0x18A2FBF4,
-	0x18A3FBF4,
-	0x18A4FBF4,
-	0x18A5FBF4,
-	0x18A6FBF4,
-	0x18E1EFF4,
-	0x18E2EFF4,
-	0x18E3EFF4,
-	0x18E4EFF4,
-	0x18FEDAF4,
-	0x18FF23F4,
-	0x18FF24F4,
-	0x18FF25F4,
-	0x18FF30F4,
+UINT32 BcuInTable[28] = {
+	0x1801D0F3,
+	0x1801D8F3,
+	0x1880D0F3,
+	0x1881D0F3,
+	0x1882D0F3,
+	0x1883D0F3,
+	0x1884D0F3,
+	0x1885D0F3,
+	0x1886D0F3,
+	0x1887D0F3,
+	0x1888D0F3,
+	0x1889D0F3,
+	0x188AD0F3,
+	0x18C1D0F3,
+	0x18C2D0F3,
+	0x18E1D0F3,
+	0x18E2D0F3,
+	0x18E3D0F3,
+	0x18E4D0F3,
+	0x18E5D0F3,
+	0x18E6D0F3,
+	0x18F1D0F3,
+	0x18F2D0F3,
+	0x18F3D0F3,
+	0x18F4D0F3,
+	0x18F5D0F3,
 	0x18FF45F4,
 	0x18FFC13A,
-	0x18FFD4F4,
-	0x18FFD5F4,
-	0x18FFD6F4,
-	0x18FFD7F4,
-	0x18FFD8F4,
-	0x18FFD9F4,
 };
-BOOL BcuRxShortError[130];
-BOOL BcuRxLongError[130];
-UINT8 BcuRxErrorCounter[130];
-UINT8 BcuRxFlag[130];
+
+BOOL BcuRxShortError[28];
+BOOL BcuRxLongError[28];
+UINT8 BcuRxErrorCounter[28];
+UINT8 BcuRxFlag[28];
 /************************************************************
  *BCU->Ebc解码变量存放区
  ************************************************************/
-UINT8 BMS13_ReqVIN = 0x00;						   // BMS请求VIN码标志,0-无请求 1-请求,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_DelTemp = 0x00;				   //电芯温差异常报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_OverTemp = 0x00;				   //电芯温度过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_PackOverHVolt = 0x00;			   // PACK过压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_PackLowHVolt = 0x00;			   // PACK欠压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-4级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_LowSOC = 0x00;				   // SOC过低报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-5级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_OverUcell = 0x00;				   //单体电压过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-6级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_LowUcell = 0x00;				   //单体电压欠压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-7级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_LowInsRes = 0x00;				   //绝缘报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-8级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_UcellUniformity = 0x00;		   //电池一致性差报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-9级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_OverChg = 0x00;				   //车载储能装置过充报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-10级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_OverSOC = 0x00;				   // SOC过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_SOCChangeFast = 0x00;			   // SOC跳变报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_BatSysNotMatch = 0x00;		   //可充电储能系统不匹配报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS11_Fult1_HVILFault = 0x00;				   //高压互锁报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_FaultNum = 0x00;				   // BMS当前发生的故障总数目(包括GB32960中规定的故障数目) 精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_CellOverDischrg = 0x00;		   //电芯过放故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_CellLowTemp = 0x00;			   //电芯低温报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_PackFireWarning = 0x00;		   //电池包火灾报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_OverDischrgCurr = 0x00;		   //放电电流超限报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_OverChrgCurrInTheDrive = 0x00;   //回充电流超限报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_CurrSensorErr = 0x00;			   //电流传感器故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_PowerSupplyErr = 0x00;		   // BMS低压供电电压异常报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_TMSErr = 0x00;				   //热管理机组故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_HeatingFilmErr = 0x00;		   //加热膜加热回路故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_PackSelfProtect = 0x00;		   //电池包自保护故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_MainLoopPrechrgErr = 0x00;	   //主回路预充或预检故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_AuxLoopPrechrgErr = 0x00;		   //辅件回路预充或预检故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ChrgInsLowErr = 0x00;			   //充电绝缘阻值低,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ACANLost = 0x00;				   // ACAN通讯故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_InnerCommunicationErr = 0x00;	   // BMS内部通信故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCDCErr = 0x00;				   // BMS-DC-DC故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_BranchBreakErr = 0x00;		   //支路断路故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_HeatRelayOpenErr = 0x00;		   //加热膜或TMS接触器故障无法闭合报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_HeatRelayWeldErr = 0x00;		   //加热膜或TMS接触器故障无法断开报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_MainPosRelayOpenErr = 0x00;	   //主正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_MainPosRelayWeldErr = 0x00;	   //主正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_MainNegRelayOpenErr = 0x00;	   //主负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_MainNegRelayWeldErr = 0x00;	   //主负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgPos1RelayOpenErr = 0x00;   //直流充电A正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgPos1RelayWeldErr = 0x00;   //直流充电A正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgNeg1RelayOpenErr = 0x00;   //直流充电A负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgNeg1RelayWeldErr = 0x00;   //直流充电A负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgPos2RelayOpenErr = 0x00;   //直流充电B正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgPos2RelayWeldErr = 0x00;   //直流充电B正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgNeg2RelayOpenErr = 0x00;   //直流充电B负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_DCChrgNeg2RelayWeldErr = 0x00;   //直流充电B负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ChrgConnectErr = 0x00;		   //插枪连接信号异常,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_ult2_OverDischrgCurrWhenInChrg = 0x00; //充电时放电电流过大,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_OverChrgCurrInTheChrg = 0x00;	   //充电电流超限报警,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ChrgNTCErr = 0x00;			   //充电插座NTC故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ChrgNTCTempOver = 0x00;		   //充电插座过温报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ELockErr = 0x00;				   //电子锁故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_FireDetectorEr = 0x00;		   //火警探测器故障,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ContiDischrgCurrOverLoad = 0x00; //持续回充过流故障,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_SOCDifferErr = 0x00;			   // SOC差异过大,0-正常  1-故障,精度_1,偏移量_0,单位_
-UINT8 BMS12_Fult2_ContiChrgCurrOverLoad = 0x00;	   //持续放电过流故障,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS1_MainPosRelaySt = 0x00;				   //主正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_MainNegRelaySt = 0x00;				   //主负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_PreChgRelaySt = 0x00;				   //预充继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_DCChrgPos1RelaySt = 0x00;			   //直流充正继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_DCChrgNeg1RelaySt = 0x00;			   //直流充负继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_DCChrgPos2RelaySt = 0x00;			   //直流充正继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_DCChrgNeg2RelaySt = 0x00;			   //直流充负继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_HeatPosRelaySt = 0x00;				   //加热正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_HeatNegRelaySt = 0x00;				   //加热负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
-UINT8 BMS1_SysSts = 0x00;						   //电池管理系统工作状态,0-初始化 1-自检完成允许上电 2-运行状态 3-高压切断 4-故障状态,精度_1,偏移量_0,单位_
-UINT8 BMS1_Life = 0x00;							   // BMS生命信号 精度_1,偏移量_1,单位_
-UINT8 BMS1_BalanceStatus = 0x00;				   // BMS当前均衡状态,0-未均衡 1-均衡中,精度_1,偏移量_0,单位_
-UINT8 BMS1_DCChrgConnectSt = 0x00;				   //直流充电枪连接状态,0-未连接 1-单枪连接 2-双枪连接 3-无效,精度_1,偏移量_0,单位_
-UINT8 BMS1_ChrgMode = 0x00;						   // BMS当前充电模式,0-未充电 1-直流充电 2-交流充电 3-其他充电模式,精度_1,偏移量_0,单位_
-UINT8 BMS1_ChrgStatus = 0x00;					   //充电状态,0-未充电 1-充电中 2-充电已完成 3-充电错误故障,精度_1,偏移量_0,单位_
-UINT8 BMS1_HeatingStatus = 0x00;				   //当前加热状态,0-未加热 1-加热中,精度_1,偏移量_0,单位_
-UINT8 BMS1_CoolingStatus = 0x00;				   //当前冷却状态,0-未冷却 1-冷却中,精度_1,偏移量_0,单位_
-UINT8 BMS2_SOC = 0x00;							   //电池包SOC 精度_0.4,偏移量_0,单位_
-UINT8 BMS2_SOH = 0x00;							   //电池包SOH 精度_0.4,偏移量_0,单位_
-UINT8 BMS2_FaultCode = 0x00;					   //故障码,见BMS_ErrCode,精度_1,偏移量_0,单位_
-UINT8 BMS2_FaultLevel = 0x00;					   //当前最高故障等级,0-正常 1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
-UINT8 BMS2_RqHVPoerOff = 0x00;					   // BMS下高压请求,0-无效 1-请求下高压 2-不请求下高压 3-无效,精度_1,偏移量_0,单位_
-UINT8 BMS2_Life = 0x00;							   // BMS生命信号 精度_1,偏移量_0,单位_
-UINT8 BMS4_InsDetectorSt = 0x00;				   // BMS绝缘检测状态,0-停止检测  1-激活检测,精度_1,偏移量_0,单位_
-UINT8 BMS8_Max_Temp = 0x00;						   //单体最高温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS8_Min_Temp = 0x00;						   //单体最低温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS8_Avg_Temp = 0x00;						   //单体平均温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS8_MaxTempSysNr = 0x00;					   //最高温度子系统号 精度_1,偏移量_0,单位_
-UINT8 BMS8_MaxTempNr = 0x00;					   //最高温度探针单体代号 精度_1,偏移量_0,单位_
-UINT8 BMS8_MinTempSysNr = 0x00;					   //最低温度子系统号 精度_1,偏移量_0,单位_
-UINT8 BMS8_MinTempNr = 0x00;					   //最低温度探针子系统代号 精度_1,偏移量_0,单位_
-UINT8 BMS7_MaxUcellSysNr = 0x00;				   //最高电压电池子系统号 精度_1,偏移量_0,单位_
-UINT8 BMS7_MinUcellSysNr = 0x00;				   //最低电压电池子系统号 精度_1,偏移量_0,单位_
-UINT8 BMS23_Gun1DCPosTemp = 0x00;				   // A枪DC+温度传感器温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS23_Gun1DCNegTemp = 0x00;				   // A枪DC-温度传感器温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS23_Gun2DCPosTemp = 0x00;				   // B枪DC+温度传感器温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS23_Gun2DCNegTemp = 0x00;				   // B枪DC-温度传感器温度 精度_1,偏移量_-40,单位_℃
-UINT8 BMS_Cell_TempN[64] = {0x00};				   //电池温度编号
-UINT8 BMS_SN_SysCode[24] = {0x00};				   //电池SN
-UINT8 BMS21_BattType = 0x00;					   //电池类型,1 -铅酸电池 2 -镍氢电池 3 -磷酸铁锂电池  4 -锰酸锂电池 5 -钴酸锂电池 6 -三元材料电池  7 -聚合物锂离子电池 8 -钛酸锂电池  9-超级电容 15-其他车载储能装置,精度_1,偏移量_0,单位_
-UINT8 BMS21_CoolType = 0x00;					   //电池冷却方式,0-其他冷却方式 1-自然冷却 2-风扇冷却 3-水冷却,精度_1,偏移量_0,单位_
-UINT8 BMS21_Manufacture = 0x00;					   //电池厂家,1-CATL 2-LS 3-MGL 4-SAMSUN 5-LG 6-GXGK 7-SUNWODA 8-Others,精度_1,偏移量_0,单位_
-UINT8 BMS21_ProtocolEditionH = 0x00;			   //通讯协议版本高位(例 - 版本为3 .1,则此处发3) 精度_1,偏移量_0,单位_
-UINT8 BMS21_ProtocolEditionL = 0x00;			   //通讯协议版本低位(例 - 版本为3 .1,则此处发1) 精度_1,偏移量_0,单位_
-UINT8 BMS9_TotCSCNum = 0x00;					   //电池系统中CSC总的数目 精度_1,偏移量_0,单位_
-UINT8 BMS9_PackTotTempNum = 0x00;				   // PACK中电芯温度点(探针)的总数目 精度_1,偏移量_0,单位_
-UINT8 BMS9_HVBranchNum = 0x00;					   //电池系统高压支路数 精度_1,偏移量_0,单位_
-UINT8 BMS9_SingleHVBranchCellNum = 0x00;		   //电池系统单支路电芯数 精度_1,偏移量_0,单位_
-UINT8 BMS9_BattSysNum = 0x00;					   //可充电储能系统数目(EV默认1,满足GB32960要求) 精度_1,偏移量_0,单位_
-UINT8 BMS9_BattSysSeqNum = 0x00;				   //可充电储能系统序号(EV默认1,满足GB32960要求) 精度_1,偏移量_0,单位_
-UINT8 BMS22_AvaiMaxSOC = 0x00;					   // PACK可用最高SOC(根据技术协议) 精度_0.4,偏移量_0,单位_
-UINT8 BMS22_AvaiMinSOC = 0x00;					   // PACK可用最低SOC(根据技术协议) 精度_0.4,偏移量_0,单位_
-UINT8 BMS22_AvaiMaxTemp = 0x00;					   // PACK可用温度上限(根据技术协议) 精度_1,偏移量_-40,单位_℃
-UINT8 BMS22_AvaiMinTemp = 0x00;					   // PACK可用温度下限(根据技术协议) 精度_1,偏移量_-40,单位_℃
-UINT8 BMS10_SubSysEncodingLen = 0x00;			   //可充电储能系统编码长度 精度_1,偏移量_0,单位_
-UINT8 BMS10_SubSysIdx = 0x00;					   //可充电储能系统编码 精度_1,偏移量_0,单位_
-UINT8 BMS10_SubSysErrNum = 0x00;				   //可充电储能装置故障总数 精度_1,偏移量_0,单位_
-UINT8 BMS28_ReqMode = 0x00;						   // BMS请求设定模式,0-关机模式 1-制冷模式 2-制热模式 3-自循环模式,精度_1,偏移量_0,单位_
-UINT8 BMS28_HVCmd = 0x00;						   //高压请求,0-请求上高压 1-请求下高压,精度_1,偏移量_0,单位_
-UINT8 BMS28_ChgSts = 0x00;						   //充电状态,0-非充电 1-充电,精度_1,偏移量_0,单位_
-UINT8 BMS28_HVRelaySts = 0x00;					   // BMS高压继电器状态,0-断开状态 1-闭合状态,精度_1,偏移量_0,单位_
-UINT8 BMS28_SetTemp = 0x00;						   //设定温度 精度_1,偏移量_-40,单位_
-UINT8 BMS28_Life = 0x00;						   // BMS生命帧 精度_1,偏移量_0,单位_
-UINT8 BMS28_CRC = 0x00;							   // CRC校验值 精度_1,偏移量_0,单位_
-UINT8 TMS_WorkStatus = 0x00;					   // TMS工作状态,0-关机模式 1-制冷模式 2-制热模式 3-自循环模式,精度_1,偏移量_0,单位_
-UINT8 TMS_HVRelayST = 0x00;						   // TMS高压继电器状态,0-断开状态 1-闭合状态,精度_1,偏移量_0,单位_
-UINT8 TMS_OutletTemp = 0x00;					   //出水温度(机组到电池) 精度_1,偏移量_-40,单位_
-UINT8 TMS_InletTemp = 0x00;						   //回水温度(电池到机组) 精度_1,偏移量_-40,单位_
-UINT8 TMS_Version = 0x00;						   // TMS软件版本 精度_0.1,偏移量_0,单位_
-UINT8 TMS_ErrCode = 0x00;						   // TMS故障码,见附件,精度_1,偏移量_0,单位_
-UINT8 TMS_FaultLevel = 0x00;					   // TMS故障码等级,0-无效 1-1级故障 2-2级故障 3-3级故障,精度_1,偏移量_0,单位_
-UINT8 BCU_SnMsgFlag = 0x00;						   // SN码收全标志位
-UINT16 BMS_Cell_Volt[384] = {0x00};				   //电芯电压
-UINT16 BMS11_PackOutsideVolt = 0x00;			   //电池包外侧电压 精度_0.1,偏移量_0,单位_V
-UINT16 BMS2_PackCurrent = 0x00;					   //电池包总电流,充电为负值,放电为正值 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS2_PackInsideVolt = 0x00;				   //电池包内侧电压 精度_0.1,偏移量_0,单位_V
-UINT16 BMS4_PosIsolation = 0x00;				   //母线正对车体绝缘电阻 精度_1,偏移量_0,单位_KΩ
-UINT16 BMS4_NegIsolation = 0x00;				   //母线负对车体绝缘电阻 精度_1,偏移量_0,单位_KΩ
-UINT16 BMS4_SysInsRes = 0x00;					   //系统绝缘电阻 精度_1,偏移量_0,单位_KΩ
-UINT16 BMS6_Max_Ucell = 0x00;					   //单体最高电压值 精度_0.001,偏移量_0,单位_V
-UINT16 BMS6_Min_Ucell = 0x00;					   //单体最低电压值 精度_0.001,偏移量_0,单位_V
-UINT16 BMS6_Avg_Ucell = 0x00;					   //电体电压平均值 精度_0.001,偏移量_0,单位_V
-UINT16 BMS6_SOE = 0x00;							   //剩余电量电量(SOE) 精度_0.01,偏移量_0,单位_Kwh
-UINT16 BMS7_MaxUcellNr = 0x00;					   //最高电压电池单体代号 精度_1,偏移量_0,单位_
-UINT16 BMS7_MinUcellNr = 0x00;					   //最低电压电池单体代号 精度_1,偏移量_0,单位_
-UINT16 BMS23_RemainChgTi = 0x00;				   //剩余充电时间 精度_1,偏移量_0,单位_min
-UINT16 BMS21_RateCap = 0x00;					   //电池包额定容量 精度_0.1,偏移量_0,单位_Ah
-UINT16 BMS21_RateHVolt = 0x00;					   //电池包额定电压 精度_0.1,偏移量_0,单位_V
-UINT16 BMS21_RatePower = 0x00;					   //电池包额定总能量 精度_0.1,偏移量_0,单位_kWh
-UINT16 BMS9_PackTotCellNum = 0x00;				   // PACK中单体电芯的总数目 精度_1,偏移量_0,单位_
-UINT16 BMS22_PackAvaiMaxVolt = 0x00;			   // PACK可用电压上限(根据技术协议) 精度_0.1,偏移量_0,单位_V
-UINT16 BMS22_PackAvaiMinVolt = 0x00;			   // PACK可用电压下限(根据技术协议) 精度_0.1,偏移量_0,单位_V
-UINT16 BMS_SoftwareVersion = 0x00;				   //软件版本 精度_0.1,偏移量_0,单位_
-UINT16 BMS_HardwareVersion = 0x00;				   //硬件版本 精度_0.1,偏移量_0,单位_
-UINT16 BMS3_MaxDischgPow = 0x00;				   //最大允许放电功率 精度_0.1,偏移量_0,单位_Kw
-UINT16 BMS3_MaxChgPow = 0x00;					   //最大允许充电功率 精度_0.1,偏移量_0,单位_Kw
-UINT16 BMS3_MaxInstantDischgPow = 0x00;			   //最大允许瞬时放电功率 精度_0.1,偏移量_0,单位_Kw
-UINT16 BMS3_MaxiInstantChgPow = 0x00;			   //最大允许瞬时充电功率 精度_0.1,偏移量_0,单位_Kw
-UINT16 BMS5_DischgCurMaxAllw = 0x00;			   //电池最大允许放电电流 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS5_ChrgCurMaxAllw = 0x00;				   //电池最大允许充电电流 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS5_InstChrgCurMaxAllw = 0x00;			   //动力电池允许最大瞬时充电电流 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS5_InstDischrgCurMaxAllw = 0x00;		   //电池允许最大瞬时放电电流 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS26_Bat_InstantConsume = 0x00;			   //动力电池瞬时能耗 精度_0.1,偏移量_0,单位_Wh
-UINT16 BMS26_Bat_TotalConsume = 0x00;			   //动力电池总能量能耗 精度_0.1,偏移量_0,单位_Wh
-UINT16 BMS26_ChgReqVoltage = 0x00;				   //充电所需电压 精度_0.1,偏移量_0,单位_V
-UINT16 BMS26_ChgReqCurrent = 0x00;				   //充电所需电流 精度_0.1,偏移量_-1000,单位_A
-UINT16 BMS28_HVVolt = 0x00;						   // BMS当前电压 精度_1,偏移量_0,单位_
-UINT16 TMS_ReqPow = 0x00;						   // TMS需求功率 精度_0.1,偏移量_0,单位_Kw
-UINT32 BMS1_RechrgCycels = 0x00;				   //充电次数 精度_1,偏移量_0,单位_
-UINT32 BMS14_TotalChargeAh = 0x00;				   //累积充入Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS14_TotalDischargeAh = 0x00;			   //累积放出Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS15_TotalChargeKwh = 0x00;				   //累计充入kWh 数 精度_0.1,偏移量_0,单位_KWh
-UINT32 BMS15_TotalDischargeKwh = 0x00;			   //累计放出kWh 数 精度_0.1,偏移量_0,单位_KWh
-UINT32 BMS16_TotalEneryECOChargeAh = 0x00;		   //累计动能回馈充入Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS16_TotalEneryECOChargeKwh = 0x00;		   //累计动能回馈充入kWh 数 精度_0.1,偏移量_0,单位_KWh
-UINT32 BMS17_TotalStationChargeAh = 0x00;		   //累计换电站充入Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS17_TotalStationChargeKwh = 0x00;		   //累计换电站充入kWh 数 精度_0.1,偏移量_0,单位_KWh
-UINT32 BMS18_TotalPoleChargeAh = 0x00;			   //累计插枪充电充入Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS18_TotalPoleChargeKwh = 0x00;			   //累计插枪充电充入kWh 数 精度_0.1,偏移量_0,单位_KWh
-UINT32 BMS19_SingleChargeAh = 0x00;				   //单次充电Ah 数 精度_0.1,偏移量_0,单位_Ah
-UINT32 BMS19_SingleChargeKwh = 0x00;			   //单次充电kWh 数 精度_0.1,偏移量_0,单位_KWh
-/*************************************************************
- *Ebc->Bcu组码变量存放区
- ************************************************************/
-UINT32 Ebc2BcuOutTable[5][2] = {
-	{0x1802F4EF, 100},
-	{0x1803F4EF, 100},
-	{0x18E1F4EF, 1000},
-	{0x18FF11F1, 100},
-	{0x18FF12F1, 100},
-};
-// UINT8 VCU_Life = 0x00;			   // VCU生命信号,精度_1,偏移_0,单位_
-
-UINT8 VCU_ReqHV = 0x00;	  //整车发给BMS的主回路上下高压指令,1 _PowerOn   2_PowerOff,精度_1,偏移_0,单位_
-UINT8 VCU_DCDCSts = 0x00; // DCDC 状态,1_停止(断开)2_运行中,精度_1,偏移_0,单位_
-UINT8 VCU_DCACSts = 0x00; //电动油泵状态,1_停止(断开)2_运行中,精度_1,偏移_0,单位_
-UINT8 VCU_DCAPSts = 0x00; //电动空压机状态,1_停止(断开)2_运行中,精度_1,偏移_0,单位_
-// UINT8 VCU_VehicleSpeed = 0x00;	   //车速,精度_1,偏移_0,单位_km/h
-UINT8 VCU_PosRlySts = 0x00;		   //整车端主正继电器状态,1_断开   2_闭合,精度_1,偏移_0,单位_
-UINT8 VCU_PosRlyErrSts = 0x00;	   //整车端主正继电器故障状态,0_正常 1_粘连 2 无法吸合,精度_1,偏移_0,单位_
-UINT8 VCU_PTCRlSts = 0x00;		   // PTC 继电器状态,1_断开   2_闭合,精度_1,偏移_0,单位_
-UINT8 VCU_PTCRlErrSts = 0x00;	   // PTC 继电器故障状态,0_正常 1_粘连" 2 无法吸合,精度_1,偏移_0,单位_
-UINT8 VCU_StopChgCmd = 0x00;	   //停止充电指令,1_未激活  2_激活,精度_1,偏移_0,单位_
-UINT8 VCU_HVInterlock = 0x00;	   //高压互锁故障,0_正常 1_故障,精度_1,偏移_0,单位_
-UINT8 VCU_AssistRlySts = 0x00;	   //辅助接触器状态,1_断开   2_闭合,精度_1,偏移_0,单位_
-UINT8 VCU_AssistRlyErrSts = 0x00;  //辅助接触器故障状态,0_正常 1_粘连" 2 无法吸合,精度_1,偏移_0,单位_
-UINT8 VCU_ACRlySts = 0x00;		   //空调压缩机接触器状态,1_断开   2_闭合,精度_1,偏移_0,单位_
-UINT8 VCU_ACRlyErrSts = 0x00;	   //空调压缩机接触器故障状态,0_正常 1_粘连" 2 无法吸合,精度_1,偏移_0,单位_
-UINT8 ISO_WorkStatus = 0x00;	   //绝缘检测仪工作状态,0_安全检查 1_ 工作  2_ 停止工作 3_设备故障,精度_1,偏移_0,单位_
-UINT8 ISO_FaultLevel = 0x00;	   //绝缘故障等级,0_无故障 1_1级故障 2_2级故障 3_3级故障 ,精度_1,偏移_0,单位_
-UINT16 ISO_PosResis = 0x00;		   //正极绝缘值,精度_1,偏移_0,单位_
-UINT16 ISO_NegResis = 0x00;		   //负极绝缘值,精度_1,偏移_0,单位_
-UINT8 VIN_FrameNo = 0;			   // VIN帧序号
-UINT8 EBC_State = 0x00;			   //换电控制器状态,0_行车状态 1_通讯状态 2_换电状态,精度_1,偏移_0,单位_
-UINT8 EBC_ForbidHVOn = 0x00;	   //禁止高压上电,0_允许高压上电 1_禁止高压上电,精度_1,偏移_0,单位_
-UINT8 EBC_RequestHVOff = 0x00;	   //请求高压下电,0_无效 1_请求高压下电,精度_1,偏移_0,单位_
-UINT8 EBC_ChgFaultFlag = 0x00;	   //充电故障标志,0_无故障 1_有故障,精度_2,偏移_0,单位_
-UINT8 EBC_LockupFaultFlag = 0x00;  //锁止机构故障标志,0_异常 1_正常,精度_1,偏移_0,单位_
-UINT8 EBC_ChgCnctOverTemp = 0x00;  //充电连接器过温故障标志,0_异常 1_正常,精度_1,偏移_0,单位_
-UINT8 EBC_DischgHIVLFlag = 0x00;   //放电互锁故障标志,0_异常 1_正常,精度_1,偏移_0,单位_
-UINT8 EBC_ChargeHIVLFlag = 0x00;   //充电互锁故障标志,0_异常 1_正常,精度_1,偏移_0,单位_
-UINT8 EBC_DChgCnctOverTemp = 0x00; //放电连接器过温故障标志,0_异常 1_正常,精度_1,偏移_0,单位_
-UINT8 EBC_FaultLevel = 0x00;	   //故障等级,0_无效 1_1级故障 2_2级故障 3_3级故障,精度_1,偏移_0,单位_
-UINT8 EBC_FaultCode = 0x00;		   //故障码,见附件,精度_1,偏移_0,单位_
-UINT8 EBC_ChargingStatus = 0x00;   //充电标志位,1_车载插枪充入 2_换电站充入,精度_1,偏移_0,单位_
-UINT8 EBC_ActiveHeatReq = 0x00;	   //主动预热请求,0_无主动预热请求 1_请求主动预热 2~3预留,精度_1,偏移_0,单位_
-UINT8 EBC_AirPressure = 0x00;	   //气压值,精度_0.01,偏移_0,单位_Mpa
-// UINT8 EBC_Life = 0x00;			   // LIFE 信号,精度_1,偏移_0,单位_
-//  UINT8 EBC_ChgPos1Temp = 0x00;	   //充电正1温度(保留),精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_ChgNeg1Temp = 0x00;	   //充电负1温度(保留),精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_ChgPos2Temp = 0x00;	   //充电正2温度(保留),精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_ChgNeg2Temp = 0x00;	   //充电负2温度(保留),精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_DchgPos1Temp = 0x00;	   //放电正1温度,精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_DchgNeg1Temp = 0x00;	   //放电负1温度,精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_DchgPos2Temp = 0x00;	   //放电正2温度,精度_1,偏移_-40,单位_℃
-//  UINT8 EBC_DchgNeg2Temp = 0x00;	   //放电负2温度,精度_1,偏移_-40,单位_℃
-/*************************************************************
- *Vcu->Ebc组码变量存放区
- ************************************************************/
-UINT8 EBC_VinMsgFlag = 0x00; // EBC收全VIN标志位
-UINT32 VcuInTable[8] = {
-	0x1802F3D0,
+UINT8 BMS_ReqVIN = 0x00;					  //是否请求VIN码,0:预留;1:请求VIN;2:不请求VIN;3:无效;,Re-1,Off-0,
+UINT8 BMS_ReqHVOff = 0x00;					  //是否请求下高压,0:预留;1:请求下高压;2:不请求下高压;3:无效;,Re-1,Off-0,
+UINT8 BMS_ProtocolEditionH = 0x00;			  //通讯协议版本高位(例 : 版本为3 .1, 则此处发3),	, Re - 1, Off - 0,
+UINT8 BMS_ProtocolEditionL = 0x00;			  //通讯协议版本低位(例 : 版本为3 .1, 则此处发1),	, Re - 1, Off - 0,
+UINT8 BMS_CharDevNum = 0x00;				  //可充电装置系统序号(BMS是整车中可充电装置系统中的第几个, 需要整车告知),1,Re-1,Off-0,
+UINT8 BMS_FtPosRly = 0x00;					  //主正继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegRly = 0x00;					  //主负继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtPosCharRly1 = 0x00;				  //充正1继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegCharRly1 = 0x00;				  //充负1继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtPosCharRly2 = 0x00;				  //充正2继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegCharRly2 = 0x00;				  //充负2继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtHeatRly1 = 0x00;				  //加热1/正继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtHeatRly2 = 0x00;				  //加热2/负继电器粘连故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_StPosRly = 0x00;					  //主正继电器状态(如继电器状态由BMS检测),0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StNegRly = 0x00;					  //主负继电器状态(如继电器状态由BMS检测),0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StPreCharRly = 0x00;				  //预充继电器状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StPosCharRly1 = 0x00;				  //直流充正继电器1状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StNegCharRly1 = 0x00;				  //直流充负继电器1状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StPosCharRly2 = 0x00;				  //直流充正继电器2状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_StNegCharRly2 = 0x00;				  //直流充负继电器2状态,0:预留;1:开启;2:闭合;3:无效;,Re-1,Off-0,
+UINT8 BMS_FtAuxRelayWeld = 0x00;			  //附件继电器粘连故障(保留),0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_BraOpenCirc = 0x00;				  //支路断路故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtBackCharCurrOutLim = 0x00;		  //回充电流超限报警,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtPosRlyOpen = 0x00;				  //主正继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegRlyOpen = 0x00;				  //主负继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtPosCharRly1Open = 0x00;			  //直流充电正1继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtPosCharRly2Open = 0x00;			  //直流充电正2继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegCharRly1Open = 0x00;			  //直流充电负1继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNegCharRly2Open = 0x00;			  //直流充电负2继电器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtTMSContClose = 0x00;			  //加热膜或TMS接触器无法断开报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtTMSContOpen = 0x00;				  //加热膜或TMS接触器无法闭合报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtTMS = 0x00;						  //热管理系统故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_Ft24VSpy = 0x00;					  // BMS 24V供电异常报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtPACKSelfProt = 0x00;			  //电池包自保护报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtCharSockTempOver = 0x00;		  //充电插座过温报警,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtTempOutCtrl = 0x00;				  //热失控报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_StPosHeatRly = 0x00;				  //加热正继电器状态,0:保留;1:开启;2:闭合;3:无效,Re-1,Off-0,
+UINT8 BMS_StNegHeatRly = 0x00;				  //加热负继电器状态,0:保留;1:开启;2:闭合;3:无效,Re-1,Off-0,
+UINT8 BMS_CharSysNum = 0x00;				  //可充电储能子系统总数(保留),,Re-1,Off-0,
+UINT8 BMS_FtCode = 0x00;					  //电池系统故障码,详见附表电池系统故障码列表,Re-1,Off-0,
+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,
+UINT8 BMS_ST1Counter = 0x00;				  // B2V_ST1的生命信号,0~14循环,15:信号无效,Re-1,Off-0,
+UINT8 BMS_Mode = 0x00;						  // BMS当前状态,0:预留;1:高压上电;2:高压下电;3:无效;,Re-1,Off-0,
+UINT8 BMS_AuxRlySt = 0x00;					  //附件继电器状态,0:开启;1:闭合;,Re-1,Off-0,
+UINT8 BMS_BattBalaSt = 0x00;				  // BMS当前均衡状态,0:未开启均衡;1:开启均衡;,Re-1,Off-0,
+UINT8 BMS_CharGunSt = 0x00;					  //直流充电枪连接状态,0:未连接1 : 连接, Re - 1, Off - 0,
+UINT8 BMS_CharMode = 0x00;					  // BMS当前充电模式,0:预留1 : 直流充电 2 : 交流充电 3 : 其他充电, Re - 1, Off - 0,
+UINT8 BMS_CharSt = 0x00;					  //充电状态,0:可以充电1 : 正在充电 2 : 充电结束 3 : 充电故障, Re - 1, Off - 0,
+UINT8 BMS_FtLvl = 0x00;						  //当前最高故障等级,0:正常1 : 1级 轻微故障 2 : 2级 较严重故障 3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellTempDiff = 0x00;			  //电芯温差异常报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellTempHigh = 0x00;			  //电芯温度过高报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtPACKOverVolt = 0x00;			  // PACK过压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtPACKUndeVolt = 0x00;			  // PACK欠压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtSOCLow = 0x00;					  // SOC过低报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellOverVolt = 0x00;			  //单体电压过高报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellUndeVolt = 0x00;			  //单体电压欠压报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtIns = 0x00;						  //绝缘报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellOverVoltDiff = 0x00;		  //单体压差过大,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCharCurrOver = 0x00;			  //充电电流过大报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtDisCharCurrOver = 0x00;			  //放电电流过大报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtCellTempLow = 0x00;				  //电芯温度过低报警,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtBranVoltDifOver = 0x00;			  //支路压差过大报警(存在并联支路的系统),0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtBMSHardWare = 0x00;				  // BMS硬件故障,0:无故障; 1:1级 轻微故障; 2:2级 较严重故障3 : 3级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtSOCHigh = 0x00;					  // SOC过高报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtSOCJump = 0x00;					  // SOC跳变报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtInCom = 0x00;					  // BMS内部通信故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtSysMism = 0x00;					  // BMS/可充电储能系统不匹配报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtHvIntLock = 0x00;				  //高压互锁报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtSmoke = 0x00;					  //火警探测器故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtFire = 0x00;					  //电池包火灾报警,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtNum = 0x00;						  // BMS当前发生的故障总数目(包括GB32960中规定的故障数目),,Re-1,Off-0,
+UINT8 BMS_PackSOC = 0x00;					  //电池包SOC,,Re-0.4,Off-0,
+UINT8 BMS_PackSOH = 0x00;					  //电池包SOH,,Re-0.4,Off-0,
+UINT8 BMS_MaxCellTemp = 0x00;				  //单体最高温度,,Re-1,Off--50,℃
+UINT8 BMS_MinCellTemp = 0x00;				  //单体最低温度,,Re-1,Off--50,℃
+UINT8 BMS_AverCellTemp = 0x00;				  //单体平均温度,,Re-1,Off--50,℃
+UINT8 BMS_MaxCellTempCSC = 0x00;			  //最高温度电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MaxCellTempNum = 0x00;			  //最高温度电芯所在子系统(CSC)内温度探针编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MinCellTempCSC = 0x00;			  //最低温度电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MinCellTempNum = 0x00;			  //最低温度电芯所在子系统(CSC)内温度探针编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MaxCellVoltCSC = 0x00;			  //最高电压电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MaxCellVoltNum = 0x00;			  //最高电压电芯所在子系统(CSC)内单体编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MinCellVoltCSC = 0x00;			  //最低电压电芯所在子系统(CSC)编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_MinCellVoltNum = 0x00;			  //最低电压电芯所在子系统(CSC)内单体编号,范围(1~255),Re-1,Off-0,
+UINT8 BMS_InsDeteSt = 0x00;					  // BMS绝缘检测状态,0:停止检测;1:激活检测;,Re-1,Off-0,
+UINT8 BMS_FtCharInsLow = 0x00;				  //充电绝缘阻值低,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtCurrSenr = 0x00;				  //电流传感器故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtHeatingFilm = 0x00;				  //加热膜加热回路故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtMainLoopPreChar = 0x00;			  //主回路预充或预检故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtAuxLoopPreChar = 0x00;			  //辅件回路预充或预检故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtACANLost = 0x00;				  // ACAN/整车CAN通讯故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtDCDC = 0x00;					  // BMS-DC-DC故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtSOCDif = 0x00;					  // SOC差异过大,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtCellOverDisChar = 0x00;			  //电芯过放故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtCharOver = 0x00;				  //车载储能装置过充报警,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtContDisCharCurrOverLoad = 0x00;	  //持续回充过流故障,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_FtContCharCurrOverLoad = 0x00;	  //持续放电过流故障,0:正常;1:1级 轻微故障;2:2级 较严重故障3 : 10级 最严重故障, Re - 1, Off - 0,
+UINT8 BMS_Gun1DCNegTemp = 0x00;				  //充电口1负温感值,,Re-1,Off--40,℃
+UINT8 BMS_Gun1DCPosTemp = 0x00;				  //充电口1正温感值,,Re-1,Off--40,℃
+UINT8 BMS_Gun2DCNegTemp = 0x00;				  //充电口2负温感值,,Re-1,Off--40,℃
+UINT8 BMS_Gun2DCPosTemp = 0x00;				  //充电口2正温感值,,Re-1,Off--40,℃
+UINT8 BMS_CurrHeatSt = 0x00;				  //当前加热状态,0:未加热;1:加热中;2:预留;3:无效;,Re-1,Off-0,
+UINT8 BMS_CurrCoolSt = 0x00;				  //当前冷却状态,0:未冷却;1:冷却中;2:预留;3:无效;,Re-1,Off-0,
+UINT8 BMS_FtCharCnct = 0x00;				  //插枪连接信号异常,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtOverDisCharCurrDuringChar = 0x00; //充电时放电电流过大,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtCharNTC = 0x00;					  //充电插座NTC故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_FtELock = 0x00;					  //电子锁故障,0:正常; 1:故障,Re-1,Off-0,
+UINT8 BMS_CellVoltFramNum = 0x00;			  //单体电压帧序号,有效值1~255,Re-1,Off-0,
+UINT8 BMS_CellTempFramNum = 0x00;			  //温度帧序号,有效值1~255,Re-1,Off-0,
+UINT8 BMS_CSC_Code = 0x00;					  //子系统编号CSC,有效值1~255,Re-1,Off-0,
+UINT8 BMS_CellTemp[64] = {0x00};			  //当前CSC下的第N个探针的温度,255 "Invalid" 0xFF 无效有效值 0 ~254, 单位 ℃, 范围(-50 ~204)℃, , Re - 1, Off-- 50,℃
+UINT8 BMS_Checksum = 0x00;					  //电池编码信息1的CheckSum,Byte0=Byte1 XOR Byte2 XOR Byte3 XOR Byte4 XOR Byte5 XOR Byte6 XOR Byte7,Re-1,Off-0,
+UINT8 BMS_PackComp = 0x00;					  //电池厂家,1:"CATL" 2:"Li Shen" 3:"MGL" 4:"SAMSUN" 5:"LG",Re-1,Off-0,
+UINT8 BMS_BattCodeLeng = 0x00;				  //电池编码长度,0:Do not transmit this Code,Re-1,Off-0,
+UINT8 BMS_SN[27] = {0x00};					  //电池编码(SN)字符1(ASCII),,Re-1,Off-0,
+UINT8 BMS_BattType = 0x00;					  //电池类型,1:铅酸电池; 2:镍氢电池; 3:磷酸铁锂电池; 4:锰酸锂电池; 5:钴酸锂电池; 6:三元材料电池; 7:聚合物锂离子电池; 8:钛酸锂电池; 9:超级电容; 10~13:保留; 14:燃料电池;15:保留,Re-1,Off-0,
+UINT8 BMS_CoolType = 0x00;					  //电池冷却方式,0:其他冷却方式1 : 自然冷却 2 : 风扇冷却 3 : 水冷却, Re - 1, Off - 0,
+UINT8 BMS_CSC_Total = 0x00;					  //电池系统中CSC总的数目,,Re-1,Off-0,
+UINT8 BMS_CellVoltLevel = 0x00;				  //单体平台电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
+UINT8 BMS_CellMinVolt = 0x00;				  //单体可用最低电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
+UINT8 BMS_CellMaxVolt = 0x00;				  //单体可用最高电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,Re-0.1,Off-0,V
+UINT8 BMS_HVBranNum = 0x00;					  //电池系统高压支路数,,Re-1,Off-0,
+UINT8 BMS_SingleHVBranchCellNum = 0x00;		  //电池系统单支路电芯数,,Re-1,Off-0,
+UINT8 BMS_ReqMode = 0x00;					  // BMS请求设定模式,0:关机模式1 : 制冷模式 2 : 制热模式 3 : 自循环模式, Re - 1, Off - 0,
+UINT8 BMS_HVCmd = 0x00;						  //高压请求,0:请求上高压1 : 请求下高压, Re - 1, Off - 0,
+UINT8 BMS_ChgSts = 0x00;					  //充电状态,0:非充电1 : 充电, Re - 1, Off - 0,
+UINT8 BMS_HVRelaySts = 0x00;				  // BMS高压继电器状态,0:断开状态; 1:闭合状态; 2~3:无效,Re-1,Off-0,
+UINT8 BMS_SetTemp = 0x00;					  //设定温度,,Re-1,Off--40,
+UINT8 BMS_Life = 0x00;						  // BMS生命帧,,Re-1,Off-0,
+UINT8 BMS_CRC = 0x00;						  // CRC校验值,,Re-1,Off-0,
+UINT8 TMS_WorkStatus = 0x00;				  // TMS工作状态,0:关机模式1 : 制冷模式 2 : 制热模式 3 : 自循环模式, Re - 1, Off - 0,
+UINT8 TMS_HVRelayST = 0x00;					  // TMS高压继电器状态,0:断开状态; 1:闭合状态; 2~3:无效,Re-1,Off-0,
+UINT8 TMS_OutletTemp = 0x00;				  //出水温度(机组到电池),255:无效,Re-1,Off--40,
+UINT8 TMS_InletTemp = 0x00;					  //回水温度(电池到机组),255:无效,Re-1,Off--40,
+UINT8 TMS_ErrCode = 0x00;					  // TMS故障码,0:无故障; 出现 1 种以上循环发送,Re-1,Off-0,
+UINT8 TMS_FaultLevel = 0x00;				  // TMS故障码等级,0:无效1 : 1级故障 2 : 2级故障 3 : 3级故障, Re - 1, Off - 0,
+UINT16 BMS_SoftwareVersion = 0x00;			  //软件版本号:RyyyBzzz(R为软件版本、B为测试版本、正式版本不带B)  ,yyy:0~254,精度1,255:无效,不显示;zzz:0~254,精度1,255:无效,不显示;
+UINT16 BMS_HardwareVersion = 0x00;			  //硬件版本号:VyyyBzzz(V为硬件版本、B为测试版本、正式版本不带B)  ,,Re-1,Off-0,
+UINT16 BMS_PackCurr = 0x00;					  //电池包总电流,充电为负值,放电为正值,,Re-0.1,Off--1000,A
+UINT16 BMS_MaxCharCurr = 0x00;				  //电池包最大回充电流,,Re-0.1,Off--1000,A
+UINT16 BMS_MaxDisCharCurr = 0x00;			  //电池包最大放电电流,,Re-0.1,Off--1000,A
+UINT16 BMS_PosIns = 0x00;					  //母线正对车体绝缘电阻,,Re-1,Off-0,KΩ
+UINT16 BMS_NegIns = 0x00;					  //母线负对车体绝缘电阻,,Re-1,Off-0,KΩ
+UINT16 BMS_BattVolt = 0x00;					  //电池包内侧电压,,Re-0.1,Off-0,V
+UINT16 BMS_LinkVolt = 0x00;					  //电池包外侧电压,,Re-0.1,Off-0,V
+UINT16 BMS_MaxCellVolt = 0x00;				  //单体最高电压值,,Re-0.001,Off-0,V
+UINT16 BMS_AverCellVolt = 0x00;				  //电芯电压平均值,,Re-0.001,Off-0,V
+UINT16 BMS_MinCellVolt = 0x00;				  //电芯最低电压值,,Re-0.001,Off-0,V
+UINT16 BMS_ContChrgCurr = 0x00;				  // BMS允许的持续回充电流,,Re-0.1,Off-0,A
+UINT16 BMS_ContDisCharCurr = 0x00;			  // BMS允许的持续放电电流,,Re-0.1,Off--1000,A
+UINT16 BMS_CharReqVolt = 0x00;				  //充电所需电压(交流),,Re-0.1,Off-0,V
+UINT16 BMS_CharReqCurr = 0x00;				  //充电所需电流(交流),,Re-0.1,Off--1000,A
+UINT16 BMS_SysInsRes = 0x00;				  //系统绝缘电阻,,Re-1,Off-0,KΩ
+UINT16 BMS_MaxDisCharPwr = 0x00;			  //最大允许放电功率,,Re-0.1,Off-0,kw
+UINT16 BMS_MaxCharPwr = 0x00;				  //最大允许充电功率,,Re-0.1,Off-0,kw
+UINT16 BMS_ContDisCharPwr = 0x00;			  // BMS允许的持续放电功率,,Re-0.1,Off-0,kw
+UINT16 BMS_ContCharPwr = 0x00;				  // BMS允许的持续充电功率,,Re-0.1,Off-0,kw
+UINT16 BMS_InstEngyCons = 0x00;				  //动力电池瞬时百公里能耗,,Re-0.1,Off-0,kwh
+UINT16 BMS_TotalEngyCons = 0x00;			  //动力电池总/平均百公里能耗,,Re-0.1,Off-0,kwh
+UINT16 BMS_SOE = 0x00;						  //剩余电量,,Re-0.01,Off-0,kwh
+UINT16 BMS_RmanCharTime = 0x00;				  //剩余充电时间,,Re-1,Off-0,min
+UINT16 BMS_CharNum = 0x00;					  //充电次数,,Re-1,Off-0,
+UINT16 BMS_CellVolt[384] = {0x00};			  //电芯的电压,65535 "Invalid" 0xFFFF 无效有效值 0 ~65534, 范围(0 ~65.534) V, Re - 0.001, Off - 0, V
+UINT16 BMS_BattRateCap = 0x00;				  //电池包额定容量,有效值 0~65534,65535 "Signal Invalid" 无效,Re-1,Off-0,Ah
+UINT16 BMS_BattRateVolt = 0x00;				  //电池包额定电压,有效值 0~6553.4,65535 "Signal Invalid" 无效,Re-0.1,Off-0,V
+UINT16 BMS_BattRateEngy = 0x00;				  //电池包额定能量,有效值 0~6553.4,65535 "Signal Invalid" 无效,Re-0.1,Off-0,kWh
+UINT16 BMS_CellTotal = 0x00;				  // PACK中单体电芯的总数目,,Re-1,Off-0,
+UINT16 BMS_TempTotal = 0x00;				  // PACK中电芯温度点(探针)的总数目,,Re-1,Off-0,
+UINT16 BMS_SingleCharEngy = 0x00;			  //单次充电kWh 数,,Re-0.1,Off-0,KWh
+UINT16 BMS_SingleCharCapy = 0x00;			  //单次充电Ah 数,,Re-0.1,Off-0,Ah
+UINT16 BMS_HVVolt = 0x00;					  // BMS当前电压,,Re-1,Off-0,
+UINT16 TMS_ReqPow = 0x00;					  // TMS需求功率,65535:无效,Re-0.1,Off-0,Kw
+UINT32 BMS_TotalCharEngy = 0x00;			  //累计充入kWh 数,,Re-0.1,Off-0,KWh
+UINT32 BMS_TotalDisCharEngy = 0x00;			  //累计放出kWh 数,,Re-0.1,Off-0,KWh
+UINT32 BMS_TotalBackCharEngy = 0x00;		  //累计动能回馈充入kWh 数,,Re-0.1,Off-0,KWh
+UINT32 BMS_TotalStaCharEngy = 0x00;			  //累计换电站充入kWh 数,,Re-0.1,Off-0,KWh
+UINT32 BMS_TotalGunCharEngy = 0x00;			  //累计插枪充电充入kWh 数,,Re-0.1,Off-0,KWh
+UINT32 BMS_TotalGunCharCapy = 0x00;			  //累计插枪充电充入Ah 数,,Re-0.1,Off-0,Ah
+UINT32 BMS_TotalCharCapy = 0x00;			  //累计充入Ah 数,,Re-0.1,Off-0,Ah
+UINT32 BMS_TotalDisCharCapy = 0x00;			  //累计放出Ah 数,,Re-0.1,Off-0,Ah
+UINT32 BMS_TotalBackCharCapy = 0x00;		  //累计动能回馈充入Ah 数,,Re-0.1,Off-0,Ah
+UINT32 BMS_TotalStaCharCapy = 0x00;			  //累计换电站充入Ah 数,,Re-0.1,Off-0,Ah
+/*VCU->EBC信号*****************************************/
+UINT32 VcuInTable[4] = {
+	0x18F101D0,
+	0x18F103D0,
 	0x18E1F3D0,
-	0x18FEDA17,
-	0x18FF15F6,
-	0x18FF43A8,
-	0x18FF44A8,
-	0x18FF4617,
-	0x18FF48A8,
-};
-UINT8 VcuRxFlag[8] = {0};
-BOOL VcuRxShortError[8] = {0};
-BOOL VcuRxLongError[8] = {0};
-UINT8 VcuRxErrorCount[8] = {0};
-UINT8 Checksum = 0x00;			   //(No)最后7个字节checksum,Byte0=Byte1 XOR Byte2 XOR Byte3 XOR Byte4 XOR Byte5 XOR Byte6 XOR Byte7,精度_1,偏移_0
-UINT8 VCU_Life = 0x00;			   // VCU生命信号,0~14循环,15_信号无效,精度_1,偏移_0
-UINT8 VCU_HvOnOff = 0x00;		   //高压上下电指令,0_预留;1_高压上电;2_高压下电;3_无效;,精度_1,偏移_0
-UINT8 VCU_AuxOnOff = 0x00;		   //(No)附件高压上下电指令(保留),0_预留;1_高压上电;2_高压下电;3_无效;,精度_1,偏移_0
-UINT8 VCU_VehicleSpeed = 0x00;	   //车速,有效值 0~255,单位 km/h,范围(0~255) km/h,偏移量 0,比例因子 1km/h/bit,精度_1,偏移_0
-UINT8 VCU_HeatOnOff = 0x00;		   //加热开启关闭指令(保留),0_预留;1_加热开启;2_加热关断;3_无效;,精度_1,偏移_0
-UINT8 VCU_MainPosRlySts = 0x00;	   //主正继电器状态(如继电器状态由整车检测)(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_MainNegRlySts = 0x00;	   //主负继电器状态(如继电器状态由整车检测)(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_PreChgRlySts = 0x00;	   //预充继电器状态(如继电器状态由整车检测)(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_AuxRlySts = 0x00;		   //附件继电器状态(如继电器状态由整车检测)(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_MainMotRlySts = 0x00;	   //主电机接触器状态(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_MainMotRlyErrSts = 0x00; //主电机接触器故障(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist1RlySts = 0x00;	   //辅件1接触器状态(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist1RlyErrSts = 0x00; //辅件1接触器故障(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist2RlySts = 0x00;	   //辅件2接触器状态(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist2RlyErrSts = 0x00; //辅件2接触器故障(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist3RlySts = 0x00;	   //辅件3接触器状态(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist3RlyErrSts = 0x00; //辅件3接触器故障(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist4RlySts = 0x00;	   //辅件4接触器状态(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_Assist4RlyErrSts = 0x00; //辅件4接触器故障(保留),0_预留;1_开启;2_闭合;3_无效;,精度_1,偏移_0
-UINT8 VCU_VIN[17] = {0x00};
-UINT8 DrvMotPosRySts = 0x00;	 //驱动电机主正继电器状态,0_断开;1_闭合;2_粘连;,精度_1,偏移_0
-UINT8 VehSts = 0x00;			 //车辆状态,1_启动 2_熄火,精度_1,偏移_0
-UINT8 BrakePedal = 0x00;		 //制动开度 精度_0.005,偏移_0
-UINT8 HandbrakeSts = 0x00;		 //手刹信号,0_未拉手刹1_已拉手刹,其它值无效,精度_1,偏移_0
-UINT8 GearPos = 0x00;			 //档位,最小值__-1,最大值 14 ,0x0F表示无效,_-1 代表倒档 R;0 代表空挡 N;大于 0 代表前进档 D;,精度_1,偏移_0
-UINT16 VehSpd = 0x00;			 //车速 精度_0.00390625,偏移_0
-UINT32 VCU_TotalDistance = 0x00; //累计行驶里程,0~16777215,精度_1,偏移_0
-/*************************************************************
- *Ebc->Vcu组码变量存放区
- ************************************************************/
-UINT32 Ebc2VcuOutTable[25][2] = {
-	{0x1801D0F3, 100},
-	{0x1801D8F3, 1000},
-	{0x1880D0F3, 100},
-	{0x1881D0F3, 100},
-	{0x1882D0F3, 100},
-	{0x1883D0F3, 100},
-	{0x1884D0F3, 100},
-	{0x1885D0F3, 100},
-	{0x1886D0F3, 100},
-	{0x1887D0F3, 1000},
-	{0x18C1D0F3, 100},
-	{0x18C2D0F3, 200},
-	{0x18E1D0F3, 1000},
-	{0x18E2D0F3, 1000},
-	{0x18E3D0F3, 1000},
-	{0x18E4D0F3, 1000},
-	{0x18E5D0F3, 100},
-	{0x18E6D0F3, 100},
-	{0x18F1D0F3, 1000},
-	{0x18F2D0F3, 1000},
-	{0x18F3D0F3, 1000},
-	{0x18FEF8A7, 100},
-	{0x18FF45F4, 1000},
-	{0x18FFC13A, 1000},
-	{0x18FFF8A7, 100},
-};
-UINT8 ReqVIN = 0x00;					   //是否请求VIN码,0_预留;1_请求VIN;2_不请求VIN;3_无效;,精度_1,_偏移_0,单位_
-UINT8 ReqHVOff = 0x00;					   //是否请求下高压,0_预留;1_请求下高压;2_不请求下高压;3_无效;,精度_1,_偏移_0,单位_
-UINT8 ChgSysNum = 0x00;					   //可充电装置系统序号(BMS是整车中可充电装置系统中的第几个, 需要整车告知),1,精度_1,_偏移_0,单位_
-UINT8 Fult2_MainPosRelayWeldErr = 0x00;	   //主正继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_MainNegRelayWeldErr = 0x00;	   //主负继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgPos1RelayWeldErr = 0x00;  //充正1继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgNeg1RelayWeldErr = 0x00;  //充负1继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgPos2RelayWeldErr = 0x00;  //充正2继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgNeg2RelayWeldErr = 0x00;  //充负2继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 HeatPosRelayWeldErr = 0x00;		   //加热正继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 HeatNegRelayWeldErr = 0x00;		   //加热负继电器粘连故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 MainPosRelaySt = 0x00;			   //主正继电器状态(如继电器状态由BMS检测),0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 MainNegRelaySt = 0x00;			   //主负继电器状态(如继电器状态由BMS检测),0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 PreChgRelaySt = 0x00;				   //预充继电器状态,0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 DCChrgPos1RelaySt = 0x00;			   //直流充正继电器1状态,0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 DCChrgNeg1RelaySt = 0x00;			   //直流充负继电器1状态,0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 DCChrgPos2RelaySt = 0x00;			   //直流充正继电器2状态,0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 DCChrgNeg2RelaySt = 0x00;			   //直流充负继电器2状态,0_预留;1_开启;2_闭合;3_无效;,精度_1,_偏移_0,单位_
-UINT8 AuxRelayWeldErr = 0x00;			   //附件继电器粘连故障(保留),0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_BranchBreakErr = 0x00;		   //支路断路故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_OverChrgCurrInTheDrive = 0x00; //回充电流超限报警,0_正常  1_1级 轻微故障 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_MainPosRelayOpenErr = 0x00;	   //主正继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_MainNegRelayOpenErr = 0x00;	   //主负继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgPos1RelayOpenErr = 0x00;  //直流充电正1继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgPos2RelayOpenErr = 0x00;  //直流充电正2继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgNeg1RelayOpenErr = 0x00;  //直流充电负1继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_DCChgNeg2RelayOpenErr = 0x00;  //直流充电负2继电器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_HeatRelayWeldErr = 0x00;	   //加热膜或TMS接触器无法断开报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_HeatRelayOpenErr = 0x00;	   //加热膜或TMS接触器无法闭合报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_TMSErr = 0x00;				   //热管理系统故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_PowerSupplyErr = 0x00;		   // BMS 24V供电异常报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_PackSelfProtect = 0x00;		   //电池包自保护报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_ChrgNTCTempOver = 0x00;		   //充电插座过温报警,0_正常 1_1级 轻微故障 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 BattSysNum = 0x00;				   //可充电储能子系统总数(保留),,精度_1,_偏移_0,单位_
-UINT8 BatSysFaultCode = 0x00;			   //电池系统故障码,详见附表电池系统故障码列表,精度_1,_偏移_0,单位_
-UINT8 ST1_CheckSum = 0x00;				   // B2V_ST1的CheckSum,Byte0=Byte1 XOR Byte2 XOR Byte3 XOR Byte4 XOR Byte5 XOR Byte6 XOR Byte7,精度_1,_偏移_0,单位_
-UINT8 ST1_Life = 0x00;					   // B2V_ST1的生命信号,0~14循环,15_信号无效,精度_1,_偏移_0,单位_
-UINT8 BMS_SysSts = 0x00;				   // BMS当前状态,0_预留;1_高压上电;2_高压下电;3_无效;,精度_1,_偏移_0,单位_
-UINT8 AssisRelaySts = 0x00;				   //附件继电器状态,0_开启;1_闭合;,精度_1,_偏移_0,单位_
-UINT8 BlanceSts = 0x00;					   // BMS当前均衡状态,0_未开启均衡;1_开启均衡;,精度_1,_偏移_0,单位_
-UINT8 DCChrgConnectSt = 0x00;			   //直流充电枪连接状态,0_未连接 1_连接,精度_1,_偏移_0,单位_
-UINT8 ChrgMode = 0x00;					   // BMS当前充电模式,0_预留 1_直流充电 2_交流充电 3_其他充电,精度_1,_偏移_0,单位_
-UINT8 ChrgStatus = 0x00;				   //充电状态,0_可以充电 1_正在充电 2_充电结束 3_充电故障,精度_1,_偏移_0,单位_
-UINT8 FaultLevel = 0x00;				   //当前最高故障等级,0_正常 1_1级 轻微故障 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_DelTemp = 0x00;				   //电芯温差异常报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_OverTemp = 0x00;			   //电芯温度过高报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_PackOverHVolt = 0x00;		   // PACK过压报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_PackLowHVolt = 0x00;		   // PACK欠压报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_LowSOC = 0x00;				   // SOC过低报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_OverUcell = 0x00;			   //单体电压过高报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_LowUcell = 0x00;			   //单体电压欠压报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_LowInsRes = 0x00;			   //绝缘报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_UcellUniformity = 0x00;		   //单体压差过大,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_CellLowTemp = 0x00;			   //电芯低温报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_OverDischrgCurr = 0x00;		   //放电电流超限报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_OverChrgCurrInTheChrg = 0x00;  //充电电流超限报警,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult_BranchVolUniformity = 0x00;	   //支路压差过大报警(存在并联支路的系统),0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult_BMSHardware = 0x00;			   // BMS硬件故障,0_无故障; 1_1级 轻微故障; 2_2级 较严重故障 3_3级 最严重故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_OverSOC = 0x00;				   // SOC过高报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_SOCChangeFast = 0x00;		   // SOC跳变报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_InnerCommunicationErr = 0x00;  // BMS内部通信故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_BatSysNotMatch = 0x00;		   //可充电储能系统不匹配报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult1_HVILFault = 0x00;			   //高压互锁报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_FireDetectorEr = 0x00;		   //火警探测器故障,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_PackFireWarning = 0x00;		   //电池包火灾报警,0_正常; 1_故障,精度_1,_偏移_0,单位_
-UINT8 Fult2_FaultNum = 0x00;			   // BMS当前发生的故障总数目(包括GB32960中规定的故障数目),,精度_1,_偏移_0,单位_
-UINT8 SOC = 0x00;						   //电池包SOC,,精度_0.4,_偏移_0,单位_
-UINT8 SOH = 0x00;						   //电池包SOH,,精度_0.4,_偏移_0,单位_
-UINT8 Max_Temp = 0x00;					   //单体最高温度,,精度_1,_偏移_-50,单位_℃
-UINT8 Min_Temp = 0x00;					   //单体最低温度,,精度_1,_偏移_-50,单位_℃
-UINT8 Avg_Temp = 0x00;					   //单体平均温度,,精度_1,_偏移_-50,单位_℃
-UINT8 MaxTempSysNr = 0x00;				   //最高温度子系统(CSC)号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MaxTempNr = 0x00;					   //最高温度探针单体代号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MinTempSysNr = 0x00;				   //最低温度子系统(CSC)号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MinTempNr = 0x00;					   //最低温度探针子系统代号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MaxUcellSysNr = 0x00;				   //最高电压电池子系统号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MaxUcellNr = 0x00;				   //最高电压电池单体代号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MinUcellSysNr = 0x00;				   //最低电压电池子系统号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 MinUcellNr = 0x00;				   //最低电压电池单体代号,范围(1~255),精度_1,_偏移_0,单位_
-UINT8 Gun1DCNegTemp = 0x00;				   //充电口1负温感值,,精度_1,_偏移_-40,单位_℃
-UINT8 Gun1DCPosTemp = 0x00;				   //充电口1正温感值,,精度_1,_偏移_-40,单位_℃
-UINT8 Gun2DCNegTemp = 0x00;				   //充电口2负温感值,,精度_1,_偏移_-40,单位_℃
-UINT8 Gun2DCPosTemp = 0x00;				   //充电口2正温感值,,精度_1,_偏移_-40,单位_℃
-UINT8 HeatPosRelaySt = 0x00;			   //加热正继电器状态,0_断开;1_闭合;2_粘连;3_无效;,精度_1,_偏移_0,单位_
-UINT8 HeatNegRelaySt = 0x00;			   //加热负继电器状态,0_断开;1_闭合;2_粘连;3_无效;,精度_1,_偏移_0,单位_
-UINT8 UcellFrameNum = 0x01;				   //单体电压帧序号,有效值1~255,精度_1,_偏移_0,单位_
-UINT8 UcellCSCNum = 0x00;				   //子系统编号CSC,有效值1~255,精度_1,_偏移_0,单位_
-UINT8 TempFrameNum = 0x01;				   //温度帧序号,有效值1~255,精度_1,_偏移_0,单位_
-UINT8 TempCSCNum = 0x00;				   //子系统编号CSC,有效值1~255,精度_1,_偏移_0,单位_
-UINT8 CurCSC_TempN = 0x00;				   //当前CSC下的第N个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 CurCSC_TempN1 = 0x00;				   //当前CSC下的第N1个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 CurCSC_TempN2 = 0x00;				   //当前CSC下的第N2个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 CurCSC_TempN3 = 0x00;				   //当前CSC下的第N3个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 CurCSC_TempN4 = 0x00;				   //当前CSC下的第N4个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 CurCSC_TempN5 = 0x00;				   //当前CSC下的第N5个探针的温度,255 "Invalid" 0xFF 无效 有效值 0~254,单位 ℃,范围(-50~204)℃,,精度_1,_偏移_-50,单位_℃
-UINT8 BattType = 0x00;					   //电池类型,1_铅酸电池; 2_镍氢电池; 3_磷酸铁锂电池; 4_锰酸锂电池; 5_钴酸锂电池; 6_三元材料电池; 7_聚合物锂离子电池; 8_钛酸锂电池; 9_超级电容; 10~13_保留; 14_燃料电池;15_保留,精度_1,_偏移_0,单位_
-UINT8 CoolType = 0x00;					   //电池冷却方式,0_其他冷却方式 1_自然冷却 2_风扇冷却 3_水冷却,精度_1,_偏移_0,单位_
-UINT8 TotCSCNum = 0x00;					   //电池系统中CSC总的数目,,精度_1,_偏移_0,单位_
-UINT8 CellVoltPlat = 0x00;				   //单体平台电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,精度_0.1,_偏移_0,单位_V
-UINT8 MinAvlCellVolt = 0x00;			   //单体可用最低电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,精度_0.1,_偏移_0,单位_V
-UINT8 MaxAvlCellVolt = 0x00;			   //单体可用最高电压(非实时变化的值),有效值0~5V;  255 "Signal Invalid" 0xFF 无效,精度_0.1,_偏移_0,单位_V
-UINT8 EBC_DchgPos1Temp = 0x00;			   //放电正1温度,,精度_1,偏移_-40,单位_℃
-UINT8 EBC_DchgNeg1Temp = 0x00;			   //放电负1温度,,精度_1,偏移_-40,单位_℃
-UINT8 EBC_DchgPos2Temp = 0x00;			   //放电正2温度,,精度_1,偏移_-40,单位_℃
-UINT8 EBC_DchgNeg2Temp = 0x00;			   //放电负2温度,,精度_1,偏移_-40,单位_℃
-UINT8 EBC_ChgPos1Temp = 0x00;			   //充电正1温度(保留),,精度_1,偏移_-40,单位_℃
-UINT8 EBC_ChgNeg1Temp = 0x00;			   //充电负1温度(保留),,精度_1,偏移_-40,单位_℃
-UINT8 EBC_ChgPos2Temp = 0x00;			   //充电正2温度(保留),,精度_1,偏移_-40,单位_℃
-UINT8 EBC_ChgNeg2Temp = 0x00;			   //充电负2温度(保留),,精度_1,偏移_-40,单位_℃
-UINT8 ReqMode = 0x00;					   // BMS请求设定模式,0_关机模式 1_制冷模式 2_制热模式 3_自循环模式,精度_1,_偏移_0,单位_
-UINT8 HVCmd = 0x00;						   //高压请求,0_请求上高压 1_请求下高压,精度_1,_偏移_0,单位_
-UINT8 ChgSts = 0x00;					   //充电状态,0_非充电 1_充电,精度_1,_偏移_0,单位_
-UINT8 HVRelaySts = 0x00;				   // BMS高压继电器状态,0_断开状态; 1_闭合状态; 2~3_无效,精度_1,_偏移_0,单位_
-UINT8 SetTemp = 0x00;					   //设定温度,,精度_1,_偏移_-40,单位_
-UINT8 Bms_Life = 0x00;					   // BMS生命帧,,精度_1,_偏移_0,单位_
-UINT8 CRC = 0x00;						   // CRC校验值,,精度_1,_偏移_0,单位_
-// UINT8 TMS_WorkStatus = 0x00;			   // TMS工作状态,0_关机模式 1_制冷模式 2_制热模式 3_自循环模式,精度_1,_偏移_0,单位_
-// UINT8 TMS_HVRelayST = 0x00;				   // TMS高压继电器状态,0_断开状态; 1_闭合状态; 2~3_无效,精度_1,_偏移_0,单位_
-// UINT8 TMS_OutletTemp = 0x00;			   //出水温度(机组到电池),255_无效,精度_1,_偏移_-40,单位_
-// UINT8 TMS_InletTemp = 0x00;				   //回水温度(电池到机组),255_无效,精度_1,_偏移_-40,单位_
-// UINT8 TMS_ErrCode = 0x00;				   // TMS故障码,0_无故障; 出现 1 种以上循环发送,精度_1,_偏移_0,单位_
-// UINT8 TMS_FaultLevel = 0x00;			   // TMS故障码等级,0_无效 1_1级故障 2_2级故障 3_3级故障,精度_1,_偏移_0,单位_
-// UINT8 EBC_Life = 0x00;					   // LIFE 信号,0~255循环计数,每次+1,精度_1,偏移_0,单位_
-UINT8 EBC_LockupSts = 0x00;			 //锁止销反馈状态,0_锁止故障(未解锁和未上锁同时出现) 1_解锁成功 2_上锁成功其他状态无效,精度_1,偏移_0,单位_
-UINT8 EBC_ConnectorSts = 0x00;		 //换电连接器状态(充电回路&放电回路同时闭合代表闭合,有一路断开则为断开),0_未连接 1_连接 其他状态无效,精度_1,偏移_0,单位_
-UINT8 EBC_DischgConnectorSts = 0x00; //放电回路换电连接器状态(保留),0_未连接 1_连接 其他状态无效,精度_1,偏移_0,单位_
-UINT8 EBC_ChgConnectorSts = 0x00;	 //充电回路换电连接器状态(保留),0_未连接 1_连接 其他状态无效,精度_1,偏移_0,单位_
-// UINT8 EBC_FaultLevel = 0x00;		 //换电系统故障等级,0_无故障 1_1级故障 2_2级故障 3_3级故障,精度_1,偏移_0,单位_
-// UINT8 EBC_FaultCode = 0x00;			 //换电系统故障码,见附件,精度_1,偏移_0,单位_
-//  UINT16 BMS_SoftwareVersion = 0x00;  //软件版本号_RyyyBzzz(R为软件版本、B为测试版本、正式版本不带B)  ,yyy_ 0~254,精度1,255_无效,不显示; zzz_ 0~254,精度1,255_无效,不显示;,精度_1,_偏移_0,单位_
-//  UINT16 BMS_HardwareVersion = 0x00;  //硬件版本号_VyyyBzzz(V为硬件版本、B为测试版本、正式版本不带B)  ,xxx_ 0~254,精度1,255_无效,不显示; zzz_ 0~254,精度1,255_无效,不显示 ,精度_1,_偏移_0,单位_
-UINT16 PackCurrent = 0x00;			 //电池包总电流,充电为负值,放电为正值,,精度_0.1,_偏移_-1000,单位_A
-UINT16 InstChrgCurMaxAllw = 0x00;	 //动力电池允许最大瞬时充电电流,,精度_0.1,_偏移_-1000,单位_A
-UINT16 InstDischrgCurMaxAllw = 0x00; //电池允许最大瞬时放电电流,,精度_0.1,_偏移_-1000,单位_A
-UINT16 PosIsolation = 0x00;			 //母线正对车体绝缘电阻,,精度_1,_偏移_0,单位_KΩ
-UINT16 NegIsolation = 0x00;			 //母线负对车体绝缘电阻,,精度_1,_偏移_0,单位_KΩ
-UINT16 PackInsideVolt = 0x00;		 //电池包内侧电压,,精度_0.1,_偏移_0,单位_V
-UINT16 PackOutsideVolt = 0x00;		 //电池包外侧电压,,精度_0.1,_偏移_0,单位_V
-UINT16 Max_Ucell = 0x00;			 //单体最高电压值,,精度_0.001,_偏移_0,单位_V
-UINT16 Avg_Ucell = 0x00;			 //电体电压平均值,,精度_0.001,_偏移_0,单位_V
-UINT16 Min_Ucell = 0x00;			 //单体最低电压值,,精度_0.001,_偏移_0,单位_V
-UINT16 ChrgCurMaxAllw = 0x00;		 //电池最大允许充电电流,,精度_0.1,_偏移_0,单位_A
-// UINT16 CurCSC_UCellN = 0x00;		 //当前CSC下的第N个电芯的电压,65535 "Invalid" 0xFFFF 无效 有效值 0~65534,范围(0~65.534)V,精度_0.001,_偏移_0,单位_V
-// UINT16 CurCSC_UCellN1 = 0x00;		 //当前CSC下的第N1个电芯的电压,65535 "Invalid" 0xFFFF 无效 有效值 0~65534,范围(0~65.534)V,精度_0.001,_偏移_0,单位_V
-// UINT16 CurCSC_UCellN2 = 0x00;		 //当前CSC下的第N2个电芯的电压,65535 "Invalid" 0xFFFF 无效 有效值 0~65534,范围(0~65.534)V,精度_0.001,_偏移_0,单位_V
-
-UINT16 Pack_RateCap = 0x00;	   //电池包额定容量,有效值 0~65534,65535 "Signal Invalid" 无效,精度_1,_偏移_0,单位_Ah
-UINT16 Pack_RateHVolt = 0x00;  //电池包额定电压,有效值 0~6553.4,65535 "Signal Invalid" 无效,精度_0.1,_偏移_0,单位_V
-UINT16 Pack_RatePower = 0x00;  //电池包额定总能量,有效值 0~6553.4,65535 "Signal Invalid" 无效,精度_0.1,_偏移_0,单位_kWh
-UINT16 PackTotCellNum = 0x00;  // PACK中单体电芯的总数目,,精度_1,_偏移_0,单位_
-UINT16 PackTotTempNum = 0x00;  // PACK中电芯温度点(探针)的总数目,,精度_1,_偏移_0,单位_
-UINT16 SingleChargeKwh = 0x00; //单次充电kWh 数,,精度_0.1,_偏移_0,单位_KWh
-UINT16 HVVolt = 0x00;		   // BMS当前电压,,精度_1,_偏移_0,单位_
-// UINT16 TMS_ReqPow = 0x00;			  // TMS需求功率,65535_无效,精度_0.1,_偏移_0,单位_Kw
-UINT32 TotalChargeKwh = 0x00;		  //累计充入kWh 数,,精度_0.1,_偏移_0,单位_KWh
-UINT32 TotalDischargeKwh = 0x00;	  //累计放出kWh 数,,精度_0.1,_偏移_0,单位_KWh
-UINT32 TotalEneryECOChargeKwh = 0x00; //累计动能回馈充入kWh 数,,精度_0.1,_偏移_0,单位_KWh
-UINT32 TotalStationChargeKwh = 0x00;  //累计换电站充入kWh 数,,精度_0.1,_偏移_0,单位_KWh
-UINT32 TotalPoleChargeKwh = 0x00;	  //累计插枪充电充入kWh 数,,精度_0.1,_偏移_0,单位_KWh
+	0x18FEF100};
+BOOL VcuRxShortError[4];
+BOOL VcuRxLongError[4];
+UINT8 VcuRxFlag[4];
+UINT8 VcuRxErrorCounter[4];
+UINT8 VCU_Num_VIN[17];			// VCU-VIN
+UINT8 VCU_St_VinRecv;			// VIN接收状态
+UINT8 VCU_St_BattRly = 0x00;	//电池接触器状态,0:闭合,指示灯灭 1:断开,指示灯亮 2:预留 3:无效,R-1,Off-0,
+UINT8 VCU_St_Check = 0x00;		// VCU自检状态,0:正在自检 1:自检成功 2:自检失败 3:无效,R-1,Off-0,
+UINT8 VCU_St_SysIntLock = 0x00; //系统互锁状态,0:没有互锁 1:充电互锁 2:预留 3:无效,R-1,Off-0,
+UINT8 VCU_St_Veh = 0x00;		//整车状态,0:Wait 1:Ready 2:预留 3:无效,R-1,Off-0,
+UINT8 VCU_St_Gear = 0x00;		//档位状态, -1:倒档  0:空档  1:1档  2:2档  3:3档  4:4档  5:5档  6:6档  7:7档  8:8档  9:9档  10:10档  11:11档  12:12档  13:13档  14:14无效 ,R-1,Off--125,
+UINT8 VCU_Ft_Sys = 0x00;		// VCU故障(与MCU故障点亮同一个符号),0:无故障 1:系统故障,R-1,Off-0,
+UINT8 VCU_Ft_Tran = 0x00;		//变速箱故障,0:正常 1:报警,R-1,Off-0,
+UINT8 VCU_Ft_BattSys = 0x00;	//动力电池系统故障,0:正常 1:报警,R-1,Off-0,
+UINT8 VCU_State_Veh = 0x00;		//车辆状态,1:车辆启动状态 2:熄火 3:其他状态 14:异常 15:无效,R-1,Off-0,
+UINT8 VCU_Counter = 0x00;		//循环计数器,,R-0.1,Off-0,
+UINT8 VCU_SoftVersion = 0x00;	// VCU软件版本号,,R-0.1,Off-0,
+UINT8 VCU_St_AccPedal = 0x00;	//加速踏板状态,,R-0.4,Off-0,
+UINT8 VCU_St_BrakePedal = 0x00; //刹车踏板状态,,R-0.4,Off-0,
+UINT8 VCU_St_ParkBrakeSw = 0;	//手刹状态
+// declear the UINT16 vars
+UINT16 VCU_VehSpd = 0x00;	//车速,,R-0.0039,Off-0,Km/h
+UINT16 VCU_RemaMile = 0x00; //剩余里程,,R-0.125,Off-0,Km
+/*EBC->CAN信号*****************************/
+UINT32 EbcOutTable[2][2] =
+	{{0x18FFF8A7, 100},
+	 {0x18FEF8A7, 100}};
+UINT8 EBC_Counter = 0;		   // EBC_Counter	LIFE 信号
+UINT8 EBC_LockSt = 0;		   // EBC_LockSt	锁止销反馈状态
+UINT8 EBC_CnctSt = 0;		   //换电连接器状态(充电回路&放电回路同时闭合代表闭合,有一路断开则为断开)
+UINT8 EBC_DisCharCnctSt = 0;   //	放电回路换电连接器状态(保留)
+UINT8 EBC_CharCnctSt = 0;	   //	充电回路换电连接器状态(保留)
+UINT8 EBC_FtLvl = 0;		   //换电系统故障等级
+UINT8 EBC_FtCode = 0;		   //换电系统故障码
+UINT8 EBC_AirPressure = 0;	   //气压值
+UINT8 EBC_CharSt = 0;		   //充电标志位
+UINT8 EBC_ActHeatReq = 0;	   //主动预热请求
+UINT8 EBC_InhiHVOn = 0;		   //禁止高压上电
+UINT8 EBC_ReqHVOff = 0;		   //请求高压下电
+UINT8 EBC_StopChgCmd = 0;	   //停止充电指令
+UINT8 EBC_State = 0;		   //换电控制器状态
+UINT8 EBC_DisCharPos1Temp = 0; //放电正1温度
+UINT8 EBC_DischarNeg1Temp = 0; //放电负1温度
+UINT8 EBC_DisCharPos2Temp = 0; //放电正2温度
+UINT8 EBC_DisCharNeg2Temp = 0; //放电负2温度
+UINT8 EBC_ChgPos1Temp = 0;	   //充电正1温度(保留)
+UINT8 EBC_ChgNeg1Temp = 0;	   //充电负1温度(保留)
+UINT8 EBC_ChgPos2Temp = 0;	   //充电正2温度(保留)
+UINT8 EBC_ChgNeg2Temp = 0;	   //充电负2温度(保留)
 
 /*************************************************************
  *Ebc->Ble组码变量以及Ebc应用层变量存放区
@@ -620,9 +288,8 @@ UINT32 TotalPoleChargeKwh = 0x00;	  //
 uint8 g_c_BlePwr = 0;
 uint8 g_c_AirPwr = 0;
 uint8 g_c_LedPwr = 0;
-uint16 bcud_E_snglChrg;		 //单次充电能量,精度0.1kwh
-uint16 ebcd_Nr_swapBatt;	 //换电次数
-uint16 ebcd_Nr_swapSucBatt;	 //换电成功次数
+uint16 bcud_E_snglChrg; //单次充电能量,精度0.1kwh
+
 uint16 bcud_pct_soc;		 //电池SOC,精度0.1
 uint16 bcud_Q_snglChrg;		 //单次充电容量,精度0.1Ah
 uint16 bcud_V_battU;		 //电池电压 精度0.1V
@@ -643,23 +310,7 @@ uint8 bcud_st_bcuMainRelay;	 //
 uint8 bcud_st_bcuTmsLiquid;	 //热管理液位状态,1-液位正常,0-液位过低
 uint8 bcud_st_hvWork;		 //电池高压状态,0-高压开启 1-预充,2-高压关断,3-高压上电故障
 uint8 bcuv_Num_battSn[32];	 //电池SN号码
-// uint8 ebcd_flg_pluginLockSig; //互锁接插件信号状态,1-触发,0-无触发
-// uint8 ebcd_flg_swapAdmit;	  //允许换电判断:0-不允许,1-允许
-// uint8 ebcd_Num_err1;		  //故障码1
-// uint8 ebcd_Num_err2;		  //故障码2
-// uint8 ebcd_st_ebcConnect;	  // Ebc通讯模式,0-无线蓝牙,1-有线连接 ,默认0
-// uint8 ebcd_st_ebcLockWork;	  // Ebc解锁模式,0-单步模式,1-自动模式
-// uint8 ebcd_st_errTable1;	  //故障表1,bit0-气压异常,bit1-液位异常,bit2-Flash读取异常
-// uint8 ebcd_st_errTable2;	  //故障表2,bit0-互锁异常,bit1-整车CAN异常,bit2-电池CAN异常,bit3-锁钩异常,bit4-升降机异常,bit5-电池位置异常
-// uint8 ebcd_st_errTable3;	  //故障表3,bit0-放电互锁异常,bit1-充电互锁异常,bit2-整车高压互锁异常
-// uint8 ebcd_st_lockSensor;	  //锁紧传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
-// uint8 ebcd_st_lockSucJug;	  //锁紧完成判断:0-完全未锁紧,1-完全锁紧,2-未完全锁紧"
-// uint8 ebcd_st_pedstSensor;	  //底座落座传感器:bit0-bit1:传感器0-1的状态,每bit:1-触发,0-无触发
-// uint8 ebcd_st_pedstSucJug;	  //电池底座到位判断:0-完全未到位,1-完全到位,2-未完全到位
-// uint8 ebcd_st_pluginLockSig;  //互锁接插件信号具体状态,1-触发,0-无触发
-// uint8 ebcd_st_unlockSensor;	  //解锁传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
-// uint8 ebcd_st_unlockSucJug;	  //解锁完成判断:0-完全未解锁,1-完全解锁,2-未完全解锁
-// uint8 ebcd_P_airSensor;				   //压力传感器气压值:单位Mpa,精度0.01Mpa
+
 uint8 vcud_P_airSensorBack;			   //后桥气压值,单位Mpa,精度0.01Mpa
 uint8 vcud_P_airSensorForward;		   //前桥气压值,单位Mpa,精度0.01Mpa
 uint8 vcud_st_carStart;				   //整车启动状态,0001-车辆启动状态,0010-熄火,0011-其他状态,1111-无效
@@ -695,13 +346,13 @@ uint32 bled_Nr_softVer = 0;			   // BLE
 uint8 bled_flg_role = 0;			   // ble的主从模式 01-主,02-从
 uint8 bled_flg_bleConn = 0;			   // ble蓝牙连接状态
 uint8 bled_flg_bleDisconn = 0;		   // ble蓝牙断开状态
-uint8 bled_st_dataTrans = 0;//蓝牙数据传输状态
+uint8 bled_st_dataTrans = 0;		   //蓝牙数据传输状态
 /*
 ebc应用层变量
 */
-uint8 ebcd_flg_Can2SendEnbale = 0;	//应答BLE的使能
-uint8 ebcd_st_toBleAns = 0;			//应答BLE的指令序号
-uint8 ebcd_P_airSensor = 0;			//压力传感器气压值:单位Mpa,精度0.01Mpa
+uint8 ebcd_flg_Can2SendEnbale = 0;	 //应答BLE的使能
+uint8 ebcd_st_toBleAns = 0;			 //应答BLE的指令序号
+uint8 ebcd_P_airSensor = 0;			 //压力传感器气压值:单位Mpa,精度0.01Mpa
 uint8 ebcd_T_plugin[4] = {0};		 //四个接插件温度
 uint8 ebcd_flg_forbidHVOn = 0;		 //禁止高压上电 BMS
 uint8 ebcb_flg_reqHvOff = 0;		 //请求高压下电 BMS
@@ -731,18 +382,21 @@ uint8 ebcd_st_pedstSucJug;			 //
 uint8 ebcd_st_pluginLockSig;		 //互锁接插件信号具体状态,1-触发,0-无触发
 uint8 ebcd_st_unlockSensor;			 //解锁传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
 uint8 ebcd_st_unlockSucJug;			 //解锁完成判断:0-完全未解锁,1-完全解锁,2-未完全解锁
-uint8 m_flg_HVlock1 = 0;//互锁状态1
-uint8 m_flg_HVlock2 = 0;//互锁状态2
-uint16 Test_LockPressure = 0;//锁紧力测试
-uint8 ebcd_flg_ebcManCtrlEn = 0;		 // EBC手动控制使能
-uint8 ebcd_flg_ebcManCtrlMode = 0;		 // EBC手动控制模式
-
+uint8 m_flg_HVlock1 = 0;			 //互锁状态1,电池换电接插件
+uint8 m_flg_HVlock2 = 0;			 //互锁状态2,整车放电接插件
+uint16 Test_LockPressure = 0;		 //锁紧力测试
+uint8 ebcd_flg_ebcManCtrlEn = 0;	 // EBC手动控制使能
+uint8 ebcd_flg_ebcManCtrlMode = 0;	 // EBC手动控制模式
 
 #define EEPDATA_START_SEC_VAR
 #include "MemMap.h"
+
+uint16 ebcd_Nr_swapBatt;	//换电次数
+uint16 ebcd_Nr_swapSucBatt; //换电成功次数
+
 uint16 ManuControlTimes = 0;
-uint16 LockDelayTime = 0;//锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
-uint16 UnlockDelayTime = 0;//解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
+uint16 LockDelayTime = 0;	//锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
+uint16 UnlockDelayTime = 0; //解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
 #define EEPDATA_STOP_SEC_VAR
 #include "MemMap.h"
 #define APPLAYERVER_START_SEC_VAR
@@ -777,4 +431,3 @@ const uint8 DataPackCounter[21] = {1, 1, 7, 5, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 const uint8 DataPackBegin[21] = {0, 0x11, 0x21, 0x31, 0x40, 0x51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 #define APPLAYERVER_STOP_SEC_VAR
 #include "MemMap.h"
-

+ 312 - 515
System/Vehicle/Communication/CanVar.h

@@ -3,7 +3,7 @@
  * @Date         : 2021-12-27 11:21:08
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-01-11 17:31:05
+ * @LastEditTime : 2022-05-09 16:18:44
  * @Description  : file content
  * @FilePath     : \VehicleControl\VehicleControl\src\System\Vehicle\Communication\CanVar.h
  */
@@ -22,524 +22,319 @@
 /************************************************************
  *BCU->Ebc解码变量存放区
  ************************************************************/
-extern UINT32 BcuInTable[130];
-extern BOOL BcuRxShortError[130];
-extern BOOL BcuRxLongError[130];
-extern UINT8 BcuRxErrorCounter[130];
-extern UINT8 BcuRxFlag[130];
-extern UINT8 BMS13_ReqVIN;
-extern UINT8 BMS11_Fult1_DelTemp;
-extern UINT8 BMS11_Fult1_OverTemp;
-extern UINT8 BMS11_Fult1_PackOverHVolt;
-extern UINT8 BMS11_Fult1_PackLowHVolt;
-extern UINT8 BMS11_Fult1_LowSOC;
-extern UINT8 BMS11_Fult1_OverUcell;
-extern UINT8 BMS11_Fult1_LowUcell;
-extern UINT8 BMS11_Fult1_LowInsRes;
-extern UINT8 BMS11_Fult1_UcellUniformity;
-extern UINT8 BMS11_Fult1_OverChg;
-extern UINT8 BMS11_Fult1_OverSOC;
-extern UINT8 BMS11_Fult1_SOCChangeFast;
-extern UINT8 BMS11_Fult1_BatSysNotMatch;
-extern UINT8 BMS11_Fult1_HVILFault;
-extern UINT8 BMS12_Fult2_FaultNum;
-extern UINT8 BMS12_Fult2_CellOverDischrg;
-extern UINT8 BMS12_Fult2_CellLowTemp;
-extern UINT8 BMS12_Fult2_PackFireWarning;
-extern UINT8 BMS12_Fult2_OverDischrgCurr;
-extern UINT8 BMS12_Fult2_OverChrgCurrInTheDrive;
-extern UINT8 BMS12_Fult2_CurrSensorErr;
-extern UINT8 BMS12_Fult2_PowerSupplyErr;
-extern UINT8 BMS12_Fult2_TMSErr;
-extern UINT8 BMS12_Fult2_HeatingFilmErr;
-extern UINT8 BMS12_Fult2_PackSelfProtect;
-extern UINT8 BMS12_Fult2_MainLoopPrechrgErr;
-extern UINT8 BMS12_Fult2_AuxLoopPrechrgErr;
-extern UINT8 BMS12_Fult2_ChrgInsLowErr;
-extern UINT8 BMS12_Fult2_ACANLost;
-extern UINT8 BMS12_Fult2_InnerCommunicationErr;
-extern UINT8 BMS12_Fult2_DCDCErr;
-extern UINT8 BMS12_Fult2_BranchBreakErr;
-extern UINT8 BMS12_Fult2_HeatRelayOpenErr;
-extern UINT8 BMS12_Fult2_HeatRelayWeldErr;
-extern UINT8 BMS12_Fult2_MainPosRelayOpenErr;
-extern UINT8 BMS12_Fult2_MainPosRelayWeldErr;
-extern UINT8 BMS12_Fult2_MainNegRelayOpenErr;
-extern UINT8 BMS12_Fult2_MainNegRelayWeldErr;
-extern UINT8 BMS12_Fult2_DCChrgPos1RelayOpenErr;
-extern UINT8 BMS12_Fult2_DCChrgPos1RelayWeldErr;
-extern UINT8 BMS12_Fult2_DCChrgNeg1RelayOpenErr;
-extern UINT8 BMS12_Fult2_DCChrgNeg1RelayWeldErr;
-extern UINT8 BMS12_Fult2_DCChrgPos2RelayOpenErr;
-extern UINT8 BMS12_Fult2_DCChrgPos2RelayWeldErr;
-extern UINT8 BMS12_Fult2_DCChrgNeg2RelayOpenErr;
-extern UINT8 BMS12_Fult2_DCChrgNeg2RelayWeldErr;
-extern UINT8 BMS12_Fult2_ChrgConnectErr;
-extern UINT8 BMS12_ult2_OverDischrgCurrWhenInChrg;
-extern UINT8 BMS12_Fult2_OverChrgCurrInTheChrg;
-extern UINT8 BMS12_Fult2_ChrgNTCErr;
-extern UINT8 BMS12_Fult2_ChrgNTCTempOver;
-extern UINT8 BMS12_Fult2_ELockErr;
-extern UINT8 BMS12_Fult2_FireDetectorEr;
-extern UINT8 BMS12_Fult2_ContiDischrgCurrOverLoad;
-extern UINT8 BMS12_Fult2_SOCDifferErr;
-extern UINT8 BMS12_Fult2_ContiChrgCurrOverLoad;
-extern UINT8 BMS1_MainPosRelaySt;
-extern UINT8 BMS1_MainNegRelaySt;
-extern UINT8 BMS1_PreChgRelaySt;
-extern UINT8 BMS1_DCChrgPos1RelaySt;
-extern UINT8 BMS1_DCChrgNeg1RelaySt;
-extern UINT8 BMS1_DCChrgPos2RelaySt;
-extern UINT8 BMS1_DCChrgNeg2RelaySt;
-extern UINT8 BMS1_HeatPosRelaySt;
-extern UINT8 BMS1_HeatNegRelaySt;
-extern UINT8 BMS1_SysSts;
-extern UINT8 BMS1_Life;
-extern UINT8 BMS1_BalanceStatus;
-extern UINT8 BMS1_DCChrgConnectSt;
-extern UINT8 BMS1_ChrgMode;
-extern UINT8 BMS1_ChrgStatus;
-extern UINT8 BMS1_HeatingStatus;
-extern UINT8 BMS1_CoolingStatus;
-extern UINT8 BMS2_SOC;
-extern UINT8 BMS2_SOH;
-extern UINT8 BMS2_FaultCode;
-extern UINT8 BMS2_FaultLevel;
-extern UINT8 BMS2_RqHVPoerOff;
-extern UINT8 BMS2_Life;
-extern UINT8 BMS4_InsDetectorSt;
-extern UINT8 BMS8_Max_Temp;
-extern UINT8 BMS8_Min_Temp;
-extern UINT8 BMS8_Avg_Temp;
-extern UINT8 BMS8_MaxTempSysNr;
-extern UINT8 BMS8_MaxTempNr;
-extern UINT8 BMS8_MinTempSysNr;
-extern UINT8 BMS8_MinTempNr;
-extern UINT8 BMS7_MaxUcellSysNr;
-extern UINT8 BMS7_MinUcellSysNr;
-extern UINT8 BMS23_Gun1DCPosTemp;
-extern UINT8 BMS23_Gun1DCNegTemp;
-extern UINT8 BMS23_Gun2DCPosTemp;
-extern UINT8 BMS23_Gun2DCNegTemp;
-extern UINT8 BMS_Cell_TempN[64];
-extern UINT8 BMS_SN_SysCode[24];
-extern UINT8 BMS21_BattType;
-extern UINT8 BMS21_CoolType;
-extern UINT8 BMS21_Manufacture;
-extern UINT8 BMS21_ProtocolEditionH;
-extern UINT8 BMS21_ProtocolEditionL;
-extern UINT8 BMS9_TotCSCNum;
-extern UINT8 BMS9_PackTotTempNum;
-extern UINT8 BMS9_HVBranchNum;
-extern UINT8 BMS9_SingleHVBranchCellNum;
-extern UINT8 BMS9_BattSysNum;
-extern UINT8 BMS9_BattSysSeqNum;
-extern UINT8 BMS22_AvaiMaxSOC;
-extern UINT8 BMS22_AvaiMinSOC;
-extern UINT8 BMS22_AvaiMaxTemp;
-extern UINT8 BMS22_AvaiMinTemp;
-extern UINT8 BMS10_SubSysEncodingLen;
-extern UINT8 BMS10_SubSysIdx;
-extern UINT8 BMS10_SubSysErrNum;
-extern UINT8 BMS28_ReqMode;
-extern UINT8 BMS28_HVCmd;
-extern UINT8 BMS28_ChgSts;
-extern UINT8 BMS28_HVRelaySts;
-extern UINT8 BMS28_SetTemp;
-extern UINT8 BMS28_Life;
-extern UINT8 BMS28_CRC;
+extern UINT32 BcuInTable[28];
+extern BOOL BcuRxShortError[28];
+extern BOOL BcuRxLongError[28];
+extern UINT8 BcuRxErrorCounter[28];
+extern UINT8 BcuRxFlag[28];
+extern UINT8 BMS_ReqVIN;
+extern UINT8 BMS_ReqHVOff;
+extern UINT8 BMS_ProtocolEditionH;
+extern UINT8 BMS_ProtocolEditionL;
+extern UINT8 BMS_CharDevNum;
+extern UINT8 BMS_FtPosRly;
+extern UINT8 BMS_FtNegRly;
+extern UINT8 BMS_FtPosCharRly1;
+extern UINT8 BMS_FtNegCharRly1;
+extern UINT8 BMS_FtPosCharRly2;
+extern UINT8 BMS_FtNegCharRly2;
+extern UINT8 BMS_FtHeatRly1;
+extern UINT8 BMS_FtHeatRly2;
+extern UINT8 BMS_StPosRly;
+extern UINT8 BMS_StNegRly;
+extern UINT8 BMS_StPreCharRly;
+extern UINT8 BMS_StPosCharRly1;
+extern UINT8 BMS_StNegCharRly1;
+extern UINT8 BMS_StPosCharRly2;
+extern UINT8 BMS_StNegCharRly2;
+extern UINT8 BMS_FtAuxRelayWeld;
+extern UINT8 BMS_BraOpenCirc;
+extern UINT8 BMS_FtBackCharCurrOutLim;
+extern UINT8 BMS_FtPosRlyOpen;
+extern UINT8 BMS_FtNegRlyOpen;
+extern UINT8 BMS_FtPosCharRly1Open;
+extern UINT8 BMS_FtPosCharRly2Open;
+extern UINT8 BMS_FtNegCharRly1Open;
+extern UINT8 BMS_FtNegCharRly2Open;
+extern UINT8 BMS_FtTMSContClose;
+extern UINT8 BMS_FtTMSContOpen;
+extern UINT8 BMS_FtTMS;
+extern UINT8 BMS_Ft24VSpy;
+extern UINT8 BMS_FtPACKSelfProt;
+extern UINT8 BMS_FtCharSockTempOver;
+extern UINT8 BMS_FtTempOutCtrl;
+extern UINT8 BMS_StPosHeatRly;
+extern UINT8 BMS_StNegHeatRly;
+extern UINT8 BMS_CharSysNum;
+extern UINT8 BMS_FtCode;
+extern UINT8 BMS_ST1CheckSum;
+extern UINT8 BMS_ST1Counter;
+extern UINT8 BMS_Mode;
+extern UINT8 BMS_AuxRlySt;
+extern UINT8 BMS_BattBalaSt;
+extern UINT8 BMS_CharGunSt;
+extern UINT8 BMS_CharMode;
+extern UINT8 BMS_CharSt;
+extern UINT8 BMS_FtLvl;
+extern UINT8 BMS_FtCellTempDiff;
+extern UINT8 BMS_FtCellTempHigh;
+extern UINT8 BMS_FtPACKOverVolt;
+extern UINT8 BMS_FtPACKUndeVolt;
+extern UINT8 BMS_FtSOCLow;
+extern UINT8 BMS_FtCellOverVolt;
+extern UINT8 BMS_FtCellUndeVolt;
+extern UINT8 BMS_FtIns;
+extern UINT8 BMS_FtCellOverVoltDiff;
+extern UINT8 BMS_FtCharCurrOver;
+extern UINT8 BMS_FtDisCharCurrOver;
+extern UINT8 BMS_FtCellTempLow;
+extern UINT8 BMS_FtBranVoltDifOver;
+extern UINT8 BMS_FtBMSHardWare;
+extern UINT8 BMS_FtSOCHigh;
+extern UINT8 BMS_FtSOCJump;
+extern UINT8 BMS_FtInCom;
+extern UINT8 BMS_FtSysMism;
+extern UINT8 BMS_FtHvIntLock;
+extern UINT8 BMS_FtSmoke;
+extern UINT8 BMS_FtFire;
+extern UINT8 BMS_FtNum;
+extern UINT8 BMS_PackSOC;
+extern UINT8 BMS_PackSOH;
+extern UINT8 BMS_MaxCellTemp;
+extern UINT8 BMS_MinCellTemp;
+extern UINT8 BMS_AverCellTemp;
+extern UINT8 BMS_MaxCellTempCSC;
+extern UINT8 BMS_MaxCellTempNum;
+extern UINT8 BMS_MinCellTempCSC;
+extern UINT8 BMS_MinCellTempNum;
+extern UINT8 BMS_MaxCellVoltCSC;
+extern UINT8 BMS_MaxCellVoltNum;
+extern UINT8 BMS_MinCellVoltCSC;
+extern UINT8 BMS_MinCellVoltNum;
+extern UINT8 BMS_InsDeteSt;
+extern UINT8 BMS_FtCharInsLow;
+extern UINT8 BMS_FtCurrSenr;
+extern UINT8 BMS_FtHeatingFilm;
+extern UINT8 BMS_FtMainLoopPreChar;
+extern UINT8 BMS_FtAuxLoopPreChar;
+extern UINT8 BMS_FtACANLost;
+extern UINT8 BMS_FtDCDC;
+extern UINT8 BMS_FtSOCDif;
+extern UINT8 BMS_FtCellOverDisChar;
+extern UINT8 BMS_FtCharOver;
+extern UINT8 BMS_FtContDisCharCurrOverLoad;
+extern UINT8 BMS_FtContCharCurrOverLoad;
+extern UINT8 BMS_Gun1DCNegTemp;
+extern UINT8 BMS_Gun1DCPosTemp;
+extern UINT8 BMS_Gun2DCNegTemp;
+extern UINT8 BMS_Gun2DCPosTemp;
+extern UINT8 BMS_CurrHeatSt;
+extern UINT8 BMS_CurrCoolSt;
+extern UINT8 BMS_FtCharCnct;
+extern UINT8 BMS_FtOverDisCharCurrDuringChar;
+extern UINT8 BMS_FtCharNTC;
+extern UINT8 BMS_FtELock;
+extern UINT8 BMS_CellVoltFramNum;
+extern UINT8 BMS_CellTempFramNum;
+extern UINT8 BMS_CSC_Code;
+extern UINT8 BMS_CellTemp[64];
+extern UINT8 BMS_Checksum;
+extern UINT8 BMS_PackComp;
+extern UINT8 BMS_BattCodeLeng;
+extern UINT8 BMS_SN[27];
+extern UINT8 BMS_BattType;
+extern UINT8 BMS_CoolType;
+extern UINT8 BMS_CSC_Total;
+extern UINT8 BMS_CellVoltLevel;
+extern UINT8 BMS_CellMinVolt;
+extern UINT8 BMS_CellMaxVolt;
+extern UINT8 BMS_HVBranNum;
+extern UINT8 BMS_SingleHVBranchCellNum;
+extern UINT8 BMS_ReqMode;
+extern UINT8 BMS_HVCmd;
+extern UINT8 BMS_ChgSts;
+extern UINT8 BMS_HVRelaySts;
+extern UINT8 BMS_SetTemp;
+extern UINT8 BMS_Life;
+extern UINT8 BMS_CRC;
 extern UINT8 TMS_WorkStatus;
 extern UINT8 TMS_HVRelayST;
 extern UINT8 TMS_OutletTemp;
 extern UINT8 TMS_InletTemp;
-extern UINT8 TMS_Version;
 extern UINT8 TMS_ErrCode;
 extern UINT8 TMS_FaultLevel;
-extern UINT8 BCU_SnMsgFlag;
-extern UINT16 BMS_Cell_Volt[384];
-extern UINT16 BMS11_PackOutsideVolt;
-extern UINT16 BMS2_PackCurrent;
-extern UINT16 BMS2_PackInsideVolt;
-extern UINT16 BMS4_PosIsolation;
-extern UINT16 BMS4_NegIsolation;
-extern UINT16 BMS4_SysInsRes;
-extern UINT16 BMS6_Max_Ucell;
-extern UINT16 BMS6_Min_Ucell;
-extern UINT16 BMS6_Avg_Ucell;
-extern UINT16 BMS6_SOE;
-extern UINT16 BMS7_MaxUcellNr;
-extern UINT16 BMS7_MinUcellNr;
-extern UINT16 BMS23_RemainChgTi;
-extern UINT16 BMS21_RateCap;
-extern UINT16 BMS21_RateHVolt;
-extern UINT16 BMS21_RatePower;
-extern UINT16 BMS9_PackTotCellNum;
-extern UINT16 BMS22_PackAvaiMaxVolt;
-extern UINT16 BMS22_PackAvaiMinVolt;
 extern UINT16 BMS_SoftwareVersion;
 extern UINT16 BMS_HardwareVersion;
-extern UINT16 BMS3_MaxDischgPow;
-extern UINT16 BMS3_MaxChgPow;
-extern UINT16 BMS3_MaxInstantDischgPow;
-extern UINT16 BMS3_MaxiInstantChgPow;
-extern UINT16 BMS5_DischgCurMaxAllw;
-extern UINT16 BMS5_ChrgCurMaxAllw;
-extern UINT16 BMS5_InstChrgCurMaxAllw;
-extern UINT16 BMS5_InstDischrgCurMaxAllw;
-extern UINT16 BMS26_Bat_InstantConsume;
-extern UINT16 BMS26_Bat_TotalConsume;
-extern UINT16 BMS26_ChgReqVoltage;
-extern UINT16 BMS26_ChgReqCurrent;
-extern UINT16 BMS28_HVVolt;
+extern UINT16 BMS_PackCurr;
+extern UINT16 BMS_MaxCharCurr;
+extern UINT16 BMS_MaxDisCharCurr;
+extern UINT16 BMS_PosIns;
+extern UINT16 BMS_NegIns;
+extern UINT16 BMS_BattVolt;
+extern UINT16 BMS_LinkVolt;
+extern UINT16 BMS_MaxCellVolt;
+extern UINT16 BMS_AverCellVolt;
+extern UINT16 BMS_MinCellVolt;
+extern UINT16 BMS_ContChrgCurr;
+extern UINT16 BMS_ContDisCharCurr;
+extern UINT16 BMS_CharReqVolt;
+extern UINT16 BMS_CharReqCurr;
+extern UINT16 BMS_SysInsRes;
+extern UINT16 BMS_MaxDisCharPwr;
+extern UINT16 BMS_MaxCharPwr;
+extern UINT16 BMS_ContDisCharPwr;
+extern UINT16 BMS_ContCharPwr;
+extern UINT16 BMS_InstEngyCons;
+extern UINT16 BMS_TotalEngyCons;
+extern UINT16 BMS_SOE;
+extern UINT16 BMS_RmanCharTime;
+extern UINT16 BMS_CharNum;
+extern UINT16 BMS_CellVolt[384];
+extern UINT16 BMS_BattRateCap;
+extern UINT16 BMS_BattRateVolt;
+extern UINT16 BMS_BattRateEngy;
+extern UINT16 BMS_CellTotal;
+extern UINT16 BMS_TempTotal;
+extern UINT16 BMS_SingleCharEngy;
+extern UINT16 BMS_SingleCharCapy;
+extern UINT16 BMS_HVVolt;
 extern UINT16 TMS_ReqPow;
-extern UINT32 BMS1_RechrgCycels;
-extern UINT32 BMS14_TotalChargeAh;
-extern UINT32 BMS14_TotalDischargeAh;
-extern UINT32 BMS15_TotalChargeKwh;
-extern UINT32 BMS15_TotalDischargeKwh;
-extern UINT32 BMS16_TotalEneryECOChargeAh;
-extern UINT32 BMS16_TotalEneryECOChargeKwh;
-extern UINT32 BMS17_TotalStationChargeAh;
-extern UINT32 BMS17_TotalStationChargeKwh;
-extern UINT32 BMS18_TotalPoleChargeAh;
-extern UINT32 BMS18_TotalPoleChargeKwh;
-extern UINT32 BMS19_SingleChargeAh;
-extern UINT32 BMS19_SingleChargeKwh;
-/*************************************************************
- *Ebc->Bcu组码变量存放区
- ************************************************************/
-extern UINT32 Ebc2BcuOutTable[5][2];
-// extern UINT8 VCU_Life;
-
-extern UINT8 VCU_ReqHV;
-extern UINT8 VCU_DCDCSts;
-extern UINT8 VCU_DCACSts;
-extern UINT8 VCU_DCAPSts;
-// extern UINT8 VCU_VehicleSpeed;
-
-extern UINT8 VCU_PosRlySts;
-extern UINT8 VCU_PosRlyErrSts;
-extern UINT8 VCU_PTCRlSts;
-extern UINT8 VCU_PTCRlErrSts;
-extern UINT8 VCU_StopChgCmd;
-extern UINT8 VCU_HVInterlock;
-extern UINT8 VCU_AssistRlySts;
-extern UINT8 VCU_AssistRlyErrSts;
-extern UINT8 VCU_ACRlySts;
-extern UINT8 VCU_ACRlyErrSts;
-extern UINT8 ISO_WorkStatus;
-extern UINT8 ISO_FaultLevel;
-extern UINT8 VIN_FrameNo;
-extern UINT8 VCU_VIN[17];
-extern UINT8 EBC_State;
-extern UINT8 EBC_ForbidHVOn;
-extern UINT8 EBC_RequestHVOff;
-extern UINT8 EBC_ChgFaultFlag;
-extern UINT8 EBC_LockupFaultFlag;
-extern UINT8 EBC_ChgCnctOverTemp;
-extern UINT8 EBC_DischgHIVLFlag;
-extern UINT8 EBC_ChargeHIVLFlag;
-extern UINT8 EBC_DChgCnctOverTemp;
-extern UINT8 EBC_FaultLevel;
-extern UINT8 EBC_FaultCode;
-extern UINT8 EBC_ChargingStatus;
-extern UINT8 EBC_ActiveHeatReq;
+extern UINT32 BMS_TotalCharEngy;
+extern UINT32 BMS_TotalDisCharEngy;
+extern UINT32 BMS_TotalBackCharEngy;
+extern UINT32 BMS_TotalStaCharEngy;
+extern UINT32 BMS_TotalGunCharEngy;
+extern UINT32 BMS_TotalGunCharCapy;
+extern UINT32 BMS_TotalCharCapy;
+extern UINT32 BMS_TotalDisCharCapy;
+extern UINT32 BMS_TotalBackCharCapy;
+extern UINT32 BMS_TotalStaCharCapy;
+/*Vcu->Ebc*********************************/
+extern UINT32 VcuInTable[4];
+extern UINT8 VcuRxFlag[4];
+extern BOOL VcuRxShortError[4];
+extern BOOL VcuRxLongError[4];
+extern UINT8 VcuRxErrorCounter[4];
+extern UINT8 VCU_Num_VIN[17];
+extern UINT8 VCU_St_VinRecv;
+extern UINT8 VCU_St_BattRly;
+extern UINT8 VCU_St_Check;
+extern UINT8 VCU_St_SysIntLock;
+extern UINT8 VCU_St_Veh;
+extern UINT8 VCU_St_Gear;
+extern UINT8 VCU_Ft_Sys;
+extern UINT8 VCU_Ft_Tran;
+extern UINT8 VCU_Ft_BattSys;
+extern UINT8 VCU_State_Veh;
+extern UINT8 VCU_Counter;
+extern UINT8 VCU_SoftVersion;
+extern UINT8 VCU_St_AccPedal;
+extern UINT8 VCU_St_BrakePedal;
+extern UINT8 VCU_St_ParkBrakeSw;
+/**********************************/
+extern UINT32 EbcOutTable[2][2];
+extern UINT8 EBC_Counter;
+extern UINT8 EBC_LockSt;
+extern UINT8 EBC_CnctSt;
+extern UINT8 EBC_DisCharCnctSt;
+extern UINT8 EBC_CharCnctSt;
+extern UINT8 EBC_FtLvl;
+extern UINT8 EBC_FtCode;
 extern UINT8 EBC_AirPressure;
-// extern UINT8 EBC_Life;
-// extern UINT8 EBC_ChgPos1Temp;
-// extern UINT8 EBC_ChgNeg1Temp;
-// extern UINT8 EBC_ChgPos2Temp;
-// extern UINT8 EBC_ChgNeg2Temp;
-// extern UINT8 EBC_DchgPos1Temp;
-// extern UINT8 EBC_DchgNeg1Temp;
-// extern UINT8 EBC_DchgPos2Temp;
-// extern UINT8 EBC_DchgNeg2Temp;
-extern UINT16 ISO_PosResis;
-extern UINT16 ISO_NegResis;
-/*************************************************************
- *Vcu->Ebc组码变量存放区
- ************************************************************/
-extern UINT8 VcuRxFlag[8];
-extern UINT32 VcuInTable[8];
-extern BOOL VcuRxShortError[8];
-extern BOOL VcuRxLongError[8];
-extern UINT8 VcuRxErrorCount[8];
-extern UINT8 Checksum;
-extern UINT8 VCU_Life;
-extern UINT8 VCU_HvOnOff;
-extern UINT8 VCU_AuxOnOff;
-extern UINT8 VCU_VehicleSpeed;
-extern UINT8 VCU_HeatOnOff;
-extern UINT8 VCU_MainPosRlySts;
-extern UINT8 VCU_MainNegRlySts;
-extern UINT8 VCU_PreChgRlySts;
-extern UINT8 VCU_AuxRlySts;
-extern UINT8 VCU_MainMotRlySts;
-extern UINT8 VCU_MainMotRlyErrSts;
-extern UINT8 VCU_Assist1RlySts;
-extern UINT8 VCU_Assist1RlyErrSts;
-extern UINT8 VCU_Assist2RlySts;
-extern UINT8 VCU_Assist2RlyErrSts;
-extern UINT8 VCU_Assist3RlySts;
-extern UINT8 VCU_Assist3RlyErrSts;
-extern UINT8 VCU_Assist4RlySts;
-extern UINT8 VCU_Assist4RlyErrSts;
-extern UINT8 VCU_VIN[17];
-extern UINT8 DrvMotPosRySts;
-extern UINT8 VehSts;
-extern UINT8 BrakePedal;
-extern UINT8 HandbrakeSts;
-extern UINT8 GearPos;
-extern UINT16 VehSpd;
-extern UINT32 VCU_TotalDistance;
-extern UINT8 EBC_VinMsgFlag;
-/*************************************************************
- *Ebc->Vcu组码变量存放区
- ************************************************************/
-extern UINT32 Ebc2VcuOutTable[25][2];
-extern UINT8 ReqVIN;
-extern UINT8 ReqHVOff;
-extern UINT8 ChgSysNum;
-extern UINT8 Fult2_MainPosRelayWeldErr;
-extern UINT8 Fult2_MainNegRelayWeldErr;
-extern UINT8 Fult2_DCChgPos1RelayWeldErr;
-extern UINT8 Fult2_DCChgNeg1RelayWeldErr;
-extern UINT8 Fult2_DCChgPos2RelayWeldErr;
-extern UINT8 Fult2_DCChgNeg2RelayWeldErr;
-extern UINT8 HeatPosRelayWeldErr;
-extern UINT8 HeatNegRelayWeldErr;
-extern UINT8 MainPosRelaySt;
-extern UINT8 MainNegRelaySt;
-extern UINT8 PreChgRelaySt;
-extern UINT8 DCChrgPos1RelaySt;
-extern UINT8 DCChrgNeg1RelaySt;
-extern UINT8 DCChrgPos2RelaySt;
-extern UINT8 DCChrgNeg2RelaySt;
-extern UINT8 AuxRelayWeldErr;
-extern UINT8 Fult2_BranchBreakErr;
-extern UINT8 Fult2_OverChrgCurrInTheDrive;
-extern UINT8 Fult2_MainPosRelayOpenErr;
-extern UINT8 Fult2_MainNegRelayOpenErr;
-extern UINT8 Fult2_DCChgPos1RelayOpenErr;
-extern UINT8 Fult2_DCChgPos2RelayOpenErr;
-extern UINT8 Fult2_DCChgNeg1RelayOpenErr;
-extern UINT8 Fult2_DCChgNeg2RelayOpenErr;
-extern UINT8 Fult2_HeatRelayWeldErr;
-extern UINT8 Fult2_HeatRelayOpenErr;
-extern UINT8 Fult2_TMSErr;
-extern UINT8 Fult2_PowerSupplyErr;
-extern UINT8 Fult2_PackSelfProtect;
-extern UINT8 Fult2_ChrgNTCTempOver;
-extern UINT8 BattSysNum;
-extern UINT8 BatSysFaultCode;
-extern UINT8 ST1_CheckSum;
-extern UINT8 ST1_Life;
-extern UINT8 BMS_SysSts;
-extern UINT8 AssisRelaySts;
-extern UINT8 BlanceSts;
-extern UINT8 DCChrgConnectSt;
-extern UINT8 ChrgMode;
-extern UINT8 ChrgStatus;
-extern UINT8 FaultLevel;
-extern UINT8 Fult1_DelTemp;
-extern UINT8 Fult1_OverTemp;
-extern UINT8 Fult1_PackOverHVolt;
-extern UINT8 Fult1_PackLowHVolt;
-extern UINT8 Fult1_LowSOC;
-extern UINT8 Fult1_OverUcell;
-extern UINT8 Fult1_LowUcell;
-extern UINT8 Fult1_LowInsRes;
-extern UINT8 Fult1_UcellUniformity;
-extern UINT8 Fult2_CellLowTemp;
-extern UINT8 Fult2_OverDischrgCurr;
-extern UINT8 Fult2_OverChrgCurrInTheChrg;
-extern UINT8 Fult_BranchVolUniformity;
-extern UINT8 Fult_BMSHardware;
-extern UINT8 Fult1_OverSOC;
-extern UINT8 Fult1_SOCChangeFast;
-extern UINT8 Fult2_InnerCommunicationErr;
-extern UINT8 Fult1_BatSysNotMatch;
-extern UINT8 Fult1_HVILFault;
-extern UINT8 Fult2_FireDetectorEr;
-extern UINT8 Fult2_PackFireWarning;
-extern UINT8 Fult2_FaultNum;
-extern UINT8 SOC;
-extern UINT8 SOH;
-extern UINT8 Max_Temp;
-extern UINT8 Min_Temp;
-extern UINT8 Avg_Temp;
-extern UINT8 MaxTempSysNr;
-extern UINT8 MaxTempNr;
-extern UINT8 MinTempSysNr;
-extern UINT8 MinTempNr;
-extern UINT8 MaxUcellSysNr;
-extern UINT8 MaxUcellNr;
-extern UINT8 MinUcellSysNr;
-extern UINT8 MinUcellNr;
-extern UINT8 Gun1DCNegTemp;
-extern UINT8 Gun1DCPosTemp;
-extern UINT8 Gun2DCNegTemp;
-extern UINT8 Gun2DCPosTemp;
-extern UINT8 HeatPosRelaySt;
-extern UINT8 HeatNegRelaySt;
-extern UINT8 UcellFrameNum;
-extern UINT8 UcellCSCNum;
-extern UINT8 TempFrameNum;
-extern UINT8 TempCSCNum;
-// extern UINT8 CurCSC_TempN;
-// extern UINT8 CurCSC_TempN1;
-// extern UINT8 CurCSC_TempN2;
-// extern UINT8 CurCSC_TempN3;
-// extern UINT8 CurCSC_TempN4;
-// extern UINT8 CurCSC_TempN5;
-
-extern UINT8 BattType;
-extern UINT8 CoolType;
-extern UINT8 TotCSCNum;
-extern UINT8 CellVoltPlat;
-extern UINT8 MinAvlCellVolt;
-extern UINT8 MaxAvlCellVolt;
-extern UINT8 EBC_DchgPos1Temp;
-extern UINT8 EBC_DchgNeg1Temp;
-extern UINT8 EBC_DchgPos2Temp;
-extern UINT8 EBC_DchgNeg2Temp;
+extern UINT8 EBC_CharSt;
+extern UINT8 EBC_ActHeatReq;
+extern UINT8 EBC_InhiHVOn;
+extern UINT8 EBC_ReqHVOff;
+extern UINT8 EBC_StopChgCmd;
+extern UINT8 EBC_State;
+extern UINT8 EBC_DisCharPos1Temp;
+extern UINT8 EBC_DischarNeg1Temp;
+extern UINT8 EBC_DisCharPos2Temp;
+extern UINT8 EBC_DisCharNeg2Temp;
 extern UINT8 EBC_ChgPos1Temp;
 extern UINT8 EBC_ChgNeg1Temp;
 extern UINT8 EBC_ChgPos2Temp;
 extern UINT8 EBC_ChgNeg2Temp;
-extern UINT8 ReqMode;
-extern UINT8 HVCmd;
-extern UINT8 ChgSts;
-extern UINT8 HVRelaySts;
-extern UINT8 SetTemp;
-extern UINT8 Bms_Life;
-extern UINT8 CRC;
-extern UINT8 TMS_WorkStatus;
-extern UINT8 TMS_HVRelayST;
-extern UINT8 TMS_OutletTemp;
-extern UINT8 TMS_InletTemp;
-extern UINT8 TMS_ErrCode;
-extern UINT8 TMS_FaultLevel;
-// extern UINT8 EBC_Life;
-
-extern UINT8 EBC_LockupSts;
-extern UINT8 EBC_ConnectorSts;
-extern UINT8 EBC_DischgConnectorSts;
-extern UINT8 EBC_ChgConnectorSts;
-extern UINT8 EBC_FaultLevel;
-extern UINT8 EBC_FaultCode;
-extern UINT16 BMS_SoftwareVersion;
-extern UINT16 BMS_HardwareVersion;
-extern UINT16 PackCurrent;
-extern UINT16 InstChrgCurMaxAllw;
-extern UINT16 InstDischrgCurMaxAllw;
-extern UINT16 PosIsolation;
-extern UINT16 NegIsolation;
-extern UINT16 PackInsideVolt;
-extern UINT16 PackOutsideVolt;
-extern UINT16 Max_Ucell;
-extern UINT16 Avg_Ucell;
-extern UINT16 Min_Ucell;
-extern UINT16 ChrgCurMaxAllw;
-// extern UINT16 CurCSC_UCellN;
-// extern UINT16 CurCSC_UCellN1;
-// extern UINT16 CurCSC_UCellN2;
-
-extern UINT16 Pack_RateCap;
-extern UINT16 Pack_RateHVolt;
-extern UINT16 Pack_RatePower;
-extern UINT16 PackTotCellNum;
-extern UINT16 PackTotTempNum;
-extern UINT16 SingleChargeKwh;
-extern UINT16 HVVolt;
-// extern UINT16 TMS_ReqPow;
 
-extern UINT32 TotalChargeKwh;
-extern UINT32 TotalDischargeKwh;
-extern UINT32 TotalEneryECOChargeKwh;
-extern UINT32 TotalStationChargeKwh;
-extern UINT32 TotalPoleChargeKwh;
 /*************************************************************
  *Ebc->ble组码变量存放区
  ************************************************************/
 // Ble
-extern uint16 bcud_E_snglChrg;       //单次充电能量,精度0.1kwh
-extern uint16 ebcd_Nr_swapBatt;      //换电次数
-extern uint16 ebcd_Nr_swapSucBatt;   //换电成功次数
-extern uint16 bcud_pct_soc;          //电池SOC,精度0.1
-extern uint16 bcud_Q_snglChrg;       //单次充电容量,精度0.1Ah
-extern uint16 bcud_V_battU;          //电池电压 精度0.1V
-extern uint32 bcud_E_accChrg;        //累计充电能量,精度0.1kwh
-extern uint32 bcud_E_accDischrg;     //累计放电能量,精度0.1kwh
-extern uint32 bcud_E_accPlugInChrg;  //累计插枪充电能量,精度0.1kwh
-extern uint32 bcud_E_accRecovry;     //累计回收能量,精度0.1kwh
-extern uint32 bcud_E_accSwapBatt;    //累计换电站能量,精度0.1kwh
-extern uint32 bcud_Q_accChrg;        //累计充电容量,精度0.1ah
-extern uint32 bcud_Q_accDischrg;     //累计放电容量,精度0.1ah
-extern uint32 bcud_Q_accPlugInChrg;  //累计插枪充电容量,精度0.1ah
-extern uint32 bcud_Q_accRecovry;     //累计回收容量,精度0.1ah
-extern uint32 bcud_Q_accSwapBatt;    //累计换电站容量,精度0.1ah
-extern uint32 vcud_M_accDrv;         //累计行驶里程,精度0.1km
-extern uint8 bcud_pct_bcuSoh;        //电池Soh,精度0.4%
-extern uint8 bcud_st_bcuComun;       //电池通讯状态,0-通信中断,1-通信正常
-extern uint8 bcud_st_bcuMainRelay;   //主继电器信号,0-保留 1-断开,2-关闭 3-异常
-extern uint8 bcud_st_bcuTmsLiquid;   //热管理液位状态,1-液位正常,0-液位过低
-extern uint8 bcud_st_hvWork;         //电池高压状态,0-高压开启 1-预充,2-高压关断,3-高压上电故障
-extern uint8 bcuv_Num_battSn[32];    //电池SN号码
+extern uint16 bcud_E_snglChrg;		 //单次充电能量,精度0.1kwh
+extern uint16 bcud_pct_soc;			 //电池SOC,精度0.1
+extern uint16 bcud_Q_snglChrg;		 //单次充电容量,精度0.1Ah
+extern uint16 bcud_V_battU;			 //电池电压 精度0.1V
+extern uint32 bcud_E_accChrg;		 //累计充电能量,精度0.1kwh
+extern uint32 bcud_E_accDischrg;	 //累计放电能量,精度0.1kwh
+extern uint32 bcud_E_accPlugInChrg;	 //累计插枪充电能量,精度0.1kwh
+extern uint32 bcud_E_accRecovry;	 //累计回收能量,精度0.1kwh
+extern uint32 bcud_E_accSwapBatt;	 //累计换电站能量,精度0.1kwh
+extern uint32 bcud_Q_accChrg;		 //累计充电容量,精度0.1ah
+extern uint32 bcud_Q_accDischrg;	 //累计放电容量,精度0.1ah
+extern uint32 bcud_Q_accPlugInChrg;	 //累计插枪充电容量,精度0.1ah
+extern uint32 bcud_Q_accRecovry;	 //累计回收容量,精度0.1ah
+extern uint32 bcud_Q_accSwapBatt;	 //累计换电站容量,精度0.1ah
+extern uint32 vcud_M_accDrv;		 //累计行驶里程,精度0.1km
+extern uint8 bcud_pct_bcuSoh;		 //电池Soh,精度0.4%
+extern uint8 bcud_st_bcuComun;		 //电池通讯状态,0-通信中断,1-通信正常
+extern uint8 bcud_st_bcuMainRelay;	 //主继电器信号,0-保留 1-断开,2-关闭 3-异常
+extern uint8 bcud_st_bcuTmsLiquid;	 //热管理液位状态,1-液位正常,0-液位过低
+extern uint8 bcud_st_hvWork;		 //电池高压状态,0-高压开启 1-预充,2-高压关断,3-高压上电故障
+extern uint8 bcuv_Num_battSn[32];	 //电池SN号码
 extern uint8 ebcd_flg_pluginLockSig; //互锁接插件信号状态,1-触发,0-无触发
-extern uint8 ebcd_flg_swapAdmit;     //允许换电判断:0-不允许,1-允许
-extern uint8 ebcd_Nr_errMax;         //故障等级:当前故障最大等级
-extern uint8 ebcd_Num_err1;          //故障码1
-extern uint8 ebcd_Num_err2;          //故障码2
-extern uint8 ebcd_st_ebcConnect;     // Ebc通讯模式,0-无线蓝牙,1-有线连接 ,默认0
-extern uint8 ebcd_st_ebcLockWork;    // Ebc解锁模式,0-单步模式,1-自动模式
-extern uint8 ebcd_st_ebcWork;        // Ebc当前状态 0-行车,1-通讯,2-换电
-extern uint8 ebcd_st_errTable1;      //故障表1,bit0-气压异常,bit1-液位异常,bit2-Flash读取异常
-extern uint8 ebcd_st_errTable2;      //故障表2,bit0-互锁异常,bit1-整车CAN异常,bit2-电池CAN异常,bit3-锁钩异常,bit4-升降机异常,bit5-电池位置异常
-extern uint8 ebcd_st_errTable3;      //故障表3,bit0-放电互锁异常,bit1-充电互锁异常,bit2-整车高压互锁异常
-extern uint8 ebcd_st_lockSensor;     //锁紧传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
-extern uint8 ebcd_st_lockSucJug;     //锁紧完成判断:0-完全未锁紧,1-完全锁紧,2-未完全锁紧"
-extern uint8 ebcd_st_pedstSensor;    //底座落座传感器:bit0-bit1:传感器0-1的状态,每bit:1-触发,0-无触发
-extern uint8 ebcd_st_pedstSucJug;    //电池底座到位判断:0-完全未到位,1-完全到位,2-未完全到位
-extern uint8 ebcd_st_pluginLockSig;  //互锁接插件信号具体状态,1-触发,0-无触发
-extern uint8 ebcd_st_unlockSensor;   //解锁传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
-extern uint8 ebcd_st_unlockSucJug;   //解锁完成判断:0-完全未解锁,1-完全解锁,2-未完全解锁
+extern uint8 ebcd_flg_swapAdmit;	 //允许换电判断:0-不允许,1-允许
+extern uint8 ebcd_Nr_errMax;		 //故障等级:当前故障最大等级
+extern uint8 ebcd_Num_err1;			 //故障码1
+extern uint8 ebcd_Num_err2;			 //故障码2
+extern uint8 ebcd_st_ebcConnect;	 // Ebc通讯模式,0-无线蓝牙,1-有线连接 ,默认0
+extern uint8 ebcd_st_ebcLockWork;	 // Ebc解锁模式,0-单步模式,1-自动模式
+extern uint8 ebcd_st_ebcWork;		 // Ebc当前状态 0-行车,1-通讯,2-换电
+extern uint8 ebcd_st_errTable1;		 //故障表1,bit0-气压异常,bit1-液位异常,bit2-Flash读取异常
+extern uint8 ebcd_st_errTable2;		 //故障表2,bit0-互锁异常,bit1-整车CAN异常,bit2-电池CAN异常,bit3-锁钩异常,bit4-升降机异常,bit5-电池位置异常
+extern uint8 ebcd_st_errTable3;		 //故障表3,bit0-放电互锁异常,bit1-充电互锁异常,bit2-整车高压互锁异常
+extern uint8 ebcd_st_lockSensor;	 //锁紧传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
+extern uint8 ebcd_st_lockSucJug;	 //锁紧完成判断:0-完全未锁紧,1-完全锁紧,2-未完全锁紧"
+extern uint8 ebcd_st_pedstSensor;	 //底座落座传感器:bit0-bit1:传感器0-1的状态,每bit:1-触发,0-无触发
+extern uint8 ebcd_st_pedstSucJug;	 //电池底座到位判断:0-完全未到位,1-完全到位,2-未完全到位
+extern uint8 ebcd_st_pluginLockSig;	 //互锁接插件信号具体状态,1-触发,0-无触发
+extern uint8 ebcd_st_unlockSensor;	 //解锁传感器信号:bit0-bit3:传感器0-3的状态每,bit:1-触发,0-不触发
+extern uint8 ebcd_st_unlockSucJug;	 //解锁完成判断:0-完全未解锁,1-完全解锁,2-未完全解锁
 // extern uint8 vcud_P_airSensor;            //压力传感器气压值:单位Mpa,精度0.01Mpa
-extern uint8 vcud_P_airSensorBack;        //后桥气压值,单位Mpa,精度0.01Mpa
-extern uint8 vcud_P_airSensorForward;     //前桥气压值,单位Mpa,精度0.01Mpa
-extern uint8 vcud_st_carStart;            //整车启动状态,0001-车辆启动状态,0010-熄火,0011-其他状态,1111-无效
-extern uint8 vcud_st_footbrake;           //脚刹信号,0-无效,1-有效
-extern uint8 vcud_st_gear;                //档位信号,FF-倒挡(R),0-空挡(N),X-前进档(DX)X取1-12
-extern uint8 vcud_st_handbrake;           //手刹信号,0-无效,1-有效
-extern uint8 vcud_st_keyOn;               //钥匙信号,1-上电,0-下电
-extern uint8 vcud_st_Steer;               //方向盘信号,bit0-左侧转向灯,bit1-右侧转向灯,每bit 0-OFF,1-ON
-extern uint8 vcud_st_vcuComun;            // vcu通讯状态,0-通信中断,1-通信正常
-extern uint8 vcuv_Num_vin[17];            // VIN码
-extern uint8 bled_flg_lockCmd;            //锁钩电磁阀锁紧命令,1-有效,0-无效
-extern uint8 bled_flg_unlockCmd;          //锁钩电磁阀解锁命令,1-有效,0-无效
-extern uint8 bled_flg_lockCmdForce;       //锁钩电磁阀锁紧强制命令,1-有效,0-无效
-extern uint8 bled_flg_unlockCmdForce;     //锁钩电磁阀解锁强制命令,1-有效,0-无效
-extern uint8 bled_flg_topAscendCmd;       //顶板上升命令,1-有效,0-无效
-extern uint8 bled_flg_topDescendCmd;      //顶板下降命令,1-有效,0-无效
+extern uint8 vcud_P_airSensorBack;		  //后桥气压值,单位Mpa,精度0.01Mpa
+extern uint8 vcud_P_airSensorForward;	  //前桥气压值,单位Mpa,精度0.01Mpa
+extern uint8 vcud_st_carStart;			  //整车启动状态,0001-车辆启动状态,0010-熄火,0011-其他状态,1111-无效
+extern uint8 vcud_st_footbrake;			  //脚刹信号,0-无效,1-有效
+extern uint8 vcud_st_gear;				  //档位信号,FF-倒挡(R),0-空挡(N),X-前进档(DX)X取1-12
+extern uint8 vcud_st_handbrake;			  //手刹信号,0-无效,1-有效
+extern uint8 vcud_st_keyOn;				  //钥匙信号,1-上电,0-下电
+extern uint8 vcud_st_Steer;				  //方向盘信号,bit0-左侧转向灯,bit1-右侧转向灯,每bit 0-OFF,1-ON
+extern uint8 vcud_st_vcuComun;			  // vcu通讯状态,0-通信中断,1-通信正常
+extern uint8 vcuv_Num_vin[17];			  // VIN码
+extern uint8 bled_flg_lockCmd;			  //锁钩电磁阀锁紧命令,1-有效,0-无效
+extern uint8 bled_flg_unlockCmd;		  //锁钩电磁阀解锁命令,1-有效,0-无效
+extern uint8 bled_flg_lockCmdForce;		  //锁钩电磁阀锁紧强制命令,1-有效,0-无效
+extern uint8 bled_flg_unlockCmdForce;	  //锁钩电磁阀解锁强制命令,1-有效,0-无效
+extern uint8 bled_flg_topAscendCmd;		  //顶板上升命令,1-有效,0-无效
+extern uint8 bled_flg_topDescendCmd;	  //顶板下降命令,1-有效,0-无效
 extern uint8 bled_flg_topAscendCmdForce;  //顶板强制上升命令,1-有效,0-无效
 extern uint8 bled_flg_topDescendCmdForce; //顶板强制下降命令,1-有效,0-无效
-extern uint8 bled_flg_openDustReCmd;      //除尘打开指令,1-有效,0-无效
-extern uint8 bled_flg_closeDustReCmd;     //除尘关闭指令,1-有效,0-无效
-extern uint8 bled_flg_Heart;              //心跳维持指令
-extern uint8 bled_flg_getEbcData;         //获取ebc数据指令
-extern uint8 bled_flg_getVcuData;         //获取vcu数据指令
-extern uint8 bled_flg_getBmsData;         //获取bms数据指令
-extern uint8 bled_flg_handShake;          //握手指令
-extern uint8 bled_flg_swapBattDone;       //换电完成指令
-extern uint8 bled_flg_backToDrv;          //回到行驶状态指令
-extern uint8 bled_flg_autoLock;           //自动锁定指令
-extern uint8 bled_flg_autoUnlock;         //自动解锁指令
-extern uint8 bled_flg_toSwapMod;          //换到换电状态
-extern uint8 bled_flg_safeStopCmd;        //急停指令
-extern uint32 bled_Nr_softVer;            // BLE软件版本
-extern uint8 bled_flg_role;               // ble的主从模式 01-主,02-从
-extern uint8 bled_flg_bleConn;            // ble蓝牙连接状态
-extern uint8 bled_flg_bleDisconn;         // ble蓝牙断开状态
+extern uint8 bled_flg_openDustReCmd;	  //除尘打开指令,1-有效,0-无效
+extern uint8 bled_flg_closeDustReCmd;	  //除尘关闭指令,1-有效,0-无效
+extern uint8 bled_flg_Heart;			  //心跳维持指令
+extern uint8 bled_flg_getEbcData;		  //获取ebc数据指令
+extern uint8 bled_flg_getVcuData;		  //获取vcu数据指令
+extern uint8 bled_flg_getBmsData;		  //获取bms数据指令
+extern uint8 bled_flg_handShake;		  //握手指令
+extern uint8 bled_flg_swapBattDone;		  //换电完成指令
+extern uint8 bled_flg_backToDrv;		  //回到行驶状态指令
+extern uint8 bled_flg_autoLock;			  //自动锁定指令
+extern uint8 bled_flg_autoUnlock;		  //自动解锁指令
+extern uint8 bled_flg_toSwapMod;		  //换到换电状态
+extern uint8 bled_flg_safeStopCmd;		  //急停指令
+extern uint32 bled_Nr_softVer;			  // BLE软件版本
+extern uint8 bled_flg_role;				  // ble的主从模式 01-主,02-从
+extern uint8 bled_flg_bleConn;			  // ble蓝牙连接状态
+extern uint8 bled_flg_bleDisconn;		  // ble蓝牙断开状态
 extern uint8 bled_st_dataTrans;			  //蓝牙数据传输状态
 //正式变量
 typedef enum
@@ -547,32 +342,34 @@ typedef enum
 	DriveMode = 0,
 	CommuMode = 1,
 	SwapMode = 2
-}WorkType;
+} WorkType;
 extern uint8 ebcd_flg_Can2SendEnbale;
 extern uint8 ebcd_st_toBleAns;
 extern uint8 ebcd_P_airSensor;
-extern uint8 ebcd_T_plugin[4];          //四个接插件温度
-extern uint8 ebcd_flg_forbidHVOn;       //禁止高压上电
-extern uint8 ebcb_flg_reqHvOff;         //请求高压下电
-extern uint8 ebcd_flg_LockErr;          //锁紧机构故障状态
-extern uint8 ebcd_flg_dChrgLockErr;     //放电互锁故障状态
-extern uint8 ebcd_flg_chrgLockErr;      //充电互锁故障状态
+extern uint8 ebcd_T_plugin[4];			//四个接插件温度
+extern uint8 ebcd_flg_forbidHVOn;		//禁止高压上电
+extern uint8 ebcb_flg_reqHvOff;			//请求高压下电
+extern uint8 ebcd_flg_LockErr;			//锁紧机构故障状态
+extern uint8 ebcd_flg_dChrgLockErr;		//放电互锁故障状态
+extern uint8 ebcd_flg_chrgLockErr;		//充电互锁故障状态
 extern uint8 ebcd_flg_dChgCnctOverTemp; //放电连接器过温标志
-extern uint8 ebcd_st_ebcWork;           // Ebc当前状态 0-行车,1-通讯,2-换电
-extern uint8 ebcd_Nr_errMax;      //故障等级:当前故障最大等级
-extern uint8 ebcd_Num_faultCode;  // ebc故障码,未定义
-extern uint8 ebcd_st_chargingMod; //充电模式,1-车载充电,2-换电站充电
-extern uint8 ebdc_st_lockUpState; //锁止机构状态,0-故障,1-解锁成功,2-上锁成功
-extern uint8 ebdc_st_ConnecState; //换电连接器状态(充电回路&放电回路同时闭合代表闭合,有一路断开则为断开),0_未连接 1_连接
-extern uint8 m_flg_HVlock1;//互锁状态1
-extern uint8 m_flg_HVlock2;//互锁状态2
+extern uint8 ebcd_st_ebcWork;			// Ebc当前状态 0-行车,1-通讯,2-换电
+extern uint8 ebcd_Nr_errMax;			//故障等级:当前故障最大等级
+extern uint8 ebcd_Num_faultCode;		// ebc故障码,未定义
+extern uint8 ebcd_st_chargingMod;		//充电模式,1-车载充电,2-换电站充电
+extern uint8 ebdc_st_lockUpState;		//锁止机构状态,0-故障,1-解锁成功,2-上锁成功
+extern uint8 ebdc_st_ConnecState;		//换电连接器状态(充电回路&放电回路同时闭合代表闭合,有一路断开则为断开),0_未连接 1_连接
+extern uint8 m_flg_HVlock1;				//互锁状态1
+extern uint8 m_flg_HVlock2;				//互锁状态2
 extern uint16 Test_LockPressure;
 #define EEPDATA_START_SEC_VAR
 #include "MemMap.h"
-extern uint8 ebcd_flg_ebcManCtrlEn;		 // EBC手动控制使能
-extern uint8 ebcd_flg_ebcManCtrlMode;		 // EBC手动控制模式
-extern uint16 LockDelayTime;//锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
-extern uint16 UnlockDelayTime;//解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
+extern uint16 ebcd_Nr_swapBatt;		  //换电次数
+extern uint16 ebcd_Nr_swapSucBatt;	  //换电成功次数
+extern uint8 ebcd_flg_ebcManCtrlEn;	  // EBC手动控制使能
+extern uint8 ebcd_flg_ebcManCtrlMode; // EBC手动控制模式
+extern uint16 LockDelayTime;		  //锁定延时时间(传感器到位以后延时多少时间确定为锁定成功
+extern uint16 UnlockDelayTime;		  //解锁延时时间(传感器到位以后延时多少时间确定为解锁成功
 extern uint16 ManuControlTimes;
 #define EEPDATA_STOP_SEC_VAR
 #include "MemMap.h"

+ 71 - 689
System/Vehicle/Communication/VcuCanProtocolFunc.c

@@ -1,746 +1,128 @@
-#include "VcuCanProtocolFunc.h"
-/**
- * @brief : VcuCan淇℃伅瑙g爜鍑芥暟
- * @param {UINT32} ID
- * @param {UINT8} *rawData
- * @return {*}
+/*
+ * @Author       : ChenJie
+ * @Date         : 2021-12-24 15:26:57
+ * @Version      : V3.0
+ * @LastEditors  : ChenJie
+ * @LastEditTime : 2022-05-09 16:13:46
+ * @Description  : file content
+ * @FilePath     : \VehicleControl\VehicleControl\src\System\Vehicle\Communication\VcuCanProtocolFunc.c
  */
+#include "VcuCanProtocolFunc.h"
 void VcuDecodeFunction(UINT32 ID, UINT8 *rawData)
 {
 	switch (ID)
 	{
-	case 0x1802F3D0:
-		Checksum = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0xFF);
-		VCU_Life = (UINT8)(((*(UINT8 *)(rawData + 1))) & 0xF);
-		VCU_HvOnOff = (UINT8)(((*(UINT8 *)(rawData + 1)) >> 4) & 0x3);
-		VCU_AuxOnOff = (UINT8)(((*(UINT8 *)(rawData + 1)) >> 6) & 0x3);
-		VCU_VehicleSpeed = (UINT8)(((*(UINT8 *)(rawData + 2))) & 0xFF);
-		VCU_HeatOnOff = (UINT8)(((*(UINT8 *)(rawData + 3))) & 0x3);
-		VCU_MainPosRlySts = (UINT8)(((*(UINT8 *)(rawData + 3)) >> 2) & 0x3);
-		VCU_MainNegRlySts = (UINT8)(((*(UINT8 *)(rawData + 3)) >> 4) & 0x3);
-		VCU_PreChgRlySts = (UINT8)(((*(UINT8 *)(rawData + 3)) >> 6) & 0x3);
-		VCU_AuxRlySts = (UINT8)(((*(UINT8 *)(rawData + 4))) & 0x3);
-		VCU_MainMotRlySts = (UINT8)(((*(UINT8 *)(rawData + 4)) >> 2) & 0x3);
-		VCU_MainMotRlyErrSts = (UINT8)(((*(UINT8 *)(rawData + 4)) >> 4) & 0x3);
-		VCU_Assist1RlySts = (UINT8)(((*(UINT8 *)(rawData + 4)) >> 6) & 0x3);
-		VCU_Assist1RlyErrSts = (UINT8)(((*(UINT8 *)(rawData + 5))) & 0x3);
-		VCU_Assist2RlySts = (UINT8)(((*(UINT8 *)(rawData + 5)) >> 2) & 0x3);
-		VCU_Assist2RlyErrSts = (UINT8)(((*(UINT8 *)(rawData + 5)) >> 4) & 0x3);
-		VCU_Assist3RlySts = (UINT8)(((*(UINT8 *)(rawData + 5)) >> 6) & 0x3);
-		VCU_Assist3RlyErrSts = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0x3);
-		VCU_Assist4RlySts = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 2) & 0x3);
-		VCU_Assist4RlyErrSts = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 4) & 0x3);
+	case 0x18F101D0:
+		VCU_St_BattRly = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0x3);
+		VCU_St_Check = (UINT8)(((*(UINT8 *)(rawData + 0)) >> 2) & 0x3);
+		VCU_St_SysIntLock = (UINT8)(((*(UINT8 *)(rawData + 0)) >> 4) & 0x3);
+		VCU_St_Veh = (UINT8)(((*(UINT8 *)(rawData + 0)) >> 6) & 0x3);
+		VCU_St_Gear = (UINT8)(((*(UINT8 *)(rawData + 3))) & 0xFF);
+		VCU_Ft_Sys = (UINT8)(((*(UINT8 *)(rawData + 4))) & 0x1);
+		VCU_Ft_Tran = (UINT8)(((*(UINT8 *)(rawData + 4)) >> 1) & 0x1);
+		VCU_Ft_BattSys = (UINT8)(((*(UINT8 *)(rawData + 4)) >> 5) & 0x1);
+		VCU_State_Veh = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0xF);
+		VCU_Counter = (UINT8)(((*(UINT8 *)(rawData + 7))) & 0xFF);
 		VcuRxFlag[0] = 0x01;
 		break;
+	case 0x18F103D0:
+		VCU_SoftVersion = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0xFF);
+		VCU_St_AccPedal = (UINT8)(((*(UINT8 *)(rawData + 3))) & 0xFF);
+		VCU_St_BrakePedal = (UINT8)(((*(UINT8 *)(rawData + 4))) & 0xFF);
+		VcuRxFlag[1] = 0x01;
+		break;
 	case 0x18E1F3D0:
-		if (*rawData >= 0x1 && *rawData <= 3)
+	{
+		UINT8 VinNum = 0;
+		VinNum = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0xFF);
+		if (VinNum == 0 || VinNum > 3)
+		{
+			break;
+		}
+		VCU_St_VinRecv = ((VinNum == 1) | ((VinNum == 2) << 1) | ((VinNum == 3) << 2)) | VCU_St_VinRecv;
+		for (UINT8 i = 0; i < 7; i++)
 		{
-			for (UINT8 i = 0; i < 7; i++)
+			if(((VinNum - 1) * 7 + i) < 17)
 			{
-				if ((UINT8)(i + ((*rawData) - 1) * 7) < (UINT8)sizeof(VCU_VIN))
-				{
-					VCU_VIN[i + ((*rawData) - 1) * 7] = *(rawData + i + 1) & 0xFF;
-				}
+				VCU_Num_VIN[(VinNum - 1) * 7 + i] = (UINT8)(((*(UINT8 *)(rawData + i))) & 0xFF);;
 			}
-			EBC_VinMsgFlag = EBC_VinMsgFlag | (1 << (*rawData - 1));
 		}
-		VcuRxFlag[1] = 0x01;
-		break;
-	case 0x18FEDA17:
-		VCU_TotalDistance = (UINT32)(((*(UINT32 *)(rawData + 0))) & 0xFFFFFFFF);
 		VcuRxFlag[2] = 0x01;
 		break;
-	case 0x18FF15F6:
-		DrvMotPosRySts = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0x1);
+	}
+	case 0x18FEF100:
+		VCU_St_ParkBrakeSw = (UINT8)(((*(UINT8 *)(rawData + 0)) >> 2) & 0x3);
 		VcuRxFlag[3] = 0x01;
 		break;
-	case 0x18FF43A8:
-		VehSts = (UINT8)(((*(UINT8 *)(rawData + 0))) & 0xF);
-		VcuRxFlag[4] = 0x01;
-		break;
-	case 0x18FF44A8:
-		BrakePedal = (UINT8)(((*(UINT8 *)(rawData + 4))) & 0xFF);
-		VcuRxFlag[5] = 0x01;
-		break;
-	case 0x18FF4617:
-		VehSpd = (UINT16)(((*(UINT16 *)(rawData + 0))) & 0xFFFF);
-		HandbrakeSts = (UINT8)(((*(UINT8 *)(rawData + 2))) & 0x3);
-		VcuRxFlag[6] = 0x01;
-		break;
-	case 0x18FF48A8:
-		GearPos = (UINT8)(((*(UINT8 *)(rawData + 0)) >> 4) & 0xF);
-		VcuRxFlag[7] = 0x01;
-		break;
 	default:
 		break;
 	}
 }
-/**
- * @brief : Vcu涓㈠抚淇℃伅璇婃柇
- * @param {*}
- * @return {*}
- */
 void VcuRxDiagnose(void)
 {
-	static UINT16 TimeCounter = 0;//ms
+	static UINT16 TimeCounter = 0;
 	TimeCounter = TimeCounter + 10;
-	/*
-	Can涓㈠抚璇婃柇
-	*/
 	for (UINT8 i = 0; i < sizeof(VcuInTable) / 4; i++)
 	{
-		if (VcuRxFlag[i] == 1) // received msg, and clear the error counter
+		if (VcuRxFlag[i] == 1) // received msg, and clear the error conter
 		{
-			VcuRxErrorCount[i] = 0;
+			VcuRxErrorCounter[i] = 0;
 			VcuRxFlag[i] = 0;
 			continue;
 		}
-		if (VcuRxErrorCount[i] < 3)
+		if (VcuRxErrorCounter[i] < 3)
 		{
 			VcuRxShortError[i] = 0;
 			VcuRxLongError[i] = 0;
 		}
-		else if (VcuRxErrorCount[i] >= 3 && VcuRxErrorCount[i] < 13)
+		else if (VcuRxErrorCounter[i] >= 3 && VcuRxErrorCounter[i] < 13)
 		{
 			VcuRxShortError[i] = 1;
 			VcuRxLongError[i] = 0;
 		}
-		else if (VcuRxErrorCount[i] >= 13)
+		else if (VcuRxErrorCounter[i] >= 13)
 		{
 			VcuRxShortError[i] = 0;
 			VcuRxLongError[i] = 1;
 			VcuRxMsgSetInvalidValue(VcuInTable[i]);
-			VcuRxErrorCount[i] = 0;
+			VcuRxErrorCounter[i] = 0;
 		}
-		else if (VcuRxErrorCount[i] == 0xFF)
+		else if (VcuRxErrorCounter[i] == 0xFF)
 		{
-			VcuRxErrorCount[i] = 0xFE;
+			VcuRxErrorCounter[i] = 0xFE;
 		}
 	}
-	/*
-	CAN涓㈠抚绱
-	*/
 	if (TimeCounter % 100 == 0) // period <=100ms
 	{
-		VcuRxErrorCount[0]++; // can msg 0x1802F3D0
-		// if(VcuRxErrorCount[0]>=13)
-		VcuRxErrorCount[3]++; // can msg 0x18FF15F6
-		// if(VcuRxErrorCount[3]>=13)
-		VcuRxErrorCount[6]++; // can msg 0x18FF4617
-		// if(VcuRxErrorCount[6]>=13)
-		VcuRxErrorCount[7]++; // can msg 0x18FF48A8
-							  // if(VcuRxErrorCount[7]>=13)
-	}
-	if (TimeCounter % 200 == 0) // period ==200ms
-	{
-	}
-	if (TimeCounter % 500 == 0) // period ==500ms
-	{
-		VcuRxErrorCount[2]++; // can msg 0x18FEDA17
-		// if(VcuRxErrorCount[2]>=13)
-		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[2]);
-		VcuRxErrorCount[4]++; // can msg 0x18FF43A8
-		// if(VcuRxErrorCount[4]>=13)
-		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[4]);
-		VcuRxErrorCount[5]++; // can msg 0x18FF44A8
-							  // if(VcuRxErrorCount[5]>=13)
-							  // printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[5]);
-	}
-	if (TimeCounter % 1000 == 0) // period ==1000ms
-	{
-		VcuRxErrorCount[1]++; // can msg 0x18E1F3D0
-							  // if(VcuRxErrorCount[1]>=13)
-							  // printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[1]);
-	}
-	if (TimeCounter % 2000 == 0) // period ==2000ms
-	{
-	}
-	if (TimeCounter % 3000 == 0) // period ==3000ms
-	{
-	}
-	if (TimeCounter % 5000 == 0) // period ==5000ms
-	{
+		VcuRxErrorCounter[0]++; // can msg 0x18F101D0
+		// if(canRxErrorCounter[0]>=13)
+		VcuRxErrorCounter[1]++; // can msg 0x18F103D0
+								// if(canRxErrorCounter[1]>=13)
 	}
 }
-/**
- * @brief : VcuCan淇℃伅澶辨晥缃綅
- * @param {UINT32} ID
- * @return {*}
- */
 void VcuRxMsgSetInvalidValue(UINT32 ID)
 {
 	switch (ID)
 	{
-	case 0x1802F3D0:
-		Checksum = 0xFF;
-		VCU_Life = 0xFF;
-		VCU_HvOnOff = 0xFF;
-		VCU_AuxOnOff = 0xFF;
-		VCU_VehicleSpeed = 0xFF;
-		VCU_HeatOnOff = 0xFF;
-		VCU_MainPosRlySts = 0xFF;
-		VCU_MainNegRlySts = 0xFF;
-		VCU_PreChgRlySts = 0xFF;
-		VCU_AuxRlySts = 0xFF;
-		VCU_MainMotRlySts = 0xFF;
-		VCU_MainMotRlyErrSts = 0xFF;
-		VCU_Assist1RlySts = 0xFF;
-		VCU_Assist1RlyErrSts = 0xFF;
-		VCU_Assist2RlySts = 0xFF;
-		VCU_Assist2RlyErrSts = 0xFF;
-		VCU_Assist3RlySts = 0xFF;
-		VCU_Assist3RlyErrSts = 0xFF;
-		VCU_Assist4RlySts = 0xFF;
-		VCU_Assist4RlyErrSts = 0xFF;
-		break;
-	case 0x18E1F3D0:
-		break;
-	case 0x18FEDA17:
-		VCU_TotalDistance = 0xFFFFFFFF;
-		break;
-	case 0x18FF15F6:
-		DrvMotPosRySts = 0xFF;
+	case 0x18F101D0:
+		VCU_St_BattRly = 0xFF;
+		VCU_St_Check = 0xFF;
+		VCU_St_SysIntLock = 0xFF;
+		VCU_St_Veh = 0xFF;
+		VCU_St_Gear = 0xFF;
+		VCU_Ft_Sys = 0xFF;
+		VCU_Ft_Tran = 0xFF;
+		VCU_Ft_BattSys = 0xFF;
+		VCU_State_Veh = 0xFF;
+		VCU_Counter = 0xFF;
+		break;
+	case 0x18F103D0:
+		VCU_SoftVersion = 0xFF;
+		VCU_St_AccPedal = 0xFF;
+		VCU_St_BrakePedal = 0xFF;
+		break;
+	case 0x18FEF100:
 		break;
-	case 0x18FF43A8:
-		VehSts = 0xFF;
-		break;
-	case 0x18FF44A8:
-		BrakePedal = 0xFF;
-		break;
-	case 0x18FF4617:
-		VehSpd = 0xFFFF;
-		HandbrakeSts = 0xFF;
-		break;
-	case 0x18FF48A8:
-		GearPos = 0xFF;
-		break;
-	default:
-		break;
-	}
-}
-
-/*
-缁勭爜鍑芥暟
-*/
-void VcuEncodeFunction(UINT32 ID, UINT8 *rawData)
-{
-	switch (ID)
-	{
-	case 0x1801D0F3:
-		ReqVIN = BMS13_ReqVIN;
-		ReqHVOff = BMS2_RqHVPoerOff;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ReqVIN << 0) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ReqHVOff << 2) & 0xFF);
-		break;
-	case 0x1801D8F3:
-		// BMS_SoftwareVersion = ;//瀹氫箟涓轰竴鑷�
-		// BMS_HardwareVersion = ;
-		*(UINT16 *)(rawData + 0) = *(UINT16 *)(rawData + 0) | ((BMS_SoftwareVersion << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 2) = *(UINT16 *)(rawData + 2) | ((BMS_HardwareVersion << 0) & 0xFFFF);
-		break;
-	case 0x1880D0F3:
-		ChgSysNum = 1; // 瀹氫箟涓�1涓�
-		Fult2_MainPosRelayWeldErr = BMS12_Fult2_MainPosRelayWeldErr;
-		Fult2_MainNegRelayWeldErr = BMS12_Fult2_MainNegRelayWeldErr;
-		Fult2_DCChgPos1RelayWeldErr = BMS12_Fult2_DCChrgPos1RelayWeldErr;
-		Fult2_DCChgNeg1RelayWeldErr = BMS12_Fult2_DCChrgNeg1RelayWeldErr;
-		Fult2_DCChgPos2RelayWeldErr = BMS12_Fult2_DCChrgPos2RelayWeldErr;
-		Fult2_DCChgNeg2RelayWeldErr = BMS12_Fult2_DCChrgNeg2RelayWeldErr;
-		HeatPosRelayWeldErr = 0x00;
-		HeatNegRelayWeldErr = 0x00;
-		MainPosRelaySt = BMS1_MainPosRelaySt;
-		MainNegRelaySt = BMS1_MainNegRelaySt;
-		PreChgRelaySt = BMS1_PreChgRelaySt;
-		DCChrgPos1RelaySt = BMS1_DCChrgPos1RelaySt;
-		DCChrgNeg1RelaySt = BMS1_DCChrgNeg1RelaySt;
-		DCChrgPos2RelaySt = BMS1_DCChrgPos2RelaySt;
-		DCChrgNeg2RelaySt = BMS1_DCChrgNeg2RelaySt;
-		AuxRelayWeldErr = 0x00;
-		Fult2_BranchBreakErr = BMS12_Fult2_BranchBreakErr;
-		Fult2_OverChrgCurrInTheDrive = BMS12_Fult2_OverChrgCurrInTheDrive;
-		Fult2_MainPosRelayOpenErr = BMS12_Fult2_MainPosRelayOpenErr;
-		Fult2_MainNegRelayOpenErr = BMS12_Fult2_MainNegRelayOpenErr;
-		Fult2_DCChgPos1RelayOpenErr = BMS12_Fult2_DCChrgPos1RelayOpenErr;
-		Fult2_DCChgPos2RelayOpenErr = BMS12_Fult2_DCChrgNeg1RelayOpenErr;
-		Fult2_DCChgNeg1RelayOpenErr = BMS12_Fult2_DCChrgPos2RelayOpenErr;
-		Fult2_DCChgNeg2RelayOpenErr = BMS12_Fult2_DCChrgNeg2RelayOpenErr;
-		Fult2_HeatRelayWeldErr = BMS12_Fult2_HeatRelayWeldErr;
-		Fult2_HeatRelayOpenErr = BMS12_Fult2_HeatRelayOpenErr;
-		Fult2_TMSErr = BMS12_Fult2_TMSErr;
-		Fult2_PowerSupplyErr = BMS12_Fult2_PowerSupplyErr;
-		Fult2_PackSelfProtect = BMS12_Fult2_PackSelfProtect;
-		Fult2_ChrgNTCTempOver = BMS12_Fult2_ChrgNTCTempOver;
-		BattSysNum = BMS9_BattSysNum;
-		BatSysFaultCode = BMS2_FaultCode; // TBD 鏄惁闇�瑕佸鍔燛BC鏁呴殰鐮�
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ChgSysNum << 0) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Fult2_MainPosRelayWeldErr << 4) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Fult2_MainNegRelayWeldErr << 5) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Fult2_DCChgPos1RelayWeldErr << 6) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Fult2_DCChgNeg1RelayWeldErr << 7) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((Fult2_DCChgPos2RelayWeldErr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((Fult2_DCChgNeg2RelayWeldErr << 1) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((HeatPosRelayWeldErr << 2) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((HeatNegRelayWeldErr << 3) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((MainPosRelaySt << 4) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((MainNegRelaySt << 6) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((PreChgRelaySt << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((DCChrgPos1RelaySt << 2) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((DCChrgNeg1RelaySt << 4) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((DCChrgPos2RelaySt << 6) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((DCChrgNeg2RelaySt << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((AuxRelayWeldErr << 2) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult2_BranchBreakErr << 3) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult2_OverChrgCurrInTheDrive << 4) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult2_MainPosRelayOpenErr << 6) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult2_MainNegRelayOpenErr << 7) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_DCChgPos1RelayOpenErr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_DCChgPos2RelayOpenErr << 1) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_DCChgNeg1RelayOpenErr << 2) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_DCChgNeg2RelayOpenErr << 3) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_HeatRelayWeldErr << 4) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_HeatRelayOpenErr << 5) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_TMSErr << 6) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult2_PowerSupplyErr << 7) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult2_PackSelfProtect << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult2_ChrgNTCTempOver << 1) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BattSysNum << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((BatSysFaultCode << 0) & 0xFF);
-		break;
-	case 0x1881D0F3:
-		ST1_Life = ST1_Life + 1;
-		if (ST1_Life >= 15)
-		{
-			ST1_Life = 0;
-		}
-		if (BMS1_SysSts == 2)
-		{
-			BMS_SysSts = 1; //楂樺帇涓婄數
-		}
-		else
-		{
-			BMS_SysSts = 2; //楂樺帇涓嬬數
-		}
-		AssisRelaySts = 0x00; // bms涓嶅彂锛屽浐瀹氫负0
-		BlanceSts = BMS1_BalanceStatus;
-		if (BMS1_DCChrgConnectSt == 1 || BMS1_DCChrgConnectSt == 2)
-		{
-			DCChrgConnectSt = 1;
-		}
-		else
-		{
-			DCChrgConnectSt = 0;
-		}
-		ChrgMode = BMS1_ChrgMode;
-		ChrgStatus = BMS1_ChrgStatus;
-		FaultLevel = BMS2_FaultLevel;
-		Fult1_DelTemp = BMS11_Fult1_DelTemp;
-		Fult1_OverTemp = BMS11_Fult1_OverTemp;
-		Fult1_PackOverHVolt = BMS11_Fult1_PackOverHVolt;
-		Fult1_PackLowHVolt = BMS11_Fult1_PackLowHVolt;
-		Fult1_LowSOC = BMS11_Fult1_LowSOC;
-		Fult1_OverUcell = BMS11_Fult1_OverUcell;
-		Fult1_LowUcell = BMS11_Fult1_LowUcell;
-		Fult1_LowInsRes = BMS11_Fult1_LowInsRes;
-		Fult1_UcellUniformity = BMS11_Fult1_UcellUniformity;
-		Fult2_CellLowTemp = BMS12_Fult2_CellLowTemp;
-		Fult2_OverDischrgCurr = BMS12_Fult2_OverDischrgCurr;
-		Fult2_OverChrgCurrInTheChrg = BMS12_Fult2_OverChrgCurrInTheChrg;
-		Fult_BranchVolUniformity = 0; // BMS涓嶅彂锛屽畾涔夋棤鏁呴殰
-		Fult_BMSHardware = 0;		  // BMS涓嶅彂锛屽畾涔変负鏃犳晠闅�
-		Fult1_OverSOC = BMS11_Fult1_OverSOC;
-		Fult1_SOCChangeFast = BMS11_Fult1_SOCChangeFast;
-		Fult2_InnerCommunicationErr = BMS12_Fult2_InnerCommunicationErr;
-		Fult1_BatSysNotMatch = BMS11_Fult1_BatSysNotMatch;
-		Fult1_HVILFault = BMS11_Fult1_HVILFault;
-		Fult2_FireDetectorEr = BMS12_Fult2_FireDetectorEr;
-		Fult2_PackFireWarning = BMS12_Fult2_PackFireWarning;
-		Fult2_FaultNum = BMS12_Fult2_FaultNum;
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((ST1_Life << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((BMS_SysSts << 4) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((AssisRelaySts << 6) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((BlanceSts << 7) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((DCChrgConnectSt << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((ChrgMode << 1) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((ChrgStatus << 3) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((FaultLevel << 5) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult1_DelTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult1_OverTemp << 2) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult1_PackOverHVolt << 4) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Fult1_PackLowHVolt << 6) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult1_LowSOC << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult1_OverUcell << 2) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult1_LowUcell << 4) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((Fult1_LowInsRes << 6) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult1_UcellUniformity << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult2_CellLowTemp << 2) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult2_OverDischrgCurr << 4) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((Fult2_OverChrgCurrInTheChrg << 6) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult_BranchVolUniformity << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult_BMSHardware << 2) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult1_OverSOC << 4) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult1_SOCChangeFast << 5) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult2_InnerCommunicationErr << 6) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Fult1_BatSysNotMatch << 7) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((Fult1_HVILFault << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((Fult2_FireDetectorEr << 1) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((Fult2_PackFireWarning << 2) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((Fult2_FaultNum << 3) & 0xFF);
-		ST1_CheckSum = 0x00;
-		for (UINT8 i = 1; i < 8; i++)
-		{
-			ST1_CheckSum = ST1_CheckSum ^ (*(UINT8 *)(rawData + i));
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ST1_CheckSum << 0) & 0xFF);
-		break;
-	case 0x1882D0F3:
-		SOC = BMS2_SOC;
-		SOH = BMS2_SOH;
-		PackCurrent = BMS2_PackCurrent;
-		InstChrgCurMaxAllw = BMS5_InstChrgCurMaxAllw;
-		InstDischrgCurMaxAllw = BMS5_InstDischrgCurMaxAllw;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((SOC << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((SOH << 0) & 0xFF);
-		*(UINT16 *)(rawData + 2) = *(UINT16 *)(rawData + 2) | ((PackCurrent << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((InstChrgCurMaxAllw << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 6) = *(UINT16 *)(rawData + 6) | ((InstDischrgCurMaxAllw << 0) & 0xFFFF);
-		break;
-	case 0x1883D0F3:
-		PosIsolation = BMS4_PosIsolation;
-		NegIsolation = BMS4_NegIsolation;
-		PackInsideVolt = BMS2_PackInsideVolt;
-		PackOutsideVolt = 0xFFFF;
-		*(UINT16 *)(rawData + 0) = *(UINT16 *)(rawData + 0) | ((PosIsolation << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 2) = *(UINT16 *)(rawData + 2) | ((NegIsolation << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((PackInsideVolt << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 6) = *(UINT16 *)(rawData + 6) | ((PackOutsideVolt << 0) & 0xFFFF);
-		break;
-	case 0x1884D0F3:
-		Max_Temp = (UINT8)(BMS8_Max_Temp + 10);
-		Min_Temp = (UINT8)(BMS8_Min_Temp + 10);
-		Avg_Temp = (UINT8)(BMS8_Avg_Temp + 10);
-		MaxTempSysNr = BMS8_MaxTempSysNr;
-		MaxTempNr = BMS8_MaxTempNr;
-		MinTempSysNr = BMS8_MinTempSysNr;
-		MinTempNr = BMS8_MinTempNr;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Max_Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((Min_Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((Avg_Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((MaxTempSysNr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((MaxTempNr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((MinTempSysNr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((MinTempNr << 0) & 0xFF);
-		break;
-	case 0x1885D0F3:
-		Max_Ucell = BMS6_Max_Ucell;
-		MaxUcellSysNr = BMS7_MaxUcellSysNr;
-		MaxUcellNr = BMS7_MaxUcellNr;
-		Avg_Ucell = BMS6_Avg_Ucell;
-		*(UINT16 *)(rawData + 0) = *(UINT16 *)(rawData + 0) | ((Max_Ucell << 0) & 0xFFFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((MaxUcellSysNr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((MaxUcellNr << 0) & 0xFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((Avg_Ucell << 0) & 0xFFFF);
-		break;
-	case 0x1886D0F3:
-		Min_Ucell = BMS6_Min_Ucell;
-		MinUcellSysNr = BMS7_MinUcellSysNr;
-		MinUcellNr = BMS7_MinUcellNr;
-		if (BMS5_ChrgCurMaxAllw < 10000)
-		{
-			ChrgCurMaxAllw = 10000 - BMS5_ChrgCurMaxAllw;
-		}
-		else
-		{
-			ChrgCurMaxAllw = 0;
-		}
-		*(UINT16 *)(rawData + 0) = *(UINT16 *)(rawData + 0) | ((Min_Ucell << 0) & 0xFFFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((MinUcellSysNr << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((MinUcellNr << 0) & 0xFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((ChrgCurMaxAllw << 0) & 0xFFFF);
-		break;
-	case 0x1887D0F3:
-		Gun1DCNegTemp = BMS23_Gun1DCNegTemp;
-		Gun1DCPosTemp = BMS23_Gun1DCPosTemp;
-		Gun2DCNegTemp = BMS23_Gun2DCNegTemp;
-		Gun2DCPosTemp = BMS23_Gun2DCPosTemp;
-		if (BMS1_HeatPosRelaySt == 1)
-		{
-			HeatPosRelaySt = 0;
-		}
-		else if (BMS1_HeatPosRelaySt == 2)
-		{
-			HeatPosRelaySt = 1;
-		}
-		if (BMS1_HeatNegRelaySt == 1)
-		{
-			HeatNegRelaySt = 0;
-		}
-		else if (BMS1_HeatNegRelaySt == 2)
-		{
-			HeatNegRelaySt = 1;
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Gun1DCNegTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((Gun1DCPosTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((Gun2DCNegTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((Gun2DCPosTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((HeatPosRelaySt << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((HeatNegRelaySt << 2) & 0xFF);
-		break;
-	case 0x18C1D0F3:
-	{
-		UINT16 BMS_Cell_Volt_Buffer[3] = {0x00};
-		UcellCSCNum = 0x01; // 瀹氫箟涓�1
-		for (UINT8 i = 0; i < 3; i++)
-		{
-			if (((UcellFrameNum - 1) * 3 + i) < sizeof(BMS_Cell_Volt) / 2)
-			{
-				BMS_Cell_Volt_Buffer[i] = BMS_Cell_Volt[(UcellFrameNum - 1) * 3 + i];
-			}
-			else
-			{
-				UcellFrameNum = 1;
-				break;
-			}
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((UcellFrameNum << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((UcellCSCNum << 0) & 0xFF);
-		*(UINT16 *)(rawData + 2) = *(UINT16 *)(rawData + 2) | ((BMS_Cell_Volt_Buffer[0] << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((BMS_Cell_Volt_Buffer[1] << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 6) = *(UINT16 *)(rawData + 6) | ((BMS_Cell_Volt_Buffer[2] << 0) & 0xFFFF);
-		UcellFrameNum = UcellFrameNum + 1;
-		break;
-	}
-	case 0x18C2D0F3:
-	{
-		UINT8 BMS_Cell_TempN_Buffer[6] = {0x00};
-		TempCSCNum = 0x01; // 瀹氫箟涓�1
-		for (UINT8 i = 0; i < 6; i++)
-		{
-			if (((TempFrameNum - 1) * 6 + i) < sizeof(BMS_Cell_TempN))
-			{
-				BMS_Cell_TempN_Buffer[i] = BMS_Cell_TempN[(TempFrameNum - 1) * 6 + i] + 10;
-			}
-			else
-			{
-				TempFrameNum = 1;
-				break;
-			}
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((TempFrameNum << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((TempCSCNum << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((BMS_Cell_TempN_Buffer[0] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((BMS_Cell_TempN_Buffer[1] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((BMS_Cell_TempN_Buffer[2] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((BMS_Cell_TempN_Buffer[3] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BMS_Cell_TempN_Buffer[4] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((BMS_Cell_TempN_Buffer[5] << 0) & 0xFF);
-		TempFrameNum = TempFrameNum + 1;
-		break;
-	}
-	case 0x18E1D0F3:
-	{
-		UINT8 Sys_chk = 0;
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((0x01 << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((BMS_SN_SysCode[0] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((BMS_SN_SysCode[1] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((BMS_SN_SysCode[2] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((BMS_SN_SysCode[3] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BMS_SN_SysCode[4] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((BMS_SN_SysCode[5] << 0) & 0xFF);
-		for (UINT8 i = 0; i < 7; i++)
-		{
-			Sys_chk = Sys_chk ^ (*(UINT8 *)(rawData + 1 + i));
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Sys_chk << 0) & 0xFF);
-		break;
-	}
-	case 0x18E2D0F3:
-	{
-		UINT8 Sys_chk = 0;
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((BMS_SN_SysCode[6] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((BMS_SN_SysCode[7] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((BMS_SN_SysCode[8] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((BMS_SN_SysCode[9] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((BMS_SN_SysCode[10] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BMS_SN_SysCode[11] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((BMS_SN_SysCode[12] << 0) & 0xFF);
-		for (UINT8 i = 0; i < 7; i++)
-		{
-			Sys_chk = Sys_chk ^ (*(UINT8 *)(rawData + 1 + i));
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Sys_chk << 0) & 0xFF);
-		break;
-	}
-	case 0x18E3D0F3:
-	{
-		UINT8 Sys_chk = 0;
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((BMS_SN_SysCode[13] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((BMS_SN_SysCode[14] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((BMS_SN_SysCode[15] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((BMS_SN_SysCode[16] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((BMS_SN_SysCode[17] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BMS_SN_SysCode[18] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((BMS_SN_SysCode[19] << 0) & 0xFF);
-		for (UINT8 i = 0; i < 7; i++)
-		{
-			Sys_chk = Sys_chk ^ (*(UINT8 *)(rawData + 1 + i));
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Sys_chk << 0) & 0xFF);
-		break;
-	}
-	case 0x18E4D0F3:
-	{
-		UINT8 Sys_chk = 0;
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((BMS_SN_SysCode[20] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((BMS_SN_SysCode[21] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((BMS_SN_SysCode[22] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((BMS_SN_SysCode[23] << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((0xFF << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((0XFF << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((0xFF << 0) & 0xFF);
-		for (UINT8 i = 0; i < 7; i++)
-		{
-			Sys_chk = Sys_chk ^ (*(UINT8 *)(rawData + 1 + i));
-		}
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Sys_chk << 0) & 0xFF);
-		break;
-	}
-	case 0x18E5D0F3:
-		Pack_RateCap = BMS21_RateCap / 10;
-		Pack_RateHVolt = BMS21_RateHVolt;
-		Pack_RatePower = BMS21_RatePower;
-		BattType = BMS21_BattType;
-		CoolType = BMS21_CoolType;
-		*(UINT16 *)(rawData + 0) = *(UINT16 *)(rawData + 0) | ((Pack_RateCap << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 2) = *(UINT16 *)(rawData + 2) | ((Pack_RateHVolt << 0) & 0xFFFF);
-		*(UINT16 *)(rawData + 4) = *(UINT16 *)(rawData + 4) | ((Pack_RatePower << 0) & 0xFFFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((BattType << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((CoolType << 4) & 0xFF);
-		break;
-	case 0x18E6D0F3:
-		TotCSCNum = BMS9_TotCSCNum;
-		PackTotCellNum = BMS9_PackTotCellNum;
-		PackTotTempNum = BMS9_PackTotTempNum;
-		CellVoltPlat = 0xFF;   // BMS涓嶅彂锛屽畾涔変负鏃犳晥
-		MinAvlCellVolt = 0xFF; // BMS涓嶅彂锛屽畾涔変负鏃犳晥
-		MaxAvlCellVolt = 0xFF; // BMS涓嶅彂锛屽畾涔変负鏃犳晥
-		*(UINT8 *)(rawData + 0) = TotCSCNum;
-		*(UINT8 *)(rawData + 1) = PackTotCellNum;
-		*(UINT8 *)(rawData + 2) = PackTotCellNum>>8;
-		*(UINT8 *)(rawData + 3) = PackTotTempNum;
-		*(UINT8 *)(rawData + 4) = PackTotTempNum>>8;
-		*(UINT8 *)(rawData + 5) = CellVoltPlat;
-		*(UINT8 *)(rawData + 6) = MinAvlCellVolt;
-		*(UINT8 *)(rawData + 7) = MaxAvlCellVolt;
-		break;
-	case 0x18F1D0F3:
-		TotalChargeKwh = BMS15_TotalChargeKwh;
-		TotalDischargeKwh = BMS15_TotalDischargeKwh;
-		SingleChargeKwh = BMS19_SingleChargeKwh;
-		*(UINT8 *)(rawData + 0) = TotalChargeKwh;
-		*(UINT8 *)(rawData + 1) = TotalChargeKwh>>8;
-		*(UINT8 *)(rawData + 2) = TotalChargeKwh>>16;
-		*(UINT8 *)(rawData + 3) = TotalDischargeKwh;
-		*(UINT8 *)(rawData + 4) = TotalDischargeKwh>>8;
-		*(UINT8 *)(rawData + 5) = TotalDischargeKwh>>16;
-		*(UINT8 *)(rawData + 6) = SingleChargeKwh;
-		*(UINT8 *)(rawData + 7) = SingleChargeKwh>>8;
-		break;
-	case 0x18F2D0F3:
-		TotalEneryECOChargeKwh = BMS16_TotalEneryECOChargeKwh;
-		TotalStationChargeKwh = BMS17_TotalStationChargeKwh;
-		*(UINT8 *)(rawData + 0) = TotalEneryECOChargeKwh;
-		*(UINT8 *)(rawData + 1) = TotalEneryECOChargeKwh>>8;
-		*(UINT8 *)(rawData + 2) = TotalEneryECOChargeKwh>>16;
-		*(UINT8 *)(rawData + 3) = TotalStationChargeKwh;
-		*(UINT8 *)(rawData + 4) = TotalStationChargeKwh>>8;
-		*(UINT8 *)(rawData + 5) = TotalStationChargeKwh>>16;
-		*(UINT8 *)(rawData + 6) = 0xFF;
-		*(UINT8 *)(rawData + 7) = 0xFF;
-		break;
-	case 0x18F3D0F3:
-		TotalPoleChargeKwh = BMS18_TotalPoleChargeKwh;
-		*(UINT8 *)(rawData + 0) = BMS18_TotalPoleChargeKwh;
-		*(UINT8 *)(rawData + 1) = BMS18_TotalPoleChargeKwh>>8;
-		*(UINT8 *)(rawData + 2) = BMS18_TotalPoleChargeKwh>>16;
-		*(UINT8 *)(rawData + 3) = 0xFF;
-		*(UINT8 *)(rawData + 4) = 0xFF;
-		*(UINT8 *)(rawData + 5) = 0xFF;
-		*(UINT8 *)(rawData + 6) = 0xFF;
-		*(UINT8 *)(rawData + 7) = 0xFF;
-		break;
-	case 0x18FEF8A7:
-		EBC_DchgPos1Temp = ebcd_T_plugin[0];
-		EBC_DchgNeg1Temp = ebcd_T_plugin[1];
-		EBC_DchgPos2Temp = ebcd_T_plugin[2];
-		EBC_DchgNeg2Temp = ebcd_T_plugin[3];
-		EBC_ChgPos1Temp = 0xFF; //淇濈暀鍊硷紝瀹氫箟涓烘棤鏁�
-		EBC_ChgNeg1Temp = 0xFF; //淇濈暀鍊硷紝瀹氫箟涓烘棤鏁�
-		EBC_ChgPos2Temp = 0xFF; //淇濈暀鍊硷紝瀹氫箟涓烘棤鏁�
-		EBC_ChgNeg2Temp = 0xFF; //淇濈暀鍊硷紝瀹氫箟涓烘棤鏁�
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((EBC_DchgPos1Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((EBC_DchgNeg1Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((EBC_DchgPos2Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((EBC_DchgNeg2Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((EBC_ChgPos1Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((EBC_ChgNeg1Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((EBC_ChgPos2Temp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((EBC_ChgNeg2Temp << 0) & 0xFF);
-		break;
-	case 0x18FF45F4:
-		ReqMode = BMS28_ReqMode;
-		HVCmd = BMS28_HVCmd;
-		ChgSts = BMS1_ChrgStatus;
-		HVRelaySts = BMS28_HVRelaySts;
-		HVVolt = BMS28_HVVolt;
-		SetTemp = BMS28_SetTemp;
-		Bms_Life = BMS28_Life;
-		CRC = BMS28_CRC;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ReqMode << 0) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((HVCmd << 2) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((ChgSts << 4) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((HVRelaySts << 6) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((HVVolt >> 8) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((HVVolt << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((SetTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((Bms_Life << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((CRC << 0) & 0xFF);
-		break;
-	case 0x18FFC13A:
-		// TMS_WorkStatus = ;
-		// TMS_HVRelayST = ;
-		// TMS_OutletTemp = ;
-		// TMS_InletTemp = ;
-		// TMS_ReqPow = ;
-		// TMS_ErrCode = ;
-		// TMS_FaultLevel = ;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((TMS_WorkStatus << 0) & 0xFF);
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((TMS_HVRelayST << 2) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((TMS_OutletTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 2) = *(UINT8 *)(rawData + 2) | ((TMS_InletTemp << 0) & 0xFF);
-		*(UINT8 *)(rawData + 5) = *(UINT8 *)(rawData + 5) | ((TMS_ReqPow >> 8) & 0xFF);
-		*(UINT8 *)(rawData + 6) = *(UINT8 *)(rawData + 6) | ((TMS_ReqPow << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((TMS_ErrCode << 0) & 0xFF);
-		*(UINT8 *)(rawData + 7) = *(UINT8 *)(rawData + 7) | ((TMS_FaultLevel << 6) & 0xFF);
-		break;
-	case 0x18FFF8A7:
-	{
-		static UINT8 Life = 0;
-		Life = Life + 1;
-		EBC_LockupSts = ebdc_st_lockUpState;
-		EBC_ConnectorSts = ebdc_st_ConnecState;
-		EBC_DischgConnectorSts = 0; // 淇濈暀淇″彿锛屽畾涔変负鏃犳晥
-		EBC_ChgConnectorSts = 0;	// 淇濈暀淇″彿锛屽畾涔変负鏃犳晥
-		EBC_FaultLevel = ebcd_Nr_errMax;
-		EBC_FaultCode = ebcd_Num_faultCode;
-		*(UINT8 *)(rawData + 0) = *(UINT8 *)(rawData + 0) | ((Life << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((EBC_LockupSts << 0) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((EBC_ConnectorSts << 2) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((EBC_DischgConnectorSts << 4) & 0xFF);
-		*(UINT8 *)(rawData + 1) = *(UINT8 *)(rawData + 1) | ((EBC_ChgConnectorSts << 6) & 0xFF);
-		*(UINT8 *)(rawData + 3) = *(UINT8 *)(rawData + 3) | ((EBC_FaultLevel << 0) & 0xFF);
-		*(UINT8 *)(rawData + 4) = *(UINT8 *)(rawData + 4) | ((EBC_FaultCode << 0) & 0xFF);
-		break;
-	}
 	default:
 		break;
 	}

Some files were not shown because too many files changed in this diff