fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31279 )

Change subject: PCU_Tests: improve coding style, use f_build_BcdMccMnc()
......................................................................

PCU_Tests: improve coding style, use f_build_BcdMccMnc()

Change-Id: Ia7066c6f36678650ada61c1633977b824777194d
Related: OS#5901
---
M pcu/PCU_Tests.ttcn
1 file changed, 10 insertions(+), 15 deletions(-)

Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index affe41d..ad93b5c 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -5134,14 +5134,12 @@

 private function f_outbound_nacc_rim_tx_resp(PCUIF_info_ind info_ind)
 runs on RAW_PCU_Test_CT {
-       var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_build_BcdMccMnc_int(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1),
-                                                                   
info_ind.lac),
-                                                            info_ind.rac),
+       /* Source Cell Identifier IE is generated by osmo-pcu based on the 
INFO.ind */
+       var BcdMccMnc src_mcc_mnc := f_build_BcdMccMnc_int(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1);
+       var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(src_mcc_mnc, info_ind.lac), info_ind.rac),
                                                      info_ind.cell_id));
-       var BssgpCellId dst := valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, 
/* Decided by test itself (emulating BSC) */
-                                                                   423),
-                                                            2),
-                                                     5));
+       /* 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 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 :=
@@ -5158,15 +5156,12 @@

 altstep as_outbound_nacc_rim_resolve(PCUIF_info_ind info_ind, boolean 
do_answer := true, boolean do_repeat := false)
 runs on RAW_PCU_Test_CT {
-       /* RIM procedure: */
-       var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_build_BcdMccMnc_int(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1),
-                                                                   
info_ind.lac),
-                                                            info_ind.rac),
+       /* Source Cell Identifier IE is generated by osmo-pcu based on the 
INFO.ind */
+       var BcdMccMnc src_mcc_mnc := f_build_BcdMccMnc_int(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1);
+       var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(src_mcc_mnc, info_ind.lac), info_ind.rac),
                                                      info_ind.cell_id));
-       var BssgpCellId dst := valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, 
/* Decided by test itself (emulating BSC) */
-                                                                   423),
-                                                            2),
-                                                     5));
+       /* 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 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),



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31279
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: Ia7066c6f36678650ada61c1633977b824777194d
Gerrit-Change-Number: 31279
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to