/*
 * File: BSPR_BattVoltCoord.h
 *
 * Code generated for Simulink model 'BSPR_BattVoltCoord'.
 *
 * Model version                  : 1.1113
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Thu Nov 19 15:53:55 2020
 *
 * 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_BSPR_BattVoltCoord_h_
#define RTW_HEADER_BSPR_BattVoltCoord_h_
#include <math.h>
#ifndef BSPR_BattVoltCoord_COMMON_INCLUDES_
# define BSPR_BattVoltCoord_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* BSPR_BattVoltCoord_COMMON_INCLUDES_ */

#include "BSPR_BattVoltCoord_types.h"

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

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

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

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real32_T Delay_DSTATE;               /* '<S2>/Delay' */
  real32_T Delay_DSTATE_d;             /* '<S10>/Delay' */
  real32_T Delay_DSTATE_f;             /* '<S9>/Delay' */
  uint8_T Delay3_DSTATE_a;             /* '<S33>/Delay3' */
  uint8_T Delay3_DSTATE_m;             /* '<S8>/Delay3' */
  uint8_T Delay3_DSTATE_n;             /* '<S7>/Delay3' */
  boolean_T Delay2_DSTATE;             /* '<S43>/Delay2' */
  boolean_T Delay2_DSTATE_p;           /* '<S33>/Delay2' */
  boolean_T Delay2_DSTATE_o;           /* '<S26>/Delay2' */
  boolean_T Delay2_DSTATE_os;          /* '<S8>/Delay2' */
  boolean_T Delay2_DSTATE_a;           /* '<S7>/Delay2' */
} DW_BSPR_BattVoltCoord_T;

/* Block states (auto storage) */
extern DW_BSPR_BattVoltCoord_T BSPR_BattVoltCoord_DW;

/* Model entry point functions */
extern void BSPR_BattVoltCoord_initialize(void);
extern void BSPR_BattVoltCoord_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_BattVoltRngErr_ASW;/* Battery voltage out of range fault */
extern volatile uint8_T DFC_BattVoltVld_ASW;/* Valid fault for battery voltage upstream the main contactor */
extern volatile uint8_T DFC_DChrgVoltVld_ASW;/* Valid fault for battery downstream the DC charge contactor */
extern volatile uint8_T DFC_HVSmplComFlt_ASW;
extern volatile uint8_T DFC_PackVoltVld_ASW;/* Valid fault for battery downstream the main contactor */

#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 boolean_T BSPR_bBattVoltInvld;/* Invalid flag for battery voltage */
extern volatile boolean_T BSPR_bBattVoltRngChkErr;/* Error detect flag for battery voltage out of range check */
extern volatile boolean_T BSPR_bBattVoltRngChkOk;/* Error healing flag for battery voltage out of range check */
extern volatile boolean_T BSPR_bBattVoltVld;/* Valid flag for battery voltage upstream the main contactor  */
extern volatile boolean_T BSPR_bDChrgVoltVld;/* Valid flag for battery voltage downstream the DC charge contactor */
extern volatile boolean_T BSPR_bHVSmplComVld;
extern volatile boolean_T BSPR_bPackVoltVld;/* Valid flag for battery voltage downstream the main contactor */
extern volatile real32_T BSPR_uBattVolt;/* Battery voltage upstream the main contactor */
extern volatile real32_T BSPR_uDChrgVolt;/* Battery voltage downstream the DC charge contactor */
extern volatile real32_T BSPR_uDChrgVoltRaw;/* Battery voltage sampled downstream the DC charge contactor */
extern volatile real32_T BSPR_uPackVolt;/* Battery voltage downstream the main contactor */
extern volatile real32_T BSPR_uPackVoltRaw;/* Battery voltage sampled downstream the main contactor */

#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>' : 'BSPR_BattVoltCoord'
 * '<S1>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord'
 * '<S2>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord'
 * '<S3>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord'
 * '<S4>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk'
 * '<S5>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord'
 * '<S6>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/Compare To Constant'
 * '<S7>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck'
 * '<S8>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1'
 * '<S9>'   : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/TONV_10msTimeDebounce'
 * '<S10>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/TONV_10msTimeDebounce1'
 * '<S11>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Clear1'
 * '<S12>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Clear2'
 * '<S13>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Set'
 * '<S14>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Set1'
 * '<S15>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Set2'
 * '<S16>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck/Bit Set4'
 * '<S17>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Clear1'
 * '<S18>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Clear2'
 * '<S19>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Set'
 * '<S20>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Set1'
 * '<S21>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Set2'
 * '<S22>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/BattVoltCoord/DSM_ReportCheck1/Bit Set4'
 * '<S23>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/Compare To Constant2'
 * '<S24>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/Compare To Constant5'
 * '<S25>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/Compare To Constant6'
 * '<S26>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2'
 * '<S27>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Clear1'
 * '<S28>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Clear2'
 * '<S29>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Set'
 * '<S30>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Set1'
 * '<S31>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Set2'
 * '<S32>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/DChrgVoltCoord/DSM_ReportCheck2/Bit Set4'
 * '<S33>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2'
 * '<S34>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Clear1'
 * '<S35>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Clear2'
 * '<S36>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Set'
 * '<S37>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Set1'
 * '<S38>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Set2'
 * '<S39>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/HVSmplVldChk/DSM_ReportCheck2/Bit Set4'
 * '<S40>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/Compare To Constant1'
 * '<S41>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/Compare To Constant2'
 * '<S42>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/Compare To Constant4'
 * '<S43>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1'
 * '<S44>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Clear1'
 * '<S45>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Clear2'
 * '<S46>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Set'
 * '<S47>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Set1'
 * '<S48>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Set2'
 * '<S49>'  : 'BSPR_BattVoltCoord/BSPR_BattVoltCoord/PackVoltCoord/DSM_ReportCheck1/Bit Set4'
 */
#endif                                 /* RTW_HEADER_BSPR_BattVoltCoord_h_ */

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