From e243ef6bf0a9f6f7ae0fb322d9d4d26a0086ad2b Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 6 Nov 2021 16:32:06 +0300 Subject: [PATCH] library/L1CTL_PortType: add f_L1CTL_rx_data() helper Change-Id: I254171c6dc83f046b5ad1a72586c097deebb0fa7 Related: SYS#5319 --- library/L1CTL_PortType.ttcn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 80e33a81f..ed235d3ef 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -42,6 +42,29 @@ module L1CTL_PortType { return len; } + function f_L1CTL_rx_data(L1CTL_PT pt, + template (present) RslChannelNr chan_nr := ?, + template (present) RslLinkId link_id := ?) + return L1ctlDlMessage { + var L1ctlDlMessage dl; + timer T := 2.0; + + T.start; + alt { + [] pt.receive(tr_L1CTL_DATA_IND(chan_nr, link_id)) -> value dl { + return dl; + } + [] pt.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for L1CTL DATA.ind"); + mtc.stop; + } + } + + /* Unreachable, make TITAN happy */ + return dl; + } + function f_L1CTL_FBSB(L1CTL_PT pt, GsmBandArfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED, integer rxlev_exp := 57)