BTS_Tests: cosmetic: mark private types / functions as such
Change-Id: I99ccf398130c7e5c2aac1932ebb83f158fed281d
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1b6c9b2..a42f628 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -187,7 +187,7 @@
port PCUIF_CODEC_PT PCU;
}
-function f_init_rsl(charstring id) runs on test_CT {
+private function f_init_rsl(charstring id) runs on test_CT {
var bitstring trx_mask := '00000000'B;
var integer trx_count := 0;
var RSLEm_Event ev;
@@ -250,11 +250,11 @@
}
/* Test-specific parameters */
-type union TestSpecUnion {
+private type union TestSpecUnion {
RllTestCase rll
}
-template (value) RachControlParameters ts_RachCtrl_default := {
+private template (value) RachControlParameters ts_RachCtrl_default := {
max_retrans := RACH_MAX_RETRANS_7,
tx_integer := '1001'B, /* 12 slots */
cell_barr_access := false,
@@ -262,7 +262,7 @@
acc := '0000010000000000'B
};
-template (value) CellSelectionParameters ts_CellSelPar_default := {
+private template (value) CellSelectionParameters ts_CellSelPar_default := {
cell_resel_hyst_2dB := 2,
ms_txpwr_max_cch := mp_ms_power_level_exp,
acs := '0'B,
@@ -270,7 +270,7 @@
rxlev_access_min := 0
}
-template (value) LocationAreaIdentification ts_LAI_default := {
+private template (value) LocationAreaIdentification ts_LAI_default := {
mcc_mnc := '262F42'H,
lac := 42
}
@@ -297,7 +297,7 @@
}
/* Default SYSTEM INFORMATION 3 */
-template (value) SystemInformation ts_SI3_default := {
+private template (value) SystemInformation ts_SI3_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18),
payload := {
si3 := {
@@ -327,7 +327,7 @@
}
}
-template (value) SystemInformation ts_SI2_default := {
+private template (value) SystemInformation ts_SI2_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_2, 22),
payload := {
si2 := {
@@ -338,7 +338,7 @@
}
}
-template (value) SystemInformation ts_SI4_default := {
+private template (value) SystemInformation ts_SI4_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_4, 12), /* no CBCH / restoct */
payload := {
si4 := {
@@ -352,13 +352,13 @@
}
}
-function f_rsl_bcch_fill_raw(RSL_IE_SysinfoType rsl_si_type, octetstring si_enc)
+private function f_rsl_bcch_fill_raw(RSL_IE_SysinfoType rsl_si_type, octetstring si_enc)
runs on test_CT {
log("Setting ", rsl_si_type, ": ", si_enc);
RSL_CCHAN.send(ts_ASP_RSL_UD(ts_RSL_BCCH_INFO(rsl_si_type, si_enc)));
}
-function f_rsl_bcch_fill(RSL_IE_SysinfoType rsl_si_type, template (value) SystemInformation si_dec)
+private function f_rsl_bcch_fill(RSL_IE_SysinfoType rsl_si_type, template (value) SystemInformation si_dec)
runs on test_CT {
var octetstring si_enc := enc_SystemInformation(valueof(si_dec));
log("Setting ", rsl_si_type, ": ", si_dec);
@@ -508,7 +508,7 @@
f_connect_reset(L1CTL);
}
-type function void_fn(charstring id) runs on ConnHdlr;
+private type function void_fn(charstring id) runs on ConnHdlr;
/* create a new test component */
function f_start_handler(void_fn fn, ConnHdlrPars pars,
@@ -581,8 +581,8 @@
fn.apply(id);
}
-function f_rsl_transceive_ret(template RSL_Message tx, template RSL_Message exp_rx, charstring id,
- boolean ignore_other := false)
+private function f_rsl_transceive_ret(template RSL_Message tx, template RSL_Message exp_rx,
+ charstring id, boolean ignore_other := false)
runs on ConnHdlr return RSL_Message {
var RSL_Message rx;
timer T := 3.0;
@@ -1644,7 +1644,7 @@
* Measurement Processing / Reporting
***********************************************************************/
-template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := {
+private template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := {
spare := '0'B,
lpd := 0,
sapi := sapi,
@@ -1652,7 +1652,7 @@
ea := true
}
-template LapdmFrameAB ts_LAPDm_AB(LapdmSapi sapi, boolean c_r, boolean p, octetstring pl) := {
+private template LapdmFrameAB ts_LAPDm_AB(LapdmSapi sapi, boolean c_r, boolean p, octetstring pl) := {
addr := ts_LapdmAddr(sapi, c_r),
ctrl := ts_LapdmCtrlUI(p),
len := 0, /* overwritten */
@@ -1662,7 +1662,7 @@
}
/* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */
-altstep as_l1_sacch() runs on ConnHdlr {
+private altstep as_l1_sacch() runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl {
log("SACCH received: ", l1_dl.payload.data_ind.payload);
@@ -1683,7 +1683,7 @@
}
}
-altstep as_l1_dcch() runs on ConnHdlr {
+private altstep as_l1_dcch() runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl {
log("DCCH received: ", l1_dl.payload.data_ind.payload);
@@ -1694,17 +1694,17 @@
}
}
-type record MeasElem {
+private type record MeasElem {
uint6_t rxlev,
uint3_t rxqual
}
-type record MeasElemFS {
+private type record MeasElemFS {
MeasElem full,
MeasElem sub
}
-type record ConnL1Pars {
+private type record ConnL1Pars {
boolean dtx_enabled,
boolean toa256_enabled,
MeasElemFS meas_ul,
@@ -1834,7 +1834,7 @@
}
/* verify we regularly receive measurement reports with incrementing numbers */
-altstep as_meas_res(boolean verify_meas := true) runs on ConnHdlr {
+private altstep as_meas_res(boolean verify_meas := true) runs on ConnHdlr {
var RSL_Message rsl;
var boolean chan_est := false;
@@ -2268,7 +2268,7 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
-function f_check_meas_bs_power_level(integer level) runs on ConnHdlr {
+private function f_check_meas_bs_power_level(integer level) runs on ConnHdlr {
timer T := 8.0;
T.start;
var RSL_Message rsl;
@@ -2658,7 +2658,7 @@
}
-function f_wait_for_l1_power_level(integer level) runs on ConnHdlr {
+private function f_wait_for_l1_power_level(integer level) runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
timer T0 := 10.0;
T0.start;
@@ -2712,7 +2712,7 @@
}
type charstring BtsBand ("GSM450","GSM480","GSM750","GSM810","GSM850","GSM900","DCS1800","PCS1900");
-template charstring BtsBand_allGSM:= pattern "GSM???";
+private template charstring BtsBand_allGSM := pattern "GSM???";
private function f_power_from_band(in BtsBand band, out IntegerRecord min_dbm_level, out IntegerRecord max_dbm_level) return IntegerRecord {
// 45.005 4.1.1
var IntegerRecord gsm_power :={31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19,
@@ -3099,7 +3099,7 @@
* Paging
***********************************************************************/
-function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean {
+private function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean {
if (tmsi == 'FFFFFFFF'O) {
return true;
} else {
@@ -3107,16 +3107,16 @@
}
}
-type record allowedFn { integer frame_nr }
-template allowedFn bs_ag_blks_res_0 := { frame_nr := (6, 12, 16, 22, 26, 32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_1 := { frame_nr := (12, 16, 22, 26, 32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_2 := { frame_nr := (16, 22, 26, 32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_3 := { frame_nr := (22, 26, 32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_4 := { frame_nr := (26, 32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_5 := { frame_nr := (32, 36, 42, 46) }
-template allowedFn bs_ag_blks_res_6 := { frame_nr := (36, 42, 46) }
-template allowedFn bs_ag_blks_res_7 := { frame_nr := (42, 46) }
-function check_pch_fn(integer frame_nr, integer bs_ag_blks_res) runs on test_CT
+private type record allowedFn { integer frame_nr }
+private template allowedFn bs_ag_blks_res_0 := { frame_nr := (6, 12, 16, 22, 26, 32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_1 := { frame_nr := (12, 16, 22, 26, 32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_2 := { frame_nr := (16, 22, 26, 32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_3 := { frame_nr := (22, 26, 32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_4 := { frame_nr := (26, 32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_5 := { frame_nr := (32, 36, 42, 46) }
+private template allowedFn bs_ag_blks_res_6 := { frame_nr := (36, 42, 46) }
+private template allowedFn bs_ag_blks_res_7 := { frame_nr := (42, 46) }
+private function check_pch_fn(integer frame_nr, integer bs_ag_blks_res) runs on test_CT
{
var integer frame_nr_51;
frame_nr_51 := frame_nr mod 51
@@ -3158,7 +3158,9 @@
return;
}
-altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids, PagingTestCfg cfg)
+private altstep as_l1_count_paging(inout integer num_paging_rcv_msgs,
+ inout integer num_paging_rcv_ids,
+ PagingTestCfg cfg)
runs on test_CT {
var L1ctlDlMessage dl;
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_DummyUI)) {
@@ -3210,7 +3212,7 @@
}
}
-type record PagingTestCfg {
+private type record PagingTestCfg {
boolean combined_ccch,
integer bs_ag_blks_res,
float load_factor,
@@ -3219,7 +3221,7 @@
boolean use_tmsi
}
-type record PagingTestState {
+private type record PagingTestState {
integer num_paging_sent,
integer num_paging_rcv_msgs,
integer num_paging_rcv_ids,
@@ -3439,8 +3441,9 @@
ma := ''B
}
-template (value) ChannelDescription ts_ChanDescH0(template (value) RslChannelNr chan_nr, uint3_t tsc := 7,
- uint12_t arfcn := mp_trx0_arfcn) := {
+private template (value) ChannelDescription ts_ChanDescH0(template (value) RslChannelNr chan_nr,
+ template (value) uint3_t tsc := 7,
+ template (value) uint12_t arfcn := mp_trx0_arfcn) := {
chan_nr := chan_nr,
tsc := tsc,
h := false,
@@ -3448,8 +3451,9 @@
maio_hsn := omit
}
-template (value) ChannelDescription ts_ChanDescH1(template (value) RslChannelNr chan_nr, uint3_t tsc := 7,
- template (value) MaioHsn maio_hsn) := {
+private template (value) ChannelDescription ts_ChanDescH1(template (value) RslChannelNr chan_nr,
+ template (value) uint3_t tsc := 7,
+ template (value) MaioHsn maio_hsn) := {
chan_nr := chan_nr,
tsc := tsc,
h := true,
@@ -3544,19 +3548,22 @@
***********************************************************************/
/* tuple of Frame Number + decoded SI */
-type record SystemInformationFn {
+private type record SystemInformationFn {
GsmFrameNumber frame_number,
SystemInformation si
}
/* an arbitrary-length vector of decoded SI + gsmtap header */
-type record of SystemInformationFn SystemInformationVector;
+private type record of SystemInformationFn SystemInformationVector;
/* an array of SI-vectors indexed by TC value */
-type SystemInformationVector SystemInformationVectorPerTc[8];
+private type SystemInformationVector SystemInformationVectorPerTc[8];
/* determine if a given SI vector contains given SI type at least once */
-function f_si_vecslot_contains(SystemInformationVector arr, RrMessageType key, boolean bcch_ext := false) return boolean {
+private function f_si_vecslot_contains(SystemInformationVector arr,
+ RrMessageType key,
+ boolean bcch_ext := false)
+return boolean {
for (var integer i:= 0; i< sizeof(arr); i := i + 1) {
var integer fn_mod51 := arr[i].frame_number mod 51;
if (not bcch_ext and fn_mod51 == 2 or
@@ -3570,14 +3577,19 @@
}
/* ensure a given TC slot of the SI vector contains given SI type at least once at TC */
-function f_ensure_si_vec_contains(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false) {
+private function f_ensure_si_vec_contains(SystemInformationVectorPerTc arr,
+ integer tc, RrMessageType key,
+ boolean ext_bcch := false)
+{
if (not f_si_vecslot_contains(arr[tc], key, ext_bcch)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No ", key, " in TC=", tc, "!"));
}
}
/* check if a given SI vector contains given SI type at least once on any TC */
-function f_si_vec_contains(SystemInformationVectorPerTc arr, RrMessageType key) return boolean {
+private function f_si_vec_contains(SystemInformationVectorPerTc arr,
+ RrMessageType key)
+return boolean {
for (var integer tc:= 0; tc < sizeof(arr); tc := tc + 1) {
if (f_si_vecslot_contains(arr[tc], key) or
f_si_vecslot_contains(arr[tc], key, true)) {
@@ -3588,7 +3600,11 @@
}
/* determine if a given SI vector contains given SI type at least N of M times */
-function f_si_vecslot_contains_n_of_m(SystemInformationVector arr, RrMessageType key, boolean bcch_ext := false, integer n := 1, integer m := 4) return boolean {
+private function f_si_vecslot_contains_n_of_m(SystemInformationVector arr,
+ RrMessageType key,
+ boolean bcch_ext := false,
+ integer n := 1, integer m := 4)
+return boolean {
var integer count := 0;
if (sizeof(arr) < m) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Error: Insufficient SI in array");
@@ -3610,14 +3626,21 @@
}
/* ensure a given TC slot of the SI vector contains given SI type at least N out of M times at TC */
-function f_ensure_si_vec_contains_n_of_m(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false, integer n, integer m) {
+private function f_ensure_si_vec_contains_n_of_m(SystemInformationVectorPerTc arr,
+ integer tc, RrMessageType key,
+ boolean ext_bcch := false,
+ integer n, integer m)
+{
if (not f_si_vecslot_contains_n_of_m(arr[tc], key, ext_bcch, n, m)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Not ", n, "/", m, " of ", key, " in TC=", tc, "!"));
}
}
/* determine if a given SI vector contains given SI type at least once */
-function f_si_vecslot_contains_only(SystemInformationVector arr, RrMessageType key, boolean bcch_ext := false) return boolean {
+private function f_si_vecslot_contains_only(SystemInformationVector arr,
+ RrMessageType key,
+ boolean bcch_ext := false)
+return boolean {
for (var integer i:= 0; i< sizeof(arr); i := i + 1) {
var integer fn_mod51 := arr[i].frame_number mod 51;
if (not bcch_ext and fn_mod51 == 2 or
@@ -3631,14 +3654,17 @@
}
/* ensure a given TC slot of the SI vector contains only given SI type */
-function f_ensure_si_vec_contains_only(SystemInformationVectorPerTc arr, integer tc, RrMessageType key, boolean ext_bcch := false) {
+private function f_ensure_si_vec_contains_only(SystemInformationVectorPerTc arr,
+ integer tc, RrMessageType key,
+ boolean ext_bcch := false)
+{
if (not f_si_vecslot_contains_only(arr[tc], key, ext_bcch)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Not all ", key, " in TC=", tc, "!"));
}
}
/* SI configuration of cell, against which we validate actual SI messages */
-type set SystemInformationConfig {
+private type set SystemInformationConfig {
boolean bcch_extended,
boolean si1_present,
boolean si2bis_present,
@@ -3658,7 +3684,9 @@
}
/* validate the SI scheduling according to TS 45.002 version 14.1.0 Release 14, Section 6.3.1.3 */
-function f_validate_si_scheduling(SystemInformationConfig cfg, SystemInformationVectorPerTc si_per_tc) {
+private function f_validate_si_scheduling(SystemInformationConfig cfg,
+ SystemInformationVectorPerTc si_per_tc)
+{
var integer i;
for (i := 0; i < sizeof(si_per_tc); i := i + 1) {
if (sizeof(si_per_tc[i]) == 0) {
@@ -3856,7 +3884,8 @@
}
/* sample Systme Information for specified duration via L1CTL */
-function f_l1_sample_si(L1CTL_PT pt, float duration := 8.0) return SystemInformationVectorPerTc {
+private function f_l1_sample_si(L1CTL_PT pt, float duration := 8.0)
+return SystemInformationVectorPerTc {
timer T := duration;
var SystemInformationVectorPerTc si_per_tc;
var L1ctlDlMessage l1_dl;
@@ -5756,14 +5785,15 @@
}
}
-type record RllTestCase {
+private type record RllTestCase {
uint3_t sapi,
RslLinkId link_id,
octetstring l3,
boolean exp
}
-type record of RllTestCase RllTestCases;
-template RllTestCase t_EITC(uint3_t sapi, RslLinkId id, octetstring l3, boolean exp) := {
+private type record of RllTestCase RllTestCases;
+private template RllTestCase t_EITC(uint3_t sapi, RslLinkId id,
+ octetstring l3, boolean exp) := {
sapi := sapi,
link_id := id,
l3 := l3,
@@ -6152,7 +6182,7 @@
***********************************************************************/
/* send UNITDATA_REQ from BTS to MS and expect it to arrive */
-function f_unitdata_mt(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
+private function f_unitdata_mt(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
RSL.send(ts_RSL_UNITDATA_REQ(g_chan_nr, link_id, l3));
if (link_id.c == SACCH) {
f_l1_exp_lapdm(tr_LAPDm_B4_UI(link_id.sapi, cr_MT_CMD, l3));
@@ -6418,23 +6448,23 @@
***********************************************************************/
/* XXX These functions must be kept in sync with g_AllChannels defined on test_CT. */
-function f_g_chan_is_tchf() runs on ConnHdlr return boolean {
+private function f_g_chan_is_tchf() runs on ConnHdlr return boolean {
return (g_chan_nr == valueof(ts_RslChanNr_Bm(1)) or
g_chan_nr == valueof(ts_RslChanNr_Bm(2)) or
g_chan_nr == valueof(ts_RslChanNr_Bm(3)) or
g_chan_nr == valueof(ts_RslChanNr_Bm(4)));
}
-function f_g_chan_is_tchh() runs on ConnHdlr return boolean {
+private function f_g_chan_is_tchh() runs on ConnHdlr return boolean {
return (g_chan_nr == valueof(ts_RslChanNr_Lm(5,0)) or
g_chan_nr == valueof(ts_RslChanNr_Lm(5,1)));
}
-function f_g_chan_is_sdcch4() runs on ConnHdlr return boolean {
+private function f_g_chan_is_sdcch4() runs on ConnHdlr return boolean {
return (g_chan_nr == valueof(ts_RslChanNr_SDCCH4(0,0)) or
g_chan_nr == valueof(ts_RslChanNr_SDCCH4(0,1)) or
g_chan_nr == valueof(ts_RslChanNr_SDCCH4(0,2)) or
g_chan_nr == valueof(ts_RslChanNr_SDCCH4(0,3)));
}
-function f_g_chan_is_sdcch8() runs on ConnHdlr return boolean {
+private function f_g_chan_is_sdcch8() runs on ConnHdlr return boolean {
return (g_chan_nr == valueof(ts_RslChanNr_SDCCH8(6,0)) or
g_chan_nr == valueof(ts_RslChanNr_SDCCH8(6,1)) or
g_chan_nr == valueof(ts_RslChanNr_SDCCH8(6,2)) or