BCU.c 787 B

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