/*
 * File: IOS_OUP.c
 *
 * Code generated for Simulink model 'IOS_OUP'.
 *
 * Model version                  : 1.1
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Tue Jun 16 14:22:28 2020
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: Generic->Unspecified (assume 32-bit Generic)
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "IOS_OUP.h"
#include "IOS_OUP_private.h"

/* Real-time model */
RT_MODEL_IOS_OUP IOS_OUP_M_;
RT_MODEL_IOS_OUP *const IOS_OUP_M = &IOS_OUP_M_;

/*
 * Output and update for atomic system: '<S8>/gain1'
 * Block description for: '<S8>/gain1'
 *   notes:
 *   R1:·ÖÑ¹µçÂ·ÏÂÀ­²ÉÑùµç×è
 *   R2:·ÖÑ¹µçÂ·ÉÏÀ­²ÉÑùµç×è
 *   R1+R2:·ÖÑ¹µçÂ·×Üµç×è
 *   refVolt:»ù×¼µçÑ¹
 *   maxAdcVal:ÂúÁ¿³ÌadcÖµ
 *   voltOffSet:²âÁ¿µãÓëÊµ¼ÊµçÑ¹Æ«²î
 */
real32_T IOS_OUP_Duty2adc_UAES(real32_T rtu_duty, uint16_T rtp_P, uint16_T rtp_D)
{
  /* DataTypeConversion: '<S398>/Data Type Conversion' incorporates:
   *  Constant: '<S398>/Constant1'
   *  Constant: '<S398>/Constant2'
   *  Product: '<S398>/Product1'
   *  Product: '<S398>/Product2'
   */
  return rtu_duty / (real32_T)rtp_D * (real32_T)rtp_P;
}

/* Model step function */
void IOS_OUP_step(void)
{
  uint8_T i = 0U;
  static uint16_T BMS_GB_ChgMode_cnt = 0U;
  uint8_T BMS_StateOfCharge_tmp = 0U;
  static uint8 BMS_GB_ChgMode_tmp = 0U;
  /* DataTypeConversion: '<S338>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input16'
   */
  Sws_Io_Dio_Set_O_S_HSD_HS(Ground);

  /* DataTypeConversion: '<S337>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input15'
   */
  Sws_Io_Dio_Set_O_S_CMC_PwrSply(BMCR_bOutputVolt12vEna);

  /* DataTypeConversion: '<S336>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input14'
   */
  Sws_Io_Dio_Set_O_S_DC_Minus_L(BCCR_dcDcChNegCtrLsdEna);

  /* DataTypeConversion: '<S335>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input13'
   */
  Sws_Io_Dio_Set_O_S_DC_Plus_L(BCCR_dcDcChPosCtrLsdEna);

  /* DataTypeConversion: '<S334>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input12'
   */
  Sws_Io_Dio_Set_O_S_Main_Minus_L(BCCR_dcMNegCtrLsdEna);

  /* DataTypeConversion: '<S333>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input11'
   */
  Sws_Io_Dio_Set_O_S_Main_Plus_L(BCCR_dcMPosCtrLsdEna);

  /* DataTypeConversion: '<S332>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input10'
   */
  Sws_Io_Dio_Set_O_S_HS_CONT2(BCCR_bDcChNegCtrHsdEna);

  /* DataTypeConversion: '<S346>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input9'
   */
  Sws_Io_Dio_Set_O_S_HeatRly_L(BCCR_bPreChCtrLsdEna);

  /* DataTypeConversion: '<S345>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input8'
   */
  Sws_Io_Dio_Set_O_S_HS_CONT1(BCCR_bDcChPosCtrHsdEna);

  /* DataTypeConversion: '<S344>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input7'
   */
  Sws_Io_Dio_Set_O_S_HS_Main_Minus(BCCR_bMNegCtrHsdEna);

  /* DataTypeConversion: '<S343>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input6'
   */
  Sws_Io_Dio_Set_O_S_HS_Main_Plus(BCCR_bMPosCtrHsdEna);

  /* DataTypeConversion: '<S342>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input5'
   */
  Sws_Syc_SetShtDownTyp(BMCR_bBmuShutdown);


  /* DataTypeConversion: '<S341>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input4'
   */
  Sws_Io_Dio_Set_O_S_IsoDet_Swt_Gnd(HVSR_bIsoSwt3Ena);

  /* DataTypeConversion: '<S340>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input3'
   */
  Sws_Io_Dio_Set_O_S_IsoDet_Swt_Minus(HVSR_bIsoSwt2Ena);

  /* DataTypeConversion: '<S339>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input2'
   */
  Sws_Io_Dio_Set_O_S_IsoDet_Swt_Plus(HVSR_bIsoSwt1Ena);

  /* DataTypeConversion: '<S331>/Conversion' incorporates:
   *  Inport: '<Root>/DO_Input1'
   */
  Sws_Io_Dio_Set_O_S_VCU_WKout(BMCR_bWkUpVCU);

  /* Outputs for Atomic SubSystem: '<S8>/gain1' */

  /* SignalConversion: '<S8>/TmpSignal ConversionAtgain1Outport1' incorporates:
   *  Inport: '<Root>/PO_Input1'
   */
  Sws_Io_Pwm_SetDutyCycle_O_F_HVIL2_OUT( IOS_OUP_Duty2adc_UAES
    (BSPR_dcHvilPwmDuty, 32768U, 100U));

  /* End of Outputs for SubSystem: '<S8>/gain1' */

  /* DataTypeConversion: '<S9>/Conversion' incorporates:
   *  Inport: '<Root>/BO_Input1'
   */
  Sws_Syc_SetWakeupTimer(BMCR_tiSetWakeUpTime);


  Sws_Com_ASWReqNM(BMCR_stNMRelease);

  /* DataTypeConversion: '<S250>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input314'
   */
  FLT_DChrgLckErr = DSMR_DChrgLckErr;

  /* DataTypeConversion: '<S249>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input313'
   */
  FLT_DChrgCnntErr = DSMR_DChrgCnntErr;

  /* DataTypeConversion: '<S248>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input312'
   */
  BMS_NetMagTransfer = CNMR_stTransferRoute;

  /* DataTypeConversion: '<S247>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input311'
   */
  BMS_NetMagStateObsr = CNMR_stDebugOut;

  /* DataTypeConversion: '<S246>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input310'
   */
  BMS_EvccMode = COMR_stEuroChrgMode;

  /* DataTypeConversion: '<S245>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input309'
   */
  BMS_stDChrgCtrDiag = BCCR_stDChrgCtrDiag;

  /* DataTypeConversion: '<S243>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input308'
   */
  BMS_stMainCtrDiagMode = BCCR_stMainCtrDiagMode;

  /* DataTypeConversion: '<S242>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input307'
   */
  BMS_uNegVolt = (uint16_T)(int32_T)fmodf(floorf(BSW_uNegVolt), 65536.0F);

  /* DataTypeConversion: '<S241>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input306'
   */
  BMS_uDChrgVoltRaw = (uint16_T)(int32_T)fmodf(floorf(BSPR_uDChrgVoltRaw),
    65536.0F);

  /* DataTypeConversion: '<S240>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input305'
   */
  BMS_uDchrgNegVolt = (uint16_T)(int32_T)fmodf(floorf(BSW_uDchrgNegVolt),
    65536.0F);

  /* DataTypeConversion: '<S239>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input304'
   */
  BMS_uPackVoltRaw = (uint16_T)(int32_T)fmodf(floorf(BSPR_uPackVoltRaw),
    65536.0F);

  /* DataTypeConversion: '<S238>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input303'
   */
  BMS_bAcDischgRdy = BCMR_bAcDischgRdy;

  /* DataTypeConversion: '<S237>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input302'
   */
  BMS_bAcDischgFobd = BCMR_bAcDischgFobd;

  /* DataTypeConversion: '<S236>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input301'
   */
  FLT_DChrgParaChk = DSMR_DChrgParaChk;

  /* DataTypeConversion: '<S235>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input300'
   */
  FLT_AChrgPortOvrTemp = BCMR_bAChrgPortOvrTemp;

  /* DataTypeConversion: '<S234>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input299'
   */
  BMS_bSw5CtrDiagSwt = BCCR_bSw5CtrDiagSwt;

  /* DataTypeConversion: '<S231>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input298'
   */
  BMS_CurrReqMin = (uint8_T)(int32_T)fmodf(floorf(BCMR_iDChrgCalcMix2), 256.0F);

  /* DataTypeConversion: '<S230>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input297'
   */
  BMS_CurrReqMax = (uint8_T)(int32_T)fmodf(floorf(BCMR_iDChrgCalcMax), 256.0F);

  /* DataTypeConversion: '<S229>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input296'
   */
  FLT_DChrgSLACTmt = DSMR_DChrgSLACTOut;

  /* DataTypeConversion: '<S228>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input295'
   */
  FLT_DChrgCableChk = DSMR_DChrgCableChk;

  /* DataTypeConversion: '<S227>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input294'
   */
  FLT_DChrgPreChTOut = DSMR_DChrgPreChTOut;

  /* DataTypeConversion: '<S226>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input293'
   */
  FLT_DChrgTCnntMax = DSMR_DChrgTCnntMax;

  /* DataTypeConversion: '<S225>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input292'
   */
  FLT_DChrgHvOnFail = DSMR_DChrgHvOnFail;

  /* DataTypeConversion: '<S224>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input291'
   */
  FLT_DChrgCSDTmt = DSMR_DChrgCSDTmt;

  /* DataTypeConversion: '<S223>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input290'
   */
  FLT_DChrgStkCurrErr = DSMR_DChrgStkCurrErr;

  /* DataTypeConversion: '<S222>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input289'
   */
  FLT_DChrgCSTTmt = DSMR_DChrgCSTTmt;

  /* DataTypeConversion: '<S220>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input288'
   */
  FLT_DChrgCCSTmt = DSMR_DChrgCCSTmt;

  /* DataTypeConversion: '<S219>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input287'
   */
  FLT_DChrgStkVoltErr = DSMR_DChrgStkVoltErr;

  /* DataTypeConversion: '<S218>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input286'
   */
  FLT_DChrgCROTmt = DSMR_DChrgCROTmt;

  /* DataTypeConversion: '<S217>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input285'
   */
  FLT_DChrgFobd = DSMR_DChrgFobd;

  /* DataTypeConversion: '<S216>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input284'
   */
  FLT_DChrgCMLTmt = DSMR_DChrgCMLTmt;

  /* DataTypeConversion: '<S215>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input283'
   */
  FLT_DChrgCRMTmt = DSMR_DChrgCRMTmt;

  /* DataTypeConversion: '<S214>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input282'
   */
  FLT_DChrgCHMTmt = DSMR_DChrgCHMTmt;

  /* DataTypeConversion: '<S213>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input281'
   */
  FLT_DChrgStakeErr = DSMR_DChrgStakeErr;

  /* DataTypeConversion: '<S212>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input280'
   */
  BMS_stAChrgObsr = BCMR_stAChrgObsr;

  /* DataTypeConversion: '<S211>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input279'
   */
  BMS_stPreThmFltCode = BCMR_stPreThmFltCode;

  /* DataTypeConversion: '<S209>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input278'
   */
  BMS_stPreThmObsvr = BCMR_stPreThmObsvr;

  /* DataTypeConversion: '<S208>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input277'
   */
  FLT_AChgFobd = BCMR_bAcChgFobd;

  /* DataTypeConversion: '<S207>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input276'
   */
  FLT_AChgUnlckTmt = BCMR_bAChgUnclockTmOut;

  /* DataTypeConversion: '<S206>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input275'
   */
  FLT_AChgHVOffTmt = BCMR_bAChgHVOffTmOut;

  /* DataTypeConversion: '<S205>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input274'
   */
  FLT_AChgingErr = BCMR_bAChgingFlt;

  /* DataTypeConversion: '<S204>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input273'
   */
  FLT_AChgRdyTmt = BCMR_bAChgRdyTmOut;

  /* DataTypeConversion: '<S203>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input272'
   */
  FLT_AChgRdyPendingTmOut = BCMR_bAChgWaitingTmOut;

  /* DataTypeConversion: '<S202>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input271'
   */
  FLT_AChgHVOnTmt = BCMR_bAChgHVOnTmOut;

  /* DataTypeConversion: '<S201>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input270'
   */
  FLT_AChgLckTmt = BCMR_bAChgLockingTmOut;

  /* DataTypeConversion: '<S200>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input269'
   */
  FLT_EVCCSelfChkFlt = BCMR_bEVCCSelfChkFlt;

  /* DataTypeConversion: '<S198>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input268'
   */
  FLT_AChrgCnntErr = BCMR_bAChrgCnntFlt;

  /* DataTypeConversion: '<S197>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input267'
   */
  FLT_AChgPileRdyTmt = DSMR_AChgPileRdyTmt;

  /* DataTypeConversion: '<S196>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input266'
   */
  FLT_AChgS2ClsdTmt = BCMR_bAChgS2ClsdTmOut;

  /* DataTypeConversion: '<S195>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input265'
   */
  FLT_AChrgAbnmExit = BCMR_stChrgAbnmExit;

  /* DataTypeConversion: '<S194>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input264'
   */
  FLT_AChrgFltCode = BCMR_stAChrgFltCode;

  /* DataTypeConversion: '<S193>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input263'
   */
  BMS_Software_Version = COMR_verSoftwareVersion;

  /* DataTypeConversion: '<S192>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input262'
   */
  BMS_IsoVoltPos = (uint16_T)(int32_T)fmodf(floorf(HVSR_uIsoVoltPos), 65536.0F);

  /* DataTypeConversion: '<S191>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input261'
   */
  BMS_kL30cVolt = (uint8_T)(int32_T)fmodf(floorf(BSPR_uKl30c / 0.1F), 256.0F);

  /* DataTypeConversion: '<S190>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input260'
   */
  BMS_kL30Volt = (uint8_T)(int32_T)fmodf(floorf(BSPR_uKl30 / 0.1F), 256.0F);

  /* DataTypeConversion: '<S189>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input259'
   */
  BMS_IsoVoltNeg = (uint16_T)(int32_T)fmodf(floorf(HVSR_uIsoVoltNeg), 65536.0F);

  /* DataTypeConversion: '<S187>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input258'
   */
  BMS_DChrgModeDebug = BCMR_stDChrgDebugOut;

  /* DataTypeConversion: '<S186>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input257'
   */
  BMS_DChrgTimeout = BCMR_stDChrgGbFlowTimeout;

  /* DataTypeConversion: '<S185>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input256'
   */
  BMS_DChrgWkUp = BCMR_bDChrgWkup;

  /* DataTypeConversion: '<S184>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input255'
   */
  FLT_HvPwrUpFail = DSMR_HvPwrUpFail;

  /* DataTypeConversion: '<S183>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input254'
   */
  FLT_DChrgPwrUpFail = DSMR_DChrgPwrUpFail;

  /* DataTypeConversion: '<S182>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input253'
   */
  FLT_HtgPerfPlaus = DSMR_HtgPerfPlaus;

  /* DataTypeConversion: '<S181>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input252'
   */
  FLT_CurrStukPlaus = DSMR_CurrStukPlaus;

  /* DataTypeConversion: '<S180>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input251'
   */
  FLT_CurrOffsPlaus = DSMR_CurrOffsPlaus;

  /* DataTypeConversion: '<S179>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input250'
   */
  FLT_CurrChrgPlaus = DSMR_CurrChrgPlaus;

  /* DataTypeConversion: '<S178>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input249'
   */
  FLT_DChrgVoltMish = DSMR_DChrgVoltMish;

  /* DataTypeConversion: '<S176>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input248'
   */
  FLT_DChrgMsgTmt = DSMR_DChrgMsgTimeout;

  /* DataTypeConversion: '<S175>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input247'
   */
  FLT_DChrgLowTempCurrMish = DSMR_DChrgLowTempCurrMish;

  /* DataTypeConversion: '<S174>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input246'
   */
  FLT_DChrgCurrMish = DSMR_DChrgCurrMish;

  /* DataTypeConversion: '<S173>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input245'
   */
  FLT_DChrgBattTMin = DSMR_DChrgBattTMin;

  /* DataTypeConversion: '<S172>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input244'
   */
  FLT_CC2Chk = DSMR_CC2Chk;

  /* DataTypeConversion: '<S171>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input243'
   */
  FLT_APlusChk = DSMR_APlusChk;

  /* DataTypeConversion: '<S170>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input242'
   */
  FLT_AChrgVoltMish = DSMR_AChrgVoltMish;

  /* DataTypeConversion: '<S169>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input241'
   */
  FLT_AChrgCurrMish = DSMR_AChrgCurrMish;

  /* DataTypeConversion: '<S168>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input240'
   */
  FLT_CoolPerfPlaus = DSMR_CoolPerfPlaus;

  /* DataTypeConversion: '<S167>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input239'
   */
  FLT_BattVoltVld = DSMR_BattVoltVld;

  /* DataTypeConversion: '<S165>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input238'
   */
  FLT_DChrgVoltVld = DSMR_DChrgVoltVld;

  /* DataTypeConversion: '<S164>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input237'
   */
  FLT_PackVoltVld = DSMR_PackVoltVld;

  /* DataTypeConversion: '<S163>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input236'
   */
  FLT_DChrgTPosElecSig = DSMR_DChrgTPosElecSig;

  /* DataTypeConversion: '<S162>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input235'
   */
  FLT_DChrgTPosElecMin = DSMR_DChrgTPosElecMin;

  /* DataTypeConversion: '<S161>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input234'
   */
  FLT_DChrgTPosElecMax = DSMR_DChrgTPosElecMax;

  /* DataTypeConversion: '<S160>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input233'
   */
  FLT_DChrgTNegElecSig = DSMR_DChrgTNegElecSig;

  /* DataTypeConversion: '<S159>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input232'
   */
  FLT_DChrgTNegElecMin = DSMR_DChrgTNegElecMin;

  /* DataTypeConversion: '<S158>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input231'
   */
  FLT_DChrgTNegElecMax = DSMR_DChrgTNegElecMax;

  /* DataTypeConversion: '<S157>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input230'
   */
  FLT_ClntUsTElecSig = DSMR_ClntUsTElecSig;

  /* DataTypeConversion: '<S156>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input229'
   */
  FLT_ClntUsTElecMin = DSMR_ClntUsTElecMin;

  /* DataTypeConversion: '<S154>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input228'
   */
  FLT_ClntUsTElecMax = DSMR_ClntUsTElecMax;

  /* DataTypeConversion: '<S153>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input227'
   */
  FLT_ClntDsTElecSig = DSMR_ClntDsTElecSig;

  /* DataTypeConversion: '<S152>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input226'
   */
  FLT_ClntDsTElecMin = DSMR_ClntDsTElecMin;

  /* DataTypeConversion: '<S151>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input225'
   */
  FLT_ClntDsTElecMax = DSMR_ClntDsTElecMax;

  /* DataTypeConversion: '<S150>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input224'
   */
  FLT_BattTGradtMax = DSMR_BattTGradtMax;

  /* DataTypeConversion: '<S149>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input223'
   */
  FLT_BattTempVldMin = DSMR_BattTempVldMin;

  /* DataTypeConversion: '<S148>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input222'
   */
  FLT_BattTempVldMax = DSMR_BattTempVldMax;

  /* DataTypeConversion: '<S147>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input221'
   */
  FLT_CellVoltVldMin = DSMR_CellVoltVldMin;

  /* DataTypeConversion: '<S146>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input220'
   */
  FLT_CellVoltVldMax = DSMR_CellVoltVldMax;

  /* DataTypeConversion: '<S145>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input219'
   */
  FLT_InsResValdFault = DSMR_InsResValdFault;

  /* DataTypeConversion: '<S143>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input218'
   */
  FLT_IsoChkLv2 = DSMR_IsoChkLv2;

  /* DataTypeConversion: '<S142>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input217'
   */
  FLT_IsoChkLv1 = DSMR_IsoChkLv1;

  /* DataTypeConversion: '<S141>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input216'
   */
  FLT_Vcu2A3Tmt = DSMR_Msg2A3Tmt;

  /* DataTypeConversion: '<S140>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input215'
   */
  FLT_Obc2E1Tmt = DSMR_Obc2E1Tmt;

  /* DataTypeConversion: '<S139>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input214'
   */
  FLT_Obc2E0Tmt = DSMR_Msg2E6Tmt;

  /* DataTypeConversion: '<S138>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input213'
   */
  FLT_CellVoltTmt = DSMR_CellVoltTmt;

  /* DataTypeConversion: '<S137>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input212'
   */
  FLT_CellTempTmt = DSMR_CellTempTmt;

  /* DataTypeConversion: '<S136>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input211'
   */
  FLT_BoardTempTmt = DSMR_BoardTempTmt;

  /* DataTypeConversion: '<S135>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input210'
   */
  FLT_BusHVMsgTmt = DSMR_BusHVMsgTmt;

  /* DataTypeConversion: '<S134>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input209'
   */
  FLT_BattHVMsgTmt = DSMR_BattHVMsgTmt;

  /* DataTypeConversion: '<S132>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input208'
   */
  FLT_Kl30VoltLoErr = DSMR_Kl30VoltLoErr;

  /* DataTypeConversion: '<S131>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input207'
   */
  FLT_Kl30VoltHiErr = DSMR_Kl30VoltHiErr;

  /* DataTypeConversion: '<S130>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input206'
   */
  FLT_Kl30OutRngErr = DSMR_Kl30OutRngErr;

  /* DataTypeConversion: '<S129>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input205'
   */
  FLT_Kl30cVoltLoErr = DSMR_Kl30cVoltLoErr;

  /* DataTypeConversion: '<S128>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input204'
   */
  FLT_OutClntOverTmp = DSMR_OutClntOverTmp;

  /* DataTypeConversion: '<S127>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input203'
   */
  FLT_InClntOverTmp = DSMR_InClntOverTmp;

  /* DataTypeConversion: '<S126>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input202'
   */
  FLT_EepReadErr = DSMR_EepReadErr;

  /* DataTypeConversion: '<S125>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input201'
   */
  FLT_CscCellVoltOpenLine = DSMR_CscCellVoltOpenLine;

  /* DataTypeConversion: '<S124>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input200'
   */
  FLT_CscCellTempOpenLine = DSMR_CscCellTempOpenLine;

  /* DataTypeConversion: '<S123>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input199'
   */
  FLT_CSCPwrSpyLoErr = DSMR_CSCPwrSpyLoErr;

  /* DataTypeConversion: '<S120>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input198'
   */
  FLT_CSCPwrSpyHiErr = DSMR_CSCPwrSpyHiErr;

  /* DataTypeConversion: '<S119>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input197'
   */
  FLT_638LinCommErr = DSMR_638LinCommErr;

  /* DataTypeConversion: '<S118>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input196'
   */
  FLT_RcMsg2E1Mis = DSMR_RcMsg2E1Mis;

  /* DataTypeConversion: '<S117>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input195'
   */
  FLT_RcMsg2E0Mis = DSMR_RcMsg2E0Mis;

  /* DataTypeConversion: '<S116>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input194'
   */
  FLT_RcMsg2A7Mis = DSMR_RcMsg2A7Mis;

  /* DataTypeConversion: '<S115>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input193'
   */
  FLT_RcMsg2A5Mis = DSMR_RcMsg2A5Mis;

  /* DataTypeConversion: '<S114>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input192'
   */
  FLT_RcMsg2A3Mis = DSMR_RcMsg2A3Mis;

  /* DataTypeConversion: '<S113>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input191'
   */
  FLT_RcMsg050Mis = DSMR_RcMsg050Mis;

  /* DataTypeConversion: '<S112>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input190'
   */
  FLT_ChkSumMsg2E1Err = DSMR_ChkSumMsg2E1Err;

  /* DataTypeConversion: '<S111>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input189'
   */
  FLT_ChkSumMsg2E0Err = DSMR_ChkSumMsg2E0Err;

  /* DataTypeConversion: '<S109>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input188'
   */
  FLT_ChkSumMsg2A3Err = DSMR_ChkSumMsg2A3Err;

  /* DataTypeConversion: '<S108>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input187'
   */
  FLT_ChkSumMsg050Err = DSMR_ChkSumMsg050Err;

  /* DataTypeConversion: '<S107>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input186'
   */
  FLT_VeCanBusOff = DSMR_VeCanBusOff;

  /* DataTypeConversion: '<S106>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input185'
   */
  FLT_InCanBusOff = DSMR_InCanBusOff;

  /* DataTypeConversion: '<S105>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input184'
   */
  FLT_DcCanBusOff = DSMR_DcCanBusOff;

  /* DataTypeConversion: '<S104>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input183'
   */
  FLT_CrashNpl = DSMR_CrashNpl;

  /* DataTypeConversion: '<S103>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input182'
   */
  FLT_HvilSig = DSMR_HvilSig;

  /* DataTypeConversion: '<S102>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input181'
   */
  FLT_HvilMin = DSMR_HvilMin;

  /* DataTypeConversion: '<S101>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input180'
   */
  FLT_HvilMax = DSMR_HvilMax;

  /* DataTypeConversion: '<S100>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input179'
   */
  FLT_DChrgPosStuckMin = DSMR_DChrgPosStuckMin;

  /* DataTypeConversion: '<S98>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input178'
   */
  FLT_DChrgPosStuckMax = DSMR_DChrgPosStuckMax;

  /* DataTypeConversion: '<S97>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input177'
   */
  FLT_DChrgNegStuckMin = DSMR_DChrgNegStuckMin;

  /* DataTypeConversion: '<S96>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input176'
   */
  FLT_DChrgNegStuckMax = DSMR_DChrgNegStuckMax;

  /* DataTypeConversion: '<S95>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input175'
   */
  FLT_PrStuckMin = DSMR_PrStuckMin;

  /* DataTypeConversion: '<S94>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input174'
   */
  FLT_PosStuckMax = DSMR_PosStuckMax;

  /* DataTypeConversion: '<S93>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input173'
   */
  FLT_MPosStuckMin = DSMR_MPosStuckMin;

  /* DataTypeConversion: '<S92>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input172'
   */
  FLT_MNegStuckMin = DSMR_MNegStuckMin;

  /* DataTypeConversion: '<S91>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input171'
   */
  FLT_MNegStuckMax = DSMR_MNegStuckMax;

  /* DataTypeConversion: '<S90>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input170'
   */
  FLT_SocRngLoMin = DSMR_SocRngLoMin;

  /* DataTypeConversion: '<S89>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input169'
   */
  FLT_SocRngLoMax = DSMR_SocRngLoMax;

  /* DataTypeConversion: '<S87>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input168'
   */
  FLT_SocRngHiMin = DSMR_SocRngHiMin;

  /* DataTypeConversion: '<S86>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input167'
   */
  FLT_SocRngHiMax = DSMR_SocRngHiMax;

  /* DataTypeConversion: '<S85>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input166'
   */
  FLT_DisChOCNpl = DSMR_DisChOCNpl;

  /* DataTypeConversion: '<S84>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input165'
   */
  FLT_DisChOCMin = DSMR_DisChOCMin;

  /* DataTypeConversion: '<S83>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input164'
   */
  FLT_DisChOCMax = DSMR_DisChOCMax;

  /* DataTypeConversion: '<S82>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input163'
   */
  FLT_ChrgOCNpl = DSMR_ChrgOCNpl;

  /* DataTypeConversion: '<S81>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input162'
   */
  FLT_ChrgOCMin = DSMR_ChrgOCMin;

  /* DataTypeConversion: '<S80>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input161'
   */
  FLT_ChrgOCMax = DSMR_ChrgOCMax;

  /* DataTypeConversion: '<S79>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input160'
   */
  FLT_BattTHopMax = DSMR_BattTHopMax;

  /* DataTypeConversion: '<S78>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input159'
   */
  FLT_BattTCnstMax = DSMR_BattTCnstMax;

  /* DataTypeConversion: '<S76>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input158'
   */
  FLT_BattTFaultMin = DSMR_BattTFaultMin;

  /* DataTypeConversion: '<S75>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input157'
   */
  FLT_BattTFaultMax = DSMR_BattTFaultMax;

  /* DataTypeConversion: '<S74>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input156'
   */
  FLT_BattTAlrmMin = DSMR_BattTAlrmMin;

  /* DataTypeConversion: '<S73>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input155'
   */
  FLT_BattTAlrmMax = DSMR_BattTAlrmMax;

  /* DataTypeConversion: '<S72>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input154'
   */
  FLT_BattTWarnMin = DSMR_BattTWarnMin;

  /* DataTypeConversion: '<S71>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input153'
   */
  FLT_BattTWarnMax = DSMR_BattTWarnMax;

  /* DataTypeConversion: '<S70>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input152'
   */
  FLT_CellVoltFusfMin = DSMR_CellVoltFusfMin;

  /* DataTypeConversion: '<S69>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input151'
   */
  FLT_CellVoltFusfMax = DSMR_CellVoltFusfMax;

  /* DataTypeConversion: '<S68>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input150'
   */
  FLT_CellVoltFaultMin = DSMR_CellVoltFaultMin;

  /* DataTypeConversion: '<S67>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input149'
   */
  FLT_CellVoltFaultMax = DSMR_CellVoltFaultMax;

  /* DataTypeConversion: '<S65>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input148'
   */
  FLT_CellVoltAlrmMin = DSMR_CellVoltAlrmMin;

  /* DataTypeConversion: '<S64>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input147'
   */
  FLT_CellVoltAlrmMax = DSMR_CellVoltAlrmMax;

  /* DataTypeConversion: '<S63>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input146'
   */
  FLT_CellVoltWarnMin = DSMR_CellVoltWarnMin;

  /* DataTypeConversion: '<S62>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input145'
   */
  FLT_CellVoltWarnMax = DSMR_CellVoltWarnMax;

  /* DataTypeConversion: '<S61>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input144'
   */
  FLT_CellVoltNpl = DSMR_CellVoltNpl;

  /* DataTypeConversion: '<S60>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input143'
   */
  FLT_PackUNpl = DSMR_PackUNpl;

  /* DataTypeConversion: '<S59>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input142'
   */
  FLT_DChrgUNpl = DSMR_DChrgUNpl;

  /* DataTypeConversion: '<S58>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input141'
   */
  FLT_BattUNpl = DSMR_BattUNpl;

  /* DataTypeConversion: '<S57>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input140'
   */
  NMBMS_ActiveSource2 = CNMR_flgBmsActSrce_B;

  /* DataTypeConversion: '<S56>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input139'
   */
  NMBMS_ActiveSource1 = CNMR_flgBmsActSrce_A;

  /* DataTypeConversion: '<S54>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input138'
   */
  NMBMS_WakeSource = CNMR_flgBmsWkSrce;

  /* DataTypeConversion: '<S53>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input137'
   */
  NMBMS_NormalFromReady = CNMR_flgBmsNormFromRdy;

  /* DataTypeConversion: '<S52>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input136'
   */
  NMBMS_NormalFromRepeat = CNMR_flgBmsNormFromRpt;

  /* DataTypeConversion: '<S51>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input135'
   */
  NMBMS_RepeatFromReady = CNMR_flgBmsRptFromRdy;

  /* DataTypeConversion: '<S50>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input134'
   */
  NMBMS_RepeatFromNormal = CNMR_flgBmsRptFromNorm;

  /* DataTypeConversion: '<S49>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input133'
   */
  NMBMS_RepeatFromPrepare = CNMR_flgBmsRptFromPrepr;

  /* DataTypeConversion: '<S48>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input132'
   */
  NMBMS_RepeatFromSleep = CNMR_flgBmsRptFromSlp;

  /* DataTypeConversion: '<S47>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input131'
   */
  NMBMS_Actwake = CNMR_flgBmsWkUp;

  /* DataTypeConversion: '<S46>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input130'
   */
  NMBMS_RepeatReq = CNMR_flgBmsRptReq;

  /* DataTypeConversion: '<S45>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input129'
   */
  NMBMS_SourceID = CNMR_flgBmsSrceID;

  /* DataTypeConversion: '<S43>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input128'
   */
  BMS_ChrgVoltAbnrm = BCMR_stBattDChrgVoltOvrErr;

  /* DataTypeConversion: '<S42>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input127'
   */
  BMS_ChrgCurrAbnrm = BCMR_stBattDChrgCurrOvrErr;

  /* DataTypeConversion: '<S41>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input126'
   */
  BMS_OtherErr = BCMR_stOtherErr;

  /* DataTypeConversion: '<S40>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input125'
   */
  BMS_CC2ChkVoltErr = BCMR_stCC2ChkVoltErr;

  /* DataTypeConversion: '<S39>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input124'
   */
  BMS_MainRelayErr = BCMR_stMainRelayErr;

  /* DataTypeConversion: '<S38>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input123'
   */
  BMS_BattOvrTempErr = BCMR_stDcBattTempOvrErr;

  /* DataTypeConversion: '<S37>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input122'
   */
  BMS_ChrgCnntErr = BCMR_stDChrgCnntErr;

  /* DataTypeConversion: '<S36>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input121'
   */
  BMS_stPcbOvrTempErr = BCMR_stPcbOvrTempErr;

  /* DataTypeConversion: '<S35>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input120'
   */
  BMS_stDChrgOutpCnntOvrTempErr = BCMR_stDcOutpCnntOvrTempErr;

  /* DataTypeConversion: '<S34>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input119'
   */
  BMS_stDChrgBattInsulationErr = BCMR_stDcBattInsulationErr;

  /* DataTypeConversion: '<S32>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input118'
   */
  BMS_stDChrgChrgerActStop = BCMR_flgDChrgStopCActive;

  /* DataTypeConversion: '<S31>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input117'
   */
  BMS_stDChrgRchCellVoltLmt = BCMR_stDcRchCellVoltLmt;

  /* DataTypeConversion: '<S30>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input116'
   */
  BMS_stDChrgRchPackVoltLmt = BCMR_stDChrgRchPackVoltLmt;

  /* DataTypeConversion: '<S29>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input115'
   */
  BMS_stDChrgRchSocLmt = BCMR_stDChrgRchSocLmt;

  /* DataTypeConversion: '<S28>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input114'
   */
  BMS_DChrgCurrReq = (uint16_T)(int32_T)fmodf(floorf((COMR_iDcChrgCurrReqBcl +
    400.0F) / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S27>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input113'
   */
  BMS_DChrgVoltReq = (uint16_T)(int32_T)fmodf(floorf(BCMR_uDcChrgVoltReqCalc /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S26>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input112'
   */
  BMS_DChgStVoltOutFlg = BCMR_bRxCroRdyOk;

  /* DataTypeConversion: '<S25>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input111'
   */
  BMS_ChrgAhAccum = (uint8_T)(int32_T)fmodf(floorf(BCMR_ahAccumDChrgAh), 256.0F);

  /* DataTypeConversion: '<S24>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input110'
   */
  // BMS_DTC_2 = COMR_cntDtcCode_B;

  /* DataTypeConversion: '<S23>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input109'
   */
  // BMS_DTC_1 = COMR_cntDtcCode_A;

  /* DataTypeConversion: '<S21>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input108'
   */
  // BMS_DTCIndex = COMR_cntDtcInd;

  /* DataTypeConversion: '<S20>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input107'
   */
  // BMS_DTCQantity = COMR_cntDtcQtty;

  /* DataTypeConversion: '<S19>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input106'
   */
  BMS_CellTemp_7_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempG + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S18>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input105'
   */
  BMS_CellTemp_6_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempF + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S17>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input104'
   */
  BMS_CellTemp_5_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempE + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S16>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input103'
   */
  BMS_CellTemp_4_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempD + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S15>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input102'
   */
  BMS_CellTemp_3_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempC + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S14>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input101'
   */
  BMS_CellTemp_2_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempB + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S13>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input100'
   */
  BMS_CellTemp_1_A = (uint8_T)(int32_T)fmodf(floorf(COMR_tCellTempA + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S12>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input99'
   */
  BMS_CellTempCount_A = BSPR_cntCellTemp;

  /* DataTypeConversion: '<S330>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input98'
   */
  BMS_CellVolt_4_A = (uint16_T)(int32_T)fmodf(floorf(COMR_uCellVoltD / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S329>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input97'
   */
  BMS_CellVolt_3_A = (uint16_T)(int32_T)fmodf(floorf(COMR_uCellVoltC / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S328>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input96'
   */
  BMS_CellVolt_2_A = (uint16_T)(int32_T)fmodf(floorf(COMR_uCellVoltB / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S327>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input95'
   */
  BMS_CellVolt_1_A = (uint16_T)(int32_T)fmodf(floorf(COMR_uCellVoltA / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S326>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input94'
   */
  BMS_CellVoltCount_A = BSPR_cntCellSer;

  /* DataTypeConversion: '<S325>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input93'
   */
  BMS_CellVolt_Min = (uint16_T)(int32_T)fmodf(floorf(BSPR_uCellVoltMin2CAN / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S324>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input92'
   */
  BMS_Heat_TempDiff = (uint8_T)(int32_T)fmodf(floorf(BTMR_tDiffHtTgtUsT), 256.0F);

  /* DataTypeConversion: '<S323>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input91'
   */
  BMS_Cool_TempDiff = (uint8_T)(int32_T)fmodf(floorf(BTMR_tDiffClntTgtUsT),
    256.0F);

  /* DataTypeConversion: '<S322>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input90'
   */
  BMS_CellVolt_Max = (uint16_T)(int32_T)fmodf(floorf(BSPR_uCellVoltMax2CAN / 0.001F),
    65536.0F);

  /* DataTypeConversion: '<S321>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input89'
   */
  BMS_Heat_TempTarget = (uint8_T)(int32_T)fmodf(floorf(BTMR_tHtgTempReq + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S319>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input88'
   */
  BMS_Cool_TempTarget = (uint8_T)(int32_T)fmodf(floorf(BTMR_tClntTempReq + 40.0F),
    256.0F);  /* 891 Code */

  /* DataTypeConversion: '<S318>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input87'
   */
  BMS_DCChgMode = BCMR_stDChrgMode;

  /* DataTypeConversion: '<S317>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input86'
   */
  BMS_ACChgMode = BCMR_stAChrgMode;

  /* DataTypeConversion: '<S316>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input85'
   */
  BMS_DCChgConnectSt = BCMR_stDChrgCnnt;

  /* DataTypeConversion: '<S315>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input84'
   */
  BMS_StateOfChargeReal = (uint8_T)(int32_T)fmodf(floorf(BSER_rSoc), 256.0F);

  /* DataTypeConversion: '<S314>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input83'
   */
  BMS_TempHighWarning = BSPR_bBattOvrTempFault;

  /* DataTypeConversion: '<S313>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input82'
   */
  BMS_PackOVFault = BSER_bBattOvrVoltFault;

  /* DataTypeConversion: '<S312>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input81'
   */
  BMS_PackUVFault = BSER_bBattUndrVoltFault;

  /* DataTypeConversion: '<S311>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input80'
   */
  BMS_CellOVFault = BSER_bCellOvrVoltFault;

  /* DataTypeConversion: '<S310>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input79'
   */
  BMS_CellUVFault = BSER_bCellUndrVoltFault;

  /* DataTypeConversion: '<S308>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input78'
   */
  BMS_AcDcChrgConnectBoth = BCMR_stChrgCnntBoth;

  /* DataTypeConversion: '<S307>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input77'
   */
  BMS_OTAModeSts = BMCR_flgBmsOTAMode;

  /* DataTypeConversion: '<S306>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input76'
   */
  BMS_SOCLowWarning = BSER_bSocLoFault;

  /* DataTypeConversion: '<S305>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input75'
   */
  BMS_SOCHighWarning = BSER_bSocHiFault;

  /* DataTypeConversion: '<S304>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input74'
   */
  BMS_SOCHopWarning = BSER_bSocHopFault;

  /* DataTypeConversion: '<S303>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input73'
   */
  BMS_MismatchWarning = COMR_bSysMishFault;

  /* DataTypeConversion: '<S302>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input72'
   */
  BMS_ConsistencyWarning = BSER_bCellCnstFault;

  /* DataTypeConversion: '<S301>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input71'
   */
  BMS_OverChargeWarning = BSER_bOvrChrgFault;

  /* DataTypeConversion: '<S300>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input70'
   */
  BMS_TempValueWarning_A = BSPR_bCellTempCnstFault;

  /* DataTypeConversion: '<S299>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input69'
   */
  BMS_Ser_Lamp = HVSR_bSrvLmp;

  /* DataTypeConversion: '<S297>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input68'
   */
  BMS_Warn_Lamp = HVSR_bWarnLmp;

  /* DataTypeConversion: '<S296>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input67'
   */
  BMS_Batt_Full = BCMR_bChrgFul;

  /* DataTypeConversion: '<S295>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input66'
   */
  BMS_ACChgConnectSt = BCMR_stAChrgCnnt;

  /* DataTypeConversion: '<S294>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input65'
   */
  BMS_Chg_RemTime = (uint16_T)(int32_T)fmodf(floorf(BCMR_tiChrgRemTime),
    65536.0F);

  /* DataTypeConversion: '<S293>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input64'
   */
  BMS_Insulation_R = (uint16_T)(int32_T)fmodf(floorf(HVSR_resIso), 65536.0F);

  /* DataTypeConversion: '<S292>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input63'
   */
  /* Cell Temp CAN Signal*/
  if (0U == CcRTE_CellTempNumb_numb)
  {
    BMS_BattMaxTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTempMax + 40.0F), 256.0F);
    BMS_BattMinTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTempMin + 40.0F), 256.0F);
    BMS_BattAvgTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTempAvrg + 40.0F), 256.0F);
  }
  else
  {
    BMS_BattMaxTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTempMax + 40.0F), 256.0F);
    BMS_BattMinTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTempMin + 40.0F), 256.0F);
    BMS_BattAvgTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTempAvrg + 40.0F), 256.0F);
  }

  /* DataTypeConversion: '<S289>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input61'
   */
  BMS_IsoCheckStatus = HVSR_bIsoChkStatus;

  /* DataTypeConversion: '<S288>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input60'
   */
  BMS_StateOfEnergy = (uint16_T)(int32_T)fmodf(floorf(BSER_eSoe / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S286>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input59'
   */
  BMS_TempFault = BSPR_bBattTempFault;

  /* DataTypeConversion: '<S285>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input58'
   */
  BMS_BattEngy = (uint16_T)(int32_T)fmodf(floorf(BSER_eBattNrmEnrg / 0.01F),
    65536.0F);

  /* DataTypeConversion: '<S283>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input56'
   */
  BMS_PreThemalReq = BCMR_stAChrgPreThmReq;

  /* DataTypeConversion: '<S282>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input55'
   */
  BMS_ElockRequest = BCMR_stDChrgElockReq;

  /* DataTypeConversion: '<S281>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input54'
   */
  BMS_PreThemalMode = BCMR_stAChrgPreThmMode;

  /* DataTypeConversion: '<S280>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input53'
   */
  BMS_VCUHvDownReqValid = BMCR_bPwrDownReqVald;

  /* DataTypeConversion: '<S279>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input52'
   */
  BMS_VCUHvDownReq = BMCR_flgPwrDownReq;

  /* DataTypeConversion: '<S278>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input51'
   */
  BMS_ChgConstCurrMAX = (uint16_T)(int32_T)fmodf(floorf((BSER_iConstCurrChMax +
    700.0F) / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S277>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input50'
   */
  BMS_VCUHvUpReqValid = BMCR_bPwrUpReqVald;

  /* DataTypeConversion: '<S275>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input49'
   */
  BMS_DischgConstCurrMAX = (uint16_T)(int32_T)fmodf(floorf
    (BSER_iConstCurrDisChMax / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S274>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input48'
   */
  BMS_VCUHvUpReq = BMCR_flgPwrUpReq;

  /* DataTypeConversion: '<S273>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input47'
   */
  BMS_BlanceStateValid = BSER_bBalaVald;

  /* DataTypeConversion: '<S272>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input46'
   */
  BMS_BlanceState = BSER_stBal;

  /* DataTypeConversion: '<S271>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input45'
   */
  BMS_PackInVoltage_A = (uint16_T)(int32_T)fmodf(floorf(COMR_uBattVolt / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S290>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input45'
   */
  BMS_FuseVoltage = (uint8_T)(int32_T)fmodf(floorf(BSPR_uReservedSig4 * 0.5F),
    256.0F);

  /* DataTypeConversion: '<S270>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input44'
   */
  BMS_PackCurrent_Lem = (uint16_T)(int32_T)fmodf(floorf(BSPR_iAdCurr + 1023.0F),
    65536.0F);

  /* DataTypeConversion: '<S269>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input43'
   */
  BMS_IVI_DischargeStatus = BCMR_stIviDischg;

  /* DataTypeConversion: '<S267>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input42'
   */
  BMS_StateOfHealth = (uint8_T)(int32_T)fmodf(floorf(BSER_rSoh), 256.0F);

  /* DataTypeConversion: '<S266>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input41'
   */
  BMS_AppChgMode = BCMR_stAppChgMode;

  /* DataTypeConversion: '<S264>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input40'
   */
  BMS_VcuV2XMod = BCMR_stV2xMod;

  /* DataTypeConversion: '<S263>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input39'
   */
  BMS_FaultLevel = DSMR_stFaultRank;

  /* DataTypeConversion: '<S262>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input38'
   */
  BMS_InterlockOpenFault = HVSR_flgHvilFault;

  /* DataTypeConversion: '<S261>/Conversion' incorporates:
   *  DataTypeConversion: '<S268>/Conversion'
   *  Inport: '<Root>/CO_Input37'
   */
  BMS_StateOfCharge_tmp = (uint8_T)(int32_T)fmodf(floorf(BSER_rSocDspl), 256.0F);
  BMS_StateOfCharge = BMS_StateOfCharge_tmp;

  /* DataTypeConversion: '<S268>/Conversion' */
  BMS_StateOfCharge_A = BMS_StateOfCharge_tmp;

  /* DataTypeConversion: '<S260>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input36'
   */
  BMS_IsolationFault = HVSR_flgIsoFault;

  /* DataTypeConversion: '<S259>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input35'
   */
  BMS_SysSelfCheck = BSPR_stBmsSelfChk;

  /* DataTypeConversion: '<S258>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input34'
   */
  BMS_STAUS = BMCR_stBmsModeCtrl;

  /* DataTypeConversion: '<S255>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input33'
   */
  BMS_ChgCurrReq = (uint16_T)(int32_T)fmodf(floorf((BCMR_iReqCurrChrg + 700.0F) /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S244>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input32'
   */
  BMS_OnDischrgCmd = BCMR_flgDischgCmd;

  /* DataTypeConversion: '<S233>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input31'
   */
  BMS_ObcReadyReq = BCMR_bObcRdyReq;

  /* DataTypeConversion: '<S221>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input30'
   */
  BMS_ChargeVoltage = (uint16_T)(int32_T)fmodf(floorf(BCMR_uReqVoltChrg / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S210>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input29'
   */
  BMS_MaxChgVolt = (uint16_T)(int32_T)fmodf(floorf(BCMR_uMaxVoltChrg / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S199>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input28'
   */
  BMS_ActualChargePower = (uint16_T)(int32_T)fmodf(floorf(BCMR_pActPwrChrg /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S188>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input27'
   */
  BMS_OnChrgCmd = BCMR_flgChrgCmd;

  /* DataTypeConversion: '<S177>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input26'
   */
  BMS_ChgConstPower = (uint16_T)(int32_T)fmodf(floorf(BSER_pConstPwrCh / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S166>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input25'
   */
  BMS_DischgConstPower = (uint16_T)(int32_T)fmodf(floorf(BSER_pConstPwrDisCh /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S155>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input24'
   */
  BMS_ChgPeakPower = (uint16_T)(int32_T)fmodf(floorf(BSER_pPeakPwrCh / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S144>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input23'
   */
  BMS_DischgPeakPower = (uint16_T)(int32_T)fmodf(floorf(BSER_pPeakPwrDisCh /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S133>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input22'
   */
  BMS_ChgPeakVolt = (uint16_T)(int32_T)fmodf(floorf(BSER_uPeakVoltCh), 65536.0F);

  /* DataTypeConversion: '<S122>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input21'
   */
  BMS_DischgPeakVolt = (uint16_T)(int32_T)fmodf(floorf(BSER_uPeakVoltDisCh),
    65536.0F);

  /* DataTypeConversion: '<S110>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input20'
   */
  BMS_ChgPeakCurr = (uint16_T)(int32_T)fmodf(floorf((BSER_iPeakCurrCh + 1500.0F)
    / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S99>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input19'
   */
  BMS_DischgPeakCurr = (uint16_T)(int32_T)fmodf(floorf(BSER_iPeakCurrDisCh /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S88>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input18'
   */
  BMS_Heatreq = BTMR_flgHeatReq;

  /* DataTypeConversion: '<S77>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input17'
   */
  BMS_CoolingReq = BTMR_flgCoolReq;

  /* DataTypeConversion: '<S66>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input16'
   */
  BMS_HeatPowerReq = (uint16_T)(int32_T)fmodf(floorf(BTMR_pHtgPwrReq / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S55>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input15'
   */
  BMS_CoolPowerReq = (uint16_T)(int32_T)fmodf(floorf(BTMR_pClntPwrReq / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S44>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input14'
   */
  BMS_CoolantTempOut = (uint8_T)(int32_T)fmodf(floorf(BSPR_tClntDsT + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S33>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input13'
   */
  BMS_CoolantTempIn = (uint8_T)(int32_T)fmodf(floorf(BSPR_tClntUsT + 40.0F),
    256.0F);

  /* DataTypeConversion: '<S22>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input12'
   */

  BMS_ThermalRunAway = BTMR_bThmRunAway;
  BMS_ThermalPropogation = (true == BTMR_bThmRunAway) ? 3U : 0U;

  /* DataTypeConversion: '<S11>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input11'
   */
  BMS_KL15 = BSPR_bKl15WkUp;

  /* DataTypeConversion: '<S320>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input10'
   */
  BMS_PackCurrent = (uint16_T)(int32_T)fmodf(floorf((BSPR_iBattCurr + 700.0F) /
    0.1F), 65536.0F);

  /* DataTypeConversion: '<S309>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input9'
   */
  BMS_Prechage_relay_Sta = BCCR_stPreChCtrStatus;

  /* DataTypeConversion: '<S298>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input8'
   */
  BMS_PackVoltage = (uint16_T)(int32_T)fmodf(floorf(COMR_uPackVolt / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S287>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input7'
   */
  BMS_RelayStuckClosed = BCCR_stBmsRelayCtrStatus;

  /* DataTypeConversion: '<S276>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input6'
   */
  BMS_QCN_relay_Sta = BCCR_stDcChNegCtrStatus;

  /* DataTypeConversion: '<S265>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input5'
   */
  BMS_QCP_relay_Sta = BCCR_stDcChPosCtrStatus;

  /* DataTypeConversion: '<S232>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input4'
   */
  BMS_PV_relay_Sta = BCCR_stMPosCtrStatus;

  /* DataTypeConversion: '<S121>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input3'
   */
  BMS_NV_relay_Sta = BCCR_stMNegChCtrStatus;

  /* DataTypeConversion: '<S10>/Conversion' incorporates:
   *  Inport: '<Root>/CO_Input2'
   */
  BMS_HVConnectStt = BCCR_stHVConnSt;

  /* DataTypeConversion: '<S392>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input50'
   */
  BEM_Reserved = BCMR_stOtherErrBem;

  /* DataTypeConversion: '<S390>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input49'
   */
  BEM_RcvMsgTimeOut7_CSD = BCMR_stSpn3907TimeoutBem;

  /* DataTypeConversion: '<S389>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input48'
   */
  BEM_RcvMsgTimeOut6_CST = BCMR_stSpn3906TimeoutBem;

  /* DataTypeConversion: '<S388>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input47'
   */
  BEM_RcvMsgTimeOut5_CCS = BCMR_stSpn3905TimeoutBem;

  /* DataTypeConversion: '<S387>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input46'
   */
  BEM_RcvMsgTimeOut4_CRO_OK = BCMR_stSpn3904TimeoutBem;

  /* DataTypeConversion: '<S386>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input45'
   */
  BEM_RcvMsgTimeOut3_CTSCML = BCMR_stSpn3903TimeoutBem;

  /* DataTypeConversion: '<S385>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input44'
   */
  BEM_RcvMsgTimeOut2_CRM_OK = BCMR_stSpn3902TimeoutBem;

  /* DataTypeConversion: '<S384>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input43'
   */
  BEM_RcvMsgTimeOut1_CRM_NG = BCMR_stSpn3901TimeoutBem;

  /* DataTypeConversion: '<S383>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input42'
   */
  BSD_Batt_SOC_END = BCMR_rBattSocBsd;

  /* DataTypeConversion: '<S382>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input41'
   */
  BSD_Cell_MaxVoltduringChg = (uint16_T)(BCMR_vBattMaxCellVoltBsd * 100U);

  /* DataTypeConversion: '<S381>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input40'
   */
  BSD_Cell_MinVoltduringChg = (uint16_T)(BCMR_vBattMinCellVoltBsd * 100U);

  /* DataTypeConversion: '<S379>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input39'
   */
  BSD_Batt_MinTempduringChg = (uint8_T)(int32_T)fmodf(floorf
    (BCMR_tBattMinTempBsd + 50.0F), 256.0F);

  /* DataTypeConversion: '<S378>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input38'
   */
  BSD_Batt_MaxTempduringChg = (uint8_T)(int32_T)fmodf(floorf
    (BCMR_tBattMaxTempBsd + 50.0F), 256.0F);

  /* DataTypeConversion: '<S377>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input37'
   */
  BST_ChrgVoltAbnrm = BCMR_stChrgVoltAbnrmBst;

  /* DataTypeConversion: '<S376>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input36'
   */
  BST_ChrgCurrAbnrm = BCMR_stChrgCurrAbnrmBst;

  /* DataTypeConversion: '<S375>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input35'
   */
  BST_OtherErr = BCMR_stOtherErrBst;

  /* DataTypeConversion: '<S374>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input34'
   */
  BST_CC2ChkVoltErr = BCMR_stCC2ChkVoltErrBst;

  /* DataTypeConversion: '<S373>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input33'
   */
  BST_MainRelayErr = BCMR_stMainRelayErrBst;

  /* DataTypeConversion: '<S372>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input32'
   */
  BST_BattOvrTempErr = BCMR_stBattOvrTempErrBst;

  /* DataTypeConversion: '<S371>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input31'
   */
  BST_ChrgCnntErr = BCMR_stChrgCnntErrBst;

  /* DataTypeConversion: '<S370>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input30'
   */
  BST_PcbOvrTempErr = BCMR_stPcbOvrTempErrBst;

  /* DataTypeConversion: '<S368>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input29'
   */
  BST_OutpCnntOvrTempErr = BCMR_stOutpCnntOvrTempErrBst;

  /* DataTypeConversion: '<S367>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input28'
   */
  BST_BattInsulationErr = BCMR_stBattInsulationErrBst;

  /* DataTypeConversion: '<S366>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input27'
   */
  BST_ChrgerActStop = BCMR_stChrgerActStopBst;

  /* DataTypeConversion: '<S365>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input26'
   */
  BST_RchCellVoltLmt = BCMR_stRchCellVoltLmtBst;

  /* DataTypeConversion: '<S364>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input25'
   */
  BST_RchPackVoltLmt = BCMR_stRchPackVoltLmtBst;

  /* DataTypeConversion: '<S363>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input24'
   */
  BST_RchSocLmt = BCMR_stRchSocLmtBst;

  /* DataTypeConversion: '<S362>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input23'
   */
  BSM_Batt_TempMax = (uint8_T)(int32_T)fmodf(floorf(BCMR_tBattMaxTempBsm + 50.0F),
    256.0F);

  /* DataTypeConversion: '<S361>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input22'
   */
  BSM_Batt_SensorNumofTmpMin = (uint8_T)(BCMR_numBattMinTemptAddrBsm + -1);

  /* DataTypeConversion: '<S360>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input21'
   */
  BSM_Batt_SensorNumofTmpMax = (uint8_T)(BCMR_numBattMaxTemptAddrBsm + -1);

  /* DataTypeConversion: '<S359>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input20'
   */
  BSM_BattErr_SOCAbnor = BCMR_stBattSocErrBsm;

  /* DataTypeConversion: '<S357>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input19'
   */
  BSM_BattErr_TempOverLmt = BCMR_stBattTempOvrErrBsm;

  /* DataTypeConversion: '<S356>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input18'
   */
  BSM_BattErr_ChgCurOverLmt = BCMR_stBattChrgCurrOvrErrBsm;

  /* DataTypeConversion: '<S355>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input17'
   */
  BSM_BattErr_OutputConectSt = BCMR_stBattOutputContErrBsm;

  /* DataTypeConversion: '<S354>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input16'
   */
  BSM_Batt_NumofCellVoltMax = (uint8_T)(BCMR_numMaxCellVoltAddrBsm + -1);

  /* DataTypeConversion: '<S353>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input15'
   */
  BSM_BattErr_InsulationSt = BCMR_stBattInsulationErrBsm;

  /* DataTypeConversion: '<S352>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input14'
   */
  BSM_BattErr_ChgPermitSt = BCMR_stChrgEnaBsm;

  /* DataTypeConversion: '<S351>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input13'
   */
  BSM_BattErr_CellVoltAbnor = BCMR_stBattCellVoltErrBsm;

  /* DataTypeConversion: '<S350>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input12'
   */
  BSM_Batt_TempMin = (uint8_T)(int32_T)fmodf(floorf(BCMR_tBattMinTempBsm + 50.0F),
    256.0F);

  /* DataTypeConversion: '<S349>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input11'
   */
  BCL_ChgCurrReq = (uint16_T)(int32_T)fmodf(floorf((BCMR_iDcChrgCurrReqBcl +
    400.0F) / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S348>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input10'
   */
  BCL_ChgModeReq = (uint8_T)(int32_T)fmodf(floorf(BCMR_stDcChrgModeBcl), 256.0F);

  /* DataTypeConversion: '<S396>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input9'
   */
  BCL_ChgVoltReq = (uint16_T)(int32_T)fmodf(floorf(BCMR_vDcChrgVoltReqBcl / 0.1F),
    65536.0F);

  /* DataTypeConversion: '<S395>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input8'
   */
  BRO_ReadyforChg = BCMR_stBmsRdyBro;

  /* DataTypeConversion: '<S394>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input7'
   */
  BHM_PackMaxChrgCurrEna = (uint8_T)(int32_T)fmodf(floorf
    (BCMR_uMaxPmtdChrgPackCurrEna), 256.0F);

  /* DataTypeConversion: '<S393>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input6'
   */
  BHM_PackMaxChrgCurrPmtd = (uint16_T)(int32_T)fmodf(floorf
    ((BCMR_uMaxPmtdChrgPackCurrBhm + 400.0F) / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S391>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input5'
   */
  BHM_PackMaxChrgVoltPmtd = (uint16_T)(int32_T)fmodf(floorf
    (BCMR_uMaxPmtdChrgPackVoltBhm / 0.1F), 65536.0F);

  /* DataTypeConversion: '<S380>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input4'
   */
  BLM_S2OnReq = BCMR_bS2OnReq;

  /* DataTypeConversion: '<S369>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input3'
   */
  BLM_WeldDetReq = BCMR_bWeldDetReq;

  /* DataTypeConversion: '<S358>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input2'
   */
  BLM_BmsSleepReq = BCMR_bBmsSleepReq;

  /* DataTypeConversion: '<S347>/Conversion' incorporates:
   *  Inport: '<Root>/KO_Input1'
   */
  BLM_BmsLockReq = BCMR_bPlugLockPrms;

  /* New/Old DC */
  BRM_SendAs49Bytes = BCMR_flgDChrgVer2015;

  /* BMS_CrashPwmDuty */
  if(BSW_dcCrashPwmDutyOutDet > 255.0F)
  {
    BMS_CrashPwmDuty = 255u;
  }
  else if(BSW_dcCrashPwmDutyOutDet < 0.0F)
  {
    BMS_CrashPwmDuty = 0u;
  }
  else
  {
    BMS_CrashPwmDuty = (uint16_T)BSW_dcCrashPwmDutyOutDet;
  }

  /* BMS_CrashPwmPer */
  if(BSW_fCrashPwmFrqOutDet > 255.0F)
  {
    BMS_CrashPwmPer = 255u;
  }
  else if(BSW_fCrashPwmFrqOutDet < 0.0F)
  {
    BMS_CrashPwmPer = 0u;
  }
  else
  {
    BMS_CrashPwmPer = (uint8_T)BSW_fCrashPwmFrqOutDet;
  }

  /* BSER_tCmcBordMaxTemp */
  if(BSER_tCmcBordMaxTemp > 215.0F)
  {
    BMS_PCBMaxTemp = 255u;
  }
  else if(BSER_tCmcBordMaxTemp < -40.0F)
  {
    BMS_PCBMaxTemp = 0u;
  }
  else
  {
    BMS_PCBMaxTemp = (uint8_T)BSER_tCmcBordMaxTemp + 40u;
  }
  
  /* GbRTE_RolCntChkSumOpen_flg */
  if(COMR_YearSet == COMR_numPackVcuMsg_C)
  {
    GbRTE_RolCntChkSumOpen_flg = FALSE;
  }
  else
  {
    GbRTE_RolCntChkSumOpen_flg = TRUE;
  }
  /* GbRTE_FlasherOpen_flg */
  if(62u == IVI_YearSet)
  {
    GbRTE_FlasherOpen_flg = TRUE;
  }
  else
  {
    GbRTE_FlasherOpen_flg = FALSE;
  }
  GcRTE_Diag_85_numb = SwsAPub_DcmControlDTC_FlagDTCNotification();

  /* Cell Temp CAN Signal */
  if (0U == CcRTE_CellTempNumb_numb)
  {
    BMS_GB_Maxtempcellnumber = BSPR_idxBattTempMax;
    BMS_GB_Mintempcellnumber = BSPR_idxBattTempMin;
  }
  else
  {
    BMS_GB_Maxtempcellnumber = BSPR_idxCellTempMax;
    BMS_GB_Mintempcellnumber = BSPR_idxCellTempMin;
  }
  
  BMS_GB_Maxvoltagecellnumber = BSPR_idxCellVoltMax;
  BMS_GB_Minvoltagecellnumber = BSPR_idxCellVoltMin;
  BMS_GB_Mintempnumber = CcRTE_PackSysIndex_numb;
  BMS_GB_Maxtempnumber = CcRTE_PackSysIndex_numb;
  BMS_GB_Maxvoltagenumber = CcRTE_PackSysIndex_numb;
  BMS_GB_Minvoltagenumber = CcRTE_PackSysIndex_numb;

  /* 
  0x0：invalid 无效（除以下外的所有情况）
  0x1：parking charging 停车充电（ACChgMode=0x2 or ACChgMode=0x3 or DCChgMode=0x3）
  0x2：driving charging行驶充电（不发）
  0x3：uncharged state未充电状态（ACChgMode=0x1 or DCChgMode=0x1 or DCChgMode=0x2）
  0x4：closed state关闭状态（ACChgMode=0x4 or DCChgMode=0x4）
  0x5：abnormal异常（ACChgMode=0x6 or DCChgMode=0x6）
  */
  if(0x02U == BCMR_stAChrgMode || 0x03U == BCMR_stAChrgMode || 0x03U == BCMR_stDChrgMode)
  {
    BMS_GB_ChgMode_tmp = 0x01U;
  }
  else if(0x01U == BCMR_stAChrgMode || 0x01U == BCMR_stDChrgMode || 0x02U == BCMR_stDChrgMode)
  {
    BMS_GB_ChgMode_tmp = 0x03U;
  }
  else if(0x04U == BCMR_stAChrgMode || 0x04U == BCMR_stDChrgMode)
  {
    BMS_GB_ChgMode_tmp = 0x04U;
  }
  else if(0x06U == BCMR_stAChrgMode || 0x06U == BCMR_stDChrgMode)
  {
    BMS_GB_ChgMode_tmp = 0x05U;
  }
  else
  {
    BMS_GB_ChgMode_tmp = 0x00U;
  }

  if ((0x04U != BMS_GB_ChgMode_last) && (0x04U == BMS_GB_ChgMode_tmp))
  {
    GbRTE_BMSChgModeHold_flg = true;
    BMS_GB_ChgMode_cnt = 0U;
  }
  
  if (true == GbRTE_BMSChgModeHold_flg && BMS_GB_ChgMode_cnt < 2000)
  {
    BMS_GB_ChgMode = 0x04U;
    BMS_GB_ChgMode_cnt++;
  }
  else
  {
    BMS_GB_ChgMode = BMS_GB_ChgMode_tmp;
    GbRTE_BMSChgModeHold_flg = false;
  }

  BMS_GB_ChgMode_last = BMS_GB_ChgMode_tmp;
  /* BMS_GB_ChgMode End */

  GcRTE_EvccDtc_numb = EVCC_DTC;

  Sws_Com_NMActiveByIC(BMCR_ICWakeUp);

  BSPR_stMPosLsdSta = Sws_Diag_get_O_S_Main_Plus_L();
  BSPR_stMNegLsdSta = Sws_Diag_get_O_S_Main_Minus_L();
  BSPR_stDcPosLsdSta = Sws_Diag_get_O_S_DC_Plus_L();
  BSPR_stDcNegLsdSta = Sws_Diag_get_O_S_DC_Minus_L();

  GcBSW_PTCANCanBusOff_flg = Sws_Com_IsPTCANCanBusOff();
  GcBSW_DCCANCanBusOff_flg = Sws_Com_IsDCCANCanBusOff();

  BSWVECANBusFastRecoveryFail = (1U == GcBSW_PTCANCanBusOff_flg);
  DcCan_BusOff = (1U == GcBSW_DCCANCanBusOff_flg);

  BMS_QCPosTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tDcChPos + 40.0F), 256.0F);
  BMS_QCNegTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tDcChNeg + 40.0F), 256.0F);
  
  if ((0U == BMS_BMUResetReason) || (7U == BMS_BMUResetReason))
  {
    DFC_MCUResetFlt_ASW = 0U;
  }
  else
  {
    DFC_MCUResetFlt_ASW = 1U;
  }

  BMS_IoExtCelIf_stRepair = IoExtMc33771_stRepairAFE;
  BMS_IoExtMc33771_ChkCIDCycSt = IoExtMc33771_ChkCIDCycSt;
  
  BMS_IoExtMc33771_REGFAULT1_INIst_1 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[0] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_2 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[1] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_3 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[2] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_4 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[3] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_5 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[4] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_6 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[5] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_7 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[6] & 0x8000ul) >> 15u);
  BMS_IoExtMc33771_REGFAULT1_INIst_8 = (uint8_T)((IoExtMc33771_REGFAULT1_INIst[7] & 0x8000ul) >> 15u);
  
  BMS_IoExtMc33771_REGCFG2_INIst_1 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[0] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_2 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[1] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_3 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[2] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_4 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[3] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_5 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[4] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_6 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[5] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_7 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[6] & 0x1C00ul) >> 10u);
  BMS_IoExtMc33771_REGCFG2_INIst_8 = (uint8_T)((IoExtMc33771_REGCFG2_INIst[7] & 0x1C00ul) >> 10u);

  BMS_IoExtCelIf_flgTPLWakeup = (uint8)((boolean)IoExtCelIf_flgTPLWakeup);
  BMS_Sws_Syc_CANNMWakeup = Sws_Syc_CANNMWakeup;

  /* Busbar Temp CAN Signal */
  if (0U == CcRTE_BusbarTempNumb_numb)
  {
    BMS_BusbarMaxTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTempMax + 40.0F), 256.0F);
    BMS_BusbarMinTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTempMin + 40.0F), 256.0F);
  }
  else
  {
    BMS_BusbarMaxTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTempMax + 40.0F), 256.0F);
    BMS_BusbarMinTemp = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTempMin + 40.0F), 256.0F);
  }

  BMS_HoldTempStatus = BCMR_stHoldTempMode;
  BMS_HoldTempReq = BCMR_stHoldTempReq;
  COMR_stHoldTempVcuPermit = VCU_HoldTempPermitFlg;
  COMR_stHoldTempEna = VCU_HoldTempEnblFlg;
  COMR_bIviHoldTempSW = IVI_HoldTempSwSts;
  COMR_bIviHoldTempTimer = IVI_HoldTempTimer;

  COMR_stHoldTempReq = TBOX_RmPreThemalreq;
  COMR_tiPreThemaltime = (real32_T)((real32_T)TBOX_RmPreThemaltime * 5.0F);

  // BMS_stV2xMod = (uint8_T)Local_HoldtempChk;

  Sws_Com_VINCode2BSW(DcmDspUds_DID_0120_a);



#if (P891TestCanSend)
  for (i = 0; i < CcRTE_CellTempNumb_numb; i++)
  {
    if(i < 40)
    {
      BMS_CT[i] = (uint8_T)(int32_T)fmodf(floorf(BSPR_tCellTemp_A[i] + 40.0F), 256.0F);
    }
  }

  for (i = CcRTE_CellTempNumb_numb; i < (CcRTE_CellTempNumb_numb + CcRTE_BusbarTempNumb_numb); i++)
  {
    if(i < 40)
    {
      BMS_CT[i] = (uint8_T)(int32_T)fmodf(floorf(BSPR_tBattTemp_A[i-CcRTE_CellTempNumb_numb] + 40.0F), 256.0F);
    }
  }
#endif
}

/* Model initialize function */
void IOS_OUP_initialize(void)
{
  /* (no initialization code required) */
}

/* Model terminate function */
void IOS_OUP_terminate(void)
{
  /* (no terminate code required) */
}

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