AppConfig.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /****************************************************************************
  2. *
  3. * Copy right: 2021-, Copyrigths of RLWL Ltd.Chen J
  4. * File name: AppConfig.h
  5. * Description: App Config H file 配置文件,可以针对不同参数进行更改
  6. * History: Rev3.0 2021-07-06
  7. *
  8. ****************************************************************************/
  9. #define BMS_MANUFACTURE (2) //BMS制造商表示1-超力源,2-美顺
  10. #define BMS_INFO (1) //1-1表示超力源4830,1-2表示超力源6060,2-1表示美顺6455
  11. #define DATA_MODULE_TYPE (1) //1表示NB模块,2表示4G cat1
  12. #define EOLSTATE (0) //1表示下线检测跳过,使用默认值,0表示使用下线检测
  13. #define DEFAULT_SN "RLTEST00000000001" //默认上传的SN编码
  14. #define APPSWVERSION 0x03000000 //数据模块软件版本号
  15. #define TCP_ADD "iotp.fast-fun.cn" //数据上传的地址
  16. #define TCP_PORT 8712 //数据上传的端口
  17. #define NB_OTHER_TEMP_NUM (4) //NB采集的温度个数
  18. #define HWVERSION 0x0102 //硬件主版本,现为V1.2板
  19. #define BLSWVERSION 0x01020000 //BootLoader版本号V1.2.0.0
  20. #define DRVSWVERSION 0x01050000 //驱动层版本号V1.4.0.0 驱动层1.5.0.0,增加了三轴
  21. #define APP_CONFIG_FILE_NAME "qxappconfig.nvm"
  22. #define APP_DATAINFO_FILE_NAME "qxappDataInfo.nvm"
  23. #define BATT_SN_LEN 17
  24. //declear struct vars 结构体变量定义
  25. typedef struct AppConfigDataType
  26. {
  27. BOOL appDataModify; //数据更改标志位
  28. UINT8 battSN[BATT_SN_LEN]; //电池SN号码
  29. UINT8 EOLState; //下线检测状态
  30. UINT32 AppSwVersion; //软件版本
  31. UINT8 BattCellCount; //电池电压串数
  32. UINT8 BattTempCount; //电池温度个数
  33. }AppConfigDataType;
  34. typedef struct AppConfigDataHeader
  35. {
  36. UINT16 fileBodySize; //file body size, not include size of header;
  37. UINT8 checkSum;
  38. }AppConfigDataHeader;
  39. typedef struct AppDataType
  40. {
  41. BOOL appDataModify; //数据更改标志位
  42. UINT8 BattInfoSendFreqHigh; //电池信息发送间隔高频,单位s
  43. UINT8 BattInfoSendFreqNomal; //电池信息发送间隔正常,单位s
  44. UINT8 BattInfoSendFreqLow; //电池信息发送间隔低频,单位s
  45. UINT8 PosInfoSendFreqHigh; //定位信息发送间隔高频,单位s
  46. UINT8 PosInfoSendFreqNormal; //定位信息发送间隔正常,单位s
  47. UINT8 PosInfoSendFreqLow; //定位信息发送间隔低频,单位s
  48. UINT32 AccMileage; //累计里程,单位m
  49. UINT16 SysReStartCount; //系统重启次数
  50. }AppDataBody;
  51. typedef struct _AppDataHeader
  52. {
  53. UINT16 fileBodySize; //file body size, not include size of header;
  54. UINT8 checkSum;
  55. }AppDataHeader;
  56. typedef struct AppSocketConnectionContext_Tag
  57. {
  58. INT32 id;
  59. INT32 status;
  60. }AppSocketConnectionContext;