fixeria has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/31279/1
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),