/******************************************************************************/
// @copyright   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.
//   (c) 2023, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
//   All rights reserved.
// @version: IWD_23wk37
// $Date: 2019-05-29 17:47:16 +0200 (Wed, 29 May 2019) $
// $Rev: 24710 $
/******************************************************************************/

module NasEmu5G_AspTypes_NR {
  import from NR_CommonDefs all;

  group System_Interface {

  //****************************************************************************
  // ASP Type Definitions:
  //****************************************************************************

  type record NR_RRC_PDU_REQ {
    NR_ReqAspCommonPart_Type    Common, /* CellId : identifier of the cell
                                         * RoutingInfo : SRB0, SRB1, SRB2
                                         * RlcBearerRouting : TTCN provides the id of the cell in which the SS shall send the data out to the UE (for non-split bearers in general same as CellId)
                                         * TimingInfo : Now in normal cases;
                                         *   For latency tests TimingInfo can be set to the SFN/subframe in which the RRC messages shall be sent out
                                         *   NOTE 1: if the RRC PDU is too long to be sent in one TTI the TimingInfo corresponds to the first TTI
                                         *   NOTE 2: the TimingInfo is not changed by the NAS Emu (i.e. the timing info as coming from the test case (SRB_COMMON_REQ) is handed through by the NAS Emu)
                                         * ControlInfo
                                         *   CnfFlag:=false;
                                         *   FollowOnFlag
                                         *     true: Indicates that the message(s) to be sent on the same TTI will follow
                                         *           NOTE 1: If the TimingInfo is not the same for messages to be sent on the same TTI, the SS shall produce an error
                                         *           NOTE 2: the follow on flag applies only for messages of the same SRB
                                         *     false: Indicates that no more message(s) will follow */
    NR_RRC_MSG_Request_Type     RrcPdu
  };
  type record NR_RRC_PDU_IND {          /* common ASP to receive PDUs from SRB0, SRB1 or SRB2 */
    NR_IndAspCommonPart_Type    Common, /* CellId : identifier of the cell
                                         * RoutingInfo : SRB0, SRB1, SRB2
                                         * RlcBearerRouting : The SS shall provide the id of the cell in which the data has been sent from the UE
                                         * TimingInfo : time when message has been received (frame and sub-frame number); this is handed through to the test case by the NAS emulation
                                         *   NOTE: normally an RRC PDU is expected in one TTI; nevertheless if it is spread over more than one TTIs TimingInfo shall refer to the end of the PDU i.e. to the last RLC PDU being received;
                                         * Status : OK or RRC integrity error */
    NR_RRC_MSG_Indication_Type  RrcPdu
  };

  //****************************************************************************
  // Port definitions
  //****************************************************************************

  type port NASEMU_NR_SYSTEM_PORT message {         /* NASEMU PTC: Port for Sending/Receiving data to/from the SYSTEM Interface */
    out NR_RRC_PDU_REQ;
    in  NR_RRC_PDU_IND;
  };

  } // End group System_Interface
}
