//***************************************************************************** // (C) Automotive Lighting Reutlingen GmbH // Tuebinger Strasse 123, 72762 Reutlingen, Germany // // Automotive Lighting Reutlingen GmbH owns all the rights to this work. // This work shall not be copied, reproduced, used, modified, transferred // or its information shall not be disclosed without the prior written // authorization of Automotive Lighting Reutlingen GmbH. //***************************************************************************** //----------------------------------------------------------------------------- /// \file Test.c /// /// \brief Unit Test Cases for SigPrep1 /// /// \author /// //----------------------------------------------------------------------------- #include #include #include #include #include #include #include "SigPrep1/SigPrep1Rx.h" #include "SigPrep1/SigPrep1.h" #include "Rte_ctaaSigPrep1.h" #include "SigPrep1/Msg/SigPrep1_MsgHLMLStatesInfo.h" #include "SigPrep1/Msg/SigPrep1_MsgHLMRStatesInfo.h" #include "SigPrep1/Msg/SigPrep1_MsgAFSCommandTx.h" #include "SigPrep1/Msg/SigPrep1_MsgLightControlCommandTx.h" #include "SigPrep1/Msg/SigPrep1_MsgMatrixHBCommandTx.h" #include "SigPrep1/Msg/SigPrep1_MsgVehicleInfoTx.h" #include "SigPrep1/Msg/SigPrep1_MsgCeremonyCmdLeft1Tx.h" #include "SigPrep1/Msg/SigPrep1_MsgCeremonyCmdRight1Tx.h" #include "SigPrep1/Msg/SigPrep1_MsgCeremonyCmdLeft2Tx.h" #include "SigPrep1/Msg/SigPrep1_MsgCeremonyCmdRight2Tx.h" #include "SigPrep1/SigPrep1_Common.h" /* typedef struct { tisCommDiagInfo sHlmLStatesInfo; tisCommDiagInfo sHlmRStatesInfo; } tisSubCanDiagInfo; */ /* SigPrep1.c*/ tisSubCanDiagInfo sSubCanDiagInfo; tSigPrep1CounterMonitor CounterMonitor; /* SigPrep1_Common.c*/ uint32 SigPrep1_divAndRoundClosest_result = 0; uint32 dividend = 0; uint32 divisor = 0; tSigPrep1Signal_Val Sig; tSigPrep1Signal_usVal usSig; tSigPrep1SignalQuality quality; tSigPrep1CounterMonitor monitor; tSigPrep1CounterMonitor* pCntMon; uint8 retVal = 3; uint16 valInvalid = FALSE; boolean value = 0; uint8 buff[10]; uint16 size = 10; uint8 value2 = 0; /*SigPrep1Rx.c */ /* typedef struct { uint8 cntActivate; ///< Count of problems or invalid values until Failure / DTC or state set to fail uint8 cntDeActivate; ///< Count of successful received CAN PDUs until clear Failure / DTC uint8 cnt; ///< current problem counter in a row boolean isDebounced; ///< Failure or DTC active boolean isActiveDtc; ///< flag to remember whether monitor based DTC has been set. } tSigPrep1CounterMonitor; ///< Counter because indications can be counted. typedef struct { uint32 toutActivate; ///< Initial timer value in milliseconds until DTC when CAN PDU is not received uint32 toutDeActivate; ///< Initial timer value in milliseconds until DTC can be cleared when CAN PDU is received again boolean isTimeout; ///< DTC active boolean isActiveDtc; ///< flag to remember whether monitor based DTC has been set. } tSigPrep1TimerMonitor; //-- NOTE: Currently SigPrep does not use own timers. Instead Rte is expected to deliver timeout info. typedef struct { SigPrep1_EnumCanPduState state; //-- all errors result in one state tSigPrep1PduMonitorE2E monitor; uint32 dummy; } tSigPrep1PduQualityE2E; typedef struct { SigPrep1_EnumSignalState state; tSigPrep1CounterMonitor monitor; } tSigPrep1SignalQuality; typedef enum SigPrep1_EnumSignalState { eSigPrep1SigState_Init = 0, eSigPrep1SigState_Valid = 1, ///< The signal value does not indicate problems. eSigPrep1SigState_PreInvalid, ///< The signal value is invalid, but not enough times to consider the signal as invalid. eSigPrep1SigState_Invalid, ///< The signal value was constantly erroneous for a period of time. eSigPrep1SigState_Last } SigPrep1_EnumSignalState; typedef enum SigPrep1_EnumErrorIndicationType { eSigPrep1ErrNone = 0, ///< RTE stack indicates that CAN PDU has been received successfully eSigPrep1ErrIndRteAliveCounter, ///< RTE stack indicates ALIVE COUNTER error (for E2E protected CAN PDUs only) eSigPrep1ErrIndRteCrc, ///< RTE stack indicates CRC error (for E2E protected CAN PDUs only) eSigPrep1ErrIndRteTimeout, ///< RTE stack indicates Timeout error (CAN PDU not received in cyclic time) eSigPrep1ErrIndSelfTimeout ///< SigPrep's own timer indicates TIMEOUT error (currently not in use) } SigPrep1_EnumErrorIndicationType; typedef struct { tSigPrep1PduMonitorGroup monitorAliveCounter; //-- ALIVE COUNTER tSigPrep1PduMonitorGroup monitorCrc; //-- CRC tSigPrep1PduMonitorGroup monitorRteTimeout; //-- TIMEOUT by RTE error indication tSigPrep1TimerMonitor monitorSelfTimer; //-- TIMEOUT by SigPreps own timer (independent of RTE CAN PDU reception / error indication) } tSigPrep1PduMonitorE2E; typedef struct { tSigPrep1CounterMonitor monitorFail; //-- monitor for CAN PDU state or signal state tSigPrep1CounterMonitor monitorDTC; //-- monitor for DTC } tSigPrep1PduMonitorGroup; */ //typedef enum //{ // E2E_P02STATUS_OK = 0x00u, // E2E_P02STATUS_NONEWDATA = 0x01u, // E2E_P02STATUS_WRONGCRC = 0x02u, // E2E_P02STATUS_SYNC = 0x03u, // E2E_P02STATUS_INITIAL = 0x04u, // E2E_P02STATUS_REPEATED = 0x08u, // E2E_P02STATUS_OKSOMELOST = 0x20u, // E2E_P02STATUS_WRONGSEQUENCE = 0x40u //} E2E_P02CheckStatusType; uint32 nLimitActivate = 1; uint32 nLimitDeActivate = 1; tSigPrep1TimerMonitor TimerMonitor; uint32 nToutActivateMsec = 1; uint32 nToutDeActivateMsec = 2; tSigPrep1PduQualityE2E PduQualityE2E; tSigPrep1SignalQuality SignalQuality; tSigPrep1PduMonitorGroup MonitorGroupAliveCounter; tSigPrep1PduMonitorGroup MonitorGroupCrc; tSigPrep1PduMonitorGroup MonitorGroupRteTimeout; tSigPrep1PduMonitorE2E MonitorE2E; tSigPrep1CounterMonitor CounterMonitorFail; tSigPrep1CounterMonitor CounterMonitorDTC; uint32 E2E_ReadReturnVal; uint8 GetE2E_ErrorIndicationResult; /* SigPrep1_MsgAFSCommandTx.c */ STATIC_AL SG_sigGrpAfsCommand sAFSCommand; STATIC_AL tisClamp2Light_AFSCommand sClamp2Light_AFSCommand; STATIC_AL tisStpMVerticalTgt sStpMVerticalTgt; /* SigPrep1_MsgCeremonyCmdLeft1Tx.c */ STATIC_AL tisPlsR_CeremonyCmd1 sPlsR_CeremonyCmd1_0; // left headlamp STATIC_AL SG_sigGrpCeremonyCmdLeft1 sCeremonyCmdLeft1; /* SigPrep1_MsgCeremonyCmdLeft2Tx.c */ STATIC_AL tisPlsR_CeremonyCmd2 sPlsR_CeremonyCmd2_0; // left headlamp STATIC_AL SG_sigGrpCeremonyCmdLeft2 sCeremonyCmdLeft2; /* SigPrep1_MsgCeremonyCmdRight1Tx.c */ STATIC_AL tisPlsR_CeremonyCmd1 sPlsR_CeremonyCmd1_1; // right headlamp STATIC_AL SG_sigGrpCeremonyCmdRight1 sCeremonyCmdRight1; /* SigPrep1_MsgCeremonyCmdRight2Tx.c */ STATIC_AL tisPlsR_CeremonyCmd2 sPlsR_CeremonyCmd2_1; // right headlamp STATIC_AL SG_sigGrpCeremonyCmdRight2 sCeremonyCmdRight2; /* SigPrep1_MsgHLMLStatesInfo.c */ STATIC_AL SG_sigGrpHlmLeftStatesInfo sHLMLSTATESInfo; STATIC_AL tSigPrepCanMsg_HLM_L_STATES_Info msg_HLM_L_STATES_Info; STATIC_AL tisHlmStatesInfo_Swc sHlmStatesInfo_Swc0; uint8 GetHLMLStatesInfoResult; uint8 GetHLM_L_STATES_InfoResult; uint8 PpsreComHLMLSTATESInfo_sHLMLSTATESInfo; /* SigPrep1_MsgHLMRStatesInfo.c */ STATIC_AL SG_sigGrpHlmRightStatesInfo sHLMRSTATESInfo; STATIC_AL tSigPrepCanMsg_HLM_R_STATES_Info msg_HLM_R_STATES_Info; STATIC_AL tisHlmStatesInfo_Swc sHlmStatesInfo_Swc1; uint8 GetHLMRStatesInfoResult; uint8 GetHLM_R_STATES_InfoResult; uint8 PpsreComHLMRSTATESInfo_sHLMRSTATESInfo; /* SigPrep1_MsgLightControlCommandTx.c */ STATIC_AL tisClamp2Light_LightControlCommand sClamp2Light_LightControlCommand; STATIC_AL SG_sigGrpLightControlCommand sLightControlCommand; /* SigPrep1_MsgMatrixHBCommandTx.c */ STATIC_AL tisClamp2Light_MatrixHBCommand sClamp2Light_MatrixHBCommand; STATIC_AL SG_sigGrpMatrixHbCommmand sMatrixHBCommand; /* SigPrep1_MsgVehicleInfoTx.c */ STATIC_AL tisVehicleDynamic sVehicleDynamic; STATIC_AL tisGeneralInfo sGeneralInfo; STATIC_AL tisGlobalTime sGlobalTime; STATIC_AL tisPlsR_VehicleInfo sPlsr_VehicleInfo; STATIC_AL SG_sigGrpVehicleInfo sVehicleInfo; FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpaseSigPrep1HlmStatesInfo_Swc0_sHlmStatesInfo_Swc0(P2CONST(tisHlmStatesInfo_Swc, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Read_PpsreComHLMLSTATESInfo_sHLMLSTATESInfo(P2VAR(SG_sigGrpHlmLeftStatesInfo, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { if( PpsreComHLMLSTATESInfo_sHLMLSTATESInfo == eSigPrep1ErrNone) { return 0; } else { return 0x00008100; } } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpaseSigPrep1HlmStatesInfo_Swc1_sHlmStatesInfo_Swc1(P2CONST(tisHlmStatesInfo_Swc, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Read_PpsreComHLMRSTATESInfo_sHLMRSTATESInfo(P2VAR(SG_sigGrpHlmRightStatesInfo, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { if( PpsreComHLMRSTATESInfo_sHLMRSTATESInfo == eSigPrep1ErrNone) { return 0; } else { return 0x00008100; } } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpaseSigPrep1SubCanDiagInfo_sSubCanDiagInfo(P2CONST(tisSubCanDiagInfo, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PpareClamp2LightClamp2Light_AFSCommand_sClamp2Light_AFSCommand(P2VAR(tisClamp2Light_AFSCommand, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Write_PpsseSigPrep1AFSCommand_sAFSCommand(P2VAR(SG_sigGrpAfsCommand, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { return 0; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PparePlsRPlsR0_CeremonyCmd1_sPlsR0_CeremonyCmd1(P2VAR(tisPlsR_CeremonyCmd1, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpsseSigPrep1CeremonyCmdLeft1_sCeremonyCmdLeft1(P2CONST(SG_sigGrpCeremonyCmdLeft1, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PparePlsRPlsR0_CeremonyCmd2_sPlsR0_CeremonyCmd2(P2VAR(tisPlsR_CeremonyCmd2, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpsseSigPrep1CeremonyCmdLeft2_sCeremonyCmdLeft2(P2CONST(SG_sigGrpCeremonyCmdLeft2, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PparePlsRPlsR1_CeremonyCmd1_sPlsR1_CeremonyCmd1(P2VAR(tisPlsR_CeremonyCmd1, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpsseSigPrep1CeremonyCmdRight1_sCeremonyCmdRight1(P2CONST(SG_sigGrpCeremonyCmdRight1, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PparePlsRPlsR1_CeremonyCmd2_sPlsR1_CeremonyCmd2(P2VAR(tisPlsR_CeremonyCmd2, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Write_ctaaSigPrep1_PpsseSigPrep1CeremonyCmdRight2_sCeremonyCmdRight2(P2CONST(SG_sigGrpCeremonyCmdRight2, AUTOMATIC, RTE_CTAASIGPREP1_APPL_DATA) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PpareClamp2LightClamp2Light_LightControlCommand_sClamp2Light_LightControlCommand(P2VAR(tisClamp2Light_LightControlCommand, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Write_PpsseSigPrep1ControlCommand_sLightControlCommand(P2VAR(SG_sigGrpLightControlCommand, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { return 0; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PpareClamp2LightClamp2Light_MatrixHBCommand_sClamp2Light_MatrixHBCommand(P2VAR(tisClamp2Light_MatrixHBCommand, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Write_PpsseSigPrep1MatrixHBCommand_sMatrixHBCommand(P2VAR(SG_sigGrpMatrixHbCommmand, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { return 0; } FUNC(Std_ReturnType, ctaaVehicleHub_CODE) PpasvVehHubVehicleDynamic_ReadData(P2VAR(tisVehicleDynamic, AUTOMATIC, RTE_CTAAVEHICLEHUB_APPL_VAR) data) { return RTE_E_OK; } FUNC(uint32, ctaaSigPrep1_CODE) E2EPW_Write_PpsseSigPrep1VehicleInfo1_sVehicleInfo1(P2VAR(SG_sigGrpVehicleInfo, AUTOMATIC, ctaaSigPrep1_VAR_INIT) AppData) { return RTE_E_OK; } FUNC(Std_ReturnType, ctaaVehicleHub_CODE) PpasvVehHubGeneralInfo_ReadData(P2VAR(tisGeneralInfo, AUTOMATIC, RTE_CTAAVEHICLEHUB_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, ctaaVehicleHub_CODE) PpasvVehHubGlobalTime_ReadData(P2VAR(tisGlobalTime, AUTOMATIC, RTE_CTAAVEHICLEHUB_APPL_VAR) data) { return RTE_E_OK; } FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PparePlsRPlsR_VehicleInfo_sPlsR_VehicleInfo(P2VAR(tisPlsR_VehicleInfo, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } //static void SigPrep1_GetAfsCommandFaultErrorSts(void) //{ // //} FUNC(Std_ReturnType, RTE_CODE) Rte_Read_ctaaSigPrep1_PpareStpMStpMVerticalTgt_sStpMVerticalTgt(P2VAR(tisStpMVerticalTgt, AUTOMATIC, RTE_CTAASIGPREP1_APPL_VAR) data) { return RTE_E_OK; } /* SigPrep1.c*/ //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1HLMLStatesInfoMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1HLMLStatesInfoMsg(boolean status). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1HLMLStatesInfoMsg(void) { RTE_Can1HLMLStatesInfoMsg( 0 ); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1HLMRStatesInfoMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1HLMRStatesInfoMsg(boolean status). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1HLMRStatesInfoMsg(void) { RTE_Can1HLMRStatesInfoMsg( 0 ); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1AfsCommandMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1AfsCommandMsg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1AfsCommandMsg(void) { RTE_Can1AfsCommandMsg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1MatrixHBCommandMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1MatrixHBCommandMsg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1MatrixHBCommandMsg(void) { RTE_Can1MatrixHBCommandMsg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1LightControlCommandMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1LightControlCommandMsg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1LightControlCommandMsg(void) { RTE_Can1LightControlCommandMsg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1VehicleInfoMsg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1VehicleInfoMsg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1VehicleInfoMsg(void) { RTE_Can1VehicleInfoMsg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1CeremonyCmdLeft1Msg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1CeremonyCmdLeft1Msg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1CeremonyCmdLeft1Msg(void) { RTE_Can1CeremonyCmdLeft1Msg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1CeremonyCmdRight1Msg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1CeremonyCmdRight1Msg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1CeremonyCmdRight1Msg(void) { RTE_Can1CeremonyCmdRight1Msg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1CeremonyCmdLeft2Msg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1CeremonyCmdLeft2Msg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1CeremonyCmdLeft2Msg(void) { RTE_Can1CeremonyCmdLeft2Msg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_Can1CeremonyCmdRight2Msg /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_Can1CeremonyCmdRight2Msg(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_Can1CeremonyCmdRight2Msg(void) { RTE_Can1CeremonyCmdRight2Msg(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_riSigPrep1Init /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_riSigPrep1Init(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_riSigPrep1Init(void) { RTE_riSigPrep1Init(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_RTE_rpCan1Tx10ms /// /// \Test Case Description /// - Test subject: /// Call the RTE runnable RTE_rpCan1Tx10ms(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_RTE_rpCan1Tx10ms(void) { RTE_rpCan1Tx10ms(); } //----------------------------------------------------------------------------- /// \Test Case : Mt_SigPrep1_Init /// /// \Test Case Description /// - Test subject: /// Call runnable SigPrep1_Init(). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_SigPrep1_Init(void) { //SigPrep1_Init(); } /* SigPrep1_Common.c*/ //----------------------------------------------------------------------------- /// \Test Case : Mt_SigPrep1_divAndRoundClosest /// /// \Test Case Description /// - Test subject: /// Call runnable SigPrep1_divAndRoundClosest(uint32 dividend, uint32 divisor). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_SigPrep1_divAndRoundClosest(void) { SigPrep1_divAndRoundClosest_result = SigPrep1_divAndRoundClosest(dividend,divisor); AL_UNITTEST_CHECK(SigPrep1_divAndRoundClosest_result, dividend, == ); divisor = 4; dividend = 4; SigPrep1_divAndRoundClosest_result = SigPrep1_divAndRoundClosest(dividend,divisor); AL_UNITTEST_CHECK(SigPrep1_divAndRoundClosest_result, 1, == ); } //----------------------------------------------------------------------------- /// \Test Case : Mt_SigPrep1CheckRteAndSignalSetQuality /// /// \Test Case Description /// - Test subject: /// Call runnable SigPrep1CheckRteAndSignalSetQuality(Std_ReturnType retVal, uint16 valInvalid, tSigPrep1Signal_Val *pSig, boolean value). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_SigPrep1CheckRteAndSignalSetQuality(void) { quality.monitor.isDebounced = 0; quality.monitor.cnt = 0; quality.monitor.cntActivate = 10; quality.state = eSigPrep1SigState_Valid; Sig.value = 0; Sig.valueOld = 0; Sig.quality = quality; SigPrep1CheckRteAndSignalSetQuality( retVal, valInvalid, &Sig, value); AL_UNITTEST_CHECK(Sig.valueOld, 0, == ); retVal = RTE_E_OK; value = TRUE; Sig.value = 20; SigPrep1CheckRteAndSignalSetQuality( retVal, valInvalid, &Sig, value); AL_UNITTEST_CHECK(Sig.valueOld, Sig.value, == ); retVal = RTE_E_OK; value = FALSE; Sig.valueOld = 0; SigPrep1CheckRteAndSignalSetQuality( retVal, valInvalid, &Sig, value); AL_UNITTEST_CHECK(Sig.valueOld, 0, == ); } //----------------------------------------------------------------------------- /// \Test Case : Mt_SigPrep1CheckRteAndusSignalSetQuality /// /// \Test Case Description /// - Test subject: /// Call runnable SigPrep1CheckRteAndusSignalSetQuality(Std_ReturnType retVal, uint16 valInvalid, tSigPrep1Signal_Val *pSig, boolean value). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_SigPrep1CheckRteAndusSignalSetQuality(void) { usSig.value = 0; usSig.valueOld = 0; quality.monitor.isDebounced = 0; quality.monitor.cnt = 0; quality.monitor.cntActivate = 10; quality.state = eSigPrep1SigState_Valid; usSig.quality = quality; SigPrep1CheckRteAndusSignalSetQuality( retVal, valInvalid, &usSig, value); AL_UNITTEST_CHECK(usSig.valueOld, 0, == ); retVal = RTE_E_OK; value = TRUE; usSig.value = 20; SigPrep1CheckRteAndusSignalSetQuality( retVal, valInvalid, &usSig, value); AL_UNITTEST_CHECK(usSig.valueOld, usSig.value, == ); retVal = RTE_E_OK; value = FALSE; usSig.valueOld = 0; SigPrep1CheckRteAndusSignalSetQuality( retVal, valInvalid, &usSig, value); AL_UNITTEST_CHECK(usSig.valueOld, 0, == ); } //----------------------------------------------------------------------------- /// \Test Case : Mt_SigPrep1_MemSet /// /// \Test Case Description /// - Test subject: /// Call runnable SigPrep1_MemSet(uint8 *buf,uint8 value,uint16 size). /// No requirement for this release /// /// - Test Design Technique: ET (Exploratory Testing) /// /// - Preconditions: none /// /// - Expected test results: /// - No requirement for this release /// //----------------------------------------------------------------------------- void Mt_SigPrep1_MemSet(void) { uint8 i; value2 = 3; SigPrep1_MemSet(buff, value2, size); for(i=0;i