BCU1.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * File: BCU.h
  3. *
  4. * Code generated for Simulink model 'BCU'.
  5. *
  6. * Model version : 1.13
  7. * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
  8. * C/C++ source code generated on : Thu Aug 12 17:54:42 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_BCU_h_
  16. #define RTW_HEADER_BCU_h_
  17. #ifndef BCU_COMMON_INCLUDES_
  18. #define BCU_COMMON_INCLUDES_
  19. #include "rtwtypes.h"
  20. #include "commontypedef.h"
  21. #include "AppSignal.h"
  22. #include "zero_crossing_types.h"
  23. #endif /* BCU_COMMON_INCLUDES_ */
  24. #include "BCU_types.h"
  25. #define PROC_BCU_TASK_STACK_SIZE (2048)
  26. typedef enum
  27. {
  28. PROCESS_STATE_INIT = 0,
  29. PROCESS_STATE_IDLE,
  30. PROCESS_STATE_WORK,
  31. PROCESS_STATE_SLEEP
  32. }process_Bcu;
  33. /* Child system includes */
  34. #include "SOH.h"
  35. #include "SOC.h"
  36. #include "BLC.h"
  37. /* Macros for accessing real-time model data structure */
  38. #ifndef rtmGetErrorStatus
  39. #define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
  40. #endif
  41. #ifndef rtmSetErrorStatus
  42. #define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
  43. #endif
  44. #ifndef rtmGetErrorStatusPointer
  45. #define rtmGetErrorStatusPointer(rtm) ((const char_T **)(&((rtm)->errorStatus)))
  46. #endif
  47. /* Block states (default storage) for system '<Root>' */
  48. typedef struct {
  49. MdlrefDW_SOH_T SOH_InstanceData; /* '<Root>/SOH' */
  50. MdlrefDW_SOC_T SOC_InstanceData; /* '<Root>/SOC' */
  51. MdlrefDW_BLC_T BLC_InstanceData; /* '<Root>/BLC' */
  52. } DW_BCU_T;
  53. /* Real-time Model Data Structure */
  54. struct tag_RTM_BCU_T {
  55. const char_T *errorStatus;
  56. };
  57. /* Block states (default storage) */
  58. extern DW_BCU_T BCU_DW;
  59. /* Model entry point functions */
  60. extern void BCU_initialize(void);
  61. extern void BCU_step(void);
  62. extern void BCU_terminate(void);
  63. /* Exported data declaration */
  64. /* Declaration for custom storage class: ExportToFile */
  65. extern uint16_T blcv_Q_reqCpEi[28]; /* '<Root>/blcv_Q_reqCpEi' */
  66. /* ������������ ��ȡ�������飩�� */
  67. extern uint16_T blcv_Q_reqCpEo[28]; /* '<Root>/BLC' */
  68. /* ������������ д���������飩�� */
  69. extern uint32_T blcv_Q_totalCpEi[28]; /* '<Root>/blcv_Q_totalCpEi' */
  70. /* �ۼƾ������� ��ȡ�������飩�� */
  71. extern uint32_T blcv_Q_totalCpEo[28]; /* '<Root>/BLC' */
  72. /* �ۼƾ������� д���������飩�� */
  73. extern boolean_T blcv_flg_excute[28]; /* '<Root>/BLC' */
  74. /* ����ִ�������־λ �����飩 */
  75. extern int16_T ihd_I_curr; /* '<Root>/ihd_I_curr' */
  76. /* ��ذ������� */
  77. extern int16_T ihd_T_bdtemp; /* '<Root>/Constant' */
  78. extern int16_T ihd_T_modTMax; /* '<Root>/ihd_T_modTMax' */
  79. /* ģ���¶���� */
  80. extern int16_T ihd_T_modTMin; /* '<Root>/ihd_T_modTMin' */
  81. /* ģ���¶���С */
  82. extern uint16_T ihd_V_cellUAvrg; /* '<Root>/ihd_V_cellUAvrg' */
  83. /* ��ص����ѹƽ���� */
  84. extern uint16_T ihd_V_cellUMax; /* '<Root>/ihd_V_cellUMax' */
  85. /* ��ص����ѹ��� */
  86. extern uint16_T ihd_V_cellUMin; /* '<Root>/ihd_V_cellUMin' */
  87. /* ��ص����ѹ��С�� */
  88. extern uint8_T ihd_st_fault; /* '<Root>/ihd_st_fault' */
  89. /* ���ϵȼ� */
  90. extern uint8_T ihd_st_workStat; /* '<Root>/ihd_st_workStat' */
  91. /* ��ع���״̬�� */
  92. extern uint32_T ihd_tm_parkTime; /* '<Root>/ihd_tm_packTime' */
  93. /* פ��ʱ�䣻 */
  94. extern int16_T ihv_T_modT[6]; /* '<Root>/ihv_T_modT' */
  95. /* ģ���¶ȣ����飩 */
  96. extern uint16_T ihv_V_cellU[28]; /* '<Root>/ihv_V_cellU' */
  97. /* ��ص����ѹ�����飩�� */
  98. extern uint16_T socd_pct_ahSoc; /* '<Root>/SOC' */
  99. /* ��ʱSOC�� */
  100. extern uint16_T socd_pct_battSoc; /* '<Root>/SOC' */
  101. /* �����ʵSOC�� */
  102. extern uint16_T socd_pct_battSocEi; /* '<Root>/socd_pct_battSocEi' */
  103. /* �����ʵSOC ��ȡ���� */
  104. extern uint16_T socd_pct_battSocEo; /* '<Root>/SOC' */
  105. /* �����ʵSOC д������ */
  106. extern uint16_T socd_pct_bcuSoc; /* '<Root>/SOC' */
  107. /* �����ʾSOC�� */
  108. extern uint16_T socd_pct_bcuSocEi; /* '<Root>/socd_pct_bcuSocEi' */
  109. /* �����ʾSOC��ȡ���� */
  110. extern uint16_T socd_pct_bcuSocEo; /* '<Root>/SOC' */
  111. extern uint16_T socd_pct_ekfSoc;
  112. extern boolean_T socd_flg_EEsave;
  113. /* �����ʾSOCд������ */
  114. extern uint16_T sohd_Q_chrgEi; /* '<Root>/sohd_Q_chrgEi ' */
  115. /* ����������ȡ���� */
  116. extern uint16_T sohd_Q_chrgEo; /* '<Root>/SOH' */
  117. /* ������������� */
  118. extern boolean_T sohd_flg_chrgEndEi; /* '<Root>/sohd_flg_chrgEndEi ' */
  119. /* ��������־λ��ȡ���� */
  120. extern boolean_T sohd_flg_chrgEndEo; /* '<Root>/SOH' */
  121. /* ��������־λд������ */
  122. extern uint16_T sohd_pct_bcuSoh; /* '<Root>/SOH' */
  123. /* ���SOH�� */
  124. extern uint16_T sohd_tm_chrgStartStatEi;/* '<Root>/sohd_tm_chrgStartStatEi ' */
  125. /* ���ǰ����ʱ���ȡ���� */
  126. extern uint16_T sohd_tm_chrgStartStatEo;/* '<Root>/SOH' */
  127. /* ���ǰ����ʱ��д������ */
  128. extern uint16_T sohv_Q_cellCap[28]; /* '<Root>/SOH' */
  129. /* ������������� */
  130. extern uint16_T sohv_Q_packCapArrEi[10];/* '<Root>/sohv_Q_packCapArrEi ' */
  131. /* 10���������������飩��ȡ���� */
  132. extern uint16_T sohv_Q_packCapArrEo[10];/* '<Root>/SOH' */
  133. /* 10���������������飩д������ */
  134. extern uint16_T sohv_V_chrgStartStatEi[28];/* '<Root>/sohv_V_chrgStartStatEi ' */
  135. /* ��翪ʼʱ�̵ĵ����ѹ�����飩��ȡ���� */
  136. extern uint16_T sohv_V_chrgStartStatEo[28];/* '<Root>/SOH' */
  137. extern uint16_T sleepTime;
  138. /* ��翪ʼʱ�̵ĵ����ѹ�����飩д������ */
  139. /* Real-time Model object */
  140. extern RT_MODEL_BCU_T *const BCU_M;
  141. /*-
  142. * The generated code includes comments that allow you to trace directly
  143. * back to the appropriate location in the model. The basic format
  144. * is <system>/block_name, where system is the system number (uniquely
  145. * assigned by Simulink) and block_name is the name of the block.
  146. *
  147. * Use the MATLAB hilite_system command to trace the generated code back
  148. * to the model. For example,
  149. *
  150. * hilite_system('<S3>') - opens system 3
  151. * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
  152. *
  153. * Here is the system hierarchy for this model
  154. *
  155. * '<Root>' : 'BCU'
  156. */
  157. #endif /* RTW_HEADER_BCU_h_ */
  158. /*
  159. * File trailer for generated code.
  160. *
  161. * [EOF]
  162. */