Change in osmo-ttcn3-hacks[master]: library: relax length constraints applied to SI Rest Octets

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon May 4 18:17:20 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18025 )


Change subject: library: relax length constraints applied to SI Rest Octets
......................................................................

library: relax length constraints applied to SI Rest Octets

As it turned out, the length constraints introduced in [1] were
too strict. In particular, the use of FIELDLENGTH attribute made
it impossible to assign an octetstring of a smaller size and then
pad the remaining octets with '2B'O. TITAN would just use '00'O
instead, ignoring all my attempts to talk some sense into it.

[1] I183d3ba9000e3ced8ecce74a4390b80075ddf25d

Change-Id: Ie1b6d4100c064b6ae08ed55cd797b9416c6faf14
Signed-off-by: Vadim Yanitskiy <axilirator at gmail.com>
---
M library/GSM_SystemInformation.ttcn
1 file changed, 11 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/18025/1

diff --git a/library/GSM_SystemInformation.ttcn b/library/GSM_SystemInformation.ttcn
index 07ca8e6..de1fcf7 100644
--- a/library/GSM_SystemInformation.ttcn
+++ b/library/GSM_SystemInformation.ttcn
@@ -119,10 +119,8 @@
 	type record SystemInformationType1 {
 		CellChannelDescription	cell_chan_desc,
 		RachControlParameters	rach_control,
-		RestOctets		rest_octets
-	} with {
-		variant (rest_octets) "FIELDLENGTH(1)"
-	};
+		RestOctets		rest_octets length(0..1)
+	} with { variant "" };
 
 	/* 44.018 9.1.32 */
 	type record SystemInformationType2 {
@@ -135,18 +133,14 @@
 	type record SystemInformationType2bis {
 		NeighbourCellDescription	extd_bcch_freq_list,
 		RachControlParameters		rach_control,
-		RestOctets			rest_octets
-	} with {
-		variant (rest_octets) "FIELDLENGTH(1)"
-	};
+		RestOctets			rest_octets length(0..1)
+	} with { variant "" };
 
 	/* 44.018 9.1.34 */
 	type record SystemInformationType2ter {
 		NeighbourCellDescription2	extd_bcch_freq_list,
-		RestOctets			rest_octets
-	} with {
-		variant (rest_octets) "FIELDLENGTH(4)"
-	};
+		RestOctets			rest_octets length(0..4)
+	} with { variant "" };
 
 	/* 44.018 9.1.35 */
 	type record SystemInformationType3 {
@@ -156,10 +150,8 @@
 		CellOptions			cell_options,
 		CellSelectionParameters		cell_sel_par,
 		RachControlParameters		rach_control,
-		RestOctets			rest_octets
-	} with {
-		variant (rest_octets) "FIELDLENGTH(4)"
-	};
+		RestOctets			rest_octets length(0..4)
+	} with { variant "" };
 
 	template SystemInformationType3 t_SI3 := {
 		cell_id := ?,
@@ -179,7 +171,7 @@
 		RachControlParameters		rach_control,
 		ChannelDescriptionTV		cbch_chan_desc optional,
 		MobileAllocationT		cbch_mobile_alloc optional,
-		RestOctets			rest_octets /* 0 .. 10 octets (see 10.5.2.35) */
+		RestOctets			rest_octets length(0..10) /* see 10.5.2.35 */
 	} with { variant "TAG(cbch_chan_desc, iei = '64'O; cbch_mobile_alloc, iei = '72'O)" };
 
 	/* 44.018 9.1.37 */
@@ -203,10 +195,8 @@
 		LocationAreaIdentification	lai,
 		CellOptionsSacch		cell_options,
 		BIT8				ncc_permitted,
-		RestOctets			rest_octets
-	} with {
-		variant (rest_octets) "FIELDLENGTH(7)"
-	};
+		RestOctets			rest_octets length(0..7)
+	} with { variant "" };
 
 	type union SystemInformationUnion {
 		SystemInformationType1		si1,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18025
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: Ie1b6d4100c064b6ae08ed55cd797b9416c6faf14
Gerrit-Change-Number: 18025
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200504/b47b0d65/attachment.htm>


More information about the gerrit-log mailing list