laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41082?usp=email )

Change subject: s1ap/S1AP_Templates.ttcn: Add templates to handle CS Fallback 
related procedures
......................................................................

s1ap/S1AP_Templates.ttcn: Add templates to handle CS Fallback related procedures

These will be used to test MT CS call over SGsAP in MME_Tests_SGsAP.

Change-Id: I87fa7d988bec90ccade2f40ac4d2a0924059058e
---
M library/s1ap/S1AP_Templates.ttcn
1 file changed, 95 insertions(+), 3 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/library/s1ap/S1AP_Templates.ttcn b/library/s1ap/S1AP_Templates.ttcn
index 031ac59..3f9b1f8 100644
--- a/library/s1ap/S1AP_Templates.ttcn
+++ b/library/s1ap/S1AP_Templates.ttcn
@@ -17,6 +17,8 @@
 import from S1AP_PDU_Contents all;
 import from S1AP_PDU_Descriptions all;

+import from General_Types all;
+
 
/*********************************************************************************
  * non-UE related
  
*********************************************************************************/
@@ -991,14 +993,88 @@
 }

 /* 9.1.4.8 UE CONTEXT MODIFICATION REQUEST */
+private function f_tr_S1AP_UeContextModificationReq(template (present) 
MME_UE_S1AP_ID mme_id := ?,
+                                                   template (present) 
ENB_UE_S1AP_ID enb_id := ?,
+                                                   template 
CSFallbackIndicator csfb_ind := *,
+                                                   template LAI registered_lai 
:= *,
+                                                   template 
AdditionalCSFallbackIndicator add_csfb_ind := *)
+return template UEContextModificationRequest
+{
+       var template UEContextModificationRequest req := {
+               protocolIEs := {
+                       {
+                               id := S1AP_Constants.id_MME_UE_S1AP_ID,
+                               criticality := reject,
+                               value_ := {MME_UE_S1AP_ID := mme_id}
+                       }, {
+                               id := S1AP_Constants.id_eNB_UE_S1AP_ID,
+                               criticality := reject,
+                               value_ := {ENB_UE_S1AP_ID := enb_id}
+                       }
+               }
+       };
+       var integer idx := lengthof(req.protocolIEs);
+
+       if (ispresent(csfb_ind)) {
+               req.protocolIEs[idx] := {
+                       id := id_CSFallbackIndicator,
+                       criticality := reject,
+                       value_ := { CSFallbackIndicator := csfb_ind }
+                       };
+               idx := idx + 1;
+       }
+
+       if (ispresent(registered_lai)) {
+               req.protocolIEs[idx] := {
+                       id := id_RegisteredLAI,
+                       criticality := ignore,
+                       value_ := { LAI := registered_lai }
+                       };
+               idx := idx + 1;
+       }
+
+       if (ispresent(add_csfb_ind)) {
+               req.protocolIEs[idx] := {
+                       id := id_AdditionalCSFallbackIndicator,
+                       criticality := ignore,
+                       value_ := { AdditionalCSFallbackIndicator := 
add_csfb_ind }
+                       };
+               idx := idx + 1;
+       }
+
+       /* ignore the remaining IEs */
+       req.protocolIEs[idx] := *;
+       return req;
+}
+
 template (present) S1AP_PDU
 tr_S1AP_UeContextModificationReq(template (present) MME_UE_S1AP_ID mme_id := ?,
-                                template (present) ENB_UE_S1AP_ID enb_id := ?) 
:= {
+                                template (present) ENB_UE_S1AP_ID enb_id := ?,
+                                template CSFallbackIndicator csfb_ind := *,
+                                template LAI registered_lai := *,
+                                template AdditionalCSFallbackIndicator 
add_csfb_ind := *) := {
        initiatingMessage := {
                procedureCode := id_UEContextModification,
                criticality := reject,
                value_ := {
-                       UEContextModificationRequest := {
+                       UEContextModificationRequest := 
f_tr_S1AP_UeContextModificationReq(mme_id,
+                                                                               
           enb_id,
+                                                                               
           csfb_ind,
+                                                                               
           registered_lai,
+                                                                               
           add_csfb_ind)
+               }
+       }
+}
+
+/* 9.1.4.98 UE CONTEXT MODIFICATION RESPONSE */
+template (value) S1AP_PDU
+ts_S1AP_UeContextModificationResp(template (value) MME_UE_S1AP_ID mme_id,
+                                 template (value) ENB_UE_S1AP_ID enb_id) := {
+       successfulOutcome := {
+               procedureCode := id_UEContextModification,
+               criticality := reject,
+               value_ := {
+                       UEContextModificationResponse := {
                                protocolIEs := {
                                        {
                                                id := 
S1AP_Constants.id_MME_UE_S1AP_ID,
@@ -1008,7 +1084,8 @@
                                                id := 
S1AP_Constants.id_eNB_UE_S1AP_ID,
                                                criticality := reject,
                                                value_ := {ENB_UE_S1AP_ID := 
enb_id}
-                                       }, *
+                                       }
+                                       /* TODO: Criticality Diagnostics IE 
(Optional) */
                                }
                        }
                }
@@ -2798,4 +2875,19 @@
        }
 }

+/* 9.2.3.1 LAI */
+template (value) LAI ts_S1AP_LAI(template (value) PLMNidentity plmn_id,
+                                template (value) OCT2 lac) := {
+       pLMNidentity := plmn_id,
+       lAC := lac,
+       iE_Extensions := omit
+};
+
+template (present) LAI tr_S1AP_LAI(template (present) PLMNidentity plmn_id := 
?,
+                                  template (present) OCT2 lac := ?) := {
+       pLMNidentity := plmn_id,
+       lAC := lac,
+       iE_Extensions := *
+};
+
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41082?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I87fa7d988bec90ccade2f40ac4d2a0924059058e
Gerrit-Change-Number: 41082
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>

Reply via email to