123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- /***
- * @Author: chenjie
- * @Date: 2022-10-27
- * @LastEditTime: 2022-11-10
- * @LastEditors: chenjie
- * @Description:
- * @FilePath: \S32K146_4G\code\app\AppGlobalVar.h
- * @Copyright (c) 2022 by chenjie, All Rights Reserved.
- */
- #ifndef APPGLOBALVAR_H_
- #define APPGLOBALVAR_H_
- #define APP_CAN_ENABLE
- #include "hal_adapter.h"
- #define BATT_SN_LEN 17
- extern const uint32 AppSwVersion;
- extern const uint8 DataModuleType;
- extern const uint16 HwVersion;
- extern const uint32 BlSwVersion;
- extern const uint32 DrvSwVersion;
- extern const uint8 BmsManuFacture;
- extern const uint8 BmsInfo;
- #define BMS_CELL_MAX_NUM 384
- #define BMS_TEMP_MAX_NUM 64
- typedef struct _AppDataType
- {
- uint8 BattCellCount;
- uint8 BattTempCount;
- } AppDataBody;
- extern bool TcpSysReboot;
- extern uint8 TcpbattSN[17];
- extern uint8 VIN[17];
- extern volatile uint32 TimerCounter;
- extern uint32 BattTempR[4];
- extern uint16 ErrorArray[10];
- extern uint8 Fota_update_flag;
- extern boolean Fota_Process_Going;
- extern uint8 Fota_error_flag;
- extern uint16 DeviceSpeed;
- typedef struct
- {
- uint8 RealLen;
- uint8 *DataPtr;
- } QueueDataTrans_Type;
- /*GPS*/
- extern QueueHandle_t GpsDataQueueHandle;
- extern sint16 xyzData[3];
- /*Hal_Can*/
- extern real_T returnFreq[3][5];
- extern real_T returnP[3][5];
- extern uint8 CanIf_u8TxConfirmCnt;
- extern boolean CanIf_bTxFlag;
- extern uint8 CanIf_u8RxIndicationCnt;
- extern boolean CanIf_bRxFlag;
- extern QueueHandle_t CanRecvQueueHandle0;
- extern QueueHandle_t CanRecvQueueHandle1;
- extern QueueHandle_t CanRecvQueueHandle2;
- extern TaskHandle_t Uart_Hal_RecvTask_Handle, Uart_Hal_SendTask_Handle, MainTask_Handle, Uart0Task_Handle, CanTask_Handle, GpsTask_Handle, Uart_4G_Task_Handle;
- extern SemaphoreHandle_t sleep_mutex;
- extern uint8 CSQValue;
- extern sint8 SocketId;
- extern sint8 RegChkRet;
- extern char WebSiteIp[20];
- extern const char WebSiteName[];
- extern uint16 WebSitePort;
- extern char ImeiNum[15];
- extern char IccidNum[20];
- extern uint8 TcpWorkState;
- typedef struct _AppEppType
- {
- uint32 battDischrgAccCap;
- uint32 battDischrgAccEnrg;
- uint16 battCycleTimes;
- uint32 AccMileage;
- } AppEppBody;
- typedef struct _AppConfigType
- {
- bool appSaveFlg;
- bool eolFlg;
- uint8 deviceSn[17];
- AppEppBody AppDataInfo;
- uint8 re[20];
- } AppConfigBody;
- extern AppConfigBody AppConfigInfo;
- #ifdef APP_CAN_ENABLE
- extern uint8 vehicleStatus;
- extern uint8 bmsHVOn;
- extern uint8 currentGearPosition;
- extern uint8 parkingBreakStatus;
- extern uint8 breakingStatus;
- extern uint32 ODO;
- extern uint8 dcdcWorkStatus;
- extern uint8 numOfChrgableSubsys;
- extern uint8 chrgableSubsysCode;
- extern uint16 vcuDCVol;
- // EBC
- extern uint8 ebcStatus;
- extern uint8 ebcAskHVOn;
- extern uint8 ebcAskHVOff;
- extern uint8 retainLockSignal;
- extern uint8 dischargeLockSignal;
- extern uint8 chargeLockSignal;
- extern uint8 chargeFlag;
- 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[BMS_TEMP_MAX_NUM];
- 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_ErrCode;
- extern UINT8 TMS_FaultLevel;
- extern UINT16 BMS_SoftwareVersion;
- extern UINT16 BMS_HardwareVersion;
- 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[BMS_CELL_MAX_NUM];
- 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 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;
- #endif
- #endif /* APPGLOBALVAR_H_ */
|