neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27086 )
Change subject: BSC_Tests_VAMOS: fix TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h ......................................................................
BSC_Tests_VAMOS: fix TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h
Properly clean up conns in the end. Use COORD and new COORD2 ports to daisy-chain coordination between the four components.
Related: OS#5444 Change-Id: I3b1dfc3b11e990893cbf182fb9f8840e198eb8aa --- M bsc/BSC_Tests_VAMOS.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 48 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/86/27086/1
diff --git a/bsc/BSC_Tests_VAMOS.ttcn b/bsc/BSC_Tests_VAMOS.ttcn index 9a53200..6266634 100644 --- a/bsc/BSC_Tests_VAMOS.ttcn +++ b/bsc/BSC_Tests_VAMOS.ttcn @@ -677,19 +677,55 @@ f_shutdown_helper(); }
+const charstring DONE1 := "DONE1"; +const charstring DONE2 := "DONE2"; +const charstring DONE3 := "DONE3"; +const charstring DONE4 := "DONE4"; + +/* + * f1 f2 f3 f4 + * COORD <--> COORD | COORD2 <--> COORD | COORD2 <--> COORD + * ---DONE1----> ---DONE2----> ---DONE3----> + * <----DONE4--- <----DONE4--- <----DONE4--- + */ + /* First, primary lchan of TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h() */ private function f_TC_vamos_multiplex_tch_h_tch_h1(charstring id) runs on MSC_ConnHdlr { f_est_lchan_and_mode_modify_to_vamos(); f_logp(BSCVTY, "f_est_lchan_and_mode_modify_to_vamos done"); + COORD.send(DONE1); + COORD.receive(DONE4); + f_perform_clear(RSL); }
/* Second, VAMOS shadow lchan of TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h() */ private function f_TC_vamos_multiplex_tch_h_tch_h2(charstring id) runs on MSC_ConnHdlr { + f_sleep(1.0); + COORD.receive(DONE1); f_est_and_reassign_to_secondary_lchan(valueof(t_RslChanNr_Osmo_VAMOS_Lm(5, 0))); + COORD2.send(DONE2); + COORD2.receive(DONE4) + COORD.send(DONE4); + f_perform_clear(RSL); +} + +private function f_TC_vamos_multiplex_tch_h_tch_h3(charstring id) runs on MSC_ConnHdlr { + f_sleep(1.0); + COORD.receive(DONE2); + f_est_lchan_and_mode_modify_to_vamos(); + f_logp(BSCVTY, "f_est_lchan_and_mode_modify_to_vamos done"); + COORD2.send(DONE3); + COORD2.receive(DONE4); + COORD.send(DONE4); + f_perform_clear(RSL); }
private function f_TC_vamos_multiplex_tch_h_tch_h4(charstring id) runs on MSC_ConnHdlr { + f_sleep(1.0); + COORD.receive(DONE3); f_est_and_reassign_to_secondary_lchan(valueof(t_RslChanNr_Osmo_VAMOS_Lm(5, 1))); + COORD.send(DONE4); + f_perform_clear(RSL); }
/* Establish a primary lchan and modify it to VAMOS speech mode. Then establish @@ -725,17 +761,22 @@ pars4.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecHR}));
vc_conn1 := f_start_handler(refers(f_TC_vamos_multiplex_tch_h_tch_h1), pars1); - vc_conn1.done; - vc_conn2 := f_start_handler(refers(f_TC_vamos_multiplex_tch_h_tch_h2), pars2); - vc_conn2.done;
/* Also fill up the second subslot of the TCH/H timeslot */ - vc_conn3 := f_start_handler(refers(f_TC_vamos_multiplex_tch_h_tch_h1), pars3); - vc_conn3.done; - + vc_conn3 := f_start_handler(refers(f_TC_vamos_multiplex_tch_h_tch_h3), pars3); vc_conn4 := f_start_handler(refers(f_TC_vamos_multiplex_tch_h_tch_h4), pars4); + + /* see diagram above (search for "---DONE") */ + connect(vc_conn1:COORD, vc_conn2:COORD); + connect(vc_conn2:COORD2, vc_conn3:COORD); + connect(vc_conn3:COORD2, vc_conn4:COORD); + + vc_conn1.done; + vc_conn2.done; + vc_conn3.done; vc_conn4.done; + f_shutdown_helper(); }
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 4aeb539..109194b 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -447,6 +447,7 @@ port RAN_PROC_PT RAN; port TELNETasp_PT BSCVTY; port Coord_PT COORD; + port Coord_PT COORD2;
/* Proxy MGCP-over-IPA and MGCP-over-UDP */ port IPA_MGCP_PT MGCP_MSC_CLIENT;