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
This commit is contained in:
Vadim Yanitskiy 2022-02-07 14:18:38 +06:00 committed by laforge
parent 7bd04e4169
commit 5f14d34642
2 changed files with 45 additions and 6 deletions

View File

@ -677,19 +677,52 @@ testcase TC_vamos_multiplex_tch_f_tch_f() runs on test_CT {
f_shutdown_helper();
}
const charstring DONE := "DONE";
/*
* f1 f2 f3 f4
* COORD <--> COORD | COORD2 <--> COORD | COORD2 <--> COORD
* ---DONE-----> ---DONE-----> ---DONE----->
* <----DONE---- <----DONE---- <----DONE----
*/
/* 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(DONE);
COORD.receive(DONE);
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(DONE);
f_est_and_reassign_to_secondary_lchan(valueof(t_RslChanNr_Osmo_VAMOS_Lm(5, 0)));
COORD2.send(DONE);
COORD2.receive(DONE)
COORD.send(DONE);
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(DONE);
f_est_lchan_and_mode_modify_to_vamos();
f_logp(BSCVTY, "f_est_lchan_and_mode_modify_to_vamos done");
COORD2.send(DONE);
COORD2.receive(DONE);
COORD.send(DONE);
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(DONE);
f_est_and_reassign_to_secondary_lchan(valueof(t_RslChanNr_Osmo_VAMOS_Lm(5, 1)));
COORD.send(DONE);
f_perform_clear(RSL);
}
/* Establish a primary lchan and modify it to VAMOS speech mode. Then establish
@ -725,17 +758,22 @@ testcase TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h() runs on test_CT {
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();
}

View File

@ -447,6 +447,7 @@ type component MSC_ConnHdlr extends RAN_ConnHdlr, RSL_DchanHdlr, MGCP_ConnHdlr,
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;