library/RSL_Emulation: server mode: handle multiple transceivers

Since change [1], the IPA emulation component allows us to handle
multiple IPA connections, thus multiple RSL connections. The idea
is to attach a TCP/IP connection identifier to each message.

On top of that, this change implements mapping between TCP/IP
connection identifiers and RSL stream identifiers, so we can
finally talk to any of connected transceivers (up to 4 for now),
not only the last connected one (as it was before). The actual
mapping is done during the IPA identification procedure.

Instead of forwarding ASP_IPA_EVENT_UP to a test case, the RSL
emulation component now sends a new event - RSLEM_EV_TRX_UP,
with transceiver number (actually, IPA stream-id) attached.

[1] I93c58c08cf296e5cea81d811650caa1a09b8a579

Change-Id: I86afb55ecc6703ce7a229aaa626223f9331a4778
Related: OS#4546
diff --git a/library/IPA_Types.ttcn b/library/IPA_Types.ttcn
index ce6f9b6..110e5b1 100644
--- a/library/IPA_Types.ttcn
+++ b/library/IPA_Types.ttcn
@@ -131,5 +131,18 @@
        extension "decode(RAW)"
      }
 
+/* Finds an IE with the given tag in IPA IDENTITY RESPONSE.
+ * Returns index of an IE if found, -1 otherwise. */
+function f_ipa_id_resp_find_ie(in IpaCcmIdResp resp, IpaCcmIdTag tag)
+return integer {
+	for (var integer i := 0; i < sizeof(resp); i := i + 1) {
+		if (resp[i].tag == tag) {
+			return i;
+		}
+	}
+
+	return -1;
+}
+
 
 } with { encode "RAW" }