pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38541?usp=email )


Change subject: RAN_Emulation: Allow setting reason in primitive 
MSC_CONN_PRIM_DISC_REQ
......................................................................

RAN_Emulation: Allow setting reason in primitive MSC_CONN_PRIM_DISC_REQ

This allows setting a specific reason in the CREF transmitted on the
wire, other than "End user originted (0)".
A follow-up commit will add a test in HNBGW_Tests where an emulated MSC
answers with CREF reason "End user failure (0x02)".

Change-Id: I1fa1148135625d840426b52450bf52da10448471
---
M library/RAN_Emulation.ttcnpp
1 file changed, 8 insertions(+), 4 deletions(-)



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

diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 58d1c78..95f8b17 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -77,6 +77,7 @@

 /* we tell SCCP to release connection */
 type record MSC_CONN_PRIM_DISC_REQ {
+       SCCP_PAR_Reason reason
 };

 /* Connection confirmed indication */
@@ -100,8 +101,10 @@
 template (present) RAN_Conn_Prim tr_MSC_CONN_PRIM_DISC_REQ := {
        disc_req := ?
 }
-template (value) RAN_Conn_Prim ts_MSC_CONN_PRIM_DISC_REQ := {
-       disc_req := {}
+template (value) RAN_Conn_Prim ts_MSC_CONN_PRIM_DISC_REQ(template (value) 
SCCP_PAR_Reason reason := 0) := {
+       disc_req := {
+               reason := reason
+       }
 }

 template (present) RAN_Conn_Prim tr_MSC_CONN_PRIM_CONF_IND := {
@@ -1007,6 +1010,7 @@
                var RANAP_Conn_Req creq;
                var RANAP_PDU ranap;
                var RANAP_N_UNITDATA_req ranap_ud;
+               var RAN_Conn_Prim ran_conn_prim;
                var RAN_ConnHdlr vc_conn;
                var PDU_DTAP_PS_MO ps_mo;
                var PDU_DTAP_PS_MT ps_mt;
@@ -1080,9 +1084,9 @@
                        }

                /* Disconnect request client -> SCCP */
-               [] CLIENT.receive(tr_MSC_CONN_PRIM_DISC_REQ) -> sender vc_conn {
+               [] CLIENT.receive(tr_MSC_CONN_PRIM_DISC_REQ) -> value 
ran_conn_prim sender vc_conn {
                        var integer conn_id := f_conn_id_by_comp(vc_conn);
-                       RANAP.send(ts_RANAP_DISC_req(conn_id, 0));
+                       RANAP.send(ts_RANAP_DISC_req(conn_id, 
ran_conn_prim.disc_req.reason));
                        f_conn_table_del(conn_id);
                        }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38541?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: I1fa1148135625d840426b52450bf52da10448471
Gerrit-Change-Number: 38541
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to