/**
 *    @author   ETSI / STF
 *    @version  $URL:$
 *              $Id:$
 *    @desc     This module provides the types used by the test component for NGAP tests.
 *    @copyright   ETSI Copyright Notification
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
 *    @see      ETSI TS  / 3GPP TS 
 */
module LibNGAP_Interface {

    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_Time all;

    // LibNGAP
    import from NGAP_IEs language "ASN.1:1997" all;
    import from NGAP_PDU_Descriptions language "ASN.1:1997" all;
    import from LibNGAP_Pixits all;

    group portDefinitions {

        /**
         * @desc NGAP protocol port
         */
        type port NGAPPort message {
            inout NGAP_PDU
        } // End of type NGAPPort

    } // End of group portDefinitions 

    group interfacePorts {
         type component NGAPComponent extends SelfSyncComp {
            // Port
            port NGAPPort N2_gNBaMF_P;

            // Global variables

            var boolean vc_serverStop:=false; 

            // test adapter params
            var charstring vc_ETS_address   := "";      //defined in init
            var charstring vc_ETS_address2  := "";      //defined in init
            var integer vc_ETS_port         := 3868;    //defined in init
            var integer vc_ETS_port2        := 3869;    //defined in init
            var charstring vc_SUT_address   := "";      //defined in init
            var integer vc_SUT_port         := 3868;    //defined in init


            var NGAP_PDU vc_sendNGAP_PDU ;
            var NGAP_PDU vc_recvNGAP_PDU ;
            var NGAP_PDU vc_recvNGAP_PDUDefault ; //global variable defined to save Dimeter message received within default altstep

            // Init of values at component started
            // Note: generation of following MME and ENB UE IDs can be done randomly in init
            //var AMF_UE_NGAP_ID vc_AMF_UE_ID         := 10;
            //var GNB_UE_NGAP_ID vc_gNB_UE_ID         := 11;

            // General timers
            timer tc_wait  := PX_NGAP_TWAIT;
            timer tc_noac  := PX_TNOAC;
            timer tc_delay := 0.3;  // delay next Request
                                    // FSCOM: TTCN-3 timer are in seconds (ETSI ES 201 873-1 V4.16.1 (2024-10) Clause 12 Declaring timers)

            // Variables for storing default references
            var default     vc_default_ngap;
            var default     vc_def_catchSyncStop_ngap;

        } // End of type component NGAPComponent


    } // End of group interfacePorts 

} // End of module LibNGAP_Interface

