HVAC_M7_MODEL/HVAC_model_private.h

248 lines
13 KiB
C

/*
* File: HVAC_model_private.h
*
* Code generated for Simulink model 'HVAC_model'.
*
* Model version : 1.1314
* Simulink Coder version : 24.1 (R2024a) 19-Nov-2023
* C/C++ source code generated on : Sat Jul 11 14:20:55 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_0);
extern int8_t look1_iu8lu64n56ts8Ds16_binlcs(uint8_t u0, const uint8_t bp0[],
const int8_t table[], uint32_t maxIndex);
extern int16_t look1_iu8lu64n48ts16Ds32_binlcs(uint8_t u0, const uint8_t bp0[],
const int16_t table[], uint32_t maxIndex);
extern int16_t look1_is16lu64n32Ds32_binlcs(int16_t u0, const int16_t bp0[],
const int16_t table[], uint32_t maxIndex);
extern int16_t look1_is16lu64n32tu8Ds16Is16_binlcs(int16_t u0, const int16_t
bp0[], const uint8_t table[], uint32_t maxIndex);
extern int16_t look1_is16lu64n32Ds32_binlcn(int16_t u0, const int16_t bp0[],
const int16_t table[], uint32_t maxIndex);
extern int16_t look1_bs16ts16Dd_binlc(double u0, const int16_t bp0[], const
int16_t table[], 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 uint8_t look1_iu16lu64n48tu8_binlcse(uint16_t u0, const uint16_t bp0[],
const uint8_t table[], uint32_t maxIndex);
extern int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const
double table[], uint32_t maxIndex);
extern int16_t look1_iu16lu64n48ts16Ds32_binlcs(uint16_t u0, const uint16_t bp0[],
const int16_t table[], uint32_t maxIndex);
extern int16_t look1_iu16bs16lu64n32ts16Ds32_binlcs(uint16_t u0, const int16_t
bp0[], const int16_t table[], uint32_t maxIndex);
extern double look1_bs16ts16DdId_binlc(double u0, const int16_t bp0[], const
int16_t table[], uint32_t maxIndex);
extern double look1_iu16td_binlc(uint16_t u0, const uint16_t bp0[], const double
table[], uint32_t maxIndex);
extern uint32_t plook_u32s16_bincka(int16_t u_2, const int16_t bp[], uint32_t
maxIndex);
extern uint32_t binsearch_u32s16(int16_t u_3, const int16_t bp[], uint32_t
startIndex, 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(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void IfActionSubsystem1(int8_t *rty_Out1, int16_t *rty_Out2);
extern void IfActionSubsystem2(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void IfActionSubsystem_b(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void IfActionSubsystem2_o(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void IfActionSubsystem_n(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void IfActionSubsystem2_c(uint8_t rtu_In1, int8_t *rty_Out1, int16_t
*rty_Out2);
extern void correctionrate(int16_t rtu_SET, uint8_t rtu_LVL, int16_t *rty_y);
extern void is_ending_with_5(uint16_t rtu_SET, bool *rty_is_ending_with_5);
extern void u(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_FALLING_F);
extern void u_j(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_FALLING_DIFF_F);
extern void u_c(int16_t rtu_temp_raw, uint8_t rtu_lvl, uint16_t *rty_out, double
*rtd_KEEP_FALLING_FL_UNTIL_LIMIT, const double
*rtd_Temp_FL_store);
extern void u_l(int16_t rtu_temp_raw, uint8_t rtu_lvl, uint16_t
*rty_riseperminute, double *rtd_KEEP_FALLING_FL_UNTIL_LIMIT,
const double *rtd_Temp_FL_store);
extern void u_h(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_RISING_F);
extern void u_k(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_RISING_DIFF_F);
extern void u_lz(uint8_t rtu_lvl, uint16_t *rty_out);
extern void g_ausINCARRATE_RISING_DIFF_F8(uint16_t
*rty_f_g_ausINCARRATE_RISING_DIFF_F);
extern void INCARRATE_RISING_DIFF_F7(uint16_t
*rty_f_g_ausINCARRATE_RISING_DIFF_F);
extern void u_f(uint8_t rtu_lvl, uint16_t *rty_out);
extern void RL(int16_t rtu_temp_in, double *rty_temp_out);
extern void AMBRATE_RISING_DIFF8(uint16_t *rty_f_g_ausINCARRATE_FALLING_DIFF_R);
extern void u_kk(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_FALLING_R);
extern void u_b(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_FALLING_DIFF_R);
extern void u_hr(uint8_t rtu_lvl, uint16_t *rty_out);
extern void AMBRATE_FALLING_DIFF7(uint16_t *rty_f_g_ausINCARRATE_FALLING_DIFF_R);
extern void u_g(uint8_t rtu_lvl, uint16_t *rty_out);
extern void u_m(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_RISING_R);
extern void u_o(uint8_t rtu_lvl, uint16_t *rty_f_g_ausINCARRATE_RISING_DIFF_R);
extern void u_gq(uint8_t rtu_lvl, uint16_t *rty_out);
extern void g_ausINCARRATE_RISING_DIFF_R8(uint16_t
*rty_f_g_ausINCARRATE_RISING_DIFF_R);
extern void INCARRATE_RISING_DIFF_R7(uint16_t
*rty_f_g_ausINCARRATE_RISING_DIFF_R);
extern void u_b3(uint8_t rtu_lvl, uint16_t *rty_out);
extern void Zone_Climate_Logic_Auto_FL1_Init(uint8_t *rty_out_def, uint8_t
*rty_out_face, uint8_t *rty_out_foot, uint8_t *rty_out_auto, double
*rty_out_ac, DW_Zone_Climate_Logic_Auto_FL1 *localDW);
extern void Zone_Climate_Logic_Auto_FL1(uint8_t rtu_btn_def, uint8_t
rtu_btn_face, uint8_t rtu_btn_foot, uint8_t rtu_btn_auto, uint8_t rtu_btn_ac,
uint8_t *rty_out_def, uint8_t *rty_out_face, uint8_t *rty_out_foot, uint8_t
*rty_out_auto, double *rty_out_ac, DW_Zone_Climate_Logic_Auto_FL1 *localDW);
extern void Zone_Climate_Logic_Auto_FL2_Init(uint8_t *rty_out_def, uint8_t
*rty_out_face, uint8_t *rty_out_foot, uint8_t *rty_out_auto, double
*rty_out_ac, DW_Zone_Climate_Logic_Auto_FL2 *localDW);
extern void Zone_Climate_Logic_Auto_FL2(double rtu_btn_def, uint8_t rtu_btn_face,
uint8_t rtu_btn_foot, uint8_t rtu_btn_auto, uint8_t rtu_btn_ac, uint8_t
*rty_out_def, uint8_t *rty_out_face, uint8_t *rty_out_foot, uint8_t
*rty_out_auto, double *rty_out_ac, DW_Zone_Climate_Logic_Auto_FL2 *localDW);
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 RearLeftAFmanualdirections(bool rtu_Enable, uint8_t rtu_blowerspeed,
uint8_t rtu_faceison, uint8_t rtu_footison, uint16_t *rty_AFout);
extern void funcg_ascAUTO_STEP_AF_F(int8_t rtu_AF_STEP, int8_t *rty_y);
extern void u_m2(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_FALLING);
extern void u_kb(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_out, const
double *rtd_AMB_store, double *rtd_KEEP_FALLING_UNTIL_LIMIT);
extern void u_my(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t
*rty_riseperminute, const double *rtd_AMB_store, double
*rtd_KEEP_FALLING_UNTIL_LIMIT);
extern void u_h3(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_RISING);
extern void u_fr(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_RISING_DIFF_LVL);
extern void u_p(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_out, const
double *rtd_AMB_store, double *rtd_KEEP_RISING_UNTIL_LIMIT);
extern void u_g2(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t
*rty_riseperminute, const double *rtd_AMB_store, double
*rtd_KEEP_RISING_UNTIL_LIMIT);
extern void IfActionSubsystem_h(int8_t *rty_Out1, double
*rtd_ErrorHomming_private, double *rtd_Start_timer_n, 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_h(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 valvesformode(uint8_t rtu_MODE, uint16_t rty_get_valves[9]);
extern void valves_rear_left(uint8_t rtu_MODE, uint16_t rty_get_valves[6]);
extern void MODE_for_set_and_lvl(uint8_t rtu_LVL, int16_t rtu_SET, uint8_t
*rty_get_mode);
extern void increase(int16_t rtu_duct_tg, const uint16_t rtu_mode_array[7],
uint16_t *rty_y);
extern void decrease(int16_t rtu_duct_tg, const uint16_t rtu_mode_array[7],
uint16_t *rty_y);
extern void valves_rear_left_d(uint16_t rtu_MODE, uint16_t rty_get_valves[6]);
extern void ValvesforBiLevel(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_a(uint16_t rty_out[6]);
extern void valvesforVentmode(uint16_t rty_out[6]);
#endif /* HVAC_model_private_h_ */
/*
* File trailer for generated code.
*
* [EOF]
*/