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

Change subject: pcu: Introduce as_ms_rx_ignore_empty helper
......................................................................

pcu: Introduce as_ms_rx_ignore_empty helper

It will be further used in follow-up patches.

Change-Id: I3c80ba4b8d229fa4a75dfd04abb7c5aae26e221c
---
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 18 insertions(+), 13 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 1014498..d6749d7 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -559,6 +559,21 @@
        }
 }

+altstep as_pcuif_rx_ignore_empty(template (value) TsTrxBtsNum nr := 
ts_TsTrxBtsNum)
+runs on MS_BTS_IFACE_CT {
+       var BTS_PDTCH_Block data_msg;
+       [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
+                                          tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, 
sapi := PCU_IF_SAPI_PDTCH),
+                                          omit)) -> value data_msg {
+
+               BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
+                                         sapi := PCU_IF_SAPI_PDTCH, fn := 0,
+                                         arfcn := 
f_trxnr2arfcn(valueof(nr.trx_nr)),
+                                         block_nr := nr.blk_nr));
+               repeat;
+       }
+}
+
 altstep as_rx_fail_dummy(template (value) TsTrxBtsNum nr := ts_TsTrxBtsNum)
 runs on MS_BTS_IFACE_CT {
        var BTS_PDTCH_Block data_msg;
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 2cc6fad..c347761 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1984,19 +1984,9 @@
                                          block_nr := nr.blk_nr));
                repeat;
        }
-       [mp_osmo_pcu_newer_than_0_9_0 and N3105 == N3105_MAX]
-               BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
-                                               tr_PCUIF_DATA(nr.trx_nr, 
nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
-                                               omit)) -> value data_msg {
-               /* We may already receive idle blocks before our own TTCN3 timer
-                * triggers due to the TBF being released. Keep going until our 
T_3195 triggers. */
-               nr := ts_TsTrxBtsNum;
-               BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
-                                         sapi := PCU_IF_SAPI_PDTCH, fn := 0,
-                                         arfcn := 
f_trxnr2arfcn(valueof(nr.trx_nr)),
-                                         block_nr := nr.blk_nr));
-               repeat;
-       }
+       /* We may already receive idle blocks before our own TTCN3 timer
+        * triggers due to the TBF being released. Keep going until our T_3195 
triggers. */
+       [mp_osmo_pcu_newer_than_0_9_0 and N3105 == N3105_MAX] 
as_pcuif_rx_ignore_empty(nr);
        [T_3195.running] T_3195.timeout {
                log("T_3195 timeout");
                /* Done in alt, wait for pending RTS initiated previously in

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26220
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: I3c80ba4b8d229fa4a75dfd04abb7c5aae26e221c
Gerrit-Change-Number: 26220
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to