summaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-02 17:27:57 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-02 19:02:49 +0700
commit0007072fdacf50460c9a2a02d101aca059089f23 (patch)
treea9a7de7c4fec44b1ad3bf8fd4aef59e316e2b4eb /bsc
parent93a2fda74296be2cd68404d0a2c8555583d44684 (diff)
BSC_Tests/hopping: make f_vty_{handover,ss_action}() more flexible
Make it possible to call them from a testcase / function running on any kind of component, not only on MSC_ConnHdlr. Change-Id: Ifbcc24c5a0299ba43a998ccbdd0f77bc109c6935
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn18
1 files changed, 10 insertions, 8 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 1b37f78..fb9fa68 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4156,8 +4156,10 @@ runs on test_CT {
}
/* execute a "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7>" command on given Dchan */
-private function f_vty_ss_action(charstring suffix, integer bts_nr, integer trx_nr, RslChannelNr chan_nr)
-runs on MSC_ConnHdlr {
+private function f_vty_ss_action(TELNETasp_PT pt, charstring suffix,
+ uint8_t bts_nr, uint8_t trx_nr,
+ in RslChannelNr chan_nr)
+{
/* FIXME: resolve those from component-global state */
var integer ts_nr := chan_nr.tn;
var integer ss_nr;
@@ -4176,7 +4178,7 @@ runs on MSC_ConnHdlr {
var charstring cmd := "bts "&int2str(bts_nr)&" trx "&int2str(trx_nr)&
" timeslot "&int2str(ts_nr)&" sub-slot "&int2str(ss_nr)&" ";
- f_vty_transceive(BSCVTY, cmd & suffix);
+ f_vty_transceive(pt, cmd & suffix);
}
/* Even though the VTY command to trigger handover takes a new BTS number as argument, behind the scenes osmo-bsc always
@@ -4184,10 +4186,10 @@ runs on MSC_ConnHdlr {
* ident key (ARFCN + BSIC) in the struct passed on to handover_request(). handover_start() then resolves that to a
* viable actual neighbor cell. So from the internal osmo-bsc perspective, we always request handover to an ARFCN + BSIC
* pair, not really to a specific BTS number. */
-private function f_vty_handover(integer bts_nr, integer trx_nr, RslChannelNr chan_nr,
- integer new_bts_nr)
-runs on MSC_ConnHdlr {
- f_vty_ss_action("handover " & int2str(new_bts_nr), bts_nr, trx_nr, chan_nr);
+private function f_vty_handover(TELNETasp_PT pt, uint8_t bts_nr, uint8_t trx_nr,
+ in RslChannelNr chan_nr, uint8_t new_bts_nr)
+{
+ f_vty_ss_action(pt, "handover " & int2str(new_bts_nr), bts_nr, trx_nr, chan_nr);
}
/* intra-BSC hand-over between BTS0 and BTS1 */
@@ -4209,7 +4211,7 @@ private function f_tc_ho_int(charstring id) runs on MSC_ConnHdlr {
old_chan_nr := -
};
/* issue hand-over command on VTY */
- f_vty_handover(0, 0, g_chan_nr, 1);
+ f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
/* temporarily suspend DChan processing on BTS1 to avoid race with RSLEM_register */
f_rslem_suspend(RSL1_PROC);