daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27296 )


Change subject: RANAP_Templates: add sending of RAB_FailedList to 
tx_RANAP_RabAssResp
......................................................................

RANAP_Templates: add sending of RAB_FailedList to tx_RANAP_RabAssResp

The templates ts_RANAP_RabAssResp and tr_RANAP_RabAssResp miss the
option to send a RAB_FailedList. This is needed to simulate a RAB
assignment that fails at the HNB

Change-Id: I95c7c51587981d9f478b9d31fcde139f228fa87f
Related: OS#5152
---
M library/ranap/RANAP_Templates.ttcn
1 file changed, 136 insertions(+), 35 deletions(-)



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

diff --git a/library/ranap/RANAP_Templates.ttcn 
b/library/ranap/RANAP_Templates.ttcn
index 0aa1fad..6b4699e 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -1331,6 +1331,36 @@
        }
 } }

+template (value) RAB_FailedList ts_RAB_FL(template (value) RAB_ID rab_id,
+                                         template (value) Cause cause) := { {
+       {
+               id := id_RAB_FailedItem,
+               criticality := ignore,
+               value_ := {
+                       rAB_FailedItem := {
+                               rAB_ID := rab_id,
+                               cause := cause,
+                               iE_Extensions := omit
+                       }
+               }
+       }
+} }
+
+template RAB_FailedList tr_RAB_FL(template RAB_ID rab_id,
+                                 template Cause cause) := { {
+       {
+               id := id_RAB_FailedItem,
+               criticality := ignore,
+               value_ := {
+                       rAB_FailedItem := {
+                               rAB_ID := rab_id,
+                               cause := cause,
+                               iE_Extensions := *
+                       }
+               }
+       }
+} }
+
 template (value) RANAP_PDU
 ts_RANAP_RabAssReq(template (value) RAB_SetupOrModifyList rab_sml,
                   template (omit) RAB_AssignmentRequest.protocolExtensions 
exts := omit) := {
@@ -1376,58 +1406,130 @@
        }
 }

+function
+ts_RANAP_RabAssResp(template (omit) RAB_SetupOrModifiedList rab_sml := omit,
+                   template (omit) RAB_FailedList rab_fl := omit,
+                   template (omit) RAB_AssignmentResponse.protocolExtensions 
exts := omit) return template RANAP_PDU {
+       var template RANAP_PDU ret;
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs := {};
+       var integer ie_pos := 0;

-template (value) RANAP_PDU
-ts_RANAP_RabAssResp(template (value) RAB_SetupOrModifiedList rab_sml,
-                   template (omit) RAB_AssignmentResponse.protocolExtensions 
exts := omit) := {
-       outcome := {
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml;
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl;
+
+       /* RAB-SetupOrModifiedList */
+       if (istemplatekind(rab_sml, "value")) {
+               protocolIEs_rab_sml := {
+                       {
+                               id := id_RAB_SetupOrModifiedList,
+                               criticality := ignore,
+                               value_ := {
+                                       rAB_SetupOrModifiedList := rab_sml
+                               }
+                       }
+               }
+
+               protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+               ie_pos := ie_pos + 1;
+       }
+
+       /* TODO: RAB-ReleasedList */
+       /* TODO: RAB-QueuedList */
+
+       /* RAB-FailedList */
+       if (istemplatekind(rab_fl, "value")) {
+               protocolIEs_rab_fl := {
+                       {
+                               id := id_RAB_FailedList,
+                               criticality := ignore,
+                               value_ := {
+                                       rAB_FailedList := rab_fl
+                               }
+                       }
+               }
+
+               protocolIEs[ie_pos] := protocolIEs_rab_fl[0];
+               ie_pos := ie_pos + 1;
+       }
+
+       /* TODO: RAB-ReleaseFailedList */
+
+       ret.outcome := {
                procedureCode := id_RAB_Assignment,
                criticality := reject,
                value_ := {
                        rAB_AssignmentResponse := {
-                               protocolIEs := {
-                                       {
-                                               id := 
id_RAB_SetupOrModifiedList,
-                                               criticality := ignore,
-                                               value_ := {
-                                                       rAB_SetupOrModifiedList 
:= rab_sml
-                                               }
-                                       }
-                                       /* RAB-ReleasedList */
-                                       /* RAB-QueuedList */
-                                       /* RAB-FailedList */
-                                       /* RAB-ReleaseFailedList */
-                               },
+                               protocolIEs := protocolIEs,
                                protocolExtensions := exts
                        }
                }
        }
+
+       return ret;
 }
-template RANAP_PDU
-tr_RANAP_RabAssResp(template RAB_SetupOrModifiedList rab_sml,
-                   template RAB_AssignmentResponse.protocolExtensions exts := 
*) := {
-       outcome := {
+
+function
+tr_RANAP_RabAssResp(template RAB_SetupOrModifiedList rab_sml := omit,
+                   template RAB_FailedList rab_fl := omit,
+                   template RAB_AssignmentResponse.protocolExtensions exts := 
*) return template RANAP_PDU {
+       var template RANAP_PDU ret;
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs := {};
+       var integer ie_pos := 0;
+
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml;
+       var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl;
+
+       /* RAB-SetupOrModifiedList */
+       if (not istemplatekind(rab_sml, "omit")) {
+               protocolIEs_rab_sml := {
+                       {
+                               id := id_RAB_SetupOrModifiedList,
+                               criticality := ignore,
+                               value_ := {
+                                       rAB_SetupOrModifiedList := rab_sml
+                               }
+                       }
+               }
+
+               protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+               ie_pos := ie_pos + 1;
+       }
+
+       /* TODO: RAB-ReleasedList */
+       /* TODO: RAB-QueuedList */
+
+       /* RAB-FailedList */
+       if (not istemplatekind(rab_fl, "omit")) {
+               protocolIEs_rab_fl := {
+                       {
+                               id := id_RAB_FailedList,
+                               criticality := ignore,
+                               value_ := {
+                                       rAB_FailedList := rab_fl
+                               }
+                       }
+               }
+
+               protocolIEs[ie_pos] := protocolIEs_rab_fl[0];
+               ie_pos := ie_pos + 1;
+       }
+
+       /* TODO: RAB-ReleaseFailedList */
+
+       protocolIEs[ie_pos] := *;
+
+       ret.outcome := {
                procedureCode := id_RAB_Assignment,
                criticality := reject,
                value_ := {
                        rAB_AssignmentResponse := {
-                               protocolIEs := {
-                                       {
-                                               id := 
id_RAB_SetupOrModifiedList,
-                                               criticality := ignore,
-                                               value_ := {
-                                                       rAB_SetupOrModifiedList 
:= rab_sml
-                                               }
-                                       }, *
-                                       /* RAB-ReleasedList */
-                                       /* RAB-QueuedList */
-                                       /* RAB-FailedList */
-                                       /* RAB-ReleaseFailedList */
-                               },
+                               protocolIEs := protocolIEs,
                                protocolExtensions := exts
                        }
                }
        }
+
+       return ret;
 }

 template (value) RAB_ReleaseList ts_RAB_RL(template (value) RAB_ID rab_id,
@@ -1506,7 +1608,6 @@
        }
 }

-
 
/*****************************************************************************************************
  *
  
*****************************************************************************************************/

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I95c7c51587981d9f478b9d31fcde139f228fa87f
Gerrit-Change-Number: 27296
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <[email protected]>
Gerrit-MessageType: newchange

Reply via email to