LibS1AP_Templates.ttcn 15.2 KB
Newer Older
garciay's avatar
garciay committed
 *    @author   ETSI / STF519
 *    @version  $URL:$
 *              $Id:$
 *    @desc     This module provides Lib S1AP Templates used by the test component for S1AP 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 136 413 / 3GPP TS 36.413 version 13.4.0 Release 13
garciay's avatar
garciay committed
module LibS1AP_Templates {
garciay's avatar
garciay committed
    // LibS1AP
    import from S1AP_Constants language "ASN.1:1997" all;
    import from S1AP_CommonDataTypes language "ASN.1:1997" all;
    // import from S1AP_Containers language "ASN.1:1997" all;
    import from S1AP_IEs language "ASN.1:1997" all;
    import from S1AP_PDU_Contents language "ASN.1:1997" all;
    import from S1AP_PDU_Descriptions language "ASN.1:1997" all;
garciay's avatar
garciay committed
    import from LibS1AP_TypesAndValues all;
pintar's avatar
pintar committed
    import from LibS1AP_Interface all;
garciay's avatar
garciay committed
    
    group g_S1AP {
        
        group  g_S1AP_PDU {
            
            /**
garciay's avatar
garciay committed
             * @desc Send template for S1AP PDU with InitiatingMessage payload
             * @param p_procedureCode   Procedure code
             * @param p_value           Message value according to the Procedure code
             * @see ETSI TS 136 413 Clause 9.1 Message Functional Definition and Content
garciay's avatar
garciay committed
             */
            template (value) S1AP_PDU m_initiatingMessage(
                                                          in ProcedureCode p_procedureCode, 
                                                          in anytype p_value
            ):= {
                initiatingMessage := {
                    procedureCode := p_procedureCode,
                    criticality := reject,
                    value_ := p_value
                }
            } // End of template m_initiatingMessage
            
        } // End of group g_S1AP_PDU
        
garciay's avatar
garciay committed
        group class1 {
garciay's avatar
garciay committed
            
garciay's avatar
garciay committed
            group sendClass1 {
garciay's avatar
garciay committed
                
                group HandoverPreparation {
                    
                    group initiatingMessage {
                    } // End of group initiatingMessage
                    
                    group successfulOutcome {
                    } // End of group successfulOutcome
                    
                    group unsuccessfulOutcome {
                    } // End of group unsuccessfulOutcome
                    
                } // End of group HandoverPreparation
                
                group HandoverResourceAllocation {
                    
                }// End of group HandoverResourceAllocation
                
                group ERABSetup{
                    
garciay's avatar
garciay committed
                    /**
                     * @desc Send template for InitiatingMessage message with E-RABSetup payload
                     * @param p_value           Expected procedure code
                     */
pintar's avatar
pintar committed
                    template (value) InitiatingMessage m_E_RABSetupRequest(
                                                                          in template (value) RecordOf_ProtocolIE p_value) := {
garciay's avatar
garciay committed
                        procedureCode := id_E_RABSetup,
                        criticality := reject,
                        value_ := {RecordOf_ProtocolIE := valueof(p_value)}
pintar's avatar
pintar committed
                    } // End of template m_E_RABSetupRequest
                    
                    template (value) RecordOf_ProtocolIE m_E_RABSetupReqIEs(
                            in template (value) MME_UE_S1AP_ID p_MME_value,
                            in template (value) ENB_UE_S1AP_ID p_ENB_value,
                            in template (value) RecordOf_E_RABToBeSetupItemBearerSUReq p_RecordOf_E_RABToBeSetupItem_value) := {
                        m_MME_UE_S1AP_ID(p_MME_value),
                        m_ENB_UE_S1AP_ID(p_ENB_value),
                        m_E_RABToBeSetupList(p_RecordOf_E_RABToBeSetupItem_value)
                    } // End of template m_E_RABSetupReqIEs
garciay's avatar
garciay committed
                    
                }// End of group ERABSetup
                
                //TODO: Other....
garciay's avatar
garciay committed
                
            } // End of group sendClass1 
garciay's avatar
garciay committed
            
garciay's avatar
garciay committed
            group receiveClass1 {
                
garciay's avatar
garciay committed
                group HandoverPreparation{
garciay's avatar
garciay committed
                    
garciay's avatar
garciay committed
                }// End of group HandoverPreparation
garciay's avatar
garciay committed
                    
garciay's avatar
garciay committed
                group HandoverResourceAllocation{
garciay's avatar
garciay committed
                    
garciay's avatar
garciay committed
                }// End of group HandoverResourceAllocation
                
                group ERABSetup{
                    
                    /**
garciay's avatar
garciay committed
                     * @desc Receive template for SuccessfulOutcome message
                     * @param p_procedureCode   Expected procedure code. Default: ?
                     * @param p_value           Expected procedure code. Default: ?
garciay's avatar
garciay committed
                     */
pintar's avatar
pintar committed
                    template (present) SuccessfulOutcome mw_E_RABSetupResponse(
                                                                             template (present) RecordOf_ProtocolIE p_value := ?
garciay's avatar
garciay committed
                    ) := {
pintar's avatar
pintar committed
                        procedureCode := id_E_RABSetup,
garciay's avatar
garciay committed
                        criticality := reject,
                        value_ := {RecordOf_ProtocolIE := p_value}
pintar's avatar
pintar committed
                    } // End of template mw_E_RABSetupResponse
                    
                    template (present) RecordOf_ProtocolIE mw_E_RABSetupResIEs(
                            template (present) MME_UE_S1AP_ID p_MME_value,
                            template (present) ENB_UE_S1AP_ID p_ENB_value,
                            template (present) RecordOf_E_RABSetupItemBearerSURes p_RecordOf_E_RABSetupItem_value) := {
                        mw_MME_UE_S1AP_ID(p_MME_value, ignore),
                        mw_ENB_UE_S1AP_ID(p_ENB_value, ignore),
                        mw_E_RABSetupList(p_RecordOf_E_RABSetupItem_value)
                    } // End of template mw_E_RABSetupResIEs
                    
                    template (present) RecordOf_ProtocolIE mw_E_RABSetupResIEs_FailedToSetupList(
                            template (present) MME_UE_S1AP_ID p_MME_value,
                            template (present) ENB_UE_S1AP_ID p_ENB_value,
                            template (present) RecordOf_E_RABSetupItemBearerSURes p_RecordOf_E_RABSetupItem_value,
                            template (present) RecordOf_E_RABItem p_E_RABItem_value := ?) := {
                        mw_MME_UE_S1AP_ID(p_MME_value, ignore),
                        mw_ENB_UE_S1AP_ID(p_ENB_value, ignore),
                        mw_E_RABSetupList(p_RecordOf_E_RABSetupItem_value),
                        mw_E_RABFailedToSetupList(p_E_RABItem_value)
                    } // End of template mw_E_RABSetupResIEs
garciay's avatar
garciay committed
                    
                } // End of group ERABSetup
                
                //TODO: Other....
            
garciay's avatar
garciay committed
            } // End of group receiveClass1
garciay's avatar
garciay committed
            
garciay's avatar
garciay committed
        } // End of group class1
garciay's avatar
garciay committed
        
        group Class2{
            
        } //End of group Class2
        
    } // End of group g_S1AP
    
    group S1AP_Protocol_IEs {
        
        group Send_IEs {
            
            group E_RAB_IEsend {
                
                /**
garciay's avatar
garciay committed
                 * @desc Send template for MME UE S1AP ID protocol IE
                 * @param p_value  MME/UE S1AP identifier. Default: 1
                 * @see ETSI TS 136 413 Clause 9.2.3.3 MME UE S1AP ID
garciay's avatar
garciay committed
                 */
pintar's avatar
pintar committed
                template (value) ProtocolIE m_MME_UE_S1AP_ID(
                                                           in template (value) MME_UE_S1AP_ID p_value := 1,
                                                           in template (value) ProtocolIE.criticality p_criticality := reject
garciay's avatar
garciay committed
                ):= {
                    id := S1AP_Constants.id_MME_UE_S1AP_ID,
pintar's avatar
pintar committed
                    criticality := p_criticality,
garciay's avatar
garciay committed
                    value_ := { MME_UE_S1AP_ID := valueof(p_value) }
pintar's avatar
pintar committed
                } // End of template m_MME_UE_S1AP_ID
garciay's avatar
garciay committed
                
                /**
garciay's avatar
garciay committed
                 * @desc Send template for ENB ID protocol IE
                 * @param p_value  ENB identifier. Default: 1
                 * @see ETSI TS 136 413 Clause 9.2.3.4 eNB UE S1AP ID
garciay's avatar
garciay committed
                 */
pintar's avatar
pintar committed
                template (value) ProtocolIE m_ENB_UE_S1AP_ID(
                                                           in ENB_UE_S1AP_ID p_value := 1,
                                                           in template (value) ProtocolIE.criticality p_criticality := reject
garciay's avatar
garciay committed
                ):= {
                    id := S1AP_Constants.id_eNB_UE_S1AP_ID,
pintar's avatar
pintar committed
                    criticality := p_criticality,
garciay's avatar
garciay committed
                    value_ := { ENB_UE_S1AP_ID := p_value }
pintar's avatar
pintar committed
                } // End of template m_ENB_UE_S1AP_ID
garciay's avatar
garciay committed
                
                /**
garciay's avatar
garciay committed
                 * @desc Send template for E-RABToBeSetupListBearerSUReq protocol IE
                 * @param p_value  Protocol IE value. Default: m_E_RABToBeSetupItemBearerSUReq
garciay's avatar
garciay committed
                 */
pintar's avatar
pintar committed
                template (value) ProtocolIE m_E_RABToBeSetupList(
garciay's avatar
garciay committed
                                                            in template (value) RecordOf_E_RABToBeSetupItemBearerSUReq p_value := { m_E_RABToBeSetupItemBearerSUReq }
                ):= {
                    id := S1AP_Constants.id_E_RABToBeSetupListBearerSUReq,
                    criticality := reject,
                    value_ := { RecordOf_E_RABToBeSetupItemBearerSUReq := valueof(p_value) }
pintar's avatar
pintar committed
                } // End of template m_E_RABToBeSetupList
garciay's avatar
garciay committed
                
            } // End of group E_RAB_IEsend
            
        } // End of group Send_IEs
        
        group Receive_IEs{
            
            /**
garciay's avatar
garciay committed
             * @desc Receive template for MME UE S1AP ID protocol IE
             * @param p_value  Expected MME/UE S1AP identifier. Default: ?
             * @see ETSI TS 136 413 Clause 9.2.3.3 MME UE S1AP ID
garciay's avatar
garciay committed
             */
pintar's avatar
pintar committed
            template (present) ProtocolIE mw_MME_UE_S1AP_ID(
                                                          template (present) MME_UE_S1AP_ID p_parm := ?,
                                                          template (present) ProtocolIE.criticality p_criticality := reject
garciay's avatar
garciay committed
            ) := {
                id := S1AP_Constants.id_MME_UE_S1AP_ID,
pintar's avatar
pintar committed
                criticality := p_criticality,
garciay's avatar
garciay committed
                value_ := {MME_UE_S1AP_ID := p_parm}
pintar's avatar
pintar committed
            } // End of template mw_MME_UE_S1AP_ID
garciay's avatar
garciay committed
            
            /**
garciay's avatar
garciay committed
             * @desc Receive template for ENB ID protocol IE
             * @param p_value  Expected ENB identifier. Default: ?
             * @see ETSI TS 136 413 Clause 9.2.3.4 eNB UE S1AP ID
garciay's avatar
garciay committed
             */
pintar's avatar
pintar committed
            template (present) ProtocolIE mw_ENB_UE_S1AP_ID(
                                                          template (present) ENB_UE_S1AP_ID p_parm := ?,
                                                          template (present) ProtocolIE.criticality p_criticality := reject
garciay's avatar
garciay committed
            ) := {
                id := S1AP_Constants.id_eNB_UE_S1AP_ID,
pintar's avatar
pintar committed
                criticality := p_criticality,
garciay's avatar
garciay committed
                value_ := {ENB_UE_S1AP_ID := p_parm}
pintar's avatar
pintar committed
            } // End of template mw_ENB_UE_S1AP_ID
garciay's avatar
garciay committed
            
            /**
pintar's avatar
pintar committed
             * @desc Receive template for E-RABSetupListBearerSUReq protocol IE
garciay's avatar
garciay committed
             * @param p_value  Expected protocol IE value. Default: m_E_RABToBeSetupItemBearerSUReq
garciay's avatar
garciay committed
             */
pintar's avatar
pintar committed
            template (present) ProtocolIE mw_E_RABSetupList(
garciay's avatar
garciay committed
                                                           template (present) RecordOf_E_RABSetupItemBearerSURes p_value := { mw_E_RABSetupItemBearerSURes }
            ):= {
                id := S1AP_Constants.id_E_RABSetupListBearerSURes,
                criticality := ignore,
                value_ := { RecordOf_E_RABSetupItemBearerSURes := p_value }
            } // End of template 
            
pintar's avatar
pintar committed
            template (present) ProtocolIE mw_E_RABFailedToSetupList(
                                                           template (present) RecordOf_E_RABItem p_value := { ? }
garciay's avatar
garciay committed
            ):= {
                id := S1AP_Constants.id_E_RABFailedToSetupListBearerSURes,
                criticality := ignore,
                value_ := { RecordOf_E_RABItem := p_value }
pintar's avatar
pintar committed
            } // End of template mw_E_RABFailedToSetupList
garciay's avatar
garciay committed
            
        } // End of group Receive_IEs
        
        group g_IEParameters {
garciay's avatar
garciay committed
            
            /**
             * @desc 
             */
            template(value) E_RABToBeSetupItemBearerSUReq m_E_RABToBeSetupItemBearerSUReq(
                                                                                          in E_RAB_ID p_e_RAB_ID := 0,
                                                                                          in template (value) E_RABLevelQoSParameters p_e_RABlevelQoSParameters := m_e_RABlevelQoSParameters
            ) := {
                e_RAB_ID := p_e_RAB_ID,
                e_RABlevelQoSParameters := valueof(p_e_RABlevelQoSParameters),
                transportLayerAddress := '0'B,
                gTP_TEID := '00000000'O,
                nAS_PDU := '0000'O,
                iE_Extensions := omit
            } // End of template m_E_RABToBeSetupItemBearerSUReq
            
            /**
             * @desc 
             * @param p_qCI
             */
            template (value) E_RABLevelQoSParameters m_e_RABlevelQoSParameters(
                                                                               in QCI p_qCI := 0
            ):= {
                qCI := p_qCI,
                allocationRetentionPriority := {
                    priorityLevel := 0,
                    pre_emptionCapability := shall_not_trigger_pre_emption,
                    pre_emptionVulnerability := pre_emptable,
                    iE_Extensions := omit
                },
                gbrQosInformation := omit,
                iE_Extensions := omit
            } // End of template m_e_RABlevelQoSParameters
            
            /**
             * @desc 
             * @param p_e_RAB_ID
             * @param p_cause
             */
            template (present) E_RABSetupItemBearerSURes mw_E_RABSetupItemBearerSURes(
                                                                                      template(present) E_RAB_ID p_e_RAB_ID := ?
            ):=  {
                 e_RAB_ID                        := p_e_RAB_ID,
                 transportLayerAddress           := '?'B,
                 gTP_TEID                        := ?,
                 iE_Extensions                   := *
            } // End of template mw_E_RABSetupItemBearerSURes
            
            /**
             * @desc 
             */
            template (present) E_RABItem mw_E_RABItem(
                                                      template (present) E_RAB_ID p_e_RAB_ID := ?,
                                                      template (present) Cause p_cause := ?
            ) := {
                e_RAB_ID := p_e_RAB_ID,cause := p_cause,iE_Extensions := *
            } // End of template mw_E_RABItem
            
        } // End of group g_IEParameters
        
    } // End of group S1AP_Protocol_IEs
garciay's avatar
garciay committed
    /** 
     * @desc Type functions 
     */
    group functionsForTemplates {
        
    } // End of group functionsForTemplates
    
} // End of module LibS1AP_Templates