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


Change subject: PCU_Tests: define ts_BssgpCellIdDstAddr_default
......................................................................

PCU_Tests: define ts_BssgpCellIdDstAddr_default

Define hard-coded default Destination Cell ID in one place.

Change-Id: I8f400ba52d4d32447e0b4a640a2f4b73699937c8
Related: OS#5901
---
M pcu/PCU_Tests.ttcn
1 file changed, 29 insertions(+), 4 deletions(-)



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

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index ad93b5c..6e858d5 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -5132,6 +5132,19 @@
        return dl_block;
 }

+private const GsmMcc c_BssgpCellMcc := '023'H;
+private const GsmMnc c_BssgpCellMnc := '43'H;
+private template (value) BssgpCellId ts_BssgpCellIdDstAddr_default := {
+       ra_id := {
+               lai := {
+                       mcc_mnc := f_build_BcdMccMnc(c_BssgpCellMcc, 
c_BssgpCellMnc),
+                       lac := 423
+               },
+               rac := 2
+       },
+       cell_id := 5
+}
+
 private function f_outbound_nacc_rim_tx_resp(PCUIF_info_ind info_ind)
 runs on RAW_PCU_Test_CT {
        /* Source Cell Identifier IE is generated by osmo-pcu based on the 
INFO.ind */
@@ -5139,7 +5152,7 @@
        var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(src_mcc_mnc, info_ind.lac), info_ind.rac),
                                                      info_ind.cell_id));
        /* Destination Cell Identifier IE is resolved by the testsuite itself 
(emulating BSC) */
-       var BssgpCellId dst := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_build_BcdMccMnc('023'H, '43'H), 423), 
2), 5));
+       var BssgpCellId dst := valueof(ts_BssgpCellIdDstAddr_default);
        var RIM_Routing_Address src_addr := 
valueof(t_RIM_Routing_Address_cid(src));
        var RIM_Routing_Address dst_addr := 
valueof(t_RIM_Routing_Address_cid(dst));
        var template (value) RAN_Information_RIM_Container res_cont :=
@@ -5161,7 +5174,7 @@
        var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(src_mcc_mnc, info_ind.lac), info_ind.rac),
                                                      info_ind.cell_id));
        /* Destination Cell Identifier IE is resolved by the testsuite itself 
(emulating BSC) */
-       var BssgpCellId dst := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_build_BcdMccMnc('023'H, '43'H), 423), 
2), 5));
+       var BssgpCellId dst := valueof(ts_BssgpCellIdDstAddr_default);
        var RIM_Routing_Address src_addr := 
valueof(t_RIM_Routing_Address_cid(src));
        var RIM_Routing_Address dst_addr := 
valueof(t_RIM_Routing_Address_cid(dst));
        [] 
RIM.receive(tr_RAN_INFORMATION_REQUEST(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 dst_addr),
@@ -5187,7 +5200,12 @@
                                            int2str(req_arfcn) & "." &
                                            int2str(req_bsic);
                if (answer) {
-                       f_ctrl_exp_get(IPA_CTRL, ctrl_var, "023-43-423-2-5");
+                       var BssgpCellId addr := 
valueof(ts_BssgpCellIdDstAddr_default);
+                       f_ctrl_exp_get(IPA_CTRL, ctrl_var, 
hex2str(c_BssgpCellMcc) & "-" &
+                                                          
hex2str(c_BssgpCellMnc) & "-" &
+                                                          
int2str(addr.ra_id.lai.lac) & "-" &
+                                                          
int2str(addr.ra_id.rac) & "-" &
+                                                          
int2str(addr.cell_id));
                } else {
                        f_ctrl_exp_get(IPA_CTRL, ctrl_var, omit);
                }
@@ -5195,7 +5213,14 @@
                var PCUIF_Message pcu_msg;
                BTS.receive(tr_PCUIF_NEIGH_ADDR_REQ(0, info_ind.lac, 
info_ind.cell_id, req_arfcn, req_bsic)) -> value pcu_msg;
                if (answer) {
-                       BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, 
pcu_msg.u.container.u.neigh_addr_req, 0, 23, 43, 0, 423, 2, 5));
+                       var BssgpCellId addr := 
valueof(ts_BssgpCellIdDstAddr_default);
+                       BTS.send(ts_PCUIF_NEIGH_ADDR_CNF(0, 
pcu_msg.u.container.u.neigh_addr_req, 0,
+                                                        
str2int(hex2str(c_BssgpCellMcc)),
+                                                        
str2int(hex2str(c_BssgpCellMnc)),
+                                                        
lengthof(c_BssgpCellMnc) - 2,
+                                                        addr.ra_id.lai.lac,
+                                                        addr.ra_id.rac,
+                                                        addr.cell_id));
                }
        }
 }

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

Reply via email to