diff --git a/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn b/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn index c6d52fd857d42ccddfb80e75d28e2fda1b981d30..d94c0772fbb5242224eca7ed167ca3433a0fc32d 100644 --- a/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn +++ b/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn @@ -21,7 +21,7 @@ module ItsDenm_TpFunctions { import from LibItsDenm_Functions all; import from LibItsDenm_Templates all; import from LibItsDenm_TypesAndValues all; - import from LibItsDenm_Pics all; + import from LibItsDenm_Pics all; import from LibItsDenm_Pixits all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from ITS_Container language "ASN.1:1997" all; @@ -607,12 +607,12 @@ module ItsDenm_TpFunctions { [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd { tc_ac.stop; if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { - log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { @@ -960,7 +960,7 @@ module ItsDenm_TpFunctions { tc_ac.start; alt { [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( - mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ))))) -> value v_denmInd { + mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ))))) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -1015,7 +1015,7 @@ module ItsDenm_TpFunctions { tc_ac.start; alt { [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( - mw_denm ( mw_denmMgmtConTermination ( v_actionId, f_getIutStationType(), -, -, -, isNegation ))))) -> value v_denmInd { + mw_denm ( mw_denmMgmtConTermination ( v_actionId, f_getIutStationType(), -, -, -, isNegation ))))) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -1132,9 +1132,9 @@ module ItsDenm_TpFunctions { tc_ac.start; alt { [] denmPort.receive ( - mw_denmInd ( - mw_denmPdu ( - mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd { + mw_denmInd ( + mw_denmPdu ( + mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -1189,9 +1189,9 @@ module ItsDenm_TpFunctions { tc_ac.start; alt { [] denmPort.receive ( - mw_denmInd ( - mw_denmPdu ( - mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd { + mw_denmInd ( + mw_denmPdu ( + mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -1410,7 +1410,7 @@ module ItsDenm_TpFunctions { tc_ac.start; alt { [] denmPort.receive ( - mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd { + mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd { tc_ac.stop; v_timestampIts := f_getCurrentTime(); v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime; @@ -1451,15 +1451,15 @@ module ItsDenm_TpFunctions { function f_DEN_EVRP_TI_01() runs on ItsDenm { // Local constants - const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1 - const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2 - const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1 + const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1 + const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2 + const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1 const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95; const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05; // Local variables - var template (value) SituationContainer v_situation := m_situation (CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_ ); + var template (value) SituationContainer v_situation := m_situation (CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_ ); var template (present) DenmInd v_expectedDenmInd := - mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_validityDuration ) ) ) ); + mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_validityDuration ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; // Local timers @@ -1531,7 +1531,7 @@ module ItsDenm_TpFunctions { // Local variables var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); var template (present) DenmInd v_expectedDenmInd := - mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_validityDuration)))); + mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_validityDuration)))); var ActionID v_actionId; var DenmInd v_denmInd; // Local timers @@ -1608,7 +1608,7 @@ module ItsDenm_TpFunctions { // Local variables var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); var template (present) DenmInd v_expectedDenmInd := - mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration)))); + mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration)))); var ActionID v_actionId; var DenmInd v_denmInd; var integer i; @@ -1904,7 +1904,7 @@ module ItsDenm_TpFunctions { // Local variables var template (value) SituationContainer v_situation := m_situation (CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_ ); var template (present) DenmInd v_expectedDenmInd := - mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) ); + mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; @@ -1936,12 +1936,12 @@ module ItsDenm_TpFunctions { [] denmPort.receive ( v_expectedDenmInd ) -> value v_denmInd { tc_ac.stop; if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_actionId.originatingStationID ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { - log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { @@ -1974,7 +1974,7 @@ module ItsDenm_TpFunctions { // Local variables var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_); var template (present) DenmInd v_expectedDenmInd := - mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); + mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); var ActionID v_actionId; var DenmInd v_denmInd; // Local timers @@ -2153,8 +2153,8 @@ module ItsDenm_TpFunctions { } else { t_default.stop; - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } [] t_default.timeout { @@ -2293,92 +2293,92 @@ module ItsDenm_TpFunctions { } // end denMessageLowerLayerParameters group denMessageSSP { - - function f_DEN_SSP_BV_XX( in Oct8 p_certHashedId8, - in template (value) SituationContainer p_situation, - in template (present) bitstring pmw_ssp) - runs on ItsDenm { - - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - if (not PICS_IS_IUT_SECURED) { - log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - if (not PICS_DENM_GENERATION) { - log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(e_staticPosition, { - hashedId8 := p_certHashedId8 - }); - - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(p_situation)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd_SSP( - mw_denmPdu( - mw_denm( - mw_anyDenmMgmtCon, - p_situation - ) - ), - pmw_ssp - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } + + function f_DEN_SSP_BV_XX( in Oct8 p_certHashedId8, + in template (value) SituationContainer p_situation, + in template (present) bitstring pmw_ssp) + runs on ItsDenm { + + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_IS_IUT_SECURED) { + log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(e_staticPosition, { + hashedId8 := p_certHashedId8 + }); + + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(p_situation)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmIndWithSecurityParameters( + mw_denmPdu( + mw_denm( + mw_anyDenmMgmtCon, + p_situation + ) + ), + pmw_ssp + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { log("*** " & testcasename() & ": INFO: Received a DENM with other cause code. ***"); repeat; } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: No unexpected DENM received. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - - } // end TC_DEN_SSP_BV_XX - - function f_DEN_SSP_BV_01( ) runs on ItsDenm { - f_DEN_SSP_BV_XX ( - PX_CERT_IUT_DENM_01, - m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_), - mw_sspTrafficCondition - ); - } - - function f_DEN_SSP_BV_02( ) runs on ItsDenm { - f_DEN_SSP_BV_XX ( - PX_CERT_IUT_DENM_02, - m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_), - mw_sspAccident - ); - } - + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No unexpected DENM received. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_SSP_BV_XX + + function f_DEN_SSP_BV_01( ) runs on ItsDenm { + f_DEN_SSP_BV_XX ( + PX_CERT_IUT_DENM_01, + m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_), + mw_sspTrafficCondition + ); + } + + function f_DEN_SSP_BV_02( ) runs on ItsDenm { + f_DEN_SSP_BV_XX ( + PX_CERT_IUT_DENM_02, + m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_), + mw_sspAccident + ); + } + } // end group denMessageSSP } // end denMessageTransmission @@ -2397,11 +2397,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2455,11 +2455,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2526,11 +2526,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2585,11 +2585,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2652,11 +2652,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2680,7 +2680,7 @@ module ItsDenm_TpFunctions { ); f_sleep(1.0); - vc_utEvents := {}; + vc_utEvents := {}; v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( v_actionId, -, -, -, v_detectionTime, v_referenceTime2 ), v_situation2, m_denmLocation_zeroDelta ) ); f_sleep(PX_TNOAC); @@ -2720,11 +2720,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2790,11 +2790,11 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2857,25 +2857,25 @@ module ItsDenm_TpFunctions { group denMessageSSP { function f_DEN_MSRV_BO_08_XX( - in charstring p_certName, - in template (value) SituationContainer p_situation + in charstring p_certName, + in template (value) SituationContainer p_situation ) runs on ItsDenm { // Local variables var ActionID v_actionId; var integer i; - // Test control - if (not PICS_DENM_RECEPTION) { - log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (not PICS_IS_IUT_SECURED) { + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_IS_IUT_SECURED) { log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -2917,26 +2917,26 @@ module ItsDenm_TpFunctions { } // end TC_DEN_MSRV_BV_01 - function f_DEN_MSRV_BO_08_01 () runs on ItsDenm { - - f_DEN_MSRV_BO_08_XX( - "CERT_TS_DENM_01", - m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_) - ); - } + function f_DEN_MSRV_BO_08_01 () runs on ItsDenm { + + f_DEN_MSRV_BO_08_XX( + "CERT_TS_DENM_01", + m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_) + ); + } function f_DEN_MSRV_BO_08_02 () runs on ItsDenm { - - f_DEN_MSRV_BO_08_XX( - "CERT_TS_DENM_02", - m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_) - ); + + f_DEN_MSRV_BO_08_XX( + "CERT_TS_DENM_02", + m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_) + ); } - function f_DEN_MSRV_BO_09_XX( - in charstring p_certName, - in template (value) SituationContainer p_situation1, - in template (value) SituationContainer p_situation2 + function f_DEN_MSRV_BO_09_XX( + in charstring p_certName, + in template (value) SituationContainer p_situation1, + in template (value) SituationContainer p_situation2 ) runs on ItsDenm { // Local variables @@ -2945,16 +2945,16 @@ module ItsDenm_TpFunctions { var integer i; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } - if (not PICS_IS_IUT_SECURED) { + } + if (not PICS_IS_IUT_SECURED) { log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3013,22 +3013,22 @@ module ItsDenm_TpFunctions { } // end TC_DEN_MSRV_BV_09_XX - function f_DEN_MSRV_BO_09_01 () runs on ItsDenm { - - f_DEN_MSRV_BO_09_XX( - "CERT_TS_DENM_01", - m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_), - m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_trafficJamIncreasing_) - ); - } + function f_DEN_MSRV_BO_09_01 () runs on ItsDenm { + + f_DEN_MSRV_BO_09_XX( + "CERT_TS_DENM_01", + m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_), + m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_trafficJamIncreasing_) + ); + } function f_DEN_MSRV_BO_09_02 () runs on ItsDenm { - - f_DEN_MSRV_BO_09_XX( - "CERT_TS_DENM_02", - m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_), - m_situation(CauseCodeType_accident_, AccidentSubCauseCode_multiVehicleAccident_) - ); + + f_DEN_MSRV_BO_09_XX( + "CERT_TS_DENM_02", + m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_), + m_situation(CauseCodeType_accident_, AccidentSubCauseCode_multiVehicleAccident_) + ); } } @@ -3045,11 +3045,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_RECEPTION) { + if (not PICS_DENM_RECEPTION) { log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3106,11 +3106,11 @@ module ItsDenm_TpFunctions { timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3190,11 +3190,11 @@ module ItsDenm_TpFunctions { timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3222,9 +3222,9 @@ module ItsDenm_TpFunctions { ); // start KAF timer here, as 2nd DENM shall be ignored - t_forwarding.start; + t_forwarding.start; f_sleep(5.0); - + v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( @@ -3253,12 +3253,12 @@ module ItsDenm_TpFunctions { if(t_forwarding.running) { t_forwarding.stop; log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { tc_ac.stop; log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] denmPort.receive( @@ -3273,7 +3273,7 @@ module ItsDenm_TpFunctions { tc_ac.stop; t_forwarding.stop; log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] t_forwarding.timeout { tc_ac.start; @@ -3307,11 +3307,11 @@ module ItsDenm_TpFunctions { timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15 /* from the spec */ + 0.1 /* processing time */; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3387,11 +3387,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3470,7 +3470,7 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; @@ -3552,11 +3552,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3635,11 +3635,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3732,11 +3732,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3819,11 +3819,11 @@ module ItsDenm_TpFunctions { timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3907,11 +3907,11 @@ module ItsDenm_TpFunctions { var boolean v_positionChanged := false; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); @@ -3990,11 +3990,11 @@ module ItsDenm_TpFunctions { var ActionID v_actionId; // Test control - if (not PICS_DENM_KAF) { + if (not PICS_DENM_KAF) { log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); setverdict(inconc); stop; - } + } // Test component configuration f_cfUp(); diff --git a/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn b/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn index 123cbc5cc6d72060cc84eae61bd08cc243df828e..9d762d206c1a3faf8281304b6be05cc9beb4fc35 100644 --- a/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn +++ b/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn @@ -740,6 +740,37 @@ module ItsIvim_TestCases { group iviMessageReception { + /** + * @desc Check that content of received IVIM is transmitted to + * applications and other facilities. + *
+         * Pics Selection: PICS_IVIM_RECEPTION
+         * Initial conditions: 
+         *     with {
+         *         the IUT being in the "initial state"
+         *         and the IUT having receive a valid IVIM
+         *     }
+         * Expected behaviour:
+         *     ensure that {
+         *         when {
+         *             the IUT receives a valid IVIM
+         *         }
+         *         then {
+         *             the IUT forwards the IVIM content to upper layers
+         *             and the IUT forwards the IVIM content to other facilities
+         *         }
+         *     }
+         * 
+ * + * @version 1.0.4 + * @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVI_MSGF_BV_02 + */ + testcase TC_IVIM_MSP_BV_01() runs on ItsIvim system ItsIvimSystem { + + f_IS_IVI_MSGF_BV_02(); + + } // end TC_IVIM_MSP_BV_01 + } // End of group iviMessageReception } // End of module ItsIvim_TestCases diff --git a/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn b/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn index 712604890550aa8bbd3a4649d2847ec680ce69cb..260db16a4ded81081cbd876bc888e7f8fbd204ee 100644 --- a/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn +++ b/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn @@ -1532,6 +1532,66 @@ module ItsIvim_TpFunctions { group iviMessageReception { + /** + * @desc TP Function for TC_IS_IVI_MSGF_BV_02 + */ + function f_IS_IVI_MSGF_BV_02() runs on ItsIvim { + + // Local variables + var IvimReq v_ivimReq; + var integer i; + + // Test control + if (not PICS_IVIM_RECEPTION) { + log("*** " & testcasename() & ": PICS_IVIM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_ivimReq := valueof( + m_ivimReq( + m_ivimStructurePdu( + m_ivimStructure( + m_iviManagementContainer( + f_getProvider(), + 1, + IviStatus_new_ + ) + ) + ) + ) + ); + ivimPort.send(v_ivimReq); + + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) and not match(v_ivimReq.msgOut, vc_utEvents[i].iviMsg); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": PASS: IVIM was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: IVIM was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // End of function f_IS_IVI_MSGF_BV_02 + } // End of group iviMessageReception } // End of module ItsIvim_TpFunctions diff --git a/ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn b/ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn index 3e6bd5de4744d400bce9efa287cd171507614330..c772f7264d75ca8fd08f0b96ead027d6fe0a2c9d 100644 --- a/ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn +++ b/ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn @@ -274,7 +274,7 @@ module ItsMapem_TestCases { * Initial conditions: * with { * the IUT being in the "initial state" - * and the IUT sending MAPEM + * and the IUT having receive a valid MAPEM * } * Expected behaviour: * ensure that { diff --git a/ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn b/ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn index 5bd7d480d2f9c8fcc155ccf04bf53069f215e8b6..22a2ef529de6b4349cb58ff8c58e016f6f1dd7fb 100644 --- a/ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn +++ b/ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn @@ -212,6 +212,7 @@ module ItsMapem_TpFunctions { function f_IS_RLT_COMM_BV_01 () runs on ItsMapemSpatem { // Local variables + var boolean v_tlmServiceStarted := false; // Test control if (not PICS_RSU or not PICS_MAPEM_GENERATION or not PICS_SPATEM_GENERATION) { @@ -229,7 +230,7 @@ module ItsMapem_TpFunctions { // Test Body tc_ac.start; alt { - [] mapemSpatemPort.receive( + [v_tlmServiceStarted == false] mapemSpatemPort.receive( mw_mapemInd( mw_mapemPdu( mw_mapemWellFormatted @@ -300,7 +301,7 @@ module ItsMapem_TpFunctions { log("*** " & testcasename() & ": FAIL: Expected MAPEM received, but not encapsulated in BTP-B packet ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } - [] tc_ac.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -344,7 +345,7 @@ module ItsMapem_TpFunctions { log("*** " & testcasename() & ": FAIL: Expected MAPEM received, but not addressed to the correct destination port. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } - [] tc_ac.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -405,9 +406,9 @@ module ItsMapem_TpFunctions { f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] mapemSpatemPort.receive( - mw_spatemInd( - mw_spatemPdu( - mw_spatemWellFormatted + mw_mapemInd( + mw_mapemPdu( + mw_mapemWellFormatted ))) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Expected MAPEM received, but not encapsulated in GBC packet. ***"); @@ -420,7 +421,6 @@ module ItsMapem_TpFunctions { } // Postamble - f_utTriggerEvent(m_utTriggerEvent(stopTLMService)); f_poDefault(); f_cfDown(); diff --git a/ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn b/ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn index 33d4bd4fb5b04a7718b45119a2d8e04d74721cd0..791dd24997c7e06d20d5211db98c76184297510f 100644 --- a/ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn +++ b/ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn @@ -326,7 +326,7 @@ module ItsSpatem_TestCases { * Initial conditions: * with { * the IUT being in the "initial state" - * and the IUT sending SPATEM + * and the IUT having receive a valid SPATEM * } * Expected behaviour: * ensure that { diff --git a/ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn b/ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn index 136cbac877337904e7299a7c6980860ace63c465..b1eab4baa04c8b5630619c9ebac3fd2743969b4d 100644 --- a/ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn +++ b/ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn @@ -14,46 +14,160 @@ module ItsSrem_TestCases { // ItsMapemSpatem import from ItsSrem_TpFunctions all; - group sreMessageDissemination { + group iTS_SRole { - group sreMessageFormat { + group sreMessageDissemination { - /** - * @desc Check that protocolVersion is set to 1 and messageID is set to 9 (ITS-S) + group sreMessageFormat { + + /** + * @desc Check that protocolVersion is set to 1 and messageID is set to 9 (ITS-S) + *
+                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
+                 * Initial conditions: 
+                 *   with {
+                 *        the IUT being in the "initial state"
+                 *    }
+                 * Expected behaviour:
+                 *    ensure that {
+                 *        when { 
+                 *            the IUT is requested to generate a new SREM
+                 *        }
+                 *        then {
+                 *            the IUT sends a valid SREM
+                 *                containing ITS PDU header
+                 *                    containing protocolVersion
+                 *                        indicating value '1'
+                 *                    and containing messageID
+                 *                        indicating value '9'
+                 *        }
+                 *    }
+                 * 
+ * + * @version 1.0.4 + * @see ETSI TS 103 191-2 v0.0.1 TP_IS_RLT_MSGF_BV_01 + * @reference ETSI TS 103 301 V1.0.4 Clause 6.3 + */ + testcase TP_IS_TLC_MSGF_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem { + + f_IS_TLC_MSGF_BV_01(); + + } // End of testcase TP_IS_TLC_MSGF_BV_01 + + } // End of group sreMessageFormat + + group sreCommunication { + + /** + * @desc Check that SREM uses BTP_B packet + *
+                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
+                 * Initial conditions: 
+                 *   with {
+                 *        the IUT being in the "initial state"
+                 *        and the IUT sending SREM 
+                 *    }
+                 * Expected behaviour:
+                 *    ensure that {
+                 *        when { 
+                 *            a SREM is generated
+                 *        }
+                 *        then {
+                 *            the IUT sends a valid SREM
+                 *                encapsulated in a BTP-B packet
+                 *        }
+                 *    }
+                 * 
+ * + * @version 1.0.4 + * @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_COMM_BV_01_01 + * @reference ETSI TS 103 301 V1.0.4 Clause 6.4.3.2 + */ + testcase TC_IS_TLC_COMM_BV_01_01 () runs on ItsSremSsem system ItsSremSsemSystem { + + f_IS_TLC_COMM_BV_01_01(); + + } // End of testcase TC_IS_TLC_COMM_BV_01_01 + + /** + * @desc Check that the destination port for SREM is set to 2007 + *
+                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
+                 * Initial conditions: 
+                 *   with {
+                 *        the IUT being in the "initial state"
+                 *        and the IUT sending SREM 
+                 *    }
+                 * Expected behaviour:
+                 *    ensure that {
+                 *        when { 
+                 *            a SREM is generated
+                 *        }
+                 *        then {
+                 *            the IUT sends a valid SREM
+                 *                encapsulated in a BTP packet
+                 *                   containing a destination port value set to 2007
+                 *                   and containing a destination port info value set to 0
+                 *        }
+                 *    }
+                 * 
+ * + * @version 1.0.4 + * @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_COMM_BV_01_02 + * @reference ETSI TS 103 301 V1.0.4 Clause 6.4.3.2 + */ + testcase TC_IS_TLC_COMM_BV_01_02 () runs on ItsSremSsem system ItsSremSsemSystem { + + f_IS_TLC_COMM_BV_01_02(); + + } // End of testcase TC_IS_TLC_COMM_BV_01_02 + + } // End of group sreCommunication + + } // End of group sreMessageDissemination + + group sreMessageProcessing { + + /** + * @desc Check that the IUT can successfully process all mandatory fields of SSEM received (ITS-S) *
-             * Pics Selection: PICS_RSU and PICS_SREM_GENERATION
+             * Pics Selection: not PICS_RSU and PICS_SREM_RECEPTION
              * Initial conditions: 
              *   with {
              *        the IUT being in the "initial state"
+             *        and the IUT having receive a valid SREM
              *    }
              * Expected behaviour:
              *    ensure that {
              *        when { 
-             *            the IUT is requested to generate a new SREM
+             *            the IUT receives a valid SREM
              *        }
              *        then {
-             *            the IUT sends a valid MAPEM
-             *                containing ITS PDU header
-             *                    containing protocolVersion
-             *                        indicating value '1'
-             *                    and containing messageID
-             *                        indicating value '9'
+             *            the IUT forwards the SREM content to upper layers
+             *            and the IUT forwards the SREM content to other facilities
              *        }
              *    }
              * 
* * @version 1.0.4 - * @see ETSI TS 103 191-2 v0.0.1 TP_IS_RLT_MSGF_BV_01 - * @reference ETSI TS 103 301 V1.0.4 Clause 6.3 + * @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_MSGF_BV_03 + * @reference ETSI TS 103 301 V1.0.4 Clause 8.3 */ - testcase TP_IS_TLC_MSGF_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem { + testcase TC_IS_TLC_MSGF_BV_03 () runs on ItsSremSsem system ItsSremSsemSystem { - f_IS_TLC_MSGF_BV_01(); + f_IS_TLC_MSGF_BV_03(); - } // End of testcase TP_IS_TLC_MSGF_BV_01 + } // End of testcase TC_IS_TLC_MSGF_BV_03 - } // End of group sreMessageFormat + } // End of group sreMessageProcessing + + } // End of group iTS_SRole + + group rsuRole { + + + - } // End of group sreMessageDissemination + } // End of group rsuRole } // End of module ItsSrem_TestCases \ No newline at end of file diff --git a/ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn b/ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn index bbd694cb59d2d757d565cfec07f943bd4bbbe9d9..0095cfc95e5c5420132c53d6b56eb40a9fe20f87 100644 --- a/ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn +++ b/ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn @@ -31,24 +31,273 @@ module ItsSrem_TpFunctions { import from LibItsSremSsem_TypesAndValues all; import from LibItsSremSsem_Pics all; - group mapeMessageDissemination { + group iTS_SRole { - group mapeMessageFormat { + group sreMessageDissemination { + + group sreMessageFormat { + + /** + * @desc TP Function for TC_IS_TLC_MSGF_BV_01 + */ + function f_IS_TLC_MSGF_BV_01 () runs on ItsSremSsem { + + // Local variables + var SremInd v_sremInd; + + // Test control + if (PICS_RSU or not PICS_SREM_GENERATION) { + log("*** " & testcasename() & ": not PICS_RSU and PICS_SREM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(ssemNewContent)); + + tc_ac.start; + alt { + [] sremSsemPort.receive( + mw_sremInd( + mw_sremPdu + )) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": PASS: Successfully received SREM PDU header. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // End of function f_IS_TLC_MSGF_BV_01 + + } // End of group sreMessageFormat + + group sreCommunication { + + /** + * @desc TP Function for TC_IS_TLC_COMM_BV_01_01 + */ + function f_IS_TLC_COMM_BV_01_01 () runs on ItsSremSsem { + + // Local variables + const UInt8 c_gnNhBtpB := 2; + var SremInd v_sremInd; + + // Test component configuration + f_cfUp(); + + // Preamble + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(ssemNewContent)); + + tc_ac.start; + alt { + [] sremSsemPort.receive( + mw_sremIndWithGnParameters( + mw_sremPdu( + mw_sremWellFormatted + ), + c_gnNhBtpB + )) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": PASS: Expected SREM encapsultated in BTP-B packet received. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] sremSsemPort.receive(mw_sremIndWithGnParameters(mw_sremPdu(mw_sremWellFormatted), omit)) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": INCONC: no GN NH information in SremInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] sremSsemPort.receive(mw_sremInd(mw_sremPdu(mw_defaultSrem))) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": FAIL: Expected SREM received, but not encapsulated in BTP-B packet ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // End of function f_IS_TLC_COMM_BV_01_01 + + /** + * @desc TP Function for TC_IS_TLC_COMM_BV_01_02 + */ + function f_IS_TLC_COMM_BV_01_02 () runs on ItsSremSsem { + + // Local variables + const UInt16 c_gnNhBtpBPort := 2007; + var SremInd v_sremInd; + + // Test component configuration + f_cfUp(); + + // Preamble + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(ssemNewContent)); + + tc_ac.start; + alt { + [] sremSsemPort.receive( + mw_sremIndWithBtpParameters( + mw_sremPdu, + c_gnNhBtpBPort, + 0 + )) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": PASS: Expected SREM encapsultated in BTP packet with port value 2003 received. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] sremSsemPort.receive(mw_sremInd(mw_sremPdu(mw_defaultSrem))) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": FAIL: Expected SREM received, but not addressed to the correct destination port. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // End of function f_IS_TLC_COMM_BV_01_02 + + /** + * @desc TP Function for TC_IS_TLC_COMM_BV_03 + */ + function f_IS_TLC_COMM_BV_03 () runs on ItsSremSsem { + + // Local variables + const UInt8 c_gnHtGbc := 4; + var SremInd v_sremInd; + + // Test control + if (PICS_RSU or not PICS_SREM_GENERATION) { + log("*** " & testcasename() & ": not PICS_RSU and PICS_SREM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(ssemNewContent)); + + tc_ac.start; + alt { + [] sremSsemPort.receive( + mw_sremIndWithGnParameters( + mw_sremPdu( + mw_sremWellFormatted + ), + -, + c_gnHtGbc + )) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": PASS: Expected SREM encapsulated in GBC packet received. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] sremSsemPort.receive( + mw_sremIndWithGnParameters( + mw_sremPdu( + mw_sremWellFormatted + ), + -, + omit + )) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": FAIL: no GN HT information in SremInd. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] sremSsemPort.receive( + mw_sremInd( + mw_sremPdu( + mw_sremWellFormatted + ))) -> value v_sremInd { + tc_ac.stop; + // Send SSEM + f_sendSseMessage(v_sremInd.msgIn.srm); + log("*** " & testcasename() & ": FAIL: Expected SREM received, but not encapsulated in GBC packet. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // End of function f_IS_TLC_COMM_BV_03 + + } // End of group sreCommunication + + } // End of group sreMessageDissemination + + group sreMessageProcessing { /** - * @desc TP Function for TC_IS_TLC_MSGF_BV_01 + * @desc TP Function for TC_IS_TLC_MSGF_BV_03 */ - function f_IS_TLC_MSGF_BV_01 () runs on ItsSremSsem { + function f_IS_TLC_MSGF_BV_03 () runs on ItsSremSsem { // Local variables - - // Test control - if (not PICS_RSU or not PICS_SREM_GENERATION) { - log("*** " & testcasename() & ": PICS_RSU and PICS_SREM_GENERATION required for executing the TC ***"); + var SremReq v_sremReq; + var integer i; + + if (PICS_RSU or not PICS_SREM_RECEPTION) { + log("*** " & testcasename() & ": not PICS_RSU and PICS_SREM_RECEPTION required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cfUp(); @@ -56,31 +305,36 @@ module ItsSrem_TpFunctions { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body - tc_ac.start; - alt { - [] sremSsemPort.receive( - mw_sremInd( - mw_sremPdu - )) { - tc_ac.stop; - // FIXME Send SSEM - log("*** " & testcasename() & ": PASS: Successfully received SREM PDU header. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } + v_sremReq := valueof(m_sremReq(m_sremPdu(m_defaultSrem))); + sremSsemPort.send(v_sremReq) ; + + f_sleep(PX_TAC); + for (i := 0; i < lengthof(vc_utSremEvents) and not match (v_sremReq.msgOut , vc_utSremEvents[i].sreMsg); i := i + 1) { + // empty on purpose } - + if (i < lengthof(vc_utSremEvents) ) { + log("*** " & testcasename() & ": PASS: SREM was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: SREM was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + // Postamble f_poDefault(); f_cfDown(); - - } // End of function f_IS_TLC_MSGF_BV_01 + + } // End of function f_IS_TLC_MSGF_BV_03 - } // End of group sreMessageFormat + } // End of group sreMessageProcessing + + } // End of group iTS_SRole + + group rsuRole { + + + - } // End of group sreMessageDissemination + } // End of group rsuRole } // End of module ItsSrem_TpFunctions \ No newline at end of file diff --git a/ttcn/AtsSremSsem/ItsSsem_TestCases.ttcn b/ttcn/AtsSremSsem/ItsSsem_TestCases.ttcn deleted file mode 100644 index 00527620725f67302f408691aa55d595d2385683..0000000000000000000000000000000000000000 --- a/ttcn/AtsSremSsem/ItsSsem_TestCases.ttcn +++ /dev/null @@ -1,2 +0,0 @@ -module ItsSsem_TestCases { -} // End of module ItsSsem_TestCases \ No newline at end of file diff --git a/ttcn/AtsSremSsem/ItsSsem_TpFunctions.ttcn b/ttcn/AtsSremSsem/ItsSsem_TpFunctions.ttcn deleted file mode 100644 index 8f84d580aa6dd26b147f1d1bd021504fd9195db0..0000000000000000000000000000000000000000 --- a/ttcn/AtsSremSsem/ItsSsem_TpFunctions.ttcn +++ /dev/null @@ -1,2 +0,0 @@ -module ItsSsem_TpFunctions { -} // End of module ItsSsem_TpFunctions \ No newline at end of file