GSM_Types: More 44.018 + 24.008 definitions for RR
diff --git a/sysinfo/GSM_SystemInformation.ttcn b/sysinfo/GSM_SystemInformation.ttcn
index 4a7bfd5..8001dd9 100644
--- a/sysinfo/GSM_SystemInformation.ttcn
+++ b/sysinfo/GSM_SystemInformation.ttcn
@@ -9,57 +9,14 @@
 	import from GSM_Types all;
 	import from Osmocom_Types all;
 
-	type record L2PseudoLength {
-		uint6_t		l2_plen,
-		BIT2		zero_one
-	} with { variant "" };
-
-	template L2PseudoLength t_L2Pseudolength(template uint6_t len) := {
-		l2_plen := len,
-		zero_one := '01'B
-	};
-
-	type octetstring RestOctets  with { variant "PADDING(yes), PADDING_PATTERN('00101011'B)" };
-
-	type record MaioHsn {
-	} with { variant "" };
-
 	type union ArfcnOrMaio {
 		uint12_t	arfcn,
 		MaioHsn		maio_hsn
 	} with { variant "" };
 
-	type record SystemInformationHeader {
-		L2PseudoLength	l2_plen,
-		uint4_t		skip_indicator,
-		uint4_t		rr_protocol_discriminator,
-		RrMessageType	message_type
-	} with { variant "" };
-
-	template SystemInformationHeader t_SiHeader(RrMessageType msg_type, template uint6_t len) := {
-		l2_plen := t_L2Pseudolength(len),
-		skip_indicator := 0,
-		rr_protocol_discriminator := 6,
-		message_type := msg_type
-	};
-
-	external function enc_SystemInformationHeader(in SystemInformationHeader si) return octetstring
-		with { extension "prototype(convert) encode(RAW)" };
-	external function dec_SystemInformationHeader(in octetstring stream) return SystemInformationHeader
-		with { extension "prototype(convert) decode(RAW)" };
-
-	type hexstring GsmBcdString with { variant "HEXORDER(low)" };
-	type GsmBcdString BcdMccMnc with { variant "FIELDLENGTH(6)" };
-
 	/* 24.008 10.5.1.1 */
 	type uint16_t CellIdentity;
 
-	/* 24.008 10.5.1.3 */
-	type record LocationAreaIdentification {
-		BcdMccMnc	mcc_mnc,
-		uint16_t	lac
-	} with { variant "" };
-
 	/* 44.018 10.5.2.1b */
 	type octetstring CellChannelDescription with { variant "FIELDLENGTH(16)" };
 
@@ -88,18 +45,6 @@
 		uint6_t		rxlev_access_min
 	} with { variant "" };
 
-	/* 44.018 10.5.2.5 */
-	type record ChannelDescription {
-		OCT1		iei,
-		BIT5		chan_type_tdma_offset,
-		uint3_t		tn,
-		uint3_t		tsc,
-		boolean		h,
-		uint12_t	arfcn optional,
-		MaioHsn		maio_hsn optional
-	} with { variant (arfcn) "PRESENCE(h = true)"
-		 variant (maio_hsn) "PRESENCE(h = false)" };
-
 	/* 44.018 10.5.2.11 */
 	type record ControlChannelDescription {
 		boolean		mscrr,
@@ -116,7 +61,7 @@
 	template ControlChannelDescription t_ControlChannelDescription := { ?, ?, ?, ?, ?, ?, '00'B, ?, ? };
 
 	/* 44.018 10.5.2.21 */
-	type record MobileAllocation {
+	type record MobileAllocationT {
 		OCT1		iei,
 		uint8_t		len,
 		bitstring	ma
@@ -145,7 +90,6 @@
 
 	/* 44.018 9.1.31 */
 	type record SystemInformationType1 {
-		//SystemInformationHeader	header,
 		CellChannelDescription	cell_chan_desc,
 		RachControlParameters	rach_control,
 		Si1RestOctets		rest_octets
@@ -153,7 +97,6 @@
 
 	/* 44.018 9.1.32 */
 	type record SystemInformationType2 {
-		//SystemInformationHeader	header,
 		NeighbourCellDescription bcch_freq_list,
 		BIT8			ncc_permitted,
 		RachControlParameters	rach_control
@@ -161,7 +104,6 @@
 
 	/* 44.018 9.1.33 */
 	type record SystemInformationType2bis {
-		//SystemInformationHeader		header,
 		NeighbourCellDescription	extd_bcch_freq_list,
 		RachControlParameters		rach_control,
 		OCT1				rest_octets
@@ -169,14 +111,12 @@
 
 	/* 44.018 9.1.34 */
 	type record SystemInformationType2ter {
-		//SystemInformationHeader		header,
 		NeighbourCellDescription2	extd_bcch_freq_list,
 		OCT4				rest_octets
 	} with { variant "" };
 
 	/* 44.018 9.1.35 */
 	type record SystemInformationType3 {
-		//SystemInformationHeader		header,
 		CellIdentity			cell_id,
 		LocationAreaIdentification	lai,
 		ControlChannelDescription	ctrl_chan_desc,
@@ -199,36 +139,31 @@
 
 	/* 44.018 9.1.36 */
 	type record SystemInformationType4 {
-		//SystemInformationHeader		header,
 		LocationAreaIdentification	lai,
 		CellSelectionParameters		cell_sel_par,
 		RachControlParameters		rach_control,
 		ChannelDescription		cbch_chan_desc optional,
-		MobileAllocation		cbch_mobile_alloc optional,
+		MobileAllocationT		cbch_mobile_alloc optional,
 		RestOctets			rest_octets
 	} with { variant "TAG(cbch_chan_desc, iei = '64'O; cbch_mobile_alloc, iei = '72'O)" };
 
 	/* 44.018 9.1.37 */
 	type record SystemInformationType5 {
-		SystemInformationHeader		header,
 		NeighbourCellDescription	bcch_freq_list
 	} with { variant "" };
 
 	/* 44.018 9.1.38 */
 	type record SystemInformationType5bis {
-		//SystemInformationHeader		header,
 		NeighbourCellDescription	extd_bcch_freq_list
 	} with { variant "" };
 
 	/* 44.018 9.1.39 */
 	type record SystemInformationType5ter {
-		//SystemInformationHeader		header,
 		NeighbourCellDescription2	extd_bcch_freq_list
 	} with { variant "" };
 
 	/* 44.018 9.1.40 */
 	type record SystemInformationType6 {
-		//SystemInformationHeader		header,
 		CellIdentity			cell_id,
 		LocationAreaIdentification	lai,
 		CellOptionsSacch		cell_options,
@@ -251,7 +186,7 @@
 	} with { variant "" };
 
 	type record SystemInformation {
-		SystemInformationHeader		header,
+		RrHeader			header,
 		SystemInformationUnion		payload
 	} with { variant (payload) "CROSSTAG(si1, header.message_type = SYSTEM_INFORMATION_TYPE_1;
 			      si2, header.message_type = SYSTEM_INFORMATION_TYPE_2;