summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-09-14 12:55:47 +0200
committerHarald Welte <laforge@osmocom.org>2020-10-03 18:27:05 +0200
commit847a77e32fada86da0e647179f7b69c23a3304eb (patch)
tree3d5509fa2972935f23775f21c87502ab92ad46a0 /library
parent3dd8355d7db8d3f204f9871cff2ce419c2d0785b (diff)
NS_Emulation: pass around string idenifier for components created
We want to see useful identification for components in the log, and hence must be giving every component a name at create() time. Change-Id: I0fe650243953e4d85161684865acd0354b2e465f
Diffstat (limited to 'library')
-rw-r--r--library/NS_Emulation.ttcnpp14
-rw-r--r--library/NS_Provider_FR.ttcn5
-rw-r--r--library/NS_Provider_IPL4.ttcn2
3 files changed, 11 insertions, 10 deletions
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index ee25d3e..5fb2aa6 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -85,25 +85,25 @@ module NS_Emulation {
out NsUnitdataRequest;
} with { extension "internal" };
- function NSStart(NSConfiguration init_config) runs on NS_CT {
+ function NSStart(NSConfiguration init_config, charstring id := testcasename()) runs on NS_CT {
config := init_config;
- f_init();
+ f_init(id & "-NSemu");
f_ScanEvents();
}
- private function f_init() runs on NS_CT {
+ private function f_init(charstring id) runs on NS_CT {
var Result res;
if (ischosen(config.provider.ip)) {
/* Connect the UDP socket */
- vc_NSP_IP := NS_Provider_IPL4_CT.create;
+ vc_NSP_IP := NS_Provider_IPL4_CT.create(id & "-provIP");
connect(self:NSCP, vc_NSP_IP:NSE);
- vc_NSP_IP.start(NS_Provider_IPL4.main(config));
+ vc_NSP_IP.start(NS_Provider_IPL4.main(config, id));
#ifdef NS_EMULATION_FR
} else if (ischosen(config.provider.fr)) {
- vc_NSP_FR := NS_Provider_FR_CT.create;
+ vc_NSP_FR := NS_Provider_FR_CT.create(id & "-provFR");
connect(self:NSCP, vc_NSP_FR:NSE);
- vc_NSP_FR.start(NS_Provider_FR.main(config));
+ vc_NSP_FR.start(NS_Provider_FR.main(config, id));
#endif
}
diff --git a/library/NS_Provider_FR.ttcn b/library/NS_Provider_FR.ttcn
index afa27d9..5387b0f 100644
--- a/library/NS_Provider_FR.ttcn
+++ b/library/NS_Provider_FR.ttcn
@@ -27,11 +27,12 @@ type component NS_Provider_FR_CT extends NS_Provider_CT, FR_Client_CT {
var boolean pvc_active := false;
};
-function main(NSConfiguration config) runs on NS_Provider_FR_CT system af_packet {
+function main(NSConfiguration config, charstring id) runs on NS_Provider_FR_CT system af_packet {
/* start Frame Relay Emulation */
- vc_FREMU := FR_Emulation_CT.create();
+ vc_FREMU := FR_Emulation_CT.create(id & "-FRemu");
var Q933em_Config q933_cfg := valueof(ts_Q933em_Config(ats_is_user := not config.role_sgsn, bidirectional := false));
+ q933_cfg.T391 := 1.0;
map(vc_FREMU:FR, system:AF_PACKET) param (config.provider.fr.netdev);
vc_FREMU.start(FrameRelay_Emulation.main(q933_cfg));
diff --git a/library/NS_Provider_IPL4.ttcn b/library/NS_Provider_IPL4.ttcn
index f1fda6c..3b9fcaf 100644
--- a/library/NS_Provider_IPL4.ttcn
+++ b/library/NS_Provider_IPL4.ttcn
@@ -23,7 +23,7 @@ type component NS_Provider_IPL4_CT extends NS_Provider_CT {
var integer g_conn_id := -1;
};
-function main(NSConfiguration config) runs on NS_Provider_IPL4_CT {
+function main(NSConfiguration config, charstring id) runs on NS_Provider_IPL4_CT {
/* connect socket */
map(self:IPL4, system:IPL4);