library/GSM_RR_Types: share send templates for ChannelDescription

They're going to be used in other modules too, not only in BTS_Tests.
Also, take a chance to rearrange the list of arguments, so the ones
with default values are placed after mandatory ones.

Change-Id: Ia33ebf2e680f16f774a981fc33422dfe5036637f
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 47f8a29..1582fae 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2005,9 +2005,9 @@
 
 	/* Craft channel description (with or without frequency hopping parameters) */
 	if (ispresent(g_pars.maio_hsn)) {
-		ch_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, maio_hsn := g_pars.maio_hsn));
+		ch_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, g_pars.maio_hsn));
 	} else {
-		ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr));
+		ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx0_arfcn));
 	}
 
 	/* Send IMM.ASS via CCHAN */
@@ -3476,26 +3476,6 @@
 	ma := ''B
 }
 
-private template (value) ChannelDescription ts_ChanDescH0(template (value) RslChannelNr chan_nr,
-							  template (value) uint3_t tsc := 7,
-							  template (value) uint12_t arfcn := mp_trx0_arfcn) := {
-	chan_nr := chan_nr,
-	tsc := tsc,
-	h := false,
-	arfcn := arfcn,
-	maio_hsn := omit
-}
-
-private template (value) ChannelDescription ts_ChanDescH1(template (value) RslChannelNr chan_nr,
-							  template (value) uint3_t tsc := 7,
-							  template (value) MaioHsn maio_hsn) := {
-	chan_nr := chan_nr,
-	tsc := tsc,
-	h := true,
-	arfcn := omit,
-	maio_hsn := maio_hsn
-}
-
 private function f_fmt_ia_stats(integer num_tx, integer num_rx, integer num_del) return charstring {
 	return int2str(num_tx) & " sent, "
 		  & int2str(num_rx) & " received, "
@@ -3516,7 +3496,7 @@
 	f_l1_tune(L1CTL);
 
 	for (var integer i := 0; i < num_total; i := i+1) {
-		var ChannelDescription ch_desc := valueof(ts_ChanDescH0(valueof(t_RslChanNr_SDCCH4(0, 0))));
+		var ChannelDescription ch_desc := valueof(ts_ChanDescH0(t_RslChanNr_SDCCH4(0, 0), mp_trx0_arfcn));
 		var GsmRrMessage ia := valueof(ts_IMM_ASS(42, i, 5, ch_desc, c_MA_null));
 		var octetstring ia_enc := enc_GsmRrMessage(ia);
 		RSL_CCHAN.send(ts_ASP_RSL_UD(ts_RSL_IMM_ASSIGN(ia_enc, 0)));