From b6733a67ec7c8abc3b10f207a66c7d73c983fdcf Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 10 May 2020 14:39:00 +0700 Subject: PCU: refactor and simplify f_rx_rlcmac_dl_block_exp_data() This function was written in a way that it tries to do as many different (but related) things as possible: a) send an RTS.req to the IUT, expect a DATA.ind in return, b) decode RLC/MAC message contained in the received DATA.ind, c) make sure that it's either GPRS or EGPRS data block, d) calculate the last TDMA frame number of RRBP using f_rrbp_ack_fn() regardless of its validity, e) make sure that the block contains a given LLC payload. Everything is ok except point d). The problem is that this is only the case for the first block of RRBP, and not applicable to the rest having 'rrbp_valid' flag unset. Furthermore, this function did not match GPRS DL blocks with 'rrbp_valid' flag unset, for some odd reason. Let's move RRBP calculation into a separate function called f_dl_block_ack_fn() and return TDMA frame number of the received DATA.ind message instead. Among with that, there are more little changes: - simplify matching of (E)GPRS DL data blocks, - use 'in' qualifier in parameter list where possible, - turn parameter 'data' into a template (present). Change-Id: I1528408b4399d0a149a23961805277eaab90d407 Signed-off-by: Vadim Yanitskiy --- library/RLCMAC_Templates.ttcn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'library/RLCMAC_Templates.ttcn') diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn index 675a0811..dd1371f7 100644 --- a/library/RLCMAC_Templates.ttcn +++ b/library/RLCMAC_Templates.ttcn @@ -497,6 +497,9 @@ module RLCMAC_Templates { } } + /* Either GPRS or EGPRS data block with arbitrary contents */ + template RlcmacDlBlock tr_RLCMAC_DATA := (tr_RLCMAC_DATA_GPRS, tr_RLCMAC_DATA_EGPRS); + template RlcmacDlBlock tr_RLCMAC_DATA_GPRS(template (present) boolean rrbp_valid := ?, template (present) MacRrbp rrbp := ?, template (present) uint3_t usf := ?) := { -- cgit v1.2.3