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


Change subject: ASCI: Rename handoverRequest to n_connect in 
RAN_Emulation.ttcnpp
......................................................................

ASCI: Rename handoverRequest to n_connect in RAN_Emulation.ttcnpp

The expectation table is used to deliver new connections with Handover
Request as well as with VGCS/VBS Setup and VGCS/VBS Assignment Request.
"handoverRequest" is renamed to "n_connect".

Related: OS#4854
Change-Id: I941c5db5235785841f3368ef908a409bbb12150e
---
M library/RAN_Emulation.ttcnpp
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
3 files changed, 51 insertions(+), 37 deletions(-)



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

diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 99753da..40929ee 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -1266,9 +1266,9 @@
                        PROC.reply(RAN_register:{l3_info, vc_hdlr}) to vc_hdlr;
                        }

-               [] PROC.getcall(RAN_register_handoverRequest:{?,?}) -> 
param(targetPointCode, vc_hdlr) {
+               [] PROC.getcall(RAN_register_n_connect:{?,?}) -> 
param(targetPointCode, vc_hdlr) {
                        f_create_expect(omit, vc_hdlr, targetPointCode);
-                       
PROC.reply(RAN_register_handoverRequest:{targetPointCode, vc_hdlr}) to vc_hdlr;
+                       PROC.reply(RAN_register_n_connect:{targetPointCode, 
vc_hdlr}) to vc_hdlr;
                        }

                [] PROC.getcall(RAN_register_sccp_cr_without_payload:{?}) -> 
param(vc_hdlr) {
@@ -1305,7 +1305,7 @@
 type record ExpectData {
        /* L3 payload based on which we can match it */
        octetstring l3_payload optional,
-       integer handoverRequestPointCode optional,
+       integer n_connectPointCode optional,
        boolean sccp_cr_without_payload,
        /* component reference for this connection */
        RAN_ConnHdlr vc_conn
@@ -1313,7 +1313,7 @@

 /* procedure based port to register for incoming connections */
 signature RAN_register(in octetstring l3, in RAN_ConnHdlr hdlr);
-signature RAN_register_handoverRequest(in integer targetPointCode, in 
RAN_ConnHdlr hdlr);
+signature RAN_register_n_connect(in integer targetPointCode, in RAN_ConnHdlr 
hdlr);
 signature RAN_register_sccp_cr_without_payload(in RAN_ConnHdlr hdlr);

 /* procedure based port to register for incoming IMSI/TMSI */
@@ -1327,7 +1327,7 @@
 signature RAN_continue_after_n_sd(N_Sd_Array last_n_sd, in RAN_ConnHdlr hdlr);

 type port RAN_PROC_PT procedure {
-       inout RAN_register, RAN_register_imsi, RAN_unregister_imsi, 
RAN_register_handoverRequest,
+       inout RAN_register, RAN_register_imsi, RAN_unregister_imsi, 
RAN_register_n_connect,
              RAN_register_sccp_cr_without_payload, RAN_last_n_sd, 
RAN_continue_after_n_sd;
 } with { extension "internal" };

@@ -1337,40 +1337,40 @@
 runs on RAN_Emulation_CT return RAN_ConnHdlr {
        var RAN_ConnHdlr ret := null;
        var octetstring l3_info;
-       var boolean handoverRequest := false;
-       var integer handoverRequestPointCode;
+       var boolean n_connect := false;
+       var integer n_connectPointCode;
        var integer i;

        if (ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) {
                l3_info := 
conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info;
                log("ExpectedCreateCallback completeLayer3Information");
        } else if (ischosen(conn_ind.userData.pdu.bssmap.handoverRequest)) {
-               handoverRequest := true;
-               handoverRequestPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
-               log("ExpectedCreateCallback handoverRequest ", 
handoverRequestPointCode);
+               n_connect := true;
+               n_connectPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
+               log("ExpectedCreateCallback handoverRequest ", 
n_connectPointCode);
        } else if (ischosen(conn_ind.userData.pdu.bssmap.vGCS_VBSSetup)) {
-               handoverRequest := true;
-               handoverRequestPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
-               log("ExpectedCreateCallback VGCS/VBS Setup ", 
handoverRequestPointCode);
+               n_connect := true;
+               n_connectPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
+               log("ExpectedCreateCallback VGCS/VBS Setup ", 
n_connectPointCode);
        } else if 
(ischosen(conn_ind.userData.pdu.bssmap.vGCS_VBSAssignmentRequest)) {
-               handoverRequest := true;
-               handoverRequestPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
-               log("ExpectedCreateCallback VGCS/VBS Assignment ", 
handoverRequestPointCode);
+               n_connect := true;
+               n_connectPointCode := 
bit2int(conn_ind.calledAddress.signPointCode);
+               log("ExpectedCreateCallback VGCS/VBS Assignment ", 
n_connectPointCode);
        } else {
-               setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3 nor a 
Handover Request");
+               setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3 nor a 
new BSS connection");
                mtc.stop;
        }

        for (i := 0; i < sizeof(ExpectTable); i:= i+1) {
-               if (handoverRequest) {
-                       log("ExpectTable[", i, "].handoverRequestPointCode = ", 
ExpectTable[i].handoverRequestPointCode,
-                           " ==? ", handoverRequestPointCode);
-                       if (ExpectTable[i].handoverRequestPointCode == 
handoverRequestPointCode) {
+               if (n_connect) {
+                       log("ExpectTable[", i, "].n_connectPointCode = ", 
ExpectTable[i].n_connectPointCode,
+                           " ==? ", n_connectPointCode);
+                       if (ExpectTable[i].n_connectPointCode == 
n_connectPointCode) {
                                ret := ExpectTable[i].vc_conn;
                                /* release this entry to be used again */
-                               ExpectTable[i].handoverRequestPointCode := omit;
+                               ExpectTable[i].n_connectPointCode := omit;
                                ExpectTable[i].vc_conn := null;
-                               log("Found Expect[", i, "] for handoverRequest 
handled at ", ret);
+                               log("Found Expect[", i, "] for N-CONNECT 
handled at ", ret);
                                return ret;
                        } else {
                                continue;
@@ -1436,25 +1436,25 @@
 #endif

 private function f_create_expect(template octetstring l3, RAN_ConnHdlr hdlr,
-                                template integer handoverRequestPointCode := 
omit)
+                                template integer n_connectPointCode := omit)
 runs on RAN_Emulation_CT {
        var integer i;
-       log("f_create_expect(l3 := ", l3, ", handoverRequest := ", 
handoverRequestPointCode);
+       log("f_create_expect(l3 := ", l3, ", n_connectPointCode := ", 
n_connectPointCode);
        for (i := 0; i < sizeof(ExpectTable); i := i+1) {
                if (not ispresent(ExpectTable[i].l3_payload)
                    and not ExpectTable[i].sccp_cr_without_payload
-                   and not ispresent(ExpectTable[i].handoverRequestPointCode)) 
{
+                   and not ispresent(ExpectTable[i].n_connectPointCode)) {
                        if (ispresent(l3)) {
                                ExpectTable[i].l3_payload := valueof(l3);
                        } else {
                                ExpectTable[i].sccp_cr_without_payload := true;
                        }
-                       if (ispresent(handoverRequestPointCode)) {
-                               ExpectTable[i].handoverRequestPointCode := 
valueof(handoverRequestPointCode);
+                       if (ispresent(n_connectPointCode)) {
+                               ExpectTable[i].n_connectPointCode := 
valueof(n_connectPointCode);
                        }
                        ExpectTable[i].vc_conn := hdlr;
-                       if (ispresent(handoverRequestPointCode)) {
-                               log("Created Expect[", i, "] for 
handoverRequest to be handled at ", hdlr);
+                       if (ispresent(n_connectPointCode)) {
+                               log("Created Expect[", i, "] for N-CONNECT to 
be handled at ", hdlr);
                        } else {
                                log("Created Expect[", i, "] for ", l3, " to be 
handled at ", hdlr);
                        }
@@ -1499,7 +1499,7 @@
 runs on RAN_Emulation_CT {
        for (var integer i := 0; i < sizeof(ExpectTable); i := i+1) {
                ExpectTable[i].l3_payload := omit;
-               ExpectTable[i].handoverRequestPointCode := omit;
+               ExpectTable[i].n_connectPointCode := omit;
                ExpectTable[i].sccp_cr_without_payload := false;
        }
 }
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 64e2aff..d4723e5 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1969,9 +1969,9 @@
        }
 }

-function f_create_bssmap_exp_handoverRequest(integer targetPointCode) runs on 
BSC_ConnHdlr {
-       BSSAP_PROC.call(RAN_register_handoverRequest:{targetPointCode, self}) {
-               [] BSSAP_PROC.getreply(RAN_register_handoverRequest:{?, ?}) {};
+function f_create_bssmap_exp_n_connect(integer targetPointCode) runs on 
BSC_ConnHdlr {
+       BSSAP_PROC.call(RAN_register_n_connect:{targetPointCode, self}) {
+               [] BSSAP_PROC.getreply(RAN_register_n_connect:{?, ?}) {};
        }
 }

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 75b7688..d955f02 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -5819,7 +5819,7 @@

        /* Ok, that went well, now the other BSC is handovering back here --
         * from now on this here is the new BSS. */
-       f_create_bssmap_exp_handoverRequest(193);
+       f_create_bssmap_exp_n_connect(193);

        var template BSSMAP_IE_EncryptionInformation encryptionInformation;
        var template BSSMAP_IE_ChosenEncryptionAlgorithm 
chosenEncryptionAlgorithm;
@@ -5883,7 +5883,7 @@
                bss_rtp_ip := "1.2.3.4";
        }
        f_init_handler(pars);
-       f_create_bssmap_exp_handoverRequest(194);
+       f_create_bssmap_exp_n_connect(194);

        var template BSSMAP_IE_EncryptionInformation encryptionInformation;
        var template BSSMAP_IE_ChosenEncryptionAlgorithm 
chosenEncryptionAlgorithm;
@@ -6218,7 +6218,7 @@


        /* inter-MSC handover back to the first MSC */
-       f_create_bssmap_exp_handoverRequest(193);
+       f_create_bssmap_exp_n_connect(193);
        cil := { cIl_CGI := { ts_BSSMAP_CI_CGI('262'H, '42'H, 23, 42) } };

        /* old BSS sends Handover Required, via inter-MSC E link: like

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33999
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: I941c5db5235785841f3368ef908a409bbb12150e
Gerrit-Change-Number: 33999
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <[email protected]>
Gerrit-MessageType: newchange

Reply via email to