ItsFntp_TestCases.ttcn3 232 KB
Newer Older
//                        )) {
//                            tc_ac.stop;
//                            log("*** TC_FNTP_CIP_FP_BV_07: INFO: Received NF-COMM.indication primitive as expected ***");
//                        }
//                        [] utPort.receive {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); 
//                            log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected basic FNTP NPDU ***");
//                        }
//                        [] tc_ac.timeout {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); 
//                            log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Unexpected basic FNTP NPDU ***");
//                        }
//                    } // End of 'alt' statement
//                    // 2) the IUT retransmits the received packet in broadcast mode with...
//                    tc_ac.start;
//                    alt { 
//                        [] fntpPort.receive(
//                            mw_fntpInSapPrimitiveReq(
//                                mdw_inUnitDataReqCip( 
//                                    mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), 
//                                    mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), 
//                                    f_getIutRxCipValue() // And with access_parameters not set equal to the received CIP
//                            ))) -> value v_inSapPrimitivesDown {
//                            tc_ac.stop;
//                            f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu);
//                            if (match(
//                                    v_extendedNpdu, 
//                                    mdw_fntpExtendedNpdu(
//                                        ?, 
//                                        ?
//                                    ))) {
//                                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
//                                log("*** TC_FNTP_CIP_FP_BV_07: INFO: IUT transmits the received packet in BC mode ***");
//                            } else {
//                                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); 
//                                log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected extended N-hops FNTP NPDU ***");
//                            }
//                        }
//                        [] tc_ac.timeout {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
//                            log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Expected message not received ***");
//                        }
//                    } // End of 'alt' statement
//                    log("*** TC_FNTP_CIP_FP_BV_07: INFO: test body done ***");
//                    
//                    // Postamble
//                    f_poDefault();
//                    f_cf02Down();
//                    
//                } // End of testcase TC_FNTP_CIP_FP_BV_07
//                
//                /**
//                 * @desc    RX of an FNTP extended NPDU with CIP at ITS-S router which is due to a retransmission (N-hop)
//                 * <pre>
//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH
//                 * Config Id: CF02
//                 * Initial conditions: 
//                 *  with {
//                 *      the IUT having set up properly the FNTP forwarding table, 
//                 *      the IUT is enabled to transmit CIPs in a frame to remote ITS-S
//                 *  }
//                 * Expected behaviour:
//                 *  ensure that {
//                 *      when { 
//                 *          the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to a value larger than 0
//                 *      }
//                 *      then {
//                 *          the IUT forwards the CIP information to the implementation-specific destination in the ITS-S router, 
//                 *          the IUT retransmits the received packet in broadcast mode with FNTP hop count decremented by one, 
//                 *              and with no CIP contained in the NPDU, 
//                 *              and with access_parameters not set equal to the received CIP, 
//                 *          the IUT forwards the "FNTP extended NPDU" to the proper ITS host
//                 *      }
//                 *  }
//                 * </pre>
//                 * 
//                 * @version 1.1.2
//                 * @see     ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/08
//                 */
//                testcase TC_FNTP_CIP_FP_BV_08() runs on ItsCalm system ItsCalmSystem {
//                    // Local variables
//                    var INsapPrimitivesDown v_inSapPrimitivesDown; 
//                    var FNTPNPDU v_extendedNpdu;
//                    
//                    // Test control
//                    if (not(PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH)) {
//                        log("*** TC_FNTP_CIP_FP_BV_08: ERROR: 'PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH' required for executing the TC ***");
//                        stop;
//                    }
//                    
//                    // Test component configuration
//                    f_cf02Up();
//                    
//                    // Test adapter configuration
//                    
//                    // Preamble
//                    // Clause 'Initial conditions'
//                    f_initializeFntpForwardingTable(f_getIutAppPortValue());
//                    f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
//                    log("*** TC_FNTP_CIP_FP_BV_08: INFO: Preamble: FNTP forwarding Table was setup properly ***");
//                    
//                    // Test Body
//                    // Clause 'when'
//                    f_sendExtendedFntpNpdu( 
//                        f_getIutLocalPortNumberValue(), 
//                        f_getIutRemotePortNumberValue(), 
//                        m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), 
//                        m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), 
//                        f_getIutNhopsValue() 
//                    );
//                    log("*** TC_FNTP_CIP_FP_BV_08: INFO: Request to send an FNTP extended NPDU containing CIP done ***");
//                    // Clause 'then'
//                    // 1) The IUT forwards the "FNTP extended NPDU" to the proper ITS host
//                    tc_ac.start;
//                    alt {
//                        [] utPort.receive(
//                            mdw_checkNfFntpCommIndicationCip(
//                                f_getIutRemotePortNumberValue(),                                // Destination port of DL-UNITDATA.request primitive
//                                f_getIutLocalPortNumberValue(),                                 // Source port of DL-UNITDATA.request primitive
//                                m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()),  // Source address of DL-UNITDATA.request primitive
//                                mdw_nHopNfFntpOptions_cip( 
//                                    f_getIutNhopsValue(),
//                                    f_getIutTxCipValue(), 
//                                    f_getIutRxCipValue() 
//                                )
//                        )) {
//                            tc_ac.stop;
//                            log("*** TC_FNTP_CIP_FP_BV_08: INFO: Received NF-COMM.indication primitive as expected ***");
//                        }
//                        [] utPort.receive {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); 
//                            log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected basic FNTP NPDU ***");
//                        }
//                        [] tc_ac.timeout {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); 
//                            log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Unexpected basic FNTP NPDU ***");
//                        }
//                    } // End of 'alt' statement
//                    // 2) the IUT retransmits the received packet in broadcast mode with...
//                    tc_ac.start;
//                    alt { 
//                        [] fntpPort.receive(
//                            mw_fntpInSapPrimitiveReq(
//                                mdw_inUnitDataReqCip( 
//                                    mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), 
//                                    mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), 
//                                    f_getIutRxCipValue() // and with access_parameters not set equal to the received CIP
//                            ))) -> value v_inSapPrimitivesDown {
//                            tc_ac.stop;
//                            f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu);
//                            if (match(
//                                    v_extendedNpdu, 
//                                    mdw_fntpExtendedNpdu(
//                                        ?, 
//                                        ? 
//                                    ))) {
//                                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); 
//                                log("*** TC_FNTP_CIP_FP_BV_08: INFO: IUT transmits the received packet in BC mode ***");
//                            } else {
//                                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); 
//                                log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected extended N-hops FNTP NPDU ***");
//                            }
//                        }
//                        [] tc_ac.timeout {
//                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
//                            log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Expected message not received ***");
//                        }
//                    } // End of 'alt' statement
//                    log("*** TC_FNTP_CIP_FP_BV_08: INFO: test body done ***");
//                    
//                    // Postamble
//                    f_poDefault();
//                    f_cf02Down();
//                    
//                } // End of testcase TC_FNTP_CIP_FP_BV_08
                
            } // End of group validBehavior
            
            group invalidBehavior {
                
            } // End of group invalidBehavior
            
        } // End of group forwardedProcedure
        
    } // End of group cipManagement
    
    // x.x.x Extended procedure
    group secureCommunications {
        
        group validBehavior {
            
        } // End of group validBehavior
        
        group invalidBehavior {
            
        } // End of group invalidBehavior
        
    } // End of group secureCommunications
    
filatov's avatar
filatov committed
} // End of module ItsFntp_TestCases