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
changes/56/18356/1
Vadim Yanitskiy 3 years ago
parent 61564be045
commit a2afacc905
  1. 2
      bsc-nat/BSC_MS_Simulation.ttcn
  2. 4
      bsc/BSC_Tests.ttcn
  3. 4
      bts/BTS_Tests.ttcn
  4. 4
      hlr/HLR_EUSE.ttcn
  5. 2
      hlr/HLR_Tests.ttcn
  6. 6
      library/GSUP_Emulation.ttcn
  7. 2
      library/Osmocom_CTRL_Adapter.ttcn
  8. 6
      library/RAN_Emulation.ttcnpp
  9. 12
      library/RSL_Emulation.ttcn
  10. 8
      remsim/REMSIM_Tests.ttcn
  11. 4
      remsim/RSPRO_Server.ttcn
  12. 6
      remsim/RemsimBankd_Tests.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;

@ -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;
}

@ -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");
}

@ -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;

@ -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;

@ -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;
}

@ -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;

@ -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

@ -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;

@ -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 {

@ -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;

@ -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 {

Loading…
Cancel
Save