summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-12 21:06:41 +0100
committerpespin <pespin@sysmocom.de>2020-11-18 11:51:14 +0000
commite8db673d22c941a6d604a9213f3897b2fc37db23 (patch)
treeaa990aa6f4b3da734194c6340fa833caea2b0d3b /library
parent0c45da1f2dfac5ae534100f93afb18330ed3081f (diff)
pcu: Implement ACKing EGPRS Dl TBF blocks
Diffstat (limited to 'library')
-rw-r--r--library/RLCMAC_Templates.ttcn38
1 files changed, 15 insertions, 23 deletions
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index e6f982f..d59c74e 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -361,8 +361,16 @@ module RLCMAC_Templates {
}
}
+ private function f_presence_bit_chreq_desc(template (omit) ChannelReqDescription chreq_desc) return BIT1 {
+ if (istemplatekind(chreq_desc, "omit")) {
+ return '0'B;
+ }
+ return '1'B;
+ }
+
/* Send Template for Downlink ACK/NACK */
- template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK(template uint5_t tfi, AckNackDescription andesc, boolean retry := false) := {
+ template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK(template uint5_t tfi, AckNackDescription andesc, boolean retry := false,
+ template (omit) ChannelReqDescription chreq_desc := omit) := {
ctrl := {
mac_hdr := {
payload_type := MAC_PT_RLCMAC_NO_OPT,
@@ -375,8 +383,8 @@ module RLCMAC_Templates {
dl_ack_nack := {
dl_tfi := tfi,
ack_nack_desc := andesc,
- chreq_desc_presence := '0'B,
- chreq_desc := omit,
+ chreq_desc_presence := f_presence_bit_chreq_desc(chreq_desc),
+ chreq_desc := chreq_desc,
ch_qual_rep := c_ChQualRep_default
}
}
@@ -384,25 +392,9 @@ module RLCMAC_Templates {
}
}
- template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK_CHREQ(template uint5_t tfi,
- AckNackDescription andesc,
- boolean retry := false,
- template ChannelReqDescription chreq_desc := c_ChReqDesc_default)
- modifies ts_RLCMAC_DL_ACK_NACK := {
- ctrl := {
- payload := {
- u := {
- dl_ack_nack := {
- chreq_desc_presence := '1'B,
- chreq_desc := chreq_desc
- }
- }
- }
- }
- }
-
/* Send Template for Egprs Downlink ACK/NACK */
- template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK_EGPRS(template uint5_t tfi, EgprsAckNackDescription andesc, boolean retry := false) := {
+ template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK_EGPRS(template uint5_t tfi, EgprsAckNackDescription andesc, boolean retry := false,
+ template (omit) ChannelReqDescription chreq_desc := omit) := {
ctrl := {
mac_hdr := {
payload_type := MAC_PT_RLCMAC_NO_OPT,
@@ -417,8 +409,8 @@ module RLCMAC_Templates {
ms_oom := '0'B,
egprs_ch_qual_rep_presence := '0'B,
egprs_ch_qual_rep := omit,
- chreq_desc_presence := '0'B,
- chreq_desc := omit,
+ chreq_desc_presence := f_presence_bit_chreq_desc(chreq_desc),
+ chreq_desc := chreq_desc,
pfi_presence := '0'B,
pfi := omit,
epdan_presence := '0'B,