GSM_Types: Add RSL channel number IE encoder/decoder
diff --git a/sysinfo/GSM_Types.ttcn b/sysinfo/GSM_Types.ttcn
index 3313d7c..ecc714b 100644
--- a/sysinfo/GSM_Types.ttcn
+++ b/sysinfo/GSM_Types.ttcn
@@ -441,5 +441,68 @@
 				other, OTHERWISE;
 		)" }
 
+	/* TS 48.058 9.3.1 Channel Number IE */
+	type enumerated RslChanNr0 {
+		RSL_CHAN_NR_INVALID	('00'H),
+		RSL_CHAN_NR_Bm_ACCH	('01'H),
+		RSL_CHAN_NR_BCCH	('10'H),
+		RSL_CHAN_NR_RACH	('11'H),
+		RSL_CHAN_NR_PCH_AGCH	('12'H)
+	} with { variant "FIELDLENGTH(5)" };
+
+	type record RslChanNr2 {
+		BIT4		tag ('0001'B),
+		uint1_t		sub_chan
+	} with { variant "FIELDLENGTH(5)" };
+
+	type record RslChanNr4 {
+		BIT3		tag ('001'B),
+		uint2_t		sub_chan
+	} with { variant "FIELDLENGTH(5)" };
+
+	type record RslChanNr8 {
+		BIT2		tag ('01'B),
+		uint3_t		sub_chan
+	} with { variant "FIELDLENGTH(5)" };
+
+	type union RslChanNrU {
+		RslChanNr0	ch0,
+		RslChanNr2	lm,
+		RslChanNr4	sdcch4,
+		RslChanNr8	sdcch8
+	} with {
+		variant "TAG(lm, tag = '0001'B;
+			     sdcch4, tag = '001'B;
+			     sdcch8, tag = '01'B;
+			     ch0, OTHERWISE)"
+		variant "FIELDLENGTH(5)"
+	};
+
+	type record RslChannelNr {
+		RslChanNrU	u,
+		uint3_t		tn
+	} with { variant "FIELDLENGTH(8)" };
+
+	template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := {
+		u := { ch0 := cht },
+		tn := tn
+	}
+
+	template RslChannelNr t_RslChanNr_RACH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_RACH);
+	template RslChannelNr t_RslChanNr_BCCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_BCCH);
+	template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
+	template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
+	template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, uint1_t sub_slot) := {
+		u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
+		tn := tn
+	}
+	template RslChannelNr t_RslChanNr_SDCCH4(template uint3_t tn, template uint2_t sub_slot) := {
+		u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },
+		tn := tn
+	}
+	template RslChannelNr t_RslChanNr_SDCCH8(template uint3_t tn, template uint3_t sub_slot) := {
+		u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },
+		tn := tn
+	}
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }