library: deduplicate f_logp

Change-Id: Ie84a8a75e9f162fcbef0d07d0bc75e47a5303fa3
This commit is contained in:
Oliver Smith 2023-10-20 13:54:28 +02:00 committed by osmith
parent d35cd6a9cd
commit 7bb63cf0a8
6 changed files with 10 additions and 42 deletions

View File

@ -1129,16 +1129,6 @@ function f_init_vty(charstring id := "foo") runs on test_CT {
"sccp-timer iar " & int2str(g_bsc_sccp_timer_iar)});
}
friend function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
if (pt.checkstate("Mapped")) {
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
{
if (rsl_idx >= lengthof(g_system_information)) {

View File

@ -349,14 +349,6 @@ altstep as_Tguard() runs on test_CT {
}
}
friend function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
function f_init_vty(charstring id := "foo") runs on test_CT {
if (HNBGWVTY.checkstate("Mapped")) {
/* skip initialization if already executed once */

View File

@ -95,14 +95,6 @@ altstep as_Tguard() runs on test_CT {
}
}
friend function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
function f_init_vty(charstring id := "foo") runs on test_CT {
if (HNBVTY.checkstate("Mapped")) {
/* skip initialization if already executed once */

View File

@ -363,4 +363,14 @@ public function f_verify_talloc_bytes(TELNETasp_PT pt, ro_charstring object_strs
mtc.stop;
}
public function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
if (pt.checkstate("Mapped")) {
f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
}
}

View File

@ -156,14 +156,6 @@ altstep as_Tguard() runs on test_CT {
}
}
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(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
/* global initialization function
* \param nr_bts Number of BTSs we should start/bring up
* \param handler_mode Start an RSL_Emulation_CT component (true) or not (false).

View File

@ -68,14 +68,6 @@ altstep as_Tguard() runs on test_CT {
}
}
friend function f_logp(TELNETasp_PT pt, charstring log_msg)
{
// log on TTCN3 log output
log(log_msg);
// log in stderr log
f_vty_transceive(pt, "logp lglobal notice TTCN3 f_logp(): " & log_msg);
}
private function f_get_name_val(out charstring val, charstring str, charstring name, charstring sep := ":", charstring delim := " ") return boolean {
var charstring labl := name & sep;
var integer namepos := f_strstr(str, labl);