Commit 5e9014d9 authored by Yann Garcia's avatar Yann Garcia
Browse files

Generate docs on functions and altsteps

parent 44e424ca
Loading
Loading
Loading
Loading
+272 −64

File changed.

Preview size limit exceeded, changes collapsed.

+325 −84

File changed.

Preview size limit exceeded, changes collapsed.

+77 −34
Changes for ttcn/LibNGAP/lib_system/LibNGAP_Steps.ttcn: 77 added lines, 34 removed lines.
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ module LibNGAP_Steps {
    group receivePDU {

        /**
         *  @desc    This is a test step that assign common NGAP
         *  @param   p_PDU Extract the message payload from the NGAP PDU
         * @brief  Store a received NGAP PDU in vc_recvNGAP_PDU.
         * @param  p_PDU The received NGAP PDU.
         */
        function f_NGAPPDU_Get(
                               inout NGAP_PDU p_PDU
@@ -63,8 +63,12 @@ module LibNGAP_Steps {
        } // End of function f_NGAPPDU_Get

        /**
         * @desc Receive NGAP PDU from protocol port
         * @param p_PDU template of the message to be received
         * @brief  Await an NGAP PDU matching p_PDU on N2_gNBaMF_P.
         * @details Waits up to tc_wait (PX_NGAP_TWAIT); the received PDU is stored in vc_recvNGAP_PDU
         *          (f_NGAPPDU_Get). Any other PDU received meanwhile is handled by the active defaults
         *          (a_defaultNGAP). On timeout, sets the verdict to inconc and stops the component
         *          (f_componentStop).
         * @param  p_PDU Template of the PDU to receive.
         */
        function f_recv_NGAP_PDU(
                                 in template NGAP_PDU p_PDU
@@ -90,8 +94,9 @@ module LibNGAP_Steps {
        } // End of function f_recv_NGAP_PDU

        /**
         * @desc Receive NGAP PDU with InitiatingMessage payload from protocol port
         * @param p_initiatingMessage Receive template for InitiatingMessage message
         * @brief  Await an NGAP PDU carrying an initiating message.
         * @param  p_initiatingMessage Template of the initiating message; any by default.
         * @see    f_recv_NGAP_PDU
         */
        function f_recv_NGAP_initiatingMessage(
                                               template (present) InitiatingMessage p_initiatingMessage := ?
@@ -100,8 +105,9 @@ module LibNGAP_Steps {
        } // End of function f_recv_NGAP_initiatingMessage

        /**
         * @desc Receive NGAP PDU with SuccessfulOutcome payload from protocol port
         * @param p_successfulOutcome Receive template for SuccessfulOutcome message
         * @brief  Await an NGAP PDU carrying a successful outcome.
         * @param  p_successfulOutcome Template of the successful outcome; any by default.
         * @see    f_recv_NGAP_PDU
         */
        function f_recv_NGAP_successfulOutcome(
                                               template (present) SuccessfulOutcome p_successfulOutcome := ?
@@ -110,8 +116,9 @@ module LibNGAP_Steps {
        } // End of f_recv_NGAP_successfulOutcome

        /**
         * @desc Receive NGAP PDU with UnsuccessfulOutcome payload from protocol port
         * @param p_unsuccessfulOutcome Receive template for UnsuccessfulOutcome message
         * @brief  Await an NGAP PDU carrying an unsuccessful outcome.
         * @param  p_unsuccessfulOutcome Template of the unsuccessful outcome; any by default.
         * @see    f_recv_NGAP_PDU
         */
        function f_recv_NGAP_unsuccessfulOutcome(
                                                 template (present) UnsuccessfulOutcome p_unsuccessfulOutcome := ?
@@ -128,8 +135,8 @@ module LibNGAP_Steps {
    group sendPDU {

        /**
         *  @desc    This is a test step that assign common NGAP
         *  @param p_PDU The NGAP protocol message to set up
         * @brief  Store the NGAP PDU about to be sent in vc_sendNGAP_PDU.
         * @param  p_PDU The NGAP PDU to send.
         */
        function f_NGAPPDU_Set(
                               inout template (value) NGAP_PDU p_PDU
@@ -148,8 +155,9 @@ module LibNGAP_Steps {
        } // End of function f_NGAPPDU_Set

        /**
         * @desc Send NGAP PDU to protocol port
         * @param p_PDU template value message to be send
         * @brief  Send an NGAP PDU on N2_gNBaMF_P.
         * @details The PDU is logged and stored in vc_sendNGAP_PDU (f_NGAPPDU_Set) before being sent.
         * @param  p_PDU The NGAP PDU to send.
         */
        function f_send_NGAP_PDU(
                                 in template (value) NGAP_PDU p_PDU
@@ -184,8 +192,10 @@ module LibNGAP_Steps {
        } // End of function f_send_NGAPPDU

        /**
         * @desc Send NGAP PDU with InitiatingMessage payload from protocol port
         * @param p_initiatingMessage Send value template for InitiatingMessage message
         * @brief  Send an NGAP PDU carrying an initiating message.
         * @param  p_initiatingMessage The initiating message.
         * @param  p_criticality Unused.
         * @see    f_send_NGAP_PDU
         */
        function f_send_NGAP_initiatingMessage(
                                               in template (value) InitiatingMessage p_initiatingMessage,
@@ -195,8 +205,9 @@ module LibNGAP_Steps {
        } // End of function f_send_NGAP_initiatingMessage

        /**
         * @desc Send NGAP PDU with SuccessfulOutcome payload from protocol port
         * @param p_successfulOutcome Send value template for SuccessfulOutcome message
         * @brief  Send an NGAP PDU carrying a successful outcome.
         * @param  p_successfulOutcome The successful outcome.
         * @see    f_send_NGAP_PDU
         */
        function f_send_NGAP_successfulOutcome(
                                               in template (value) SuccessfulOutcome p_successfulOutcome
@@ -205,8 +216,9 @@ module LibNGAP_Steps {
        } // End of function f_send_NGAP_successfulOutcome

        /**
         * @desc Send NGAP PDU with UnsuccessfulOutcome payload from protocol port
         * @param p_unsuccessfulOutcome Send value template for UnsuccessfulOutcome message
         * @brief  Send an NGAP PDU carrying an unsuccessful outcome.
         * @param  p_unsuccessfulOutcome The unsuccessful outcome.
         * @see    f_send_NGAP_PDU
         */
        function f_send_NGAP_unsuccessfulOutcome(
                                                 in template (value) UnsuccessfulOutcome p_unsuccessfulOutcome
@@ -231,8 +243,8 @@ module LibNGAP_Steps {
        group preamble_NGAP{

            /**
             * @desc 
             * @verdict 
             * @brief  Common preamble when the SUT is the core network side.
             * @note   Empty: nothing to do.
             */
            function f_preambleNGAP_MME()
            runs on NGNASComponent {
@@ -240,8 +252,8 @@ module LibNGAP_Steps {
            } // End of function f_preambleNGAP_MME

            /**
             * @desc 
             * @verdict 
             * @brief  Common preamble when the SUT is the radio side.
             * @note   Empty: nothing to do.
             */
            function f_preambleNGAP_eNB()
            runs on NGNASComponent {
@@ -257,8 +269,11 @@ module LibNGAP_Steps {
        group postamble_NGAP{

            /**
             * @desc 
             * @verdict 
             * @brief  Release the UE context when the SUT is a gNB, the test system playing the AMF.
             * @details In offline mode (PICS_OFFLINE_MODE), awaits the UE CONTEXT RELEASE COMMAND and the UE
             *          CONTEXT RELEASE COMPLETE read from the capture. Otherwise sends a UE CONTEXT RELEASE
             *          COMMAND and awaits the UE CONTEXT RELEASE COMPLETE of the gNB.
             * @param  p_Cause The cause of the release.
             */
            function f_postambleNGAP_gNB(
                                         in template (value) Cause p_Cause
@@ -271,8 +286,13 @@ module LibNGAP_Steps {
            } // End of function f_postambleNGAP_gNB

            /**
             * @desc 
             * @verdict 
             * @brief  Release the UE context when the SUT is an AMF, the test system playing the gNB.
             * @details Only when an INITIAL CONTEXT SETUP REQUEST was received (vc_initialContextSetupRequest
             *          bound). In offline mode, awaits the UE CONTEXT RELEASE REQUEST and its answer read from
             *          the capture: UE CONTEXT RELEASE REQUEST, UE CONTEXT RELEASE COMMAND and UE CONTEXT
             *          RELEASE COMPLETE. Otherwise sends a UE CONTEXT RELEASE REQUEST, awaits the UE CONTEXT
             *          RELEASE COMMAND and answers with the UE CONTEXT RELEASE COMPLETE.
             * @param  p_Cause The cause of the release.
             */
            function f_postambleNGAP_AMF(
                                         in template (value) Cause p_Cause
@@ -296,7 +316,8 @@ module LibNGAP_Steps {
    group globalSteps {

        /**
         *  @desc    This is a test step that init NGAP component
         * @brief  Common initialisation of an NGAP test component.
         * @note   Empty: nothing to do.
         */
        function f_NGAP_Init_Component()
        runs on NGNASComponent {
@@ -304,7 +325,7 @@ module LibNGAP_Steps {
        } // End of function  f_NGAP_Init_Component

        /**
         * @desc Component termination
         * @brief  Terminate the test component at once: deactivate the defaults and stop.
         */
        function f_NGAP_terminate_component()
        runs on NGNASComponent {
@@ -315,7 +336,8 @@ module LibNGAP_Steps {
        } // End of function f_NGAP_terminate_component

        /**
         * @desc Component termination
         * @brief  Ask the synchronisation server (MTC) to stop the test case, then stop the component.
         * @details Sends m_syncClientStop on syncPort and clears N2_gNBaMF_P before stopping.
         */
        function f_componentStop()
        runs on NGNASComponent {
@@ -326,7 +348,8 @@ module LibNGAP_Steps {
        } // End of function f_componentStop

        /**
         * @desc Original copied from older LibCommon_VerdictControl
         * @brief  Convert the current verdict into a function return code.
         * @return e_success if the verdict is pass or none, e_error otherwise.
         */
        function f_getVerdict() // FIXME Are you sure we really need it???
        return FncRetCode {
@@ -346,8 +369,18 @@ module LibNGAP_Steps {
    group defaultsTestStep {

        /**
         * @desc 
         * @verdict 
         * @brief  Default altstep of the NGAP test components.
         * @details - Any timer timeout: sets the verdict to error through the synchronisation server, or
         *            stops the component once the server has stopped.
         *          - ERROR INDICATION for the current UE: verdict inconc, then ends the test case.
         *          - NG RESET (radio network cause, part of the NG interface): verdict inconc, answers with
         *            an NG RESET ACKNOWLEDGE, then ends the test case.
         *          - Any other NGAP initiating message, successful or unsuccessful outcome: discarded, and
         *            the interrupted alt is re-evaluated (repeat).
         *            Hence a message the test is waiting for, but that does not match its template, is
         *            silently lost here.
         *          - Anything else on N2_gNBaMF_P: verdict error, or ends the test case.
         *          - Shutdown request from the synchronisation server (a_shutdown): stops the component.
         */
        altstep a_defaultNGAP()
        runs on NGNASComponent {
@@ -432,6 +465,11 @@ module LibNGAP_Steps {
            }
        } // End of altstep a_defaultNGAP

        /**
         * @brief  Minimal default altstep: handles timer timeouts only.
         * @details Any timer timeout sets the verdict to error through the synchronisation server, or stops
         *          the component once the server has stopped. Other messages are not filtered.
         */
        altstep a_defaultNGAP_MME()
        runs on NGNASComponent {
            [] any timer.timeout {
@@ -446,6 +484,11 @@ module LibNGAP_Steps {
            // Note: possible unscollicited messages should be filtered
        } // End of altstep a_defaultNGAP_MME

        /**
         * @brief  Minimal default altstep: handles timer timeouts only.
         * @details Any timer timeout sets the verdict to error through the synchronisation server, or stops
         *          the component once the server has stopped. Other messages are not filtered.
         */
        altstep a_defaultNGAP_eNB()
        runs on NGNASComponent {
            [] any timer.timeout {