path: root/library
diff options
authorVadim Yanitskiy <>2020-05-10 14:39:00 +0700
committerVadim Yanitskiy <>2020-05-10 21:34:38 +0700
commitb6733a67ec7c8abc3b10f207a66c7d73c983fdcf (patch)
tree963cddbf314c183f5aee5834cebd652ae6dd2bcd /library
parentd4f22aaf314f0b15eb0806841112e9f2a8e6b62d (diff)
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 <>
Diffstat (limited to 'library')
1 files changed, 3 insertions, 0 deletions
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index 675a081..dd1371f 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 := ?) := {