pcu: Convert f_handle_pkt_neighbor_cell_data impl to use alt statements
Change-Id: Iac9306cdcf16d9eaa750f6ca10f0c9df6f2c7453
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index cd7a4ec..a937bf4 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3544,74 +3544,6 @@
return dl_block;
}
-/* Handle groups of PKT NEIGHBOUR CELL DATA packets */
-private function f_handle_pkt_neighbor_cell_data(inout GprsMS ms, octetstring exp_si)
-runs on RAW_PCU_Test_CT {
- var RlcmacDlBlock dl_block;
- var uint32_t sched_fn;
- var integer i := 0;
- var uint5_t exp_container_idx := 0;
- var integer si_offset := 0;
- var integer len;
- var octetstring exp_si_chunk;
- var GlobalTfi gtfi := { is_dl_tfi := false, tfi := ms.ul_tbf.tfi };
-
- dl_block := f_skip_dummy(50, sched_fn);
-
- while (true) {
- var template RlcmacDlCtrlMsg exp_msg; exp_msg :=
- tr_RlcMacDlCtrl_PKT_NEIGH_CELL_DATA(gtfi, exp_container_idx);
-
- /* Make sure last Dl block is a Pkt Neighbour Cell Data */
- if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, exp_msg))) {
- setverdict(fail, "Rx unexpected DL block: ", dl_block, " vs exp ", tr_RLCMAC_DL_CTRL(?, exp_msg));
- f_shutdown(__BFILE__, __LINE__);
- }
- var PacketNeighbourCellData neigh_data := dl_block.ctrl.payload.u.neighbour_cell_data;
- var PacketNeighbourCellDataContainer cont := neigh_data.container_list[0];
-
- if (cont.cd_length == 31) { /* continues on next message */
- len := lengthof(cont.container_data);
- exp_si_chunk := substr(exp_si, si_offset, len);
- if (cont.container_data != exp_si_chunk) {
- setverdict(fail, "Rx unexpected SI chunk at offset ", si_offset, ": ",
- cont.container_data, " vs exp ", exp_si_chunk);
- f_shutdown(__BFILE__, __LINE__);
- }
- si_offset := si_offset + len;
- } else if (cont.cd_length == 0) {
- /* we are done */
- if (si_offset != lengthof(exp_si)) {
- setverdict(fail, "Rx unexpectd SI length ", si_offset,
- " vs exp ", lengthof(exp_si));
- f_shutdown(__BFILE__, __LINE__);
- }
- break;
- } else { /* data length, last message */
- len := cont.cd_length;
- exp_si_chunk := substr(exp_si, si_offset, len);
- if (cont.container_data != exp_si_chunk) {
- setverdict(fail, "Rx unexpected SI chunk at offset ", si_offset, ": ",
- cont.container_data, " vs exp ", exp_si_chunk);
- f_shutdown(__BFILE__, __LINE__);
- return;
- }
- si_offset := si_offset + len;
- /* we are done */
- if (si_offset != lengthof(exp_si)) {
- setverdict(fail, "Rx unexpectd SI length ", si_offset,
- " vs exp ", lengthof(exp_si));
- f_shutdown(__BFILE__, __LINE__);
- }
- break;
- }
-
- exp_container_idx := exp_container_idx + 1;
- f_rx_rlcmac_dl_block(dl_block, sched_fn);
- }
- return;
-}
-
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_enc_BcdMccMnc(info_ind.mcc, info_ind.mnc, info_ind.mnc_3_digits == 1),
@@ -3693,7 +3625,7 @@
}
/* Announce SI back to MS, continue NACC procedure */
- f_handle_pkt_neighbor_cell_data(ms, si_default);
+ f_ms_handle_pkt_neighbor_cell_data(ms, si_default);
/* Obtain a Downlink block and make sure it is a Pkt Cell Chg Continue */
f_rx_rlcmac_dl_block(dl_block, sched_fn);
@@ -4213,7 +4145,7 @@
}
/* Announce SI back to MS, continue NACC procedure */
- f_handle_pkt_neighbor_cell_data(ms, si_default);
+ f_ms_handle_pkt_neighbor_cell_data(ms, si_default);
/* Obtain a Downlink block and make sure it is a Pkt Cell Chg Continue */
f_rx_rlcmac_dl_block(dl_block, sched_fn);
@@ -4296,7 +4228,7 @@
}
/* Announce SI back to MS, continue NACC procedure */
- f_handle_pkt_neighbor_cell_data(ms, si_default);
+ f_ms_handle_pkt_neighbor_cell_data(ms, si_default);
/* Obtain a Downlink block and make sure it is a Pkt Cell Chg Continue */
f_rx_rlcmac_dl_block(dl_block, sched_fn);
@@ -4379,7 +4311,7 @@
as_outbound_nacc_rim_resolve(info_ind);
/* Announce SI back to MS, continue NACC procedure */
- f_handle_pkt_neighbor_cell_data(ms, si_default);
+ f_ms_handle_pkt_neighbor_cell_data(ms, si_default);
/* Obtain a Downlink block and make sure it is a Pkt Cell Chg Continue */
f_rx_rlcmac_dl_block(dl_block, sched_fn);
@@ -4464,7 +4396,7 @@
as_outbound_nacc_rim_resolve(info_ind);
/* Announce SI back to MS, continue NACC procedure */
- f_handle_pkt_neighbor_cell_data(ms, si_default);
+ f_ms_handle_pkt_neighbor_cell_data(ms, si_default);
/* Obtain a Downlink block and make sure it is a Pkt Cell Chg Continue */
f_rx_rlcmac_dl_block(dl_block, sched_fn);