AppSignal.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /****************************************************************************
  2. *
  3. * Copy right: 2021-, Copyrigths of RLWL Ltd.
  4. * File name: Signal.h
  5. * Description: Global variable definition H file
  6. * History: Rev3.0 2021-07-06
  7. *
  8. ****************************************************************************/
  9. #include "commontypedef.h"
  10. #include "cmsis_os2.h"
  11. #include "AppConfig.h"
  12. #include "osasys.h"
  13. #include "queue.h"
  14. #include "bsp_custom.h"
  15. //declear the bool vars
  16. extern volatile BOOL NB_Fota_update_flag;
  17. extern BOOL canSNMsgLostFlag;
  18. extern BOOL canSNMsgRxCmpltFlag;
  19. extern BOOL canVINMsgRxCmpltFlag;
  20. //extern declear the UINT8 vars
  21. extern UINT8 TcpErrorcount;
  22. extern UINT8 TCPWorkState;
  23. extern UINT8 TcpSendLen;
  24. extern UINT8 GpsFlag;
  25. extern UINT8 PadInterrupt;
  26. extern UINT8 Lockstatus;
  27. //declear the UINT16 vars
  28. extern UINT16 nbHwVersion;
  29. extern UINT16 ErrorNum[5];
  30. //declear the UINT32 vars
  31. extern UINT32 nbSwVersion;
  32. extern volatile UINT32 TimeCounter;
  33. //declear other vars
  34. extern osMutexId_t Error_Mutex;
  35. extern QueueHandle_t GpsRecvHandle;
  36. extern QueueHandle_t UartWriteCmdHandle;
  37. extern QueueHandle_t CanRecvHandle;
  38. extern AppConfigDataType AppNVMData;
  39. extern AppDataBody AppDataInfo;
  40. extern AppSocketConnectionContext socContext; //网络连接状态
  41. extern process_app gProcess_app;
  42. extern UINT32 COMInTable[133];
  43. extern UINT8 canRxShortError[133];
  44. extern UINT8 canRxLongError[133];
  45. extern UINT8 canRxErrorCounter[133];
  46. extern UINT8 canRxFlag[133];
  47. extern UINT8 UDSService[2]; //uds 服务
  48. extern UINT8 UDSSubService[2]; // uds 子服务
  49. extern UINT8 UDSSubServiceActionCode[2]; // uds 子服务状态
  50. extern UINT8 GpsData[16]; //GPS 数据缓存区
  51. extern UINT16 updateDifferDataPackageCounter; //差分包升级计数器
  52. extern BOOL downloadReady;
  53. extern UINT8 UDSSwitch; //下线检测标志位
  54. extern UINT8 BattWorkStateDelay;
  55. //declear the UINT8 vars
  56. extern UINT8 csq;
  57. extern UINT8 bmsStatus;
  58. extern UINT8 bmsErrClass;
  59. extern UINT8 chrgConctStatus;
  60. extern UINT8 highVolPwrDwnReq;
  61. extern UINT8 chrgStatus;
  62. extern UINT8 bmsErrNum;
  63. extern UINT8 bmsLife;
  64. extern UINT8 battSoc;
  65. extern UINT8 maxCellTemp;
  66. extern UINT8 minCellTemp;
  67. extern UINT8 avgCellTemp;
  68. extern UINT8 maxVolSubsysCode;
  69. extern UINT8 minVolSubsysCode;
  70. extern UINT8 maxTempSubsysCode;
  71. extern UINT8 maxTempCellCode;
  72. extern UINT8 minTempSubsysCode;
  73. extern UINT8 minTempCellCode;
  74. extern UINT8 numOfChrgableSubsys;
  75. extern UINT8 lengthOfChrgableSysCode;
  76. extern UINT8 chrgableSysCode;
  77. extern UINT8 chrgableSubsysCode;
  78. extern UINT8 numOfCellTemp;
  79. extern UINT8 numOfBattErr;
  80. extern UINT8 battCellTemp[CELL_TEMP_NUM];
  81. extern UINT8 mainPosRlyStatus;
  82. extern UINT8 preRlyStatus;
  83. extern UINT8 mainNegRlyStatus;
  84. extern UINT8 thrRlyStatus;
  85. extern UINT8 ptc1RlyStatus;
  86. extern UINT8 airCondRlyStatus;
  87. extern UINT8 dcChrg1PosRlyStatus;
  88. extern UINT8 dcChrg1NegRlyStatus;
  89. extern UINT8 dcChrg2PosRlyStatus;
  90. extern UINT8 dcChrg2NegRlyStatus;
  91. extern UINT8 heatPosRlyStatus;
  92. extern UINT8 heatNegRlyStatus;
  93. extern UINT8 coolRlyStatus;
  94. extern UINT8 ptc2RlyStatus;
  95. extern UINT8 mainPosRlyErrStatus;
  96. extern UINT8 preRlyErrStatus;
  97. extern UINT8 mainNegRlyErrStatus;
  98. extern UINT8 thrRlyErrStatus;
  99. extern UINT8 ptc1RlyErrStatus;
  100. extern UINT8 airCondRlyErrStatus;
  101. extern UINT8 dcChrg1PosRlyErrStatus;
  102. extern UINT8 dcChrg1NegRlyErrStatus;
  103. extern UINT8 dcChrg2PosRlyErrStatus;
  104. extern UINT8 dcChrg2NegRlyErrStatus;
  105. extern UINT8 heatPosRlyErrStatus;
  106. extern UINT8 heatNegRlyErrStatus;
  107. extern UINT8 coolRlyErrStatus;
  108. extern UINT8 ptc2RlyErrStatus;
  109. extern UINT8 battSOH;
  110. extern UINT8 SN[24];
  111. extern UINT8 bmsHVOn;
  112. extern UINT8 acRelayStatus;
  113. extern UINT8 ptcRelayStatus;
  114. extern UINT8 mainRelayStatus;
  115. extern UINT8 preRelayStatus;
  116. extern UINT8 ptc2RelayStatus;
  117. extern UINT8 acRelayErrorStatus;
  118. extern UINT8 ptcRelayErrorStatus;
  119. extern UINT8 mainRelayErrorStatus;
  120. extern UINT8 preRelayErrorStatus;
  121. extern UINT8 hvLockErrorStatus;
  122. extern UINT8 ptc2RelayErrorStatus;
  123. extern UINT8 ebcStatus;
  124. extern UINT8 ebcAskHVOn;
  125. extern UINT8 ebcAskHVOff;
  126. extern UINT8 retainLockSignal;
  127. extern UINT8 dischargeLockSignal;
  128. extern UINT8 chargeLockSignal;
  129. extern UINT8 errorClass;
  130. extern UINT8 errorCode1;
  131. extern UINT8 errorCode2;
  132. extern UINT8 chargeFlag;
  133. extern UINT8 exchangeBattAirPressure;
  134. extern UINT8 lifeSignal;
  135. extern UINT8 vehicleStatus;
  136. extern UINT8 currentGearPosition;
  137. extern UINT8 parkingBreakStatus;
  138. extern UINT8 breakingStatus;
  139. extern UINT8 VIN[17];
  140. extern UINT8 frontBreakingPressure;
  141. extern UINT8 backBreakingPressure;
  142. extern UINT8 frontBreakingPressureErrorStatus;
  143. extern UINT8 backBreakingPressureErrorStatus;
  144. extern UINT8 dcdcErrorClass;
  145. extern UINT8 dcdcWorkStatus;
  146. extern UINT8 mainElectricityErrorClass;
  147. extern UINT8 pumpWorkStatus;
  148. extern UINT8 elecAirCompressorErrorStatus;
  149. extern UINT8 elecAirCompressorWrokStatus;
  150. //declear the UINT16 vars
  151. extern UINT16 maxChrgCurrAllowed;
  152. extern UINT16 maxDischrgCurrAllowed;
  153. extern UINT16 packTotalVol;
  154. extern UINT16 packTotalCurr;
  155. extern UINT16 insulationR;
  156. extern UINT16 maxCellVol;
  157. extern UINT16 minCellVol;
  158. extern UINT16 maxVolCellCode;
  159. extern UINT16 minVoCelllCode;
  160. extern UINT16 numOfCells;
  161. extern UINT16 battCellU[CELL_NUM];
  162. extern UINT16 vcuDCVol;
  163. //declear the UINT32 vars
  164. extern UINT32 accChrgAh;
  165. extern UINT32 accDischrgAh;
  166. extern UINT32 accChrgkWh;
  167. extern UINT32 accDischrgkWh;
  168. extern UINT32 accRecvryChrgAh;
  169. extern UINT32 accRecvryChrgkWh;
  170. extern UINT32 accStationChrgAh;
  171. extern UINT32 accStationChrgkWh;
  172. extern UINT32 accGunChrgAh;
  173. extern UINT32 accGunChrgkWh;
  174. extern UINT32 sglChrgAh;
  175. extern UINT32 sglChrgkWh;
  176. extern UINT32 ODO;