123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- #ifndef APPCONFIG_H
- #define APPCONFIG_H
- #define BMS_MANUFACTURE (2)
- #define BMS_INFO (4)
- #define DATA_MODULE_TYPE (1)
- #define EOLSTATE (0)
- #define DEFAULT_SN "MHBDBL450N224B001"
- #define APPSWRELEASE 1
- #define APPSWVERSION 0x03020008
- #define RELAYCONFIG 1
- #define TCP_ADD "iotp.fast-fun.cn"
- #define TCP_PORT 8712
- #define NB_OTHER_TEMP_NUM (4)
- #define HWVERSION 0x0102
- #define BLSWVERSION 0x01020000
- #define DRVSWVERSION 0x01050000
- #define APP_CONFIG_FILE_NAME "qxappconfig.nvm"
- #define APP_DATAINFO_FILE_NAME "qxappDataInfo3.nvm"
- #define BCU_DATAINFO_FILE_NAME "qxBcuDataInfo.nvm"
- #define BATT_SN_LEN 17
- #define BMS_OTHER_TEMP 2
- #define WORK_TIME 5
- #define SLEEP_TIME 60
- #define ErrorNumLength 20
- #define BATT_IDLE_SYM 0x00
- #define BATT_CHARGE_SYM 0x02
- #define BATT_DISCHARGE_SYM 0x01
- #define BATT_MOVE_SYM 0x01
- #define BATT_NO_MOVE_SYM 0x00
- #define TCP_START_SYM1 0x23
- #define TCP_START_SYM2 0x23
- #define TCP_CMD_SYM 0x02
- #define TCP_HEART_SYM 0x07
- #define TCP_ANS_SYM 0xFE
- #define TCP_QUERY_SYM 0x80
- #define TCP_SETCMD_SYM 0x81
- #define TCP_CONCMD_SYM 0x82
- #define TCP_ENCPT_ENABLE 0x00
- #define TCP_ENCPT_DISABLE 0x01
- #define BATTMSG 0x80
- #define GPSMSG 0x82
- #define OTHERMSG 0x84
- #define STATESMSG 0x85
- #define VERSIONMSG 0x86
- #define DEBUGMSG 0x8C
- #define FLASH_BMS_FOTA_START_ADDR 0x2E6000
- #define FLASH_BMS_FOTA_LEN 0x32000
- #define FLASH_BMS_FOTA_END_ADDR 0x318000
- typedef struct _AppConfigDataType
- {
- BOOL appDataModify;
- UINT8 battSN[BATT_SN_LEN];
- BOOL isBattLocked;
- UINT8 reserved1;
- UINT8 reserved2;
- UINT8 reserved3;
- UINT8 reserved4;
- UINT8 reserved5;
- UINT32 reserved6;
- UINT32 reserved7;
- UINT32 reserved8;
- UINT8 EOLState;
- } AppConfigDataType;
- typedef struct _AppConfigDataHeader
- {
- UINT16 fileBodySize;
- UINT8 checkSum;
- } AppConfigDataHeader;
- typedef struct _AppDataType
- {
- BOOL appDataModify;
- UINT8 BattCellCount;
- UINT8 BattTempCount;
- UINT8 BattInfoSendFreqHigh;
- UINT8 BattInfoSendFreqNomal;
- UINT8 BattInfoSendFreqLow;
- UINT8 PosInfoSendFreqHigh;
- UINT8 PosInfoSendFreqNormal;
- UINT8 PosInfoSendFreqLow;
- UINT32 AccMileage;
- UINT16 SysReStartCount;
- UINT8 RelayControl;
- UINT8 BattForceLock;
- UINT8 BattLock;
- UINT8 BattStolenFlag;
- UINT8 UserLock;
- UINT8 RentalLock;
- UINT8 RentalType;
- UINT8 ExpiryTimeArray[6];
- UINT8 ErrorMsg;
- UINT8 RentalStartTime[6];
- } AppDataBody;
- typedef struct _AppAlgorithmType
- {
- BOOL appDataModify;
- UINT32 blcv_Q_totalCpE[28];
- UINT16 blcv_Q_reqCpE[28];
- UINT16 socd_pct_bcuSocE;
- UINT16 socd_pct_battSocE;
- UINT16 sohd_tm_chrgStartStatE;
- BOOL sohd_flg_chrgEndE;
- UINT16 sohv_V_chrgStartStatE[28];
- UINT16 sohd_Q_chrgE;
- UINT16 sohv_Q_packCapArrE[10];
- UINT16 sohv_Q_cellCapArrE[28];
- UINT16 iscv_Q_remainCpE[28];
- UINT32 iscd_tm_totalE;
- BOOL sfmd_flg_iscFltE;
- BOOL sfmd_flg_mainCirClosFltE;
- BOOL sfmd_flg_heatCirClosFltE;
- BOOL sfmd_flg_heatCirOpenFltE;
- BOOL sfmd_flg_heatRunFltE;
- UINT16 ihd_tm_parkTimeE;
- UINT16 sorv_ohm_cellRE[28];
- } AppAlgorithmData;
- typedef struct _AppDataHeader
- {
- UINT16 fileBodySize;
- UINT8 checkSum;
- } AppDataHeader;
- typedef struct _BCUDataHeader
- {
- UINT16 fileBodySize;
- UINT8 checkSum;
- } BcuDataHeader;
- typedef struct AppSocketConnectionContext_Tag
- {
- INT32 id;
- INT32 status;
- } AppSocketConnectionContext;
- typedef enum
- {
- IDLE = 0,
- WORK,
- LISTEN
- } process_app;
- typedef struct _GPSInfo
- {
- UINT8 locateMark;
- UINT8 satelliteNum;
- UINT8 direction[2];
- UINT8 speed[2];
- UINT8 altitude[2];
- UINT8 latitude[4];
- UINT8 longitude[4];
- UINT8 AccMileage[4];
- } GPSInfo;
- #endif
|