255 lines
14 KiB
C
255 lines
14 KiB
C
/*
|
|
* File: HVAC_model_private.h
|
|
*
|
|
* Code generated for Simulink model 'HVAC_model'.
|
|
*
|
|
* Model version : 1.900
|
|
* Simulink Coder version : 24.1 (R2024a) 19-Nov-2023
|
|
* C/C++ source code generated on : Fri May 8 11:49:57 2026
|
|
*
|
|
* Target selection: ert.tlc
|
|
* Embedded hardware selection: ARM Compatible->ARM Cortex-M
|
|
* Emulation hardware selection:
|
|
* Differs from embedded hardware (MATLAB Host)
|
|
* Code generation objectives: Unspecified
|
|
* Validation result: Not run
|
|
*/
|
|
|
|
#ifndef HVAC_model_private_h_
|
|
#define HVAC_model_private_h_
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "HVAC_model.h"
|
|
#include "HVAC_model_types.h"
|
|
|
|
/* Includes for objects with custom storage classes */
|
|
#include "Rs_Cal_Base.h"
|
|
#ifndef UCHAR_MAX
|
|
#include <limits.h>
|
|
#endif
|
|
|
|
#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
|
|
#error Code was generated for compiler with different sized uchar/char. \
|
|
Consider adjusting Test hardware word size settings on the \
|
|
Hardware Implementation pane to match your compiler word sizes as \
|
|
defined in limits.h of the compiler. Alternatively, you can \
|
|
select the Test hardware is the same as production hardware option and \
|
|
select the Enable portable word sizes option on the Code Generation > \
|
|
Verification pane for ERT based targets, which will disable the \
|
|
preprocessor word size checks.
|
|
#endif
|
|
|
|
#if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
|
|
#error Code was generated for compiler with different sized ushort/short. \
|
|
Consider adjusting Test hardware word size settings on the \
|
|
Hardware Implementation pane to match your compiler word sizes as \
|
|
defined in limits.h of the compiler. Alternatively, you can \
|
|
select the Test hardware is the same as production hardware option and \
|
|
select the Enable portable word sizes option on the Code Generation > \
|
|
Verification pane for ERT based targets, which will disable the \
|
|
preprocessor word size checks.
|
|
#endif
|
|
|
|
#if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
|
|
#error Code was generated for compiler with different sized uint/int. \
|
|
Consider adjusting Test hardware word size settings on the \
|
|
Hardware Implementation pane to match your compiler word sizes as \
|
|
defined in limits.h of the compiler. Alternatively, you can \
|
|
select the Test hardware is the same as production hardware option and \
|
|
select the Enable portable word sizes option on the Code Generation > \
|
|
Verification pane for ERT based targets, which will disable the \
|
|
preprocessor word size checks.
|
|
#endif
|
|
|
|
#if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
|
|
#error Code was generated for compiler with different sized ulong/long. \
|
|
Consider adjusting Test hardware word size settings on the \
|
|
Hardware Implementation pane to match your compiler word sizes as \
|
|
defined in limits.h of the compiler. Alternatively, you can \
|
|
select the Test hardware is the same as production hardware option and \
|
|
select the Enable portable word sizes option on the Code Generation > \
|
|
Verification pane for ERT based targets, which will disable the \
|
|
preprocessor word size checks.
|
|
#endif
|
|
|
|
/* Skipping ulong_long/long_long check: insufficient preprocessor integer range. */
|
|
extern double rt_roundd(double u);
|
|
extern uint16_t look1_iu16bs16lu64n32_binlcse(uint16_t u0, const int16_t bp0[],
|
|
const uint16_t table[], uint32_t maxIndex);
|
|
extern uint32_t binsearch_u32s16(int16_t u, const int16_t bp[], uint32_t
|
|
startIndex, uint32_t maxIndex);
|
|
extern uint8_t look2_iu8bu8s16lu64n32_binlcse(uint8_t u0, uint8_t u1, const
|
|
uint8_t bp0[], const int16_t bp1[], const uint8_t table[], const uint32_t
|
|
maxIndex[], uint32_t stride);
|
|
extern int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const
|
|
double table[], uint32_t maxIndex);
|
|
extern uint32_t plook_u32s16_bincka(int16_t u, const int16_t bp[], uint32_t
|
|
maxIndex);
|
|
extern void get_tg_FLL_for_LVL(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp,
|
|
int16_t *rty_vals);
|
|
extern void get_tg_FLL_for_LVL_j(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp,
|
|
int16_t *rty_vals);
|
|
extern void g_assFLOW_BI_AMB_TGT_n(uint8_t rtu_LVL, int16_t
|
|
*rty_c_g_assFLOW_BI_AMB_TGT);
|
|
extern void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9],
|
|
uint8_t rtu_setTempFL, uint8_t rtu_setTempFR);
|
|
extern void g_assFLOW_BI_AMB_TGT_e(uint8_t rtu_LVL, int16_t
|
|
*rty_c_g_assFLOW_BI2_AMB_TGT);
|
|
extern void Bilevel2(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9],
|
|
uint8_t rtu_setTempFL, uint8_t rtu_setTempFR);
|
|
extern void g_aucFLOW_AF_FOOT_VALVE_MAX_e(uint8_t rtu_LVL, uint8_t
|
|
*rty_c_g_aucFLOW_AF_FOOT_VALVE_MAX);
|
|
extern void g_assFLOW_AF_AMB_TGT_g(uint8_t rtu_LVL, int16_t
|
|
*rty_c_g_assFLOW_AF_AMB_TGT);
|
|
extern void Afoot(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9],
|
|
uint8_t rtu_setTempFL, uint8_t rtu_setTempFR);
|
|
extern void g_aucFLOW_AFSM_FOOT_VALVE_MAX_f(uint8_t rtu_LVL, uint8_t
|
|
*rty_c_g_aucFLOW_AFSM_FOOT_VALVE_MAX);
|
|
extern void Afoot_Summer(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1
|
|
[9], uint8_t rtu_setTempFL, uint8_t rtu_setTempFR);
|
|
extern void left(uint8_t rtu_idx, uint16_t rty_vals[9]);
|
|
extern void IfActionSubsystem(int8_t *rty_Out1, double *rtd_ErrorHomming_private,
|
|
double *rtd_Start_timer_i, int8_t *rtd_stepSig_private);
|
|
extern void MATLABFunction_Init(DW_MATLABFunction *localDW);
|
|
extern void MATLABFunction(double rtu_cond, uint32_t rtu_t_now, uint32_t *rty_dt,
|
|
DW_MATLABFunction *localDW);
|
|
extern void IfActionSubsystem1(int8_t *rty_Output, uint8_t
|
|
*rtd_CCU_ActuatorErrF_Stat_private, uint8_t rtd_COM_private[9], uint8_t
|
|
rtd_ErrorActuator[9], uint8_t rtd_ErrorCalibration_private[9], const double
|
|
*rtd_LOGGER_LIN, uint8_t rtd_MODE_private[9], uint8_t
|
|
rtd_dtc_state_error_model[127]);
|
|
extern void IfActionSubsystem1_l(int8_t *rty_Out1, double *rtd_Start_timer_l);
|
|
extern void AFforBiLevel(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforDef(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforFoorDef(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforFoot(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforHi_Level(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforTriLevel(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforVentmode(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforBiLevelR(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforFootR(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void AFforVentmodeR(uint8_t rtu_blower_speed, uint16_t *rty_out);
|
|
extern void ValvesforBiLevel(uint16_t rty_out[9]);
|
|
extern void ValvesforDef(uint16_t rty_out[9]);
|
|
extern void ValvesforFootDef(uint16_t rty_out[9]);
|
|
extern void ValvesforHi_Level(uint16_t rty_out[9]);
|
|
extern void ValvesforTriLevel(uint16_t rty_out[9]);
|
|
extern void AFforBiLevel_m(uint16_t rty_out[6]);
|
|
extern void valvesforVentmode(uint16_t rty_out[6]);
|
|
extern void g_assSTART_ENTER_INCAR_j(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void g_assSTART_ENTER_COOLANT_p(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void Level4(int8_t *rty_step1, const uint16_t *rtd_ECT, const uint8_t
|
|
*rtd_LEVEL, const double *rtd_MODE_DRIVER);
|
|
extern void Level0(int8_t *rty_step);
|
|
extern void incarfilterdown(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void incarfilterup(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void g_assSTART_COOLANT_STEP0_TO_1_h(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void uwayvalvestatus(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Dtg_FrontLower_X(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Dtg_FrontUpper_X(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Incartempgotofromstep1tostep2(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void blowerFR(uint8_t rtu_LVL, uint16_t *rty_out);
|
|
extern void modeFRstep1(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void windowheating(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Timegotofromstep1tostep2(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void ECTminmax(uint8_t rtu_LVL, int16_t rty_out[2]);
|
|
extern void blowerminmax(uint8_t rtu_LVL, uint16_t rty_out[2]);
|
|
extern void Level4_c(int8_t *rty_step, uint16_t *rtd_Blower_FL, uint16_t
|
|
*rtd_Blower_FR, uint8_t *rtd_Dtg_FLL, uint8_t *rtd_Dtg_FLR,
|
|
uint8_t *rtd_Dtg_FUL, uint8_t *rtd_Dtg_FUR, const uint16_t *
|
|
rtd_ECT, uint8_t *rtd_El_window_heating, const int16_t
|
|
*rtd_Incar_FL, uint8_t *rtd_Incar_filter_down_value,
|
|
uint8_t *rtd_Incar_filter_up_value, const uint8_t
|
|
*rtd_LEVEL, uint8_t *rtd_Mode_FL, uint8_t *rtd_Mode_FR,
|
|
double *rtd_Recirculation, uint8_t *rtd_Valve_3_way, const
|
|
int8_t *rtd_step_start_controle_front, const uint32_t
|
|
*rtd_t_now, DW_Level4_n *localDW);
|
|
extern void uwayvalvestatus_a(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void timeforstep(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void timeforstep_j(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Timegotofromstep2tostep3(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void blowerstep(uint8_t rtu_LVL, uint16_t *rty_out);
|
|
extern void blowertimeforstep(uint8_t rtu_LVL, uint16_t *rty_out);
|
|
extern void step_j(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void timeforstep_g(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void windowheating_k(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void autodemistautodefog(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Level3(int8_t *rty_step, uint8_t *rtd_Autodefog, uint16_t
|
|
*rtd_Blower_FL, uint16_t *rtd_Blower_FR, const uint16_t
|
|
*rtd_Blower_logic_FL, uint8_t *rtd_Dtg_FLL, uint8_t
|
|
*rtd_Dtg_FLR, uint8_t *rtd_Dtg_FUL, uint8_t *rtd_Dtg_FUR,
|
|
const uint8_t *rtd_Dtg_logic_FLL, const uint8_t
|
|
*rtd_Dtg_logic_FUL, uint8_t *rtd_El_window_heating, const
|
|
bool *rtd_HI_logic_on, uint8_t *rtd_Incar_filter_down_value,
|
|
uint8_t *rtd_Incar_filter_up_value, const uint8_t *rtd_LEVEL,
|
|
uint8_t *rtd_Mode_FL, uint8_t *rtd_Mode_FR, const uint8_t
|
|
*rtd_Mode_logic_FL, double *rtd_Recirculation, uint8_t
|
|
*rtd_Valve_3_way, const int8_t *rtd_step_start_controle_front,
|
|
const uint32_t *rtd_t_now, DW_Level3 *localDW);
|
|
extern void Step3F(int8_t *rty_step, int8_t *rtd_start_control_finished_front);
|
|
extern void g_ausSTART_ENTER_SETTEMP_b(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void g_assSTART_ENTER_INCAR_p(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void g_assSTART_ENTER_COOLANT_e(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void Level4_e(int8_t *rty_step1, const uint16_t *rtd_ECT, const int16_t
|
|
*rtd_Incar_RR, const uint8_t *rtd_LEVEL, const double
|
|
*rtd_MODE_RR_passenger);
|
|
extern void incarfilterdown_c(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void incarfilterup_i(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void g_assSTART_COOLANT_STEP0_TO_1_e(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void Level4_m(int8_t *rty_step1, uint16_t *rtd_Blower_RL, uint16_t
|
|
*rtd_Blower_RR, uint8_t *rtd_Dtg_RL, uint8_t *rtd_Dtg_RR,
|
|
const uint16_t *rtd_ECT, uint8_t
|
|
*rtd_Incar_filter_down_value, uint8_t
|
|
*rtd_Incar_filter_up_value, const uint8_t *rtd_LEVEL,
|
|
uint8_t *rtd_Mode_RL, uint8_t *rtd_Mode_RR, uint8_t
|
|
*rtd_Valve_2_way, uint8_t *rtd_Valve_3_way);
|
|
extern void uwayvalve(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Dtg_rear(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Incartempgotofromstep1tostep2_j(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void Timegotofromstep1tostep2_l(uint8_t rtu_LVL, int16_t *rty_out);
|
|
extern void moderearstep1(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Level0_b(int8_t *rty_step, uint16_t *rtd_Blower_RL, uint16_t
|
|
*rtd_Blower_RR, uint8_t *rtd_Dtg_RL, uint8_t *rtd_Dtg_RR,
|
|
const int16_t *rtd_Incar_RR, uint8_t
|
|
*rtd_Incar_filter_down_value, uint8_t
|
|
*rtd_Incar_filter_up_value, const uint8_t *rtd_LEVEL,
|
|
uint8_t *rtd_Mode_RL, uint8_t *rtd_Mode_RR, double
|
|
*rtd_Recirculation, uint8_t *rtd_Valve_2_way, const int8_t *
|
|
rtd_step_start_controle_rear, const uint32_t *rtd_t_now,
|
|
DW_Level0_c *localDW);
|
|
extern void blowerstartfinish(uint8_t rtu_LVL, uint16_t rty_out[2]);
|
|
extern void ECTminmax_l(uint8_t rtu_LVL, int16_t rty_out[2]);
|
|
extern void Level4_d(int8_t *rty_step, uint16_t *rtd_Blower_RL, uint16_t
|
|
*rtd_Blower_RR, uint8_t *rtd_Dtg_RL, uint8_t *rtd_Dtg_RR,
|
|
const uint16_t *rtd_ECT, const int16_t *rtd_Incar_RR,
|
|
uint8_t *rtd_Incar_filter_down_value, uint8_t
|
|
*rtd_Incar_filter_up_value, const uint8_t *rtd_LEVEL,
|
|
uint8_t *rtd_Mode_RL, uint8_t *rtd_Mode_RR, double
|
|
*rtd_Recirculation, uint8_t *rtd_Valve_2_way, const int8_t *
|
|
rtd_step_start_controle_rear, const uint32_t *rtd_t_now,
|
|
DW_Level4_a *localDW);
|
|
extern void timeforstep_jn(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void blowerstep_d(uint8_t rtu_LVL, uint16_t *rty_out);
|
|
extern void blowertimeforstep_l(uint8_t rtu_LVL, uint16_t *rty_out);
|
|
extern void step_a(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void timeforstep_h(uint8_t rtu_LVL, uint8_t *rty_out);
|
|
extern void Level3_i(int8_t *rty_step, uint16_t *rtd_Blower_RL, uint16_t
|
|
*rtd_Blower_RR, const uint16_t *rtd_Blower_logic_RR,
|
|
uint8_t *rtd_Dtg_RL, uint8_t *rtd_Dtg_RR, const uint8_t
|
|
*rtd_Dtg_logic_RR, const bool *rtd_HI_logic_on, uint8_t
|
|
*rtd_Incar_filter_down_value, uint8_t
|
|
*rtd_Incar_filter_up_value, const uint8_t *rtd_LEVEL,
|
|
uint8_t *rtd_Mode_RL, uint8_t *rtd_Mode_RR, const uint8_t
|
|
*rtd_Mode_logic_RR, double *rtd_Recirculation, uint8_t
|
|
*rtd_Valve_2_way, const int8_t
|
|
*rtd_step_start_controle_rear, const uint32_t *rtd_t_now,
|
|
DW_Level3_n *localDW);
|
|
|
|
#endif /* HVAC_model_private_h_ */
|
|
|
|
/*
|
|
* File trailer for generated code.
|
|
*
|
|
* [EOF]
|
|
*/
|