Change in osmo-ttcn3-hacks[master]: RLCMAC: Fix unbound spb value in decoded egprs data blocks

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Feb 5 10:14:50 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22711 )

Change subject: RLCMAC: Fix unbound spb value in decoded egprs data blocks
......................................................................

RLCMAC: Fix unbound spb value in decoded egprs data blocks

That field is only present in Header Type 3 blocks.

Change-Id: Ie05576d7d7c18933dd9abcdc055cbfe1e4e54756
---
M library/RLCMAC_EncDec.cc
M library/RLCMAC_Types.ttcn
2 files changed, 6 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RLCMAC_EncDec.cc b/library/RLCMAC_EncDec.cc
index ac22def..97bd0be 100644
--- a/library/RLCMAC_EncDec.cc
+++ b/library/RLCMAC_EncDec.cc
@@ -545,6 +545,7 @@
 	ret_val.bsn2__offset() = egprs1->bsn2_lo << 7 | egprs1->bsn2_hi;
 	ret_val.pr() = egprs1->pr;
 	ret_val.cps() = egprs1->cps;
+	ret_val.spb() = OMIT_VALUE;
 
 	ttcn_buffer.increase_pos(sizeof(*egprs1));
 	return ret_val;
@@ -571,6 +572,7 @@
 	ret_val.bsn2__offset() = 0; /*TODO: mark optional and not set ? */
 	ret_val.pr() = egprs2->pr;
 	ret_val.cps() = egprs2->cps;
+	ret_val.spb() = OMIT_VALUE;
 
 	ttcn_buffer.increase_pos(sizeof(*egprs2));
 	return ret_val;
diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn
index 3110a66..fe47231 100644
--- a/library/RLCMAC_Types.ttcn
+++ b/library/RLCMAC_Types.ttcn
@@ -238,9 +238,9 @@
 		uint11_t	bsn1,
 		uint8_t		bsn2_offset,
 		uint2_t		pr, /* power reduction */
-		uint2_t		spb,
+		uint2_t		spb optional,
 		uint4_t		cps
-	} with { variant "" };
+	} with { variant (spb) "PRESENCE(header_type=RLCMAC_HDR_TYPE_3)" };
 	/* Manual C++ Decoder: */
 	type record RlcmacDlEgprsDataBlock {
 		CodingScheme		mcs, /* Provided by C++ Decoder */
@@ -295,9 +295,10 @@
 		uint4_t		cps,
 		boolean		pfi_ind,
 		BIT1		rsb,
-		BIT2		spb
+		BIT2		spb optional
 	} with {
 		variant (pfi_ind) "FIELDLENGTH(1)"
+		variant (spb) "PRESENCE(header_type=RLCMAC_HDR_TYPE_3)"
 	};
 	/* Manual C++ Decoder:  10.3a.2.1 EGPRS Uplink RLC data block */
 	type record RlcmacUlEgprsDataBlock {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22711
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie05576d7d7c18933dd9abcdc055cbfe1e4e54756
Gerrit-Change-Number: 22711
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210205/4a98c9a2/attachment.htm>


More information about the gerrit-log mailing list