SFM.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. /*
  2. * File: SFM.h
  3. *
  4. * Code generated for Simulink model 'SFM'.
  5. *
  6. * Model version : 1.88
  7. * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
  8. * C/C++ source code generated on : Fri Sep 10 17:41:38 2021
  9. *
  10. * Target selection: ert.tlc
  11. * Embedded hardware selection: Intel->x86-64 (Windows64)
  12. * Code generation objectives: Unspecified
  13. * Validation result: Not run
  14. */
  15. #ifndef RTW_HEADER_SFM_h_
  16. #define RTW_HEADER_SFM_h_
  17. #ifndef SFM_COMMON_INCLUDES_
  18. #define SFM_COMMON_INCLUDES_
  19. #include "rtwtypes.h"
  20. #endif /* SFM_COMMON_INCLUDES_ */
  21. #include "SFM_types.h"
  22. /* Includes for objects with custom storage classes. */
  23. #include "BCUCal.h"
  24. #include "BCUDisp.h"
  25. /* Block states (default storage) for system '<S27>/Subsytem' */
  26. #ifndef SFM_MDLREF_HIDE_CHILD_
  27. typedef struct {
  28. uint8_T delay_DSTATE; /* '<S31>/delay' */
  29. } DW_Subsytem_SFM_T;
  30. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  31. /* Block states (default storage) for system '<S27>/Subsytem1' */
  32. #ifndef SFM_MDLREF_HIDE_CHILD_
  33. typedef struct {
  34. uint8_T delay_DSTATE; /* '<S32>/delay' */
  35. } DW_Subsytem1_SFM_T;
  36. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  37. /* Block states (default storage) for system '<S28>/Subsytem' */
  38. #ifndef SFM_MDLREF_HIDE_CHILD_
  39. typedef struct {
  40. uint8_T delay_DSTATE; /* '<S41>/delay' */
  41. } DW_Subsytem_SFM_d_T;
  42. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  43. /* Block states (default storage) for system '<S28>/Subsytem1' */
  44. #ifndef SFM_MDLREF_HIDE_CHILD_
  45. typedef struct {
  46. uint8_T delay_DSTATE; /* '<S42>/delay' */
  47. } DW_Subsytem1_SFM_k_T;
  48. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  49. /* Block states (default storage) for system '<S28>/Subsytem6' */
  50. #ifndef SFM_MDLREF_HIDE_CHILD_
  51. typedef struct {
  52. uint8_T delay_DSTATE; /* '<S47>/delay' */
  53. } DW_Subsytem6_SFM_T;
  54. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  55. /* Block states (default storage) for system '<S28>/Subsytem7' */
  56. #ifndef SFM_MDLREF_HIDE_CHILD_
  57. typedef struct {
  58. uint8_T delay_DSTATE; /* '<S48>/delay' */
  59. } DW_Subsytem7_SFM_T;
  60. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  61. /* Block signals for model 'SFM' */
  62. #ifndef SFM_MDLREF_HIDE_CHILD_
  63. typedef struct {
  64. uint16_T CellU[28]; /* '<S13>/Chart' */
  65. uint16_T MinU; /* '<S13>/Chart' */
  66. uint16_T MaxU; /* '<S13>/Chart' */
  67. boolean_T ErrFlg[28]; /* '<S13>/Chart' */
  68. boolean_T GNDFlg; /* '<S13>/Chart' */
  69. } B_SFM_c_T;
  70. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  71. /* Block states (default storage) for model 'SFM' */
  72. #ifndef SFM_MDLREF_HIDE_CHILD_
  73. typedef struct {
  74. uint16_T Time_Delay_DSTATE; /* '<S23>/Time_Delay' */
  75. uint16_T Cntl; /* '<S3>/FltCodeArry' */
  76. uint16_T CellUArry[84]; /* '<S13>/Chart' */
  77. uint8_T delay_DSTATE; /* '<S30>/delay' */
  78. uint8_T delay_DSTATE_j; /* '<S29>/delay' */
  79. uint8_T ChgNr[28]; /* '<S13>/Chart' */
  80. uint8_T RecNr[28]; /* '<S13>/Chart' */
  81. uint8_T UdelNr[28]; /* '<S13>/Chart' */
  82. boolean_T FirstFlg; /* '<S13>/Chart' */
  83. boolean_T ErrUFlg[28]; /* '<S13>/Chart' */
  84. DW_Subsytem7_SFM_T Subsytem9; /* '<S28>/Subsytem9' */
  85. DW_Subsytem6_SFM_T Subsytem8; /* '<S28>/Subsytem8' */
  86. DW_Subsytem7_SFM_T Subsytem7; /* '<S28>/Subsytem7' */
  87. DW_Subsytem6_SFM_T Subsytem6; /* '<S28>/Subsytem6' */
  88. DW_Subsytem_SFM_d_T Subsytem5_l; /* '<S28>/Subsytem5' */
  89. DW_Subsytem_SFM_d_T Subsytem4_p; /* '<S28>/Subsytem4' */
  90. DW_Subsytem1_SFM_k_T Subsytem3_b; /* '<S28>/Subsytem3' */
  91. DW_Subsytem_SFM_d_T Subsytem2_p; /* '<S28>/Subsytem2' */
  92. DW_Subsytem1_SFM_k_T Subsytem1_n; /* '<S28>/Subsytem1' */
  93. DW_Subsytem_SFM_d_T Subsytem_j0; /* '<S28>/Subsytem' */
  94. DW_Subsytem_SFM_T Subsytem5; /* '<S27>/Subsytem5' */
  95. DW_Subsytem_SFM_T Subsytem4; /* '<S27>/Subsytem4' */
  96. DW_Subsytem1_SFM_T Subsytem3; /* '<S27>/Subsytem3' */
  97. DW_Subsytem_SFM_T Subsytem2; /* '<S27>/Subsytem2' */
  98. DW_Subsytem1_SFM_T Subsytem1_e; /* '<S27>/Subsytem1' */
  99. DW_Subsytem_SFM_T Subsytem_j; /* '<S27>/Subsytem' */
  100. } DW_SFM_f_T;
  101. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  102. #ifndef SFM_MDLREF_HIDE_CHILD_
  103. /* Real-time Model Data Structure */
  104. struct tag_RTM_SFM_T {
  105. const char_T **errorStatus;
  106. };
  107. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  108. #ifndef SFM_MDLREF_HIDE_CHILD_
  109. typedef struct {
  110. RT_MODEL_SFM_T rtm;
  111. } MdlrefDW_SFM_T;
  112. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  113. extern void SFM_Init(void);
  114. extern void SFM(void);
  115. /* Model reference registration function */
  116. extern void SFM_initialize(const char_T **rt_errorStatus);
  117. #ifndef SFM_MDLREF_HIDE_CHILD_
  118. extern void SFM_Subsytem_Init(DW_Subsytem_SFM_T *localDW);
  119. extern boolean_T SFM_Subsytem(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  120. int16_T rtu_inputs, int16_T rtu_threshold, uint8_T rtu_CtrN, DW_Subsytem_SFM_T
  121. *localDW);
  122. extern void SFM_Subsytem1_Init(DW_Subsytem1_SFM_T *localDW);
  123. extern boolean_T SFM_Subsytem1(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  124. int16_T rtu_InputS, int16_T rtu_threshold, uint8_T rtu_CtrN,
  125. DW_Subsytem1_SFM_T *localDW);
  126. extern boolean_T SFM_Subsystem5(boolean_T rtu_In1, boolean_T rtu_In2);
  127. extern void SFM_Subsytem_b_Init(DW_Subsytem_SFM_d_T *localDW);
  128. extern boolean_T SFM_Subsytem_j(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  129. uint16_T rtu_inputs, uint16_T rtu_threshold, uint8_T rtu_CtrN,
  130. DW_Subsytem_SFM_d_T *localDW);
  131. extern void SFM_Subsytem1_f_Init(DW_Subsytem1_SFM_k_T *localDW);
  132. extern boolean_T SFM_Subsytem1_n(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  133. uint16_T rtu_InputS, uint16_T rtu_threshold, uint8_T rtu_CtrN,
  134. DW_Subsytem1_SFM_k_T *localDW);
  135. extern void SFM_Subsytem6_Init(DW_Subsytem6_SFM_T *localDW);
  136. extern boolean_T SFM_Subsytem6(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  137. uint32_T rtu_inputs, uint16_T rtu_threshold, uint8_T rtu_CtrN,
  138. DW_Subsytem6_SFM_T *localDW);
  139. extern void SFM_Subsytem7_Init(DW_Subsytem7_SFM_T *localDW);
  140. extern boolean_T SFM_Subsytem7(uint8_T rtu_Enable, boolean_T rtu_Precondition,
  141. uint32_T rtu_InputS, uint16_T rtu_threshold, uint8_T rtu_CtrN,
  142. DW_Subsytem7_SFM_T *localDW);
  143. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  144. #ifndef SFM_MDLREF_HIDE_CHILD_
  145. extern MdlrefDW_SFM_T SFM_MdlrefDW;
  146. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  147. #ifndef SFM_MDLREF_HIDE_CHILD_
  148. /* Block signals (default storage) */
  149. extern B_SFM_c_T SFM_B;
  150. /* Block states (default storage) */
  151. extern DW_SFM_f_T SFM_DW;
  152. #endif /*SFM_MDLREF_HIDE_CHILD_*/
  153. /*-
  154. * These blocks were eliminated from the model due to optimizations:
  155. *
  156. * Block '<S3>/Bitwise Operator' : Unused code path elimination
  157. * Block '<S3>/Constant82' : Unused code path elimination
  158. * Block '<S3>/Constant83' : Unused code path elimination
  159. * Block '<S3>/Display' : Unused code path elimination
  160. * Block '<S3>/Display1' : Unused code path elimination
  161. * Block '<S3>/Display3' : Unused code path elimination
  162. * Block '<S3>/Display7' : Unused code path elimination
  163. * Block '<S17>/Signal Conversion' : Unused code path elimination
  164. * Block '<S28>/Display' : Unused code path elimination
  165. * Block '<S28>/Display1' : Unused code path elimination
  166. * Block '<S28>/Display2' : Unused code path elimination
  167. */
  168. /*-
  169. * The generated code includes comments that allow you to trace directly
  170. * back to the appropriate location in the model. The basic format
  171. * is <system>/block_name, where system is the system number (uniquely
  172. * assigned by Simulink) and block_name is the name of the block.
  173. *
  174. * Use the MATLAB hilite_system command to trace the generated code back
  175. * to the model. For example,
  176. *
  177. * hilite_system('<S3>') - opens system 3
  178. * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
  179. *
  180. * Here is the system hierarchy for this model
  181. *
  182. * '<Root>' : 'SFM'
  183. * '<S1>' : 'SFM/SFM'
  184. * '<S2>' : 'SFM/SFM/Fault Data'
  185. * '<S3>' : 'SFM/SFM/Fault report'
  186. * '<S4>' : 'SFM/SFM/diagnosis'
  187. * '<S5>' : 'SFM/SFM/Fault report/FltCodeArry'
  188. * '<S6>' : 'SFM/SFM/diagnosis/ thermal runaway diagnosis'
  189. * '<S7>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis'
  190. * '<S8>' : 'SFM/SFM/diagnosis/Algt diagnosis'
  191. * '<S9>' : 'SFM/SFM/diagnosis/Communication diagnosis'
  192. * '<S10>' : 'SFM/SFM/diagnosis/Relay diagnosis'
  193. * '<S11>' : 'SFM/SFM/diagnosis/Threshold diagnosis'
  194. * '<S12>' : 'SFM/SFM/diagnosis/high voltage diagnosis'
  195. * '<S13>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/BattU'
  196. * '<S14>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/I'
  197. * '<S15>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/Subsystem'
  198. * '<S16>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/else'
  199. * '<S17>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/gas'
  200. * '<S18>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/BattU/Chart'
  201. * '<S19>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/Subsystem/ModMax1'
  202. * '<S20>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/Subsystem/ModMin1'
  203. * '<S21>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/Subsystem/ModMax1/ArrMin'
  204. * '<S22>' : 'SFM/SFM/diagnosis/Acquisition signal diagnosis/Subsystem/ModMin1/ArrMin'
  205. * '<S23>' : 'SFM/SFM/diagnosis/Communication diagnosis/keep juged'
  206. * '<S24>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ current Threshold diagnosis'
  207. * '<S25>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ else Threshold diagnosis'
  208. * '<S26>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ gas Threshold diagnosis'
  209. * '<S27>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis'
  210. * '<S28>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis'
  211. * '<S29>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ current Threshold diagnosis/Subsytem'
  212. * '<S30>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ current Threshold diagnosis/Subsytem1'
  213. * '<S31>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem'
  214. * '<S32>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem1'
  215. * '<S33>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem2'
  216. * '<S34>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem3'
  217. * '<S35>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem4'
  218. * '<S36>' : 'SFM/SFM/diagnosis/Threshold diagnosis/ temperature Threshold diagnosis/Subsytem5'
  219. * '<S37>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsystem5'
  220. * '<S38>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsystem6'
  221. * '<S39>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsystem7'
  222. * '<S40>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsystem8'
  223. * '<S41>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem'
  224. * '<S42>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem1'
  225. * '<S43>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem2'
  226. * '<S44>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem3'
  227. * '<S45>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem4'
  228. * '<S46>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem5'
  229. * '<S47>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem6'
  230. * '<S48>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem7'
  231. * '<S49>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem8'
  232. * '<S50>' : 'SFM/SFM/diagnosis/Threshold diagnosis/voltage Threshold diagnosis/Subsytem9'
  233. */
  234. #endif /* RTW_HEADER_SFM_h_ */
  235. /*
  236. * File trailer for generated code.
  237. *
  238. * [EOF]
  239. */