ItsAtsp_TestCases.ttcn 239 KB
Newer Older
garciay's avatar
garciay committed
                    var template INsapPrimitivesUp v_INsapPrimUp;
                    var template UtAtspEventInd v_utAtspEventInd;

                    // Test control
                    if (not((not PICS_INUDS) and (not PICS_CIC_l4))) {
                        log("*** TC_ATSP_DP_BI_02: ERROR: 'NOT PICS_INUDS AND NOT PICS_CIC_l4' required for executing the TC ***");
                        stop;
                    }
                    
                    // Test component configuration
                    f_cf01Up();
                    
                    // Test adapter configuration
                    
                    // Preamble
                    // Clause 'Initial conditions'
                    v_CIstatus := f_initialCIstateActive();
                    //        the IUT being in the CI state "active"
                    
                    // Test Body
                    // Set MinimumUserPriority
                    v_writeParameter.paramNo := c_ciIParamNoMinUserPriority;
                    v_writeParameter.parameter.UserPriority := 128; // m_inUserPriorityAverage plus 1
                    v_writeValues := {v_writeParameter};
                    v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false );
                    
                    // Clause 'then the IUT accepts the new value of this I-Parameter'
                    if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinUserPriority, v_cfSetErrorList)) {
                        log("*** TC_ATSP_DP_BI_02: INFO: MI-Set.confirm was successfully executed ***");
                    } else {
                        log("*** TC_ATSP_DP_BI_02: ERROR: MI-Set was not properly acknowledged ***");
                        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
                        stop;
                    }

                    // Clause 'when'
                    //        the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address
                    
                    f_utSendIN_UNITDATA_Request(
                                    //source
                                    m_inLLServiceAddr( 
                                        PX_IN_SAP_ADDRESS,
                                        f_get_CI_LinkID()),     
                                    //destination
                                    m_inLLServiceAddr(
                                        PX_IN_SAP_ADDRESS,
                                        f_get_DestinationVCI_BC_LinkID()),
                                    m_inDataEmpty,
                                    m_inUserPriorityAverage);        
                    
                    v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd(
                                    //source
                                    m_inLLServiceAddr( 
                                        PX_IN_SAP_ADDRESS,
                                        f_get_CI_LinkID()),     
                                    //destination
                                    m_inLLServiceAddr(
                                        PX_IN_SAP_ADDRESS,
                                        f_get_DestinationVCI_BC_LinkID()),
                                    m_inDataEmpty,
                                    ?,
                                    m_inUnitdataDefaultAP)    ) );
                    
                    // Clause 'then'
                    //        the BC-VCI of the IUT correctly blocks transmission of the corresponding frame
                    
                    tc_wait.start;
                    alt {
                        [] atspPort.receive(v_atspEventInd) {
                            tc_wait.stop;
                            log("*** TC_ATSP_DP_BI_01: INFO: Unexpected IN-UNITDATA.indication received ***");
                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
                        }
                        [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { 
                            log("*** TC_ATSP_DP_BI_01: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result);
                            repeat;
                        }
                        [] tc_wait.timeout {
                            log("*** TC_ATSP_DP_BI_01: INFO: Expected time out ***");
                            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
                        }
                    } // End of 'alt' statement
                    
                    // Postamble
                    f_poDefault();
                    f_cf01Down();
                    log("*** TC_ATSP_DP_BI_02: INFO: Postamble: done ***");
                } // End of testcase TC_ATSP_DP_BI_02
            
        } // End of group invalidBehavior
            
    } // End of group handlingOfCDataPlane
    
    
} // End of module ItsAtsp_TestCases