summaryrefslogtreecommitdiffstats
path: root/bsc-nat/BSC_MS_Simulation.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'bsc-nat/BSC_MS_Simulation.ttcn')
-rw-r--r--bsc-nat/BSC_MS_Simulation.ttcn27
1 files changed, 16 insertions, 11 deletions
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index 5feaf0e..7f23318 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -23,6 +23,9 @@ import from RAN_Emulation all;
import from BSC_MS_ConnectionHandler all;
+type function void_fn_bsc(charstring id) runs on BSC_CT;
+type record of BSC_MS_ConnHdlr BSC_MS_ConnHdlrList;
+
type component BSC_CT {
/* component references */
var IPA_Emulation_CT vc_IPA;
@@ -64,11 +67,15 @@ runs on BSC_MS_ConnHdlr {
fn.apply(id);
}
+function bsc_do_nothing(charstring id)
+runs on BSC_CT {
+}
+
function main(charstring remote_ip, PortNumber remote_port,
charstring local_ip, PortNumber local_port,
MSC_SCCP_MTP3_parameters sccp_pars,
BSC_MS_TestHdlrParams pars,
- void_fn_bsc_ms fn, charstring id) runs on BSC_CT
+ void_fn_bsc_ms fn_bsc_ms, void_fn_bsc fn_bsc, charstring id) runs on BSC_CT
{
var integer i := 0;
timer T := 1.0;
@@ -101,8 +108,15 @@ function main(charstring remote_ip, PortNumber remote_port,
T.start(2.0);
T.timeout;
+ var BSC_MS_ConnHdlrList vc_conns;
+ for (i := 0; i < mp_num_iterations; i := i+1) {
+ vc_conns[i] := f_start_handler(fn_bsc_ms, id & "-MS-" & int2str(i), g_pars);
+ }
+
+ fn_bsc.apply(id);
+
for (i := 0; i < mp_num_iterations; i := i+1) {
- f_start_BSC_MS(fn, id & "-MS-" & int2str(i));
+ vc_conns[i].done;
}
/* explicitly stop all components that we started above */
@@ -111,13 +125,4 @@ function main(charstring remote_ip, PortNumber remote_port,
vc_SCCP.stop;
}
-function f_start_BSC_MS(void_fn_bsc_ms fn, charstring id) runs on BSC_CT {
- var BSC_MS_ConnHdlr vc_conn;
- /* start component */
- vc_conn := f_start_handler(fn, id, g_pars);
- /* blocking wait until component terminates. If you want to start MSs in parallel,
- * you have to remove this statement here */
- vc_conn.done;
-}
-
}