aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-01-17 22:19:03 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-21 19:31:09 +0100
commit67089ee9a4550ed42820d6c6cbcb968dedf2bae4 (patch)
treee1f7d2cfb2a29f80103620d405cef88739128e72 /bsc
parent876bf9d4748175d83f1dd0a963827fdee5fefa44 (diff)
BSSAP_Adapter: De-couple from BSC-testing MSC_ConnectionHandler
... and pave the way from using it on the other side in MSC testing Change-Id: I0095f7d24dd8b24f759e4c74a4e7856ec4503ed2
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn6
-rw-r--r--bsc/BSSAP_Adapter.ttcn12
2 files changed, 10 insertions, 8 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 0080fe09..880b693b 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -237,7 +237,11 @@ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs o
/* Call a function of our 'parent component' BSSAP_Adapter_CT to start the
* MSC-side BSSAP emulation */
- f_bssap_init("VirtMSC", handler_mode);
+ if (handler_mode) {
+ f_bssap_init("VirtMSC", MSC_BssmapOps);
+ } else {
+ f_bssap_init("VirtMSC", omit);
+ }
f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0);
for (i := 0; i < nr_bts; i := i+1) {
diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn
index 4268b29b..98a30d88 100644
--- a/bsc/BSSAP_Adapter.ttcn
+++ b/bsc/BSSAP_Adapter.ttcn
@@ -24,8 +24,6 @@ import from BSSAP_CodecPort all;
import from BSSMAP_Templates all;
import from BSSMAP_Emulation all;
-import from MSC_ConnectionHandler all;
-
type component BSSAP_Adapter_CT {
/* component references */
var M3UA_CT vc_M3UA;
@@ -85,14 +83,14 @@ private function init_pars() runs on BSSAP_Adapter_CT {
}
-function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSAP_Adapter_CT
+function f_bssap_init(charstring id, template BssmapOps ops) runs on BSSAP_Adapter_CT
{
init_pars();
/* create components */
vc_M3UA := M3UA_CT.create(id & "-M3UA");
vc_SCCP := SCCP_CT.create(id & "-SCCP");
- if (handler_mode) {
+ if (isvalue(ops)) {
vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP");
}
@@ -100,7 +98,7 @@ function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSA
/* connect MTP3 service provider (M3UA) to lower side of SCCP */
connect(vc_M3UA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT);
- if (handler_mode) {
+ if (isvalue(ops)) {
connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT);
} else {
/* connect BSSNAP dispatcher to upper side of SCCP */
@@ -109,8 +107,8 @@ function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSA
vc_M3UA.start(f_M3UA_Emulation(mp_sctp_addr));
vc_SCCP.start(SCCPStart(g_sccp_pars));
- if (handler_mode) {
- vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_BssmapOps, ""));
+ if (isvalue(ops)) {
+ vc_BSSMAP.start(BSSMAP_Emulation.main(valueof(ops), ""));
}
}