ItsIvim_TpFunctions.ttcn 53 KB
Newer Older
garciay's avatar
garciay committed
                    }
                }
                
                // Postamble
                f_poCancelEvent(e_iut, v_iviIdentificationNumber);
                f_cfDown();
                
            } // End of function f_IS_IVIM_GFQ_TI_02
garciay's avatar
garciay committed
        } // End of group iviGenerationFrequency
garciay's avatar
garciay committed
            function f_IS_IVIM_COMM_BV_01_01() runs on ItsIvim {
                
                // Local variables
                const UInt8 c_gnNhBtpB := 2;
garciay's avatar
garciay committed
                var IviIdentificationNumber v_iviIdentificationNumber;
garciay's avatar
garciay committed
                // Test control
                if (not PICS_IVIM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_IVIM_GENERATION 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_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent());
                        
                tc_ac.start;
                alt {
                    [] ivimPort.receive(
                        mw_ivimIndWithGnParameters(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                            )),
                            c_gnNhBtpB
                    )) {
                        tc_ac.stop;
garciay's avatar
garciay committed
                        log("*** " & testcasename() & ": PASS: Expected IVIM encapsultated in BTP-B packet received. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] ivimPort.receive(
                        mw_ivimIndWithGnParameters(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                            )),
                            omit
                    )) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": FAIL: no GN NH information in IvimInd. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                    [] ivimPort.receive(
                        mw_ivimInd(
                            mw_anyIvimPdu
                    )) {
                        tc_ac.stop;
garciay's avatar
garciay committed
                        log("*** " & testcasename() & ": FAIL: Expected IVIM 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_poCancelEvent(e_iut, v_iviIdentificationNumber);
                f_cfDown();
                
garciay's avatar
garciay committed
            } // End of function f_IS_IVIM_COMM_BV_01_01
garciay's avatar
garciay committed
            function f_IS_IVIM_COMM_BV_01_02() runs on ItsIvim {
garciay's avatar
garciay committed
                const UInt16 c_gnNhBtpBPort := 2006;
                var IviIdentificationNumber v_iviIdentificationNumber;
garciay's avatar
garciay committed
                // Test control
                if (not PICS_IVIM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_IVIM_GENERATION 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_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent());
                        
                tc_ac.start;
                alt {
                    [] ivimPort.receive(
                        mw_ivimIndWithBtpParameters(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                            )),
                            c_gnNhBtpBPort,
                            0
                    )) {
                        tc_ac.stop;
garciay's avatar
garciay committed
                        log("*** " & testcasename() & ": Expected IVIM encapsultated in BTP packet with port value 2006 received. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] ivimPort.receive(
                        mw_ivimInd(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                    )))) {
                        tc_ac.stop;
garciay's avatar
garciay committed
                        log("*** " & testcasename() & ": FAIL: Expected IVIM received, but not addressed to the correct destination port. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                    [] ivimPort.receive(
                        mw_ivimInd(
                            mw_anyIvimPdu
                    )) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": FAIL: Expected IVIM 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_poCancelEvent(e_iut, v_iviIdentificationNumber);
                f_cfDown();
                
            } // End of function f_IS_IVIM_COMM_BV_01_02
            
            function f_IS_IVIM_COMM_BV_02 () runs on ItsIvim {
                
                // Local variables
                const UInt8 c_gnHtUnc := 2;
                var IviIdentificationNumber v_iviIdentificationNumber;
                
                // Test control
                if (PICS_IVIM_GENERATION) {
                    log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                    
                // Preamble
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                v_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent());
                
                tc_ac.start;
                alt {
                    [] ivimPort.receive(
                        mw_ivimIndWithGnParameters(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                            )),
                            c_gnHtUnc
                    )) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Expected IVIM encapsulated in GBC packet received. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] ivimPort.receive(
                        mw_ivimIndWithGnParameters(
                            mw_anyIvimPdu(
                                mw_itsPduHeader,
                                mw_ivimStructure(
                                    mw_iviManagementContainer
                            )),
                            omit
                    )) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": FAIL: no GN NH information in IvimInd. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                    [] ivimPort.receive(
                        mw_ivimInd(
                            mw_anyIvimPdu
                    )) {
                        tc_ac.stop;
garciay's avatar
garciay committed
                        log("*** " & testcasename() & ": FAIL: Expected IVIM 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_poCancelEvent(e_iut, v_iviIdentificationNumber);
                f_cfDown();
                
garciay's avatar
garciay committed
            } // End of function f_IS_IVIM_COMM_BV_02
            
        } // End of group iviCommunication
        
    } // End of group iviMessageTransmission
    
    group iviMessageReception {
        
    } // End of group iviMessageReception
    
} // End of module ItsIvim_TpFunctions