ItsDenm_TestCases.ttcn 222 KB
Newer Older
filatov's avatar
filatov committed
            alt {
                [] denmPort.receive(
                    mw_denmInd(
                        mw_denmPdu(
                            mw_denm(
                                mw_denmMgmtCon(v_actionId)
                            )
                        )
                    ) 
                ) {
                    tc_ac.stop;
                    if(v_positionChanged == false) {
                        log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***");
                        f_utChangePosition(m_utChangePosition(1000, 0));
                        v_positionChanged := true;
                        tc_ac.start;
                        repeat;
                    }
                    else {
                        log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***");
                        f_clientSyncAndVerdict(c_tbDone, e_error);
                    }
                }
                [] tc_ac.timeout {
                    if(v_positionChanged == false) {
                        log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
                        f_clientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                    else {
                        log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***");
                        f_clientSyncAndVerdict(c_tbDone, e_success);
                    }
                }
            }
            
            // Postamble
            f_poCancelEvent(e_ets, v_actionId);
            f_cfDown();
            
        } // end TC_DEN_KAFW_BV_10
        
        /**
         * @desc    Check that forwarding ITS-S does not forward DENM is transmissionInterval is not present
         * <pre>
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when {
         *          the IUT receives a DENM
         *          	containing actionID
         *          		indicating ACTION_ID1
         *          	and not containing transmissionInterval
         *      }
         *      then {
         *          the IUT does not reconstruct and send the DENM associated with ACTION_ID1
         *      }
         *  }
         * </pre>
         * 
         * @version 1.2.1
         * @see     ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2
         */
        testcase TC_DEN_KAFW_BV_11() runs on ItsDenm system ItsDenmSystem {

            // Local variables
            var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
            var ActionID v_actionId;
            
            // Test component configuration
            f_cfUp();
            
            // Preamble
            f_prInitialState();
            f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
            
            // Test Body
            v_actionId := f_sendDenMessage( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
            
            tc_ac.start;
            alt {
                []  denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( v_actionId ) ) ) ) ) {
                    tc_ac.stop;
                    log("*** " & testcasename() & ": FAIL: IUT reconstructs and sends the DENM associated with ACTION_ID ***");
                    f_clientSyncAndVerdict(c_tbDone, e_error);
                }
                []  tc_ac.timeout {
                    log("*** " & testcasename() & ": PASS: IUT does not reconstruct and send the DENM associated with ACTION_ID1 ***");
                    f_clientSyncAndVerdict(c_tbDone, e_success);
                }
            }
            
            // Postamble
            f_poCancelEvent(e_ets, v_actionId);
            f_cfDown();

        } // end TC_DEN_KAFW_BV_11
        
filatov's avatar
filatov committed
    } // end denKeepAliveForwarding
    
} // end ItsDenm_TestCases