/*
 * File: BTMR_ThmMagDiag.h
 *
 * Code generated for Simulink model 'BTMR_ThmMagDiag'.
 *
 * Model version                  : 1.1446
 * Simulink Coder version         : 8.11 (R2016b) 25-Aug-2016
 * C/C++ source code generated on : Mon Mar 01 14:45:18 2021
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Infineon->TriCore
 * Code generation objectives:
 *    1. MISRA C:2012 guidelines
 *    2. Execution efficiency
 * Validation result: Not run
 */

#ifndef RTW_HEADER_BTMR_ThmMagDiag_h_
#define RTW_HEADER_BTMR_ThmMagDiag_h_
#include <stddef.h>
#ifndef BTMR_ThmMagDiag_COMMON_INCLUDES_
# define BTMR_ThmMagDiag_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "zero_crossing_types.h"
#endif                                 /* BTMR_ThmMagDiag_COMMON_INCLUDES_ */

#include "BTMR_ThmMagDiag_types.h"

/* Includes for objects with custom storage classes. */
#include "BTMR_ThmMagDiag_Parameter.h"
#include "look1_iflf_binlxpw.h"

/* Macros for accessing real-time model data structure */

/* user code (top of header file) */
#include "ASW_Interface.h"

/* Block signals (auto storage) */
typedef struct {
  boolean_T RelationalOperator;        /* '<S38>/Relational Operator' */
  boolean_T RelationalOperator_n;      /* '<S13>/Relational Operator' */
} B_BTMR_ThmMagDiag_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real32_T Delay_DSTATE;               /* '<S38>/Delay' */
  real32_T Delay_DSTATE_g;             /* '<S33>/Delay' */
  real32_T Delay_DSTATE_l;             /* '<S13>/Delay' */
  real32_T Delay_DSTATE_o;             /* '<S8>/Delay' */
  uint8_T Delay_DSTATE_i;              /* '<S35>/Delay' */
  uint8_T Delay3_DSTATE;               /* '<S15>/Delay3' */
  uint8_T Delay3_DSTATE_p;             /* '<S14>/Delay3' */
  uint8_T Delay1_DSTATE;               /* '<S10>/Delay1' */
  boolean_T Delay2_DSTATE;             /* '<S15>/Delay2' */
  boolean_T Delay2_DSTATE_l;           /* '<S14>/Delay2' */
  boolean_T Time_calc_MODE;            /* '<S4>/Time_calc' */
  boolean_T ThmHtg_MODE;               /* '<S4>/ThmHtg' */
  boolean_T Time_calc_MODE_p;          /* '<S2>/Time_calc' */
  boolean_T ThmCool_MODE;              /* '<S2>/ThmCool' */
} DW_BTMR_ThmMagDiag_T;

/* Zero-crossing (trigger) state */
typedef struct {
  ZCSigState Strt_temp_Trig_ZCE;       /* '<S4>/Strt_temp' */
  ZCSigState Strt_cool_temp_Trig_ZCE;  /* '<S2>/Strt_cool_temp' */
} PrevZCX_BTMR_ThmMagDiag_T;

/* Invariant block signals (auto storage) */
typedef struct {
  const uint8_T DataTypeConversion1;   /* '<S4>/Data Type Conversion1' */
  const uint8_T DataTypeConversion1_l; /* '<S2>/Data Type Conversion1' */
} ConstB_BTMR_ThmMagDiag_T;

/* Block signals (auto storage) */
extern B_BTMR_ThmMagDiag_T BTMR_ThmMagDiag_B;

/* Block states (auto storage) */
extern DW_BTMR_ThmMagDiag_T BTMR_ThmMagDiag_DW;
extern const ConstB_BTMR_ThmMagDiag_T BTMR_ThmMagDiag_ConstB;/* constant block i/o */

/* Model entry point functions */
extern void BTMR_ThmMagDiag_initialize(void);
extern void BTMR_ThmMagDiag_step(void);

/* Exported data declaration */

/* Volatile memory section */
#define ASW1_OEM_START_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Declaration for custom storage class: Volatile */
extern volatile uint8_T DFC_CoolPerfPlaus_ASW;
extern volatile uint8_T DFC_HtgPerfPlaus_ASW;

#define ASW1_OEM_STOP_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"
#define ASW1_OEM_START_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/* Declaration for custom storage class: OutputSignal */
extern volatile real32_T BSPR_tClntDsStrtCool;
extern volatile real32_T BSPR_tClntDsStrtHtg;
extern volatile real32_T BSPR_tClntUsStrtCool;
extern volatile real32_T BSPR_tClntUsStrtHtg;
extern volatile boolean_T BTMR_bCoolPlausErrDet;
extern volatile boolean_T BTMR_bCoolPlausHealDet;
extern volatile boolean_T BTMR_bHtgPlausErrDet;
extern volatile boolean_T BTMR_bHtgPlausHealDet;
extern volatile boolean_T BTMR_bLowClntDet;
extern volatile boolean_T BTMR_flgThmCoolDiagEn;
extern volatile boolean_T BTMR_flgThmCoolTimeEn;
extern volatile boolean_T BTMR_flgThmHtgDiagEn;
extern volatile boolean_T BTMR_flgThmHtgTimeEn;

#define ASW1_OEM_STOP_SEC_DEFAULT_RAM2_CLEARED_UNSPECIFIED
#include "Asw1_OEM_MemMap.h"

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'BTMR_ThmMagDiag'
 * '<S1>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag'
 * '<S2>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval'
 * '<S3>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM'
 * '<S4>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval'
 * '<S5>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/BTMR_cntHtgCoolDiag_CW'
 * '<S6>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/DSM_GetSFCErD1'
 * '<S7>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/Strt_cool_temp'
 * '<S8>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/TONV_VariableTimeDebounce'
 * '<S9>'   : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/ThmCool'
 * '<S10>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/Time_calc'
 * '<S11>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/BTMR_cntHtgCoolDiag_CW/Compare To Constant1'
 * '<S12>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/DSM_GetSFCErD1/DFC_IsoChkLv1_1_compare'
 * '<S13>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Cool_Eval/ThmCool/TONV_VariableTimeDebounce'
 * '<S14>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2'
 * '<S15>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3'
 * '<S16>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Clear1'
 * '<S17>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Clear2'
 * '<S18>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Set'
 * '<S19>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Set1'
 * '<S20>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Set2'
 * '<S21>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck2/Bit Set4'
 * '<S22>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Clear1'
 * '<S23>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Clear2'
 * '<S24>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Set'
 * '<S25>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Set1'
 * '<S26>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Set2'
 * '<S27>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/Thmal_DSM/DSM_ReportCheck3/Bit Set4'
 * '<S28>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Compare To Constant1'
 * '<S29>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Compare To Constant2'
 * '<S30>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Compare To Constant3'
 * '<S31>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Strt_temp'
 * '<S32>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Subsystem'
 * '<S33>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/TONV_VariableTimeDebounce'
 * '<S34>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/ThmHtg'
 * '<S35>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Time_calc'
 * '<S36>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/Subsystem/Compare To Constant1'
 * '<S37>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/ThmHtg/Compare To Constant3'
 * '<S38>'  : 'BTMR_ThmMagDiag/BTMR_ThmMagDiag/htg_Eval/ThmHtg/TONV_VariableTimeDebounce'
 */
#endif                                 /* RTW_HEADER_BTMR_ThmMagDiag_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
