ItsSpatem_TpFunctions.ttcn 98.9 KB
Newer Older
            function f_IS_TLM_GEN_SEC_BV_01 () runs on ItsMapemSpatem {
Bostjan Pintar's avatar
Bostjan Pintar committed
           
                // Local variables
                var SpatemInd v_spatem;
            
                // Test control
                if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
            
                // Test component configuration
                f_cfUp();
Bostjan Pintar's avatar
Bostjan Pintar committed
                // Preamble
                f_prInitialState();
                f_awaitSpateMessage(
                    mw_spatemInd(
                        mw_spatemPdu(
                            mw_defaultSpatem
                        )
                    ), 
                    v_spatem
                );
                
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                                               mw_spatemIndWithSecurityParameters(
                                                                                 mw_spatemPdu,
                                                                                 -, 
                                                                                 c_its_aid_SPAT
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
                        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_TLM_GEN_SEC_BV_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SEC_BV_02
             */
            function f_IS_TLM_GEN_SEC_BV_02 () runs on ItsMapemSpatem {
Bostjan Pintar's avatar
Bostjan Pintar committed
           
                // Local variables
                var SpatemInd v_spatem;
            
                // Test control
                if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
            
                // Test component configuration
                f_cfUp();
Bostjan Pintar's avatar
Bostjan Pintar committed
                // Preamble
                f_prInitialState();
                f_awaitSpateMessage(
                    mw_spatemInd(
                        mw_spatemPdu(
                            mw_defaultSpatem
                        )
                    ), 
                    v_spatem
                );
                
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                    
                // Test Body
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                                               mw_spatemIndWithSecurityParameters(
                                                                                 mw_spatemPdu,
                                                                                 -, 
                                                                                 c_its_aid_SPAT
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
                        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_TLM_GEN_SEC_BV_02
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BV_01
             */
            function f_IS_TLM_GEN_SSP_BV_01 () runs on ItsMapemSpatem {
Bostjan Pintar's avatar
Bostjan Pintar committed
           
                // Local variables
                var SpatemInd v_spatem;
            
                // Test control
                if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
            
                // Test component configuration
                f_cfUp();
Bostjan Pintar's avatar
Bostjan Pintar committed
                // Preamble
                f_prInitialState("CERT_SPAT_SSP_NONE");
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_utTriggerEvent(m_utTriggerEvent(spatemNewContent));
            
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                                               mw_spatemIndWithSecurityParameters(
                                                                                 mw_spatemPdu,
                                                                                 oct2bit('010000'O), 
                                                                                 c_its_aid_SPAT
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
                        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_TLM_GEN_SSP_BV_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BV_02
             */
            function f_IS_TLM_GEN_SSP_BV_02 () runs on ItsMapemSpatem {
Bostjan Pintar's avatar
Bostjan Pintar committed
           
                // Local variables
                var SpatemInd v_spatem;
            
                // Test control
                if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
                    log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
            
                // Test component configuration
                f_cfUp();
Bostjan Pintar's avatar
Bostjan Pintar committed
                // Preamble
                f_prInitialState("CERT_SPAT_SSP_ALL");
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                f_utTriggerEvent(m_utTriggerEvent(spatemNewContent));
            
                tc_ac.start;
                alt {
                    [] mapemSpatemPort.receive(
                                               mw_spatemIndWithSecurityParameters(
                                                                                 mw_spatemPdu,
                                                                                 oct2bit('010000'O), 
                                                                                 c_its_aid_SPAT
                    )) { 
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
                        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_TLM_GEN_SSP_BV_02
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BO_03
             */
            function f_IS_TLM_GEN_SSP_BO_03 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BO_03
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BV_04
             */
            function f_IS_TLM_GEN_SSP_BV_04 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BV_04
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BO_05
             */
            function f_IS_TLM_GEN_SSP_BO_05 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BO_05
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BV_06
             */
            function f_IS_TLM_GEN_SSP_BV_06 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BV_06
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BV_07
             */
            function f_IS_TLM_GEN_SSP_BV_07 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BV_07
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BO_08
             */
            function f_IS_TLM_GEN_SSP_BO_08 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BO_08
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_SSP_BO_09
             */
            function f_IS_TLM_GEN_SSP_BO_09 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_SSP_BO_09
            
            /**
             * @desc    TP Function for TC_IS_TLM_GEN_RATE_BV_01
             */
            function f_IS_TLM_GEN_RATE_BV_01() runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_GEN_RATE_BV_01
    }
    
             * @desc    TP Function for f_IS_TLM_RCV_MSGF_BV_01
            function f_IS_TLM_RCV_MSGF_BV_01 () runs on ItsMapemSpatem {
                    
                // Local variables
                var SpatemReq   v_spatemReq;
                var integer     i;
                
garciay's avatar
garciay committed
                if (not PICS_SPATEM_RECEPTION) {
                    log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cfUp();
                
                // Preamble
garciay's avatar
garciay committed
                f_prInitialState();
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                
                // Test Body
                v_spatemReq := valueof(m_spatemReq(m_spatemPdu(m_defaultSpatem)));
                mapemSpatemPort.send(v_spatemReq) ;
                
                f_sleep(PX_TAC);
                for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (valueof(v_spatemReq.msgOut) , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
                    // empty on purpose 
                }
                if (i < lengthof(vc_utSpatemEvents) ) {
                    log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                } else {
                    log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                }
                
                // Postamble
                f_poDefault();
                f_cfDown();
                
            } // End of function f_IS_TLM_RCV_MSGF_BV_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SEC_BV_01
             */
            function f_IS_TLM_RCV_SEC_BV_01 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SEC_BV_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SEC_BO_01
             */
            function f_IS_TLM_RCV_SEC_BO_01 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SEC_BO_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BV_01
             */
            function f_IS_TLM_RCV_SSP_BV_01 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BV_01
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BO_02
             */
            function f_IS_TLM_RCV_SSP_BO_02 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BO_02
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BV_03
             */
            function f_IS_TLM_RCV_SSP_BV_03 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BV_03
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BO_04
             */
            function f_IS_TLM_RCV_SSP_BO_04 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BO_04
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BV_05
             */
            function f_IS_TLM_RCV_SSP_BV_05 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BV_05
            
            /**
             * @desc    TP Function for TC_IS_TLM_RCV_SSP_BO_06
             */
            function f_IS_TLM_RCV_SSP_BO_06 () runs on ItsMapemSpatem {
                
                // TODO
                
            } // End of function f_IS_TLM_RCV_SSP_BO_06
            
    } // End of group spateMessageProcessing
    
} // End of module ItsSpatem_TpFunctions