AtsImsIot_TP_behavior_RX.ttcn 78.4 KB
Newer Older
Bostjan Pintar's avatar
Bostjan Pintar committed
/*
 *  @author     STF 574, TTF006
 *  @version    $Id$
 *  @desc       This module provides the TP behaviour functions at RX interface
 */

module AtsImsIot_TP_behavior_RX
{
    
    // LibIot
    import from LibIot_PIXITS all;
    import from LibIot_VxLTE_PIXITS all;
    import from LibIot_TestInterface all;
    import from LibIot_TypesAndValues all;
    import from LibIot_Functions all;
Bostjan Pintar's avatar
Bostjan Pintar committed
    
    // AtsImsIot
    import from AtsImsIot_Templates all;
    import from AtsImsIot_TypesAndValues all;
Bostjan Pintar's avatar
Bostjan Pintar committed
    import from AtsImsIot_Functions all;
    import from AtsImsIot_Diameter_Templates all;
    import from AtsImsIot_TestSystem all;
Bostjan Pintar's avatar
Bostjan Pintar committed
    
    // LibDiameter
    import from LibDiameter_Templates all;
    import from LibDiameter_TypesAndValues all;
    import from LibDiameter_Steps all;
Bostjan Pintar's avatar
Bostjan Pintar committed

    
group g_PCRF {

group g_PCRF_ASA {

    /**
     * Starts monitor component behavior for TP_RX_PCRF_ASA_01
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT sends AA-Answer after RAA is received from PGW."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when { 
     *         the IMS_P_CSCF_A entity sends a ASR containing
     *              Abort_Cause_AVP
     *                  indicating value BEARER_RELEASED '(0)'
     *              ;
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the ASA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS "(2001)"
     *     ;
     *     to the IMS_P_CSCF_A entity
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_ASA_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aSR_MSG := mw_ASR_abortCause(BEARER_RELEASED_E) };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aSR_MSG := mw_ASR_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_ASA_01 - ASR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
            
            mw_diameter_msg_pass := { aSA_MSG := mw_ASA_resultCode };
            mw_diameter_msg_fail := { aSA_MSG := mw_ASA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_ASA_01 - ASA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_ASA_01

} // end group g_PCRF_ASA

group g_PCRF_AAA {

    /**
     * Starts monitor component behavior for TP_RX_PCRF_AAA_01
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT after AA-Request is received due to provisioning of AF Signalling flow sends AA-Answer."
     * ensure that {
     *     when {
     *         the IMS_P_CSCF_A entity sends an AAR
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the AAA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS,
     *             Acceptable_Service_Info_AVP containing
     *                 "one or more" Media_Component_Description_AVP containing
     *                     Media_Component_Number_AVP
     *                         indicating value 0,
     *                     Media_Sub_Component_AVP containing
     *                         Flow_Description_AVP
     *                         Flow_Usage_AVP
     *                             indicating value AF_SIGNALING,
     *                         Flow_Status_AVP
     *                             indicating value ENABLED,
     *                         AF_Signalling_Protocol_AVP
     *                             indicating value SIP
     *                     ;
     *                 ;
     *             ;,
     *             IP_CAN_AVP
     *             RAT_Type_AVP
     *         ;
     *         to the IMS_P_CSCF_A entity
     *         }
     *     }
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_AAA_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_basic };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_dummy };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_AAA_01 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
            
            mw_diameter_msg_pass := { aAA_MSG := mw_AAA_resultCode/*mw_AAA_AcceptableService*/ };
            mw_diameter_msg_fail := { aAA_MSG := mw_AAA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_AAA_01 - AAA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_AAA_01

    /**
     * Starts monitor component behavior for TP_RX_PCRF_ECO_AAA_01
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT after AA-Request is received due to provisioning of AF Signalling flow sends AA-Answer."
     * ensure that {
     *     when {
     *         the IMS_P_CSCF_A entity sends an AAR
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the AAA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS,
     *             Acceptable_Service_Info_AVP containing
     *                 "one or more" Media_Component_Description_AVP containing
     *                     Media_Component_Number_AVP
     *                         indicating value 0,
     *                     Media_Sub_Component_AVP containing
     *                         Flow_Description_AVP
     *                         Flow_Usage_AVP
     *                             indicating value AF_SIGNALING,
     *                         Flow_Status_AVP
     *                             indicating value ENABLED,
     *                         AF_Signalling_Protocol_AVP
     *                             indicating value SIP
     *                     ;
     *                 ;
     *             ;,
     *             IP_CAN_AVP
     *             RAT_Type_AVP
     *         ;
     *         to the IMS_P_CSCF_A entity
     *         }
     *     }
     *     
     * ensure that {
     *     when {
     *         the IMS_P_CSCF_A entity sends an AAR
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the AAA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS
     *             Subscription_Id_AVP containing
     *                 Subscription_Id_Type_AVP
     *                     indicating value END_USER_IMSI;, //or END_USERE_164   
     *             "and/or" 
     *             User_Equipment_Info_AVP containing
     *                 User_Equipment_Info_Type
     *                     indicating value IMEISV,
     *                 User_Equipment_Info_Value;;  
     *         to the IMS_P_CSCF_A entity
     *     }
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_ECO_AAA_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_basic };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_dummy };
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                    },
                    {
                        mw_diameter_msg_fail
                    },
                    {0, omit},
                    "TP_RX_PCRF_ECO_AAA_01 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
            
            mw_diameter_msg_pass := { aAA_MSG := (mw_AAA_resultCode_subscriptionId_userEquipmentInfo,
                                                  mw_AAA_resultCode_userEquipmentInfo,
                                                  mw_AAA_resultCode_subscriptionId)
                                                  };
            mw_diameter_msg_fail := { aAA_MSG := mw_AAA_basic };
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                    },
                    {
                        mw_diameter_msg_fail
                    },
                    {0, omit},
                    "TP_RX_PCRF_ECO_AAA_01 - AAA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_ECO_AAA_01

Bostjan Pintar's avatar
Bostjan Pintar committed
    /**
     * Starts monitor component behavior for TP_RX_PCRF_AAA_02
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT sends AA-Answer after RAA is received from PGW."
     * ensure that {
     *     when {
     *         the EPC_PGW_A entity sends a RAA
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the AAA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS "(2001)"
     *             ;
     *         ;
     *         to the IMS_P_CSCF_A entity
     *     }
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_AAA_02(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAA_MSG := mw_AAA_resultCode };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAA_MSG := mw_AAA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_AAA_02 - AAA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_AAA_02

    /**
     * Starts monitor component behavior for TP_RX_PCRF_AAA_02
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT receives AA-Request  from home PCRF and sends AA-Answer towards visited P-CSCF."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the EPC_PCRF_A entity sends a AAA
     *         to the EPC_PCRF_B entity
     *     }
     *     then {
     *         the EPC_PCRF_B entity sends the AAA 
     *         to the IMS_P_CSCF_B entity
     *     }
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_AAA_03(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAA_MSG := mw_AAA_resultCode };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAA_MSG := mw_AAA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_AAA_03 - AAA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_AAA_03

} // end group g_PCRF_AAA

group g_PCRF_STA {

    /**
     * Starts monitor component behavior for TP_RX_PCRF_STA_01
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT after reception of RA-Request sends ST-Answer."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A and 
     *     the UE_A entity previouslyEstablishedCallWith the UE_B
     * }
     * 
     * ensure that {
     *     when { 
     *         the EPC_PGW_A entity sends an RAA
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the STA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS
     *         ;
     *         to the IMS_P_CSCF_A entity
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_STA_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { sTA_MSG := mw_STA_diamSuccess };
            var template DIAMETER_MSG mw_diameter_msg_fail := { sTA_MSG := mw_STA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_STA_01 - STA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_STA_01

    /**
     * Starts monitor component behavior for TP_RX_PCRF_STA_02
     * @param p_monitorCompRef Reference to monitor component
     * <pre>
     * Test objective  "Verify that IUT after reception of ST-Request sends ST-Answer."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when { 
     *         the IMS_P_CSCF_A entity sends an STR
     *         to the EPC_PCRF_A entity
     *     }
     *     then {
     *         the EPC_PCRF_A entity sends the STA containing
     *             Result_Code_AVP
     *                 indicating value DIAMETER_SUCCESS
     *         ;
     *         to the IMS_P_CSCF_A entity
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCRF_STA_02(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { sTR_MSG := mw_STR_basic };
            var template DIAMETER_MSG mw_diameter_msg_fail := { sTR_MSG := mw_STR_dummy };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_STA_02 - STR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
            
            mw_diameter_msg_pass := { sTA_MSG := mw_STA_diamSuccess };
            mw_diameter_msg_fail := { sTA_MSG := mw_STA_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCRF_STA_02 - STA",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCRF_STA_02

} // end group g_PCRF_STA

} // end group g_PCRF


group g_PCSCF {


group g_PCSCF_ASR {

    /**
     * Starts monitor component behavior for TP_RX_PCSCF_ASR_01
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT receives AS-Request from home PCRF and it sends AS-Request towards visited P-CSCF."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_RMI
     * 
     * Initial conditions with {
     *     the UE_A entity isAttachedTo the EPC_B and
     *     the UE_A entity isRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the EPC_PCRF_A entity sends a ASR
     *         to the EPC_PCRF_B entity
     *     }
     *     then {
     *         the EPC_PCRF_B entity sends the ASR containing
     *             Session_Id_AVP
     *             Abort_Cause_AVP
     *                 indicating value BEARER_RELEASED
     *         ;
     *         to the IMS_P_CSCF_B entity
     *     } 
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_ASR_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aSR_MSG := mw_ASR_abortCause(BEARER_RELEASED_E) };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aSR_MSG := mw_ASR_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCSCF_ASR_01 - ASR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCSCF_ASR_01
} //end group g_PCSCF_ASR {


group g_PCSCF_AAR {

    /**
     * Starts monitor component behavior for TP_RX_PCSCF_AAR_01
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT after 2XX_Response on REGISTER sends an AA-Request due to provisioning of AF Signalling flow."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the IMS_S_CSCF_A entity sends a 200_Response_REGISTER
     *         to the IMS_P_CSCF_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity sends an AAR containing
     *             Framed_IPv4_Address_AVP 
     *                 indicating value "IPv4_Address of UE_A",
     *             "or" Framed_IPv6_Address_AVP 
     *                 indicating value "IPv6_Address of UE_A",
     *             Specific_Action_AVP
     *                 indicating value INDICATION_OF_LOSS_OF_BEARER,
     *             "one or more" Media_Component_Description_AVP containing 
     *                 Media_Component_Number_AVP
     *                     indicating value 0,
     *                 Media_Sub_Component_AVP containing
     *                     Flow_Description_AVP
     *                     Flow_Usage_AVP
     *                         indicating value AF_SIGNALLING,
     *                     Flow_Status_AVP
     *                         indicating value ENABLED,
     *                     AF_Signalling_Protocol_AVP
     *                         indicating value SIP
     *                 ;
     *             ;
     *         ;
     *         to the EPC_PCRF_A entity
     *     } 
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     * @remark source function f_mtc_check_TP_EPC_6013_01
     */
    function f_mtc_check_TP_RX_PCSCF_AAR_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_MediaComponent_specificActionLossOfBearer };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCSCF_AAR_01 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
		}
    } // End of function f_mtc_check_TP_RX_PCSCF_AAR_01

    /**
     * Starts monitor component behavior for TP_RX_PCSCF_ECO_AAR_01
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT after 2XX_Response on REGISTER sends an AA-Request due to provisioning of AF Signalling flow."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity not isEmergencyRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the IMS_S_CSCF_A entity sends a 200_Response_REGISTER
     *         to the IMS_P_CSCF_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity sends an AAR containing
     *             Framed_IPv4_Address_AVP 
     *                 indicating value "IPv4_Address of UE_A",
     *             "or" Framed_IPv6_Address_AVP 
     *                 indicating value "IPv6_Address of UE_A",
     *             AF_Requested_Data_AVP
     *                 indicating value "EPC-level identities required",
     *             Service_URN_AVP
     *                 indicating value "sos*";
     *         to the EPC_PCRF_A entity
     *     }
     * }  
     * </pre>
     * @see TS 103 795-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_ECO_AAR_01(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_AfRequestedData_ServiceUrn };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_basic };
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                    },
                    {
                        mw_diameter_msg_fail
                    },
                    {0, omit},
                    "TP_RX_PCSCF_ECO_AAR_01 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCSCF_ECO_AAR_01

Bostjan Pintar's avatar
Bostjan Pintar committed
    /**
     * Starts monitor component behavior for TP_RX_PCSCF_AAR_02
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "IUT does not send AA-Request if 4XX_Response REGISTER is received."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isAttachedTo the EPC_A and
     *     the UE_A entity isNotRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when { 
     *         the IMS_P_CSCF_A entity receives an 4XX_Response_REGISTER
     *         from the IMS_S_CSCF_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity not sends the AAR
     *         to the EPC_PCRF_A entity
     *     } 
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_AAR_02(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var boolean v_noDiameterMessageExpected := true;
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        //check if nothing received
                    },
                    {
                        mw_diameter_msg_fail //Fail criteria: check if AAR is sent
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCSCF_AAR_02 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage,
                    v_noDiameterMessageExpected
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCSCF_AAR_02

    /**
     * Starts monitor component behavior for TP_RX_PCSCF_ECO_AAR_02
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT send AA-Request in case of emergency session establishment for originating side after INVITE is received."
     *
     * <pre>
     * 
     * Config Id CF_VoLTE_INT_ES
     * 
     * Initial conditions with {
     *     the UE_A entity isNotAttachedTo the EPC_A and
     *     the UE_A entity not isEmergencyRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the IMS_S_CSCF_A entity sends a 200_Response_REGISTER
     *         to the IMS_P_CSCF_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity sends an AAR containing
     *             Framed_IPv4_Address_AVP 
     *                 indicating value "IPv4_Address of UE_A",
     *             "or" Framed_IPv6_Address_AVP 
     *                 indicating value "IPv6_Address of UE_A",
     *             Service_URN_AVP
     *                 indicating value "sos*";
     *         to the EPC_PCRF_A entity
     *     }
     * }  
     * </pre>
     * @see TS 103 795-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_ECO_AAR_02(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_ServiceUrn };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_basic };
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                    },
                    {
                        mw_diameter_msg_fail
                    },
                    {0, omit},
                    "TP_RX_PCSCF_ECO_AAR_02 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCSCF_ECO_AAR_02

Bostjan Pintar's avatar
Bostjan Pintar committed
    /**
     * Starts monitor component behavior for TP_RX_PCSCF_AAR_03
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT send AA-Request in case of session establishment for originating side after INVITE is received."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isAttachedTo the EPC_A and
     *     the UE_A entity isRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the IMS_P_CSCF_A entity receives an INVITE_Request_with_SDP_offer
     *         from the UE_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity sends the AAR containing
     *             Framed_IPv4_Address_AVP 
     *                 indicating value "IPv4_Address of UE_A",
     *             "or" Framed_IPv6_Address_AVP 
     *                 indicating value "IPv6_Address of UE_A",
     *             "one or more" Media_Component_Description_AVP containing
     *                 Media_Component_Number_AVP
     *                 Media_Type_AVP
     *                 Flow_Status_AVP
     *                     indicating value DISABLED '(3)'
     *                 Max_Requested_Bandwidth_DL_AVP
     *                 RR_Bandwidth_AVP
     *                 Codec_Data_AVP
     *                 "one or more" Media_Subcomponent_Description_AVP containing
     *                     Flow_Number_AVP
     *                     Flow_Description_AVP
     *             ;
     *         ;
     *         to the EPC_PCRF_A entity
     *     } 
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_AAR_03(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false
    ) runs on ImsTestCoordinator {
        if (isvalue(p_monitorCompRef)){
            var template DIAMETER_MSG mw_diameter_msg_pass := { aAR_MSG := mw_AAR_RequestType_ServiceInfoStatus_FramedIPv4(
                                                      mw_rxRequestType(INITIAL_REQUEST_E),
                                                      mw_serviceInfoStatus(PRELIMINARY_SERVICE_INFORMATION_E),
                                                      mw_framedIPAddress(f_IPV4_Address2oct(PX_SIP_GMA_UE_IPADDR))) };
            var template DIAMETER_MSG mw_diameter_msg_fail := { aAR_MSG := mw_AAR_basic };
Bostjan Pintar's avatar
Bostjan Pintar committed
            p_monitorCompRef.start (
                f_Iot_Diameter_receive(
                    {
                        mw_diameter_msg_pass
                        mw_diameter_msg_fail
Bostjan Pintar's avatar
Bostjan Pintar committed
                    },
                    {0, omit},
                    "TP_RX_PCSCF_AAR_03 - AAR",
                    p_forward_to_mtc,
                    p_checkMessage 
                )
            );
            p_monitorCompRef.done;
        }
    } // End of function f_mtc_check_TP_RX_PCSCF_AAR_03

    /**
     * Starts monitor component behavior for TP_RX_PCSCF_AAR_04
     * @param p_monitorCompRef Reference to monitor component
     * @param p_checkMessage indicate if the incomming message should only be checked (port.check) or consumed (port.receive). 
     * The check operation allows read access to the top element of incoming port queues without removing the top element from the queue.
     * <pre>
     * Test objective  "Verify that IUT send AA-Request in case of session establishment for originating side after 180 Ringing with SDP is received."
     *
     * <pre>
     * 
     * Config Id CF_VxLTE_INT
     * 
     * Initial conditions with {
     *     the UE_A entity isAttachedTo the EPC_A and
     *     the UE_A entity isRegisteredTo the IMS_A
     * }
     * 
     * ensure that {
     *     when {
     *         the IMS_P_CSCF_A entity receives a 180_Response_INVITE_with_SDP_offer
     *         from the IMS_S_CSCF_A entity
     *     }
     *     then {
     *         the IMS_P_CSCF_A entity sends the AAR containing
     *             Framed_IPv4_Address_AVP 
     *                 indicating value "IPv4_Address of UE_A",
     *             "or" Framed_IPv6_Address_AVP 
     *                 indicating value "IPv6_Address of UE_A",
     *             "one or more" Media_Component_Description_AVP containing
     *                 Media_Component_Number_AVP
     *                 Media_Type_AVP
     *                 Flow_Status_AVP
     *                     indicating value ENABLED_DOWNLINK '(1)'
     *                 Max_Requested_Bandwidth_DL_AVP
     *                 Max_Requested_Bandwidth_UL_AVP
     *                 RR_Bandwidth_AVP
     *                 RS_Bandwidth_AVP
     *                 Codec_Data_AVP
     *                 "one or more" Media_Subcomponent_Description_AVP containing
     *                     Flow_Number_AVP
     *                     Flow_Description_AVP
     *             ;
     *         ;
     *         to the EPC_PCRF_A entity
     *     } 
     * } 
     * </pre>
     * @see TS 103 653-1 clause 7.6
     */
    function f_mtc_check_TP_RX_PCSCF_AAR_04(
        DiameterInterfaceMonitor p_monitorCompRef,
        in boolean p_checkMessage := false,
        in boolean p_forward_to_mtc := false