BCU.h 6.7 KB

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