summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-18 21:16:19 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-05-18 21:16:35 +0700
commita2afacc90515141acc4844673e5b6ff52550ae09 (patch)
treef533e2b63b60745f4ec6fdc026e8fb77071f2487
parent61564be045e4e7686638a9e65e9f2e6aed13e9da (diff)
library/IPA: use tr_ASP_IPA_EV instead of inline templates
This way we can easily add new parameters to ASP_IPA_Event. Change-Id: Icc37286fcb4d43836d56a26424ecb9dcba58d1f1
-rw-r--r--bsc-nat/BSC_MS_Simulation.ttcn2
-rw-r--r--bsc/BSC_Tests.ttcn4
-rw-r--r--bts/BTS_Tests.ttcn4
-rw-r--r--hlr/HLR_EUSE.ttcn4
-rw-r--r--hlr/HLR_Tests.ttcn2
-rw-r--r--library/GSUP_Emulation.ttcn6
-rw-r--r--library/Osmocom_CTRL_Adapter.ttcn2
-rw-r--r--library/RAN_Emulation.ttcnpp6
-rw-r--r--library/RSL_Emulation.ttcn12
-rw-r--r--remsim/REMSIM_Tests.ttcn8
-rw-r--r--remsim/RSPRO_Server.ttcn4
-rw-r--r--remsim/RemsimBankd_Tests.ttcn6
12 files changed, 30 insertions, 30 deletions
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index 0582576..0a057a3 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -131,7 +131,7 @@ function main(charstring remote_ip, PortNumber remote_port,
/* Initial delay to wait for IPA connection establishment */
T.start;
alt {
- [] SCCPLITE_IPA_CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
+ [] SCCPLITE_IPA_CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "Timeout CTRL waiting for ASP_IPA_EVENT_UP");
mtc.stop;
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 38a961b..bcefe67 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -226,7 +226,7 @@ runs on test_CT {
/* wait for IPA RSL link to connect and send ID ACK */
T.start;
alt {
- [] IPA_RSL[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) {
+ [] IPA_RSL[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {
T.stop;
IPA_RSL[i].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23)));
}
@@ -1707,7 +1707,7 @@ function f_ipa_unknown_unit_id(integer mp_bsc_ipa_port) runs on test_CT return b
/* wait for IPA OML link to connect and then disconnect */
T.start;
alt {
- [] IPA_RSL[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] IPA_RSL[0].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
T.stop;
return true;
}
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 289298b..d241496 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -417,7 +417,7 @@ function f_init() runs on test_CT {
f_init_rsl(id);
T.start;
alt {
- [] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
+ [] RSL_CCHAN.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP));
[] T.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP");
}
@@ -4956,7 +4956,7 @@ runs on test_CT {
f_init_rsl(testcasename());
T.start;
alt {
- [] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
+ [] RSL_CCHAN.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP));
[] T.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP");
}
diff --git a/hlr/HLR_EUSE.ttcn b/hlr/HLR_EUSE.ttcn
index ef07ca6..17e4776 100644
--- a/hlr/HLR_EUSE.ttcn
+++ b/hlr/HLR_EUSE.ttcn
@@ -49,8 +49,8 @@ private function f_init(charstring hlr_ip, uint16_t hlr_gsup_port, charstring na
timer T := 10.0;
T.start;
alt {
- [] EUSE.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { repeat; }
- [] EUSE.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { }
+ [] EUSE.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { repeat; }
+ [] EUSE.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { }
[] T.timeout {
setverdict(fail, "EUSE: Timeout waiting for GSUP IPA Link to come up");
self.stop;
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 27a44de..36e28b8 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -201,7 +201,7 @@ function f_init_gsup(charstring id, boolean legacy) runs on test_CT {
T.start;
alt {
[not legacy] GSUP_IPA_EVENT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
- [legacy] GSUP.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
+ [legacy] GSUP.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "No connection to GSUP Port");
mtc.stop;
diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn
index 4a03359..51c158a 100644
--- a/library/GSUP_Emulation.ttcn
+++ b/library/GSUP_Emulation.ttcn
@@ -183,9 +183,9 @@ function main(GsupOps ops, charstring id) runs on GSUP_Emulation_CT {
alt {
- [] GSUP.receive(ASP_IPA_Event:{up_down:=ASP_IPA_EVENT_ID_ACK}) { repeat; }
- [] GSUP.receive(ASP_IPA_Event:{up_down:=ASP_IPA_EVENT_UP}) { repeat; }
- [] GSUP.receive(ASP_IPA_Event:{up_down:=ASP_IPA_EVENT_DOWN}) {
+ [] GSUP.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { repeat; }
+ [] GSUP.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { repeat; }
+ [] GSUP.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
setverdict(fail, "GSUP Connection Lost");
mtc.stop;
}
diff --git a/library/Osmocom_CTRL_Adapter.ttcn b/library/Osmocom_CTRL_Adapter.ttcn
index 08195c8..0be3ebb 100644
--- a/library/Osmocom_CTRL_Adapter.ttcn
+++ b/library/Osmocom_CTRL_Adapter.ttcn
@@ -44,7 +44,7 @@ runs on CTRL_Adapter_CT {
/* wait for IPA CTRL link to connect and send UP */
T.start;
alt {
- [] IPA_CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
+ [] IPA_CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "Timeout CTRL waiting for ASP_IPA_EVENT_UP");
mtc.stop;
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index b54d6e4..7e98b8b 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -1149,13 +1149,13 @@ private altstep as_main_ctrl() runs on RAN_Emulation_CT {
CTRL_CLIENT.send(ctrl);
}
- [] CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) -> value evt {
+ [] CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) -> value evt {
CTRL_CLIENT.send(evt);
}
- [] CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
}
- [] CTRL.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) {}
+ [] CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {}
#else
[false] CLIENT.receive {}
#endif
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 309ec13..5a0816f 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -372,22 +372,22 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
while (true) {
alt {
- [bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) {
+ [bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) {
}
- [not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) -> value evt {
+ [not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) -> value evt {
CCHAN_PT.send(evt);
}
- [bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
}
- [not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
}
- [bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) {
+ [bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {
IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23)));
}
- [not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { }
+ [not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { }
[bts_role] IPA_PT.receive(tr_RSL(tr_RSL_IMM_ASSIGN)) -> value rx_rsl {
var GsmRrMessage rr;
var OCT1 ra;
diff --git a/remsim/REMSIM_Tests.ttcn b/remsim/REMSIM_Tests.ttcn
index ee2d450..b97dea1 100644
--- a/remsim/REMSIM_Tests.ttcn
+++ b/remsim/REMSIM_Tests.ttcn
@@ -46,7 +46,7 @@ type component rspro_client_CT {
};
private altstep as_ignore_id_ack(integer i := 0) runs on rspro_client_CT {
- [] RSPRO[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { repeat; }
+ [] RSPRO[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { repeat; }
}
function f_rspro_init(inout RSPRO_Client clnt, charstring dst_host, integer dst_port,
@@ -73,7 +73,7 @@ runs on rspro_client_CT
T.start;
alt {
- [] RSPRO[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
+ [] RSPRO[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "Timeout waiting for ASP_IPA_EVENT_UP");
mtc.stop;
@@ -81,7 +81,7 @@ runs on rspro_client_CT
}
T.start;
alt {
- [] RSPRO[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { }
+ [] RSPRO[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { }
[] T.timeout {
setverdict(fail, "Timeout waiting for ASP_IPA_EVENT_ID_ACK");
mtc.stop;
@@ -132,7 +132,7 @@ runs on rspro_client_CT {
timer T := 10.0;
T.start;
alt {
- [] RSPRO[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] RSPRO[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
setverdict(pass);
}
[] T.timeout {
diff --git a/remsim/RSPRO_Server.ttcn b/remsim/RSPRO_Server.ttcn
index 25ec4d1..635629f 100644
--- a/remsim/RSPRO_Server.ttcn
+++ b/remsim/RSPRO_Server.ttcn
@@ -45,7 +45,7 @@ private altstep as_rspro_srv_Tguard() runs on rspro_server_CT {
}
altstep as_ignore_id_ack(integer i) runs on rspro_server_CT {
- [] RSPRO_SRV[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { repeat; }
+ [] RSPRO_SRV[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { repeat; }
}
@@ -55,7 +55,7 @@ runs on rspro_server_CT
timer T := 20.0;
T.start;
alt {
- [] RSPRO_SRV[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { }
+ [] RSPRO_SRV[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { }
[] T.timeout {
setverdict(fail, "Timeout waiting for ASP_IPA_EVENT_UP");
mtc.stop;
diff --git a/remsim/RemsimBankd_Tests.ttcn b/remsim/RemsimBankd_Tests.ttcn
index fd3f907..47beedd 100644
--- a/remsim/RemsimBankd_Tests.ttcn
+++ b/remsim/RemsimBankd_Tests.ttcn
@@ -63,7 +63,7 @@ testcase TC_connectBankReq_timeout() runs on bankd_test_CT {
f_rspro_srv_exp(tr_RSPRO_ConnectBankReq(?, ?, ?));
T.start;
alt {
- [] RSPRO_SRV[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] RSPRO_SRV[0].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
setverdict(pass);
}
[] RSPRO_SRV[0].receive { repeat; }
@@ -233,7 +233,7 @@ testcase TC_createMapping_connectClient_changeMapping() runs on bankd_test_CT {
timer T := 5.0;
T.start;
alt {
- [] RSPRO[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] RSPRO[0].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
setverdict(pass);
}
[] RSPRO[0].receive {
@@ -273,7 +273,7 @@ testcase TC_createMapping_connectClient_recreateMapping() runs on bankd_test_CT
timer T := 5.0;
T.start;
alt {
- [] RSPRO[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ [] RSPRO[0].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) {
setverdict(fail, "Unexpected client disconnect");
}
[] RSPRO[0].receive {