Commit d226d612 authored by garciay's avatar garciay
Browse files

Add support of LibCommon v1.4.0

parent 433dbf85
Loading
Loading
Loading
Loading
+313 −313

File changed.

Preview size limit exceeded, changes collapsed.

+175 −174

File changed.

Preview size limit exceeded, changes collapsed.

+52 −34
Original line number Diff line number Diff line
@@ -11,10 +11,7 @@
//    import from LibCommon_BasicTypesAndValues {type UInt8;};//LibCommon
//    import from LibCommon_Sync all ;
//    import from LibCommon_VerdictControl all ;
    import from LibCommon_Sync {
        function f_selfOrClientSyncAndVerdict;
        const c_prDone, c_tbDone, c_poDone
    };
    import from LibCommon_Sync all;
    //import from LibCommon_VerdictControl all ;

    // LibDiameter
@@ -30,6 +27,10 @@
        function 
            f_preambleDiameterBaseClient, f_preambleDiameterBaseServer
    };
    import from LibDiameter_Interface {
        type 
            DiameterComponent 
    };
    
    // DiameterS6a
    import from DiameterS6a_PIXITS {
@@ -37,10 +38,7 @@
            ipSettings, fieldValues
    }; 
    import from DiameterS6a_Templates all;
    import from DiameterS6a_TestSystem {
        type 
            TestAdapter 
    };

    import from LibDiameter_Types_S6a_AVPs all;

    group GlobalSteps {
@@ -49,7 +47,7 @@
        *  @desc    Initialize component variables 
        */
        function f_DiameterS6a_init()
        runs on TestAdapter {
        runs on DiameterComponent {
            // Initialize component variables 
            vc_sessionId := m_sessionId(PX_SESSION_ID);
            vc_originHost := m_originHost(PX_ORIGIN_HOST);
@@ -61,43 +59,57 @@
        /**
         * @desc Default altstep activated during the preambule for MME IUT role
         */
        altstep a_mme_default() runs on TestAdapter {
            [] HSS_S6a.receive(
        altstep a_mme_default() runs on DiameterComponent {
            [] DIAMP.receive(
                mw_hssUpdateLocationRequest(
                    mw_S6a_uLR_dummy
            )) { // Received an unexpected UL-Answer message, process it as an error
                log("*** a_mme_default: ERROR: Received an unexpected UL-Request message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] HSS_S6a.receive { // Received an unexpected message, process it as an error
            [] DIAMP.receive { // Received an unexpected message, process it as an error
                log("*** a_mme_default: ERROR: Received an unexpected message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] tc_ac.timeout {
            [] tc_wait.timeout {
                log("*** a_mme_default: ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                // Process temination on error
                log("*** a_mme_default() : Process temination on error ***");
                // Terminate component execution
                stop;
            }
            
        } // End of altstep a_mme_default
        
        /**
         * @desc Default altstep activated during the preambule for HSS IUT role
         */
        altstep a_hss_default() runs on TestAdapter {
            [] MME_S6a.receive(
        altstep a_hss_default() runs on DiameterComponent {
            [] DIAMP.receive(
                mw_mmeUpdateLocationAnswer(
                    mw_S6a_ULA_dummy
            )) { // Received an unexpected UL-Answer message, process it as an error
                log("*** a_hss_default: ERROR: Received an unexpected UL-Answer message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] MME_S6a.receive { // Received an unexpected message, process it as an error
            [] DIAMP.receive { // Received an unexpected message, process it as an error
                log("*** a_hss_default: ERROR: Received an unexpected message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] tc_ac.timeout {
            [] tc_wait.timeout {
                log("*** a_hss_default: ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                // Process temination on error
                log("*** a_mme_default() : Process temination on error ***");
                // Terminate component execution
                stop;
            }
            
        } // End of altstep a_hss_default
        
    } // End of group GlobalSteps
@@ -109,21 +121,24 @@
            /**
             * @desc Preamble for NAS protocol triggerring
             */
            function f_preamble_NAS() runs on TestAdapter {
//                activate( nas_default( ) );
            function f_preamble_NAS() runs on DiameterComponent {
//                activate( nas_default( ) ); TODO Add NAS-Protocol port to trigger NAS messages for MM
            }
            
            /**
             * @desc Preamble for MME IUT role
             */
            function f_preamble_MME() runs on TestAdapter {
            function f_preamble_MME() runs on DiameterComponent {
                // Connect client sync port
                f_connect4SelfOrClientSync();
                
                // Initialilize the component's variables' 
                f_DiameterS6a_init();
                
                // Activate defaults
                activate( a_mme_default( ) );
                
//                f_preambleDiameterBaseServer(c_applIdS6a); // MME ats as the server
                f_preambleDiameterBaseServer(c_applIdS6a); // MME ats as the server
            } // End of function f_preamble_MME
        
        } // End of group mmeRole
@@ -133,14 +148,17 @@
            /**
             * @desc Preamble for HSS IUT role
             */
            function f_preamble_HSS() runs on TestAdapter {
            function f_preamble_HSS() runs on DiameterComponent {
                // Connect client sync port
                f_connect4SelfOrClientSync();
                
                // Initialilize the component's variables' 
                f_DiameterS6a_init();
                
                // Activate defaults
                activate( a_hss_default( ) );
                
//                f_preambleDiameterBaseClient(c_applIdS6a); // HSS acts as the client
                f_preambleDiameterBaseClient(c_applIdS6a); // HSS acts as the client
            } // End of function f_preamble_HSS
        
        } // End of group hssRole
@@ -154,7 +172,7 @@
            /**
             * @desc Postamble for NAS protocol triggerring
             */
            function f_postamble_NAS() runs on TestAdapter {
            function f_postamble_NAS() runs on DiameterComponent {
                // Unmap NAS-Protocol port
                // Deactivate defaults
            }
@@ -162,7 +180,7 @@
            /**
             * @desc Postamble for MME IUT role
             */
            function f_postamble_MME() runs on TestAdapter {
            function f_postamble_MME() runs on DiameterComponent {
                // Deactivate defaults
                deactivate;
            } // End of function f_postamble_MME
@@ -174,7 +192,7 @@
            /**
             * @desc Postamble for HSS IUT role
             */
            function f_postamble_HSS() runs on TestAdapter {
            function f_postamble_HSS() runs on DiameterComponent {
                // Deactivate defaults
                deactivate;
            } // End of function f_postamble_HSS
@@ -197,8 +215,8 @@
         * @verdict Unchanged
         */
        function f_triggerUlrMessage ( template (value) ULR_MSG p_ulrMSG ) 
        runs on TestAdapter {
            MME_S6a.send(
        runs on DiameterComponent {
            DIAMP.send(
                DIAMETER_MSG : { uLR_MSG := p_ulrMSG } 
            );
        } // End of function f_triggerUlrMessage
@@ -209,8 +227,8 @@
         * @verdict Unchanged
         */
        function f_triggerPuerMessage ( template (value) PUER_MSG p_purMSG ) 
        runs on TestAdapter {
            MME_S6a.send(
        runs on DiameterComponent {
            DIAMP.send(
                DIAMETER_MSG : { pUER_MSG := p_purMSG } 
            );
        } // End of function f_triggerPuerMessage
@@ -221,8 +239,8 @@
         * @verdict Unchanged
         */
        function f_triggerClaMessage ( template (value) CLA_MSG p_claMSG ) 
        runs on TestAdapter {
            MME_S6a.send(
        runs on DiameterComponent {
            DIAMP.send(
                DIAMETER_MSG : { cLA_MSG := p_claMSG } 
            );
        } // End of function f_triggerClaMessage
@@ -233,8 +251,8 @@
         * @verdict Unchanged
         */
        function f_triggerAirMessage ( template (value) AIR_MSG p_airMSG ) 
        runs on TestAdapter {
            MME_S6a.send(
        runs on DiameterComponent {
            DIAMP.send(
                DIAMETER_MSG : { aIR_MSG := p_airMSG } 
            );
        } // End of function f_triggerAirMessage
+219 −216

File changed.

Preview size limit exceeded, changes collapsed.

+77 −56
Original line number Diff line number Diff line
@@ -7,33 +7,32 @@
module DiameterS6a_TestConfiguration {
    
    // LibCommom
    import from LibCommon_Sync {
        type 
            ServerSyncComp, SyncPointList; 
        function 
            f_serverWaitForAllClientsToStop, f_serverSyncClientsTimed;
        modulepar PX_TSYNC_TIME_LIMIT
    };
    import from LibCommon_Sync all;
    import from LibCommon_VerdictControl {
        type FncRetCode;
        function 
            f_setVerdict
    };
    import from LibCommon_BasicTypesAndValues { type UInt };
    
    // LibDiameter 
    import from LibDiameter_Interface {
        type 
            DiameterComponent 
    };
    
    // DiameterS6a
    import from DiameterS6a_PICS {
        modulepar PX_MME_IUT_SUPPORT_NAS_PROTOCOL
    };
    import from DiameterS6a_TestSystem {
        type TestAdapter
        type DiameterS6a 
    };
    
    /**
     * @desc f_NrofComps returns the number of test components based on the PIXIT value PX_Rxsupportt
     */
    function f_NrofComps() return integer  {
    function f_NrofComps() return UInt  {
        return 1;
    } // End of function f_NrofComps
    
@@ -44,22 +43,24 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_hss Component instance for MME IUT role
         */
        function f_cf_1S6aUp_MME (
                                  out TestAdapter p_diameterS6a_hss,
                                  out TestAdapter p_diameterS6a_eNodeB
        ) runs on ServerSyncComp  {
                                  out DiameterComponent p_diameterS6a_hss,
                                  out DiameterComponent p_diameterS6a_eNodeB
        ) runs on DiameterS6a  {
            //     Create
            p_diameterS6a_hss := TestAdapter.create;
            p_diameterS6a_eNodeB := TestAdapter.create;
            // Connect
            connect( p_diameterS6a_hss:syncPort, self:syncPort ) ;
            connect( p_diameterS6a_eNodeB:syncPort, self:syncPort ) ;
            p_diameterS6a_hss := DiameterComponent.create;
            p_diameterS6a_eNodeB := DiameterComponent.create;
            // Map port
            map( p_diameterS6a_hss:HSS_S6a, system:HSS_S6a );
            map( p_diameterS6a_hss:DIAMP, system:DIAMP );
            // Connect mtc sync port
            connect(self:syncPort, self:syncPort);
            
            if (PX_MME_IUT_SUPPORT_NAS_PROTOCOL == true) {
              // Map NAS-Protocol port
            }
            
            // Activate sync default for MTC
            activate(a_mtc_shutdown());
            
            f_setVerdict( e_success );
        } // End of funtion f_cf_1S6aUp_MME

@@ -68,14 +69,18 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_mme Component instance for HSS IUT role
         */
        function f_cf_1S6aUp_HSS (
                                  out TestAdapter v_diameterS6a_mme
        ) runs on ServerSyncComp  {
                                  out DiameterComponent v_diameterS6a_mme
        ) runs on DiameterS6a  {
            //     Create
            v_diameterS6a_mme := TestAdapter.create;
            // Connect
            connect( v_diameterS6a_mme:syncPort, self:syncPort ) ;
            v_diameterS6a_mme := DiameterComponent.create;
            // Map port
            map( v_diameterS6a_mme:MME_S6a, system:MME_S6a ); 
            map( v_diameterS6a_mme:DIAMP, system:DIAMP ); 
            // Connect mtc sync port
            connect(self:syncPort, self:syncPort);
            
            // Activate sync default for MTC
            activate(a_mtc_shutdown());
            
            f_setVerdict( e_success );
        } // End of funtion f_cf_1S6aUp_HSS

@@ -84,14 +89,18 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_mme Component instance for HSS IUT role
         */
        function f_cf_2S6aUp_HSS (
                                  out TestAdapter v_diameterS6a_mme
        ) runs on ServerSyncComp  {
                                  out DiameterComponent v_diameterS6a_mme
        ) runs on DiameterS6a  {
            //     Create
            v_diameterS6a_mme := TestAdapter.create;
            // Connect
            connect( v_diameterS6a_mme:syncPort, self:syncPort ) ;
            v_diameterS6a_mme := DiameterComponent.create;
            // Map port
            map( v_diameterS6a_mme:MME_S6a, system:MME_S6a ); 
            map( v_diameterS6a_mme:DIAMP, system:DIAMP ); 
            // Connect mtc sync port
            connect(self:syncPort, self:syncPort);
            
            // Activate sync default for MTC
            activate(a_mtc_shutdown());
            
            f_setVerdict( e_success );
        } // End of funtion f_cf_1S6aUp_HSS

@@ -104,21 +113,21 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_mme diameter component
         */
        function f_cf_1S6aDown_MME(
                                   in TestAdapter p_diameterS6a_hss,
                                   in TestAdapter p_diameterS6a_eNodeB
        ) runs on ServerSyncComp  {
            f_serverWaitForAllClientsToStop();
            
                                   in DiameterComponent p_diameterS6a_hss,
                                   in DiameterComponent p_diameterS6a_eNodeB
        ) runs on DiameterS6a  {
            if (PX_MME_IUT_SUPPORT_NAS_PROTOCOL == true) {
              // Unmap NAS-Protocol port
            } else {
                // Nothing to do
            }
            // Unmap
            unmap( p_diameterS6a_hss:HSS_S6a, system:HSS_S6a );
            // Disconnect
            disconnect( p_diameterS6a_hss:syncPort, self:syncPort );
            disconnect( p_diameterS6a_eNodeB:syncPort, self:syncPort );
            
            // Deactivte all
            deactivate;
            // Unmap all
            unmap;
            // Disconnect all
            disconnect;
        } // End of function f_cf_1S6aDown_MME

        /**
@@ -126,14 +135,14 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_mme diameter component
         */
        function f_cf_1S6aDown_HSS(
                                   in TestAdapter v_diameterS6a_mme
        ) runs on ServerSyncComp  {
            f_serverWaitForAllClientsToStop();
            
            // Unmap
            unmap( v_diameterS6a_mme:MME_S6a, system:MME_S6a );
            // Disconnect
            disconnect( v_diameterS6a_mme:syncPort, self:syncPort );
                                   in DiameterComponent v_diameterS6a_mme
        ) runs on DiameterS6a  {
            // Deactivte all
            deactivate;
            // Unmap all
            unmap;
            // Disconnect all
            disconnect;
        } // End of function f_cf_1S6aDown_HSS

        /**
@@ -141,16 +150,28 @@ module DiameterS6a_TestConfiguration {
         * @param v_diameterS6a_mme diameter component
         */
        function f_cf_2S6aDown_HSS(
                                   in TestAdapter v_diameterS6a_mme
        ) runs on ServerSyncComp  {
            f_serverWaitForAllClientsToStop();
            
            // Unmap
            unmap( v_diameterS6a_mme:MME_S6a, system:MME_S6a );
            // Disconnect
            disconnect( v_diameterS6a_mme:syncPort, self:syncPort );
                                   in DiameterComponent v_diameterS6a_mme
        ) runs on DiameterS6a  {
            // Deactivte all
            deactivate;
            // Unmap all
            unmap;
            // Disconnect all
            disconnect;
        } // End of function f_cf_1S6aDown_HSS

    } // End of group cfDown

    group shutDownAltsteps {
        
        altstep a_mtc_shutdown() 
        runs on SelfSyncComp {
          []  syncSendPort.receive(m_syncServerStop){
              tc_sync.stop ;
              log("**** a_mtc_shutdown: MTC component received STOP signal **** ");
            }
        }
    
    } // end group shutDownAltsteps
    
} // End of module DiameterS6a_TestConfiguration
 No newline at end of file
Loading