pespin has uploaded this change for review. ( 
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, 101 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/82/41082/1

diff --git a/library/s1ap/S1AP_Templates.ttcn b/library/s1ap/S1AP_Templates.ttcn
index 031ac59..bf79073 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
  
*********************************************************************************/
@@ -1015,6 +1017,90 @@
        }
 }

+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 := omit,
+                                           template LAI registered_lai := omit,
+                                           template 
AdditionalCSFallbackIndicator add_csfb_ind := omit)
+return template (present) S1AP_PDU {
+       var template (present) S1AP_PDU pdu := {
+               initiatingMessage := {
+                       procedureCode := id_UEContextModification,
+                       criticality := reject,
+                       value_ := {
+                               UEContextModificationRequest := {
+                                       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(pdu.initiatingMessage.value_.UEContextModificationRequest.protocolIEs);
+
+       if (not istemplatekind(csfb_ind, "omit")) {
+               
pdu.initiatingMessage.value_.UEContextModificationRequest.protocolIEs[idx] := {
+                       id := id_CSFallbackIndicator,
+                       criticality := reject,
+                       value_ := { CSFallbackIndicator := csfb_ind }
+                       };
+               idx := idx + 1;
+       }
+
+       if (not istemplatekind(registered_lai, "omit")) {
+               
pdu.initiatingMessage.value_.UEContextModificationRequest.protocolIEs[idx] := {
+                       id := id_RegisteredLAI,
+                       criticality := ignore,
+                       value_ := { LAI := registered_lai }
+                       };
+               idx := idx + 1;
+       }
+
+       if (not istemplatekind(add_csfb_ind, "omit")) {
+               
pdu.initiatingMessage.value_.UEContextModificationRequest.protocolIEs[idx] := {
+                       id := id_AdditionalCSFallbackIndicator,
+                       criticality := ignore,
+                       value_ := { AdditionalCSFallbackIndicator := 
add_csfb_ind }
+                       };
+               idx := idx + 1;
+       }
+       return pdu;
+}
+
+/* 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,
+                                               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}
+                                       }
+                                       /* TODO: Criticality Diagnostics IE 
(Optional) */
+                               }
+                       }
+               }
+       }
+}
+
 /* 9.1.4.20 CONNECTION ESTABLISHMENT INDICATION */
 template (value) S1AP_PDU
 ts_S1AP_ConnEstInd(template (value) MME_UE_S1AP_ID mme_id,
@@ -2798,4 +2884,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: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I87fa7d988bec90ccade2f40ac4d2a0924059058e
Gerrit-Change-Number: 41082
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>

Reply via email to