summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-17 00:25:37 +0200
committerlaforge <laforge@osmocom.org>2020-05-19 19:21:29 +0000
commit692222cb99ee24ab6a4a4e3329a6382b86c231c4 (patch)
tree02024cfbf3a497440ee80eb6e94dc0a583f4f3b1 /library
parentaedc51186b3211d5c8881d77535fda116cd2028a (diff)
Add initial support for Packet Uplink Ack/nack EGPRS Struct
Some stuff like EGPRS Ack/Nack description is still not implemented, but it's enouh for now to be able to match against this kind of ACK blocks. Change-Id: I8066fba0e71911f0c6344c1540a501f1853daa7f
Diffstat (limited to 'library')
-rw-r--r--library/RLCMAC_CSN1_Templates.ttcn28
-rw-r--r--library/RLCMAC_CSN1_Types.ttcn36
-rw-r--r--library/RLCMAC_Templates.ttcn46
3 files changed, 95 insertions, 15 deletions
diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn
index 772df13..eebda7f 100644
--- a/library/RLCMAC_CSN1_Templates.ttcn
+++ b/library/RLCMAC_CSN1_Templates.ttcn
@@ -217,4 +217,32 @@ module RLCMAC_CSN1_Templates {
multi_block_alloc := omit
};
+ template UlAckNackGprs tr_UlAckNackGprs(template GprsTlli tlli := *) := {
+ ch_coding_cmd := ?,
+ ack_nack_desc := ?,
+ cont_res_tlli_present := ?,
+ cont_res_tlli := tlli,
+ pkt_ta_present := ?,
+ pkt_ta := *,
+ pwr_ctrl_present := ?,
+ pwr_ctrl := *
+ };
+
+ template UlAckNackEgprs tr_UlAckNackEgprs(template GprsTlli tlli := *) := {
+ ch_coding_cmd := ?,
+ resegment := ?,
+ preemptive_tx := ?,
+ prr_retrans_req := ?,
+ arac_retrans_req := ?,
+ cont_res_tlli_present := ?,
+ cont_res_tlli := tlli,
+ tbf_est := ?,
+ pkt_ta_present := ?,
+ pkt_ta := *,
+ pkt_ext_ta_present := ?,
+ pkt_ext_ta := *,
+ pwr_ctrl_present := ?,
+ pwr_ctrl := *
+ };
+
} with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };
diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index d4c6efd..1f1fb0a 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -395,14 +395,44 @@ module RLCMAC_CSN1_Types {
variant (pwr_ctrl) "PRESENCE(pwr_ctrl_present = '1'B)"
variant (cont_res_tlli) "BYTEORDER(first)"
};
+ type record UlAckNackEgprs {
+ EgprsChCodingCommand ch_coding_cmd,
+ BIT1 resegment,
+ BIT1 preemptive_tx,
+ BIT1 prr_retrans_req,
+ BIT1 arac_retrans_req,
+ BIT1 cont_res_tlli_present,
+ GprsTlli cont_res_tlli optional,
+ BIT1 tbf_est,
+ BIT1 pkt_ta_present,
+ PacketTimingAdvance pkt_ta optional,
+ BIT1 pkt_ext_ta_present,
+ BIT2 pkt_ext_ta optional,
+ BIT1 pwr_ctrl_present,
+ PowerControlParameters pwr_ctrl optional
+ /* TODO: TS 44.060 12.3.1 EGPRS Ack/Nack Description */
+ /* EgprsAckNackDescription ack_nack_desc, */
+ /* BIT1 not_used('0'B) */
+ /* TODO: Extension Bits, Rel5 ,... */
+ } with {
+ variant (cont_res_tlli) "PRESENCE(cont_res_tlli_present = '1'B)"
+ variant (pkt_ta) "PRESENCE(pkt_ta_present = '1'B)"
+ variant (pkt_ext_ta) "PRESENCE(pkt_ext_ta_present = '1'B)"
+ variant (pwr_ctrl) "PRESENCE(pwr_ctrl_present = '1'B)"
+ variant (cont_res_tlli) "BYTEORDER(first)"
+ };
type record PacketUlAckNack {
PageMode page_mode,
BIT2 msg_excape ('00'B),
uint5_t uplink_tfi,
- BIT1 is_egprs ('0'B), /* msg escape */
- UlAckNackGprs gprs optional
+ BIT1 is_egprs,
+ UlAckNackGprs gprs optional,
+ UlAckNackEgprs egprs optional
/* TODO: EGPRS */
- } with { variant (gprs) "PRESENCE(is_egprs = '0'B)" };
+ } with {
+ variant (gprs) "PRESENCE(is_egprs = '0'B)"
+ variant (egprs) "PRESENCE(is_egprs = '1'B)"
+ };
/* 11.2.8 Packet Downlink Dummy Control Block */
type record PacketDlDummy {
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index 1774197..0ffa840 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -508,7 +508,7 @@ module RLCMAC_Templates {
}
/* Receive Template for Uplink ACK/NACK */
- template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK(template uint5_t ul_tfi, template GprsTlli tlli := ?) := {
+ template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK(template uint5_t ul_tfi) := {
ctrl := {
mac_hdr := {
payload_type := (MAC_PT_RLCMAC_NO_OPT, MAC_PT_RLCMAC_OPT),
@@ -524,22 +524,44 @@ module RLCMAC_Templates {
page_mode := ?,
msg_excape := ?,
uplink_tfi := ul_tfi,
+ is_egprs := ?,
+ gprs := *,
+ egprs := *
+ }
+ }
+ }
+ }
+ };
+
+ template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK_GPRS(template uint5_t ul_tfi, template UlAckNackGprs gprs := tr_UlAckNackGprs(*))
+ modifies tr_RLCMAC_UL_ACK_NACK := {
+ ctrl := {
+ payload := {
+ u := {
+ ul_ack_nack := {
is_egprs := '0'B,
- gprs := {
- ch_coding_cmd := ?,
- ack_nack_desc := ?,
- cont_res_tlli_present := ?,
- cont_res_tlli := tlli,
- pkt_ta_present := ?,
- pkt_ta := *,
- pwr_ctrl_present := ?,
- pwr_ctrl := *
- }
+ gprs := gprs,
+ egprs := omit
}
}
}
}
- }
+ };
+
+ template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK_EGPRS(template uint5_t ul_tfi, template UlAckNackEgprs egprs := tr_UlAckNackEgprs(*))
+ modifies tr_RLCMAC_UL_ACK_NACK := {
+ ctrl := {
+ payload := {
+ u := {
+ ul_ack_nack := {
+ is_egprs := '1'B,
+ gprs := omit,
+ egprs := egprs
+ }
+ }
+ }
+ }
+ };
template RlcmacDlBlock tr_RLCMAC_PACKET_PAG_REQ(template uint3_t usf := ?) := {
ctrl := {