summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-12 21:02:18 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-11-16 10:48:25 +0100
commitafdd28d73b19099864ef8a895131ed7b1588e57b (patch)
tree3a08ec7e92f999da2f02987f4101994bd9ca1bc5 /library
parent68a7a49354cdba25a775fcd4e7741380f4579627 (diff)
RLCMAC: Implement type+template for EGPRS Dl Pkt ACK/NACK
Diffstat (limited to 'library')
-rw-r--r--library/RLCMAC_CSN1_Templates.ttcn6
-rw-r--r--library/RLCMAC_CSN1_Types.ttcn78
-rw-r--r--library/RLCMAC_Templates.ttcn28
3 files changed, 111 insertions, 1 deletions
diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn
index 727d4b8..64c709a 100644
--- a/library/RLCMAC_CSN1_Templates.ttcn
+++ b/library/RLCMAC_CSN1_Templates.ttcn
@@ -213,4 +213,10 @@ module RLCMAC_CSN1_Templates {
pwr_ctrl := *
};
+ template EgprsAckNackDescriptionIE ts_EgprsAckNackDescriptionIE(template EgprsAckNackDescription andesc) := {
+ len_present := '1'B,
+ len := 0, /* Overwritten by RAW encoder */
+ acknack_desc := andesc
+ }
+
} with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };
diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index 1ffb85b..14570bf 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -617,7 +617,7 @@ module RLCMAC_CSN1_Types {
with { extension "prototype(convert) decode(RAW)" };
- /* 11.2.6 Packet Downlikn Ack/Nack */
+ /* 11.2.6 Packet Downlink Ack/Nack */
type record ILevel {
BIT1 presence,
uint4_t i_level optional
@@ -635,7 +635,60 @@ module RLCMAC_CSN1_Types {
BIT1 chreq_desc_presence,
ChannelReqDescription chreq_desc optional,
ChannelQualityReport ch_qual_rep
+ } with { variant (chreq_desc) "PRESENCE(chreq_desc_presence = '1'B)" };
+
+ /* 11.2.6a Egprs Packet Downlink Ack/Nack */
+ type record EgprsBEPLinkQualityMeasurements {
+ BIT1 gmsk_presence,
+ BIT5 gmsk_mean_bep optional,
+ BIT3 gmsk_cv_bep optional,
+ BIT1 psk8_presence,
+ BIT5 psk8_mean_bep optional,
+ BIT3 psk8_cv_bep optional
+ } with { variant (gmsk_mean_bep) "PRESENCE(gmsk_presence = '1'B)"
+ variant (gmsk_cv_bep) "PRESENCE(gmsk_presence = '1'B)"
+ variant (psk8_mean_bep) "PRESENCE(psk8_presence = '1'B)"
+ variant (psk8_cv_bep) "PRESENCE(psk8_presence = '1'B)"
+ };
+ /* 12.5.4 EGPRS Timeslot Link Quality Measurements IE */
+ type record BEPMeas {
+ BIT1 presence,
+ BIT1 is_8psk optional,
+ uint4_t bep_meas optional
+ } with { variant (is_8psk) "PRESENCE(presence = '1'B)"
+ variant (bep_meas) "PRESENCE(presence = '1'B)"
+ };
+ type record length(8) of BEPMeas BEPMeasLi;
+ type record EgprsTimeslotLinkQualityMeasurements {
+ BIT1 bep_measurements_presence,
+ BEPMeasLi bep_meas optional,
+ BIT1 i_measurements_presence,
+ ILevels i_meas optional
+ } with { variant (bep_meas) "PRESENCE(bep_measurements_presence = '1'B)"
+ variant (i_meas) "PRESENCE(i_measurements_presence = '1'B)"
+ };
+ /* Table 12.5.1.1 : EGPRS Channel Quality Report Information elements */
+ type record EgprsChannelQualityReport {
+ EgprsBEPLinkQualityMeasurements bep_link_qual_meas,
+ uint6_t c_value,
+ EgprsTimeslotLinkQualityMeasurements ts_link_qual_meas
} with { variant "" };
+ type record EgprsPacketDlAckNack {
+ uint5_t dl_tfi,
+ BIT1 ms_oom,
+ BIT1 egprs_ch_qual_rep_presence,
+ EgprsChannelQualityReport egprs_ch_qual_rep optional,
+ BIT1 chreq_desc_presence,
+ ChannelReqDescription chreq_desc optional,
+ BIT1 pfi_presence,
+ BIT7 pfi optional,
+ BIT1 epdan_presence('0'B),
+ /* TODO: Implement EPD A/N */
+ EgprsAckNackDescriptionIE ack_nack_desc_ie
+ } with { variant (chreq_desc) "PRESENCE(chreq_desc_presence = '1'B)"
+ variant (egprs_ch_qual_rep) "PRESENCE(egprs_ch_qual_rep_presence = '1'B)"
+ variant (pfi) "PRESENCE(pfi_presence = '1'B)"
+ };
/* 11.2.2 Packet Control Acknowledgement */
type enumerated CtrlAck {
@@ -706,6 +759,7 @@ module RLCMAC_CSN1_Types {
type union RlcmacUlCtrlUnion {
PacketCtrlAck ctrl_ack,
PacketDlAckNack dl_ack_nack,
+ EgprsPacketDlAckNack dl_ack_nack_egprs,
PacketUlDummy ul_dummy,
PacketResourceReq resource_req,
octetstring other
@@ -717,6 +771,7 @@ module RLCMAC_CSN1_Types {
} with {
variant (u) "CROSSTAG(ctrl_ack, msg_type = PACKET_CONTROL_ACK;
dl_ack_nack, msg_type = PACKET_DL_ACK_NACK;
+ dl_ack_nack_egprs, msg_type = PACKET_EGPRS_DL_ACK_NACK;
ul_dummy, msg_type = PACKET_UL_DUMMY_CTRL;
resource_req, msg_type = PACKET_RESOURCE_REQUEST;
other, OTHERWISE
@@ -737,6 +792,27 @@ module RLCMAC_CSN1_Types {
ReceivedBlockBitmap receive_block_bitmap
} with { variant "" };
+ /* 12.3.1 Egprs Ack/Nack Description */
+ type bitstring UncompressedReceivedBlockBitmap length(64) with { variant "BYTEORDER(last)" };
+ type record EgprsAckNackDescription {
+ BIT1 final_ack,
+ BIT1 begin_window,
+ BIT1 end_window,
+ uint11_t starting_seq_nr,
+ BIT1 compressed,
+ /* TODO: CompressedReceivedBlockBitmap urbb optional, */
+ UncompressedReceivedBlockBitmap urbb optional
+ } with { variant (urbb) "PRESENCE(compressed = '0'B)" };
+ type record EgprsAckNackDescriptionIE {
+ BIT1 len_present,
+ uint8_t len optional,
+ EgprsAckNackDescription acknack_desc
+ } with { variant (len) "PRESENCE(len_present = '1'B)"
+ variant (len) "LENGTHTO(acknack_desc)"
+ variant (len) "UNIT(bits)"
+ };
+
+
/* 12.7 Channel Request Description */
type enumerated RlcMode {
RLC_MODE_ACKNOWLEDGED (0),
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index f016c4d..e6f982f 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -401,6 +401,34 @@ module RLCMAC_Templates {
}
}
+ /* Send Template for Egprs Downlink ACK/NACK */
+ template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK_EGPRS(template uint5_t tfi, EgprsAckNackDescription andesc, boolean retry := false) := {
+ ctrl := {
+ mac_hdr := {
+ payload_type := MAC_PT_RLCMAC_NO_OPT,
+ spare := '00000'B,
+ retry := retry
+ },
+ payload := {
+ msg_type := PACKET_EGPRS_DL_ACK_NACK,
+ u := {
+ dl_ack_nack_egprs := {
+ dl_tfi := tfi,
+ ms_oom := '0'B,
+ egprs_ch_qual_rep_presence := '0'B,
+ egprs_ch_qual_rep := omit,
+ chreq_desc_presence := '0'B,
+ chreq_desc := omit,
+ pfi_presence := '0'B,
+ pfi := omit,
+ epdan_presence := '0'B,
+ ack_nack_desc_ie := ts_EgprsAckNackDescriptionIE(andesc)
+ }
+ }
+ }
+ }
+ }
+
/* Template for uplink Data block */
template RlcmacUlBlock t_RLCMAC_UL_DATA(template CodingScheme cs, template uint5_t tfi,
template uint4_t cv, template uint7_t bsn,