BTS: manually compose Rest Octets for SI Type 3 and 4

Finally, we can get rid of hard-coded octetstrings and control
every field of the Rest Octets we're sending to the IUT.

Note that template 'ts_SI4_default' did not contain any Rest
Octets at all, thus the GPRS indicator was (and still is)
absent. This will be fixed in a follow up change.

Change-Id: I0a95b34b495267edf1f48692e24fcd5ede8ccdd1
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 6f43a44..3ed3655 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -225,6 +225,28 @@
 	lac := 42
 }
 
+private template (value) GPRSIndicator ts_GPRSIndicator_def := {
+	ra_colour := 0,
+	si13_pos := '0'B
+}
+
+private template (value) SI3RestOctets ts_SI3RestOctets_def
+modifies ts_SI3RestOctets := {
+	gprs_ind := {
+		presence := CSN1_H,
+		ind := ts_GPRSIndicator_def
+	}
+}
+
+private template (value) SI4RestOctets ts_SI4RestOctets_def
+modifies ts_SI4RestOctets := {
+	gprs_ind := {
+		/* FIXME: GPRS Indicator shall be present here too */
+		presence := CSN1_L,
+		ind := omit
+	}
+}
+
 /* Default SYSTEM INFORMATION 3 */
 template (value) SystemInformation ts_SI3_default := {
 	header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18),
@@ -251,7 +273,7 @@
 			},
 			cell_sel_par := ts_CellSelPar_default,
 			rach_control := ts_RachCtrl_default,
-			rest_octets := '2C2B2B2B'O /* GPRS present */
+			rest_octets := enc_SI3RestOctets(valueof(ts_SI3RestOctets_def))
 		}
 	}
 }
@@ -276,7 +298,7 @@
 			rach_control := ts_RachCtrl_default,
 			cbch_chan_desc := omit,
 			cbch_mobile_alloc := omit,
-			rest_octets := ''O
+			rest_octets := enc_SI4RestOctets(valueof(ts_SI4RestOctets_def))
 		}
 	}
 }