sccp: Add Tests for SCMG SST procedure

The SST procedure can be used by any SCCP node to test the availability
of a remote SSN.  If the specified remote SSN is available at the
specified PC, a SCMG SSA is returned.  If not, there's a timeout.

Test for SSN=1 (SCMG), another non-SCMG SSN that exists, and for one
SSN that doesn't exist.

Change-Id: If3f5f3144c0ed83d0bda5953522a9d73287c8ba2
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index ff4d745..9936dd0 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -215,5 +215,90 @@
 	}
 }
 
+private function f_pc_int2bit(template (present) integer pc)
+return template SCMG_param_AffectedPointCode {
+	if (istemplatekind(pc, "?")) {
+		return ?;
+	} else {
+		return int2bit(valueof(pc), 16);
+	}
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SSA(template (value) integer ssn,
+					      integer pc,
+					      template (value) BIT2 smi := '00'B) := {
+	messageType := sSAallowed,
+	affectedSSN := ssn,
+	affectedPC := int2bit(valueof(pc), 16),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCMG_SSA(template (present) integer ssn := ?,
+						template (present) integer pc := ?,
+						template (present) BIT2 smi := ?) := {
+	messageType := sSAallowed,
+	affectedSSN := ssn,
+	affectedPC := f_pc_int2bit(pc),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SSP(template (value) integer ssn,
+					      integer pc,
+					      template (value) BIT2 smi := '00'B) := {
+	messageType := sSPprohib,
+	affectedSSN := ssn,
+	affectedPC := int2bit(valueof(pc), 16),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCMG_SSP(template (present) integer ssn := ?,
+						template (present) integer pc := ?,
+						template (present) BIT2 smi := ?) := {
+	messageType := sSPprohib,
+	affectedSSN := ssn,
+	affectedPC := f_pc_int2bit(pc),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+
+template (value) PDU_SCMG_message ts_SCMG_SST(template (value) integer ssn,
+					      integer pc,
+					      template (value) BIT2 smi := '00'B) := {
+	messageType := sSTstaTest,
+	affectedSSN := ssn,
+	affectedPC := int2bit(valueof(pc), 16),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+template (present) PDU_SCMG_message tr_SCMG_SST(template (present) integer ssn := ?,
+						template (present) integer pc := ?,
+						template (present) BIT2 smi := ?) := {
+	messageType := sSTstaTest,
+	affectedSSN := ssn,
+	affectedPC := f_pc_int2bit(pc),
+	smi := {
+		smi := smi,
+		reserved := '000000'B
+	},
+	congLevel := omit
+}
+
+
 
 }