summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-25 19:01:04 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-26 18:00:26 +0700
commitef9bcd21ba64f308732c4f99a7810e2c0988ed24 (patch)
treea6b2d563e629cebc0d67c152a217d944fd267975 /library
parent6643e8d3c7f0ed7141d748f0924c339efb7b3f0a (diff)
library/IPA_Emulation: handle optional conn_id in ASP_RSL_Unitdata
This would allow the RSL Emulation component to maintain several transceiver connections in server mode. In order to send an RSL message to a specific transceiver, its TCP/IP connection ID needs to be included in the ASP_RSL_Unitdata message. Change-Id: I5c48d043cd746aad03e4329d9ffd2a627b640f64 Related: OS#4546
Diffstat (limited to 'library')
-rw-r--r--library/IPA_Emulation.ttcnpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 1833a89..2148392 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -110,18 +110,23 @@ template ASP_IPA_Unitdata t_ASP_IPA_UD(IpaStreamId sid, octetstring pl,
#ifdef IPA_EMULATION_RSL
/* like ASP_IPA_Unitdata, but with RSL_Message abstract type instead of octetstring */
type record ASP_RSL_Unitdata {
+ integer conn_id optional,
IpaStreamId streamId,
RSL_Message rsl
};
template (value) ASP_RSL_Unitdata ts_ASP_RSL_UD(template (value) RSL_Message rsl,
- IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := {
+ IpaStreamId sid := IPAC_PROTO_RSL_TRX0,
+ template (omit) integer conn_id := omit) := {
+ conn_id := conn_id,
streamId := sid,
rsl := rsl
}
template ASP_RSL_Unitdata tr_ASP_RSL_UD(template (present) RSL_Message rsl,
- template IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := {
+ template IpaStreamId sid := IPAC_PROTO_RSL_TRX0,
+ template integer conn_id := *) := {
+ conn_id := conn_id,
streamId := sid,
rsl := rsl
}
@@ -479,8 +484,13 @@ private function f_from_asp(IPL4asp_Types.ConnectionId connId, ASP_IPA_Unitdata
#ifdef IPA_EMULATION_RSL
private function f_from_rsl(IPL4asp_Types.ConnectionId connId, ASP_RSL_Unitdata rsl_tx) return IPA_Send {
var octetstring payload := enc_RSL_Message(rsl_tx.rsl);
- var IPA_Send ret := valueof(t_IPA_Send(connId, rsl_tx.streamId, payload));
- return ret;
+
+ /* ASP_RSL_Unitdata may (optionally) contain TCP/IP connection ID */
+ if (rsl_tx.conn_id != omit) {
+ connId := rsl_tx.conn_id;
+ }
+
+ return valueof(t_IPA_Send(connId, rsl_tx.streamId, payload));
}
#endif
@@ -654,10 +664,11 @@ private function ScanEvents() runs on IPA_Emulation_CT {
#endif
#ifdef IPA_EMULATION_RSL
case (t_IpaSidRSL) {
- rsl := {
- streamId := ipa_rx.streamId,
- rsl := dec_RSL_Message(ipa_rx.msg)
- };
+ rsl := valueof(ts_ASP_RSL_UD(
+ rsl := dec_RSL_Message(ipa_rx.msg),
+ sid := ipa_rx.streamId,
+ conn_id := ipa_rx.connId
+ ));
IPA_RSL_PORT.send(rsl);
}
#endif