summaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-08-09 20:26:07 +0000
committerNeels Hofmeyr <neels@hofmeyr.de>2020-10-01 06:48:49 +0200
commit767548a82ba7d73ead7973840dfb734f691fe7be (patch)
tree7053e99e5b9c4f896c95ae02b0dab166882c4170 /bsc
parenta208389c0794a09224ea76ed4b6d1ae2c3391d88 (diff)
bsc: f_logp(): add VTY pt so it works on various components
So far only worked on test_CT, now also on MSC_ConnHdlr by passing the respective BSCVTY. Change-Id: I85ad0a59af72aa72e26a1252f946ada43388dc17
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn22
1 files changed, 11 insertions, 11 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 34ee429..3a817f4 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -941,12 +941,12 @@ function f_init_vty(charstring id := "foo") runs on test_CT {
"sccp-timer iar " & int2str(g_bsc_sccp_timer_iar)});
}
-private function f_logp(charstring log_msg) runs on MSC_ConnHdlr
+private function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
- f_vty_transceive(BSCVTY, "logp lglobal notice " & log_msg);
+ f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
private function f_sysinfo_seen(integer rsl_idx, RSL_Message rsl) runs on test_CT
@@ -6092,22 +6092,22 @@ template MobileIdentityLV ts_MI_TMSI_NRI_LV(integer nri_v, integer nri_bitlen :=
ts_MI_TMSI_LV(tmsi := f_tmsi_nri(nri_v, nri_bitlen := nri_bitlen));
private function f_perform_clear(RSL_DCHAN_PT rsl) runs on MSC_ConnHdlr {
- f_logp("MSC instructs BSC to clear channel");
+ f_logp(BSCVTY, "MSC instructs BSC to clear channel");
BSSAP.send(ts_BSSMAP_ClearCommand(0));
interleave {
[] rsl.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch tr_RRM_RR_RELEASE)) {
- f_logp("Got RSL RR Release");
+ f_logp(BSCVTY, "Got RSL RR Release");
}
[] rsl.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
- f_logp("Got RSL Deact SACCH");
+ f_logp(BSCVTY, "Got RSL Deact SACCH");
}
[] BSSAP.receive(tr_BSSMAP_ClearComplete) {
- f_logp("Got BSSMAP Clear Complete");
+ f_logp(BSCVTY, "Got BSSMAP Clear Complete");
/* Also drop the SCCP connection */
BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
}
[] rsl.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
- f_logp("Got RSL RF Chan Rel, sending Rel Ack");
+ f_logp(BSCVTY, "Got RSL RF Chan Rel, sending Rel Ack");
rsl.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
}
}
@@ -6118,7 +6118,7 @@ runs on MSC_ConnHdlr {
timer T := 10.0;
var octetstring l3_enc := enc_PDU_ML3_MS_NW(valueof(l3_info));
- f_logp("establish channel, send Complete Layer 3 Info");
+ f_logp(BSCVTY, "establish channel, send Complete Layer 3 Info");
f_create_bssmap_exp(l3_enc);
/* RSL_Emulation.f_chan_est() on rsl:
@@ -6156,7 +6156,7 @@ runs on MSC_ConnHdlr {
rsl.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
- f_logp("expect BSSAP Complete Layer 3 Info at MSC");
+ f_logp(BSCVTY, "expect BSSAP Complete Layer 3 Info at MSC");
var template PDU_BSSAP exp_l3_compl;
exp_l3_compl := tr_BSSMAP_ComplL3()
if (g_pars.aoip == false) {
@@ -6169,7 +6169,7 @@ runs on MSC_ConnHdlr {
T.start;
alt {
[] BSSAP.receive(exp_l3_compl) -> value bssap {
- f_logp("received expected Complete Layer 3 Info at MSC");
+ f_logp(BSCVTY, "received expected Complete Layer 3 Info at MSC");
log("rx exp_l3_compl = ", bssap);
}
[] BSSAP.receive(tr_BSSMAP_ComplL3) {
@@ -6182,7 +6182,7 @@ runs on MSC_ConnHdlr {
/* start ciphering, if requested */
if (ispresent(g_pars.encr)) {
- f_logp("start ciphering");
+ f_logp(BSCVTY, "start ciphering");
f_cipher_mode(g_pars.encr.enc_alg, g_pars.encr.enc_key);
}