BCU.c 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "BCU.h"
  2. #include "rtwtypes.h"
  3. #include "BCUDisp.h"
  4. #include "rt_nonfinite.h"
  5. #define IH100_MDLREF_HIDE_CHILD_
  6. #include "IH100.h"
  7. #define DAM_MDLREF_HIDE_CHILD_
  8. #include "DAM.h"
  9. #define SOC_MDLREF_HIDE_CHILD_
  10. #include "SOC.h"
  11. static RT_MODEL_BCU_T BCU_M_;
  12. RT_MODEL_BCU_T *const BCU_M = &BCU_M_;
  13. void BCU_step(void)
  14. {
  15. IH100(&ihd_tm_parkTime);
  16. DAM();
  17. SOC();
  18. }
  19. void BCU_initialize(void)
  20. {
  21. rt_InitInfAndNaN(sizeof(real_T));
  22. rted_tm_month = ((uint8_T)1U);
  23. rted_tm_day = ((uint8_T)1U);
  24. sohd_pct_bcuSoh = 100.0F;
  25. IH100_initialize(rtmGetErrorStatusPointer(BCU_M));
  26. DAM_initialize(rtmGetErrorStatusPointer(BCU_M));
  27. SOC_initialize(rtmGetErrorStatusPointer(BCU_M));
  28. SOC_Start();
  29. ihd_tm_dayEi = 1U;
  30. ihd_tm_dayEo = 1U;
  31. ihd_tm_monthEi = 1U;
  32. ihd_tm_monthEo = 1U;
  33. DAM_Init();
  34. SOC_Init();
  35. }
  36. void BCU_terminate(void)
  37. {
  38. }