From a2afacc90515141acc4844673e5b6ff52550ae09 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 18 May 2020 21:16:19 +0700 Subject: 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 --- library/GSUP_Emulation.ttcn | 6 +++--- library/Osmocom_CTRL_Adapter.ttcn | 2 +- library/RAN_Emulation.ttcnpp | 6 +++--- library/RSL_Emulation.ttcn | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'library') diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn index 4a033597..51c158a5 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 08195c86..0be3ebbf 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 b54d6e4d..7e98b8b3 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 309ec13d..5a0816f6 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; -- cgit v1.2.3