cbc: Initial set of CBC tess for osmo-cbc

osmo-cbc is the Osmocom cell broadcast centre.  So far, there was no
TTCN-3 test suite.  Let's change that.

Change-Id: I38286e8a3dd0f39bd25f631dcbb3ff4f8d4c221f
diff --git a/library/CBSP_Templates.ttcn b/library/CBSP_Templates.ttcn
index 5ee1f33..5da2958 100644
--- a/library/CBSP_Templates.ttcn
+++ b/library/CBSP_Templates.ttcn
@@ -54,7 +54,7 @@
 	if (istemplatekind(val, "omit")) {
 		ie := omit;
 	} else if (istemplatekind(val, "*")) {
-		ie := tr_CBSP_IE({channel_ind := ?}) ifpresent;
+		ie := tr_CBSP_IE({channel_ind := ?}); //ifpresent;
 	} else {
 		ie := tr_CBSP_IE({channel_ind := val});
 	}
@@ -542,14 +542,20 @@
 			ts_OldSerNo(old_ser_nr),
 			ts_CbspCellList(cell_list),
 			ts_CbspChannelInd(channel_ind)});
-template CBSP_PDU tr_CBSP_KILL(template uint16_t msg_id := ?, template uint16_t old_ser_nr := ?,
-				template BSSMAP_FIELD_CellIdentificationList cell_list := ?,
-				template uint8_t channel_ind := ?) :=
-	tr_CBSP(CBSP_MSGT_KILL, {
-			tr_CbspMsgId(msg_id),
-			tr_OldSerNo(old_ser_nr),
-			tr_CbspCellList(cell_list),
-			tr_CbspChannelInd(channel_ind) });
+function tr_CBSP_KILL(template uint16_t msg_id := ?, template uint16_t old_ser_nr := ?,
+			template BSSMAP_FIELD_CellIdentificationList cell_list := ?,
+			template uint8_t channel_ind := ?)
+return template (present) CBSP_PDU {
+	var template CBSP_IEs ies := {
+		tr_CbspMsgId(msg_id),
+		tr_OldSerNo(old_ser_nr),
+		tr_CbspCellList(cell_list)
+	};
+	if (not istemplatekind(channel_ind, "omit")) {
+		ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind);
+	}
+	return tr_CBSP(CBSP_MSGT_KILL, ies);
+}
 
 /* 8.1.3.5 KILL COMPLETE */
 function ts_CBSP_KILL_COMPL(template (value) uint16_t msg_id, template (value) uint16_t old_ser_nr,