123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- #ifndef APPCONFIG_H
- #define APPCONFIG_H
- #define BMS_MANUFACTURE (2)
- #define BMS_INFO (1)
- #define DATA_MODULE_TYPE (1)
- #define EOLSTATE (0)
- #define DEFAULT_SN "RLTEST00000000002"
- #define APPSWVERSION 0x03000007
- #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 BATT_SN_LEN 17
- #define BMS_OTHER_TEMP 2
- #define WORK_TIME 5
- #define SLEEP_TIME 60
- #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 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 chargEndWorkTime;
- UINT8 BattTempCount;
- UINT8 BattCellCount;
- UINT8 BmsHwVersion;
- UINT8 BmsSwVersion;
- UINT32 BLSwVersion;
- UINT32 DrvSwVersion;
- UINT32 AppSwVersion;
- UINT8 EOLState;
- }AppConfigDataType;
- typedef struct _AppConfigDataHeader
- {
- UINT16 fileBodySize;
- UINT8 checkSum;
- }AppConfigDataHeader;
- typedef struct _AppDataType
- {
- BOOL appDataModify;
- UINT8 BattInfoSendFreqHigh;
- UINT8 BattInfoSendFreqNomal;
- UINT8 BattInfoSendFreqLow;
- UINT8 PosInfoSendFreqHigh;
- UINT8 PosInfoSendFreqNormal;
- UINT8 PosInfoSendFreqLow;
- UINT32 AccMileage;
- UINT16 SysReStartCount;
- UINT8 RelayControl;
- UINT8 BattLock;
- UINT8 BattStolenFlag;
- 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];
- }AppDataBody;
- typedef struct _AppDataHeader
- {
- UINT16 fileBodySize;
- UINT8 checkSum;
- }AppDataHeader;
- 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
|