diff options
-rw-r--r-- | bsc/BSC_Tests.ttcn | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 03b3102..fcb6b26 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6854,7 +6854,10 @@ private type record FHParamsTs { }; /* Hopping parameters per a transceiver */ -private type record length(8) of FHParamsTs FHParamsTrx; +private type record FHParamsTrx { + GsmArfcn arfcn, + FHParamsTs ts[8] +}; /* Randomly generate the hopping parameters for the given timeslot numbers */ private function f_TC_fh_params_gen(template integer tr_tn := (1, 3, 5)) @@ -6863,24 +6866,24 @@ runs on test_CT return FHParamsTrx { for (var integer tn := 0; tn < 8; tn := tn + 1) { if (not match(tn, tr_tn)) { - fhp[tn].enabled := false; - fhp[tn].ma := { }; + fhp.ts[tn].enabled := false; + fhp.ts[tn].ma := { }; continue; } /* Random HSN / MAIO values: 0..63 */ - fhp[tn].hsn := f_rnd_int(64); - fhp[tn].maio := f_rnd_int(64); - fhp[tn].ma := { }; + fhp.ts[tn].hsn := f_rnd_int(64); + fhp.ts[tn].maio := f_rnd_int(64); + fhp.ts[tn].ma := { }; /* Random Mobile Allocation (hopping channels) */ var integer ma_len := 2 + f_rnd_int(9); /* 2..10 channels */ var integer step := 3 + f_rnd_int(4); /* 3..6 stepping */ for (var integer i := 1; i <= ma_len; i := i + 1) { - fhp[tn].ma := fhp[tn].ma & { i * step }; + fhp.ts[tn].ma := fhp.ts[tn].ma & { i * step }; } - fhp[tn].enabled := true; + fhp.ts[tn].enabled := true; } log("f_TC_fh_params_gen(): ", fhp); @@ -6894,8 +6897,8 @@ private function f_TC_fh_params_match_chan_desc(in FHParamsTrx fhp, in ChannelDe var template (present) MaioHsn tr_maio_hsn; var uint3_t tn := cd.chan_nr.tn; - if (fhp[tn].enabled) { - tr_maio_hsn := tr_HsnMaio(fhp[tn].hsn, fhp[tn].maio); + if (fhp.ts[tn].enabled) { + tr_maio_hsn := tr_HsnMaio(fhp.ts[tn].hsn, fhp.ts[tn].maio); tr_cd := tr_ChanDescH1(cd.chan_nr, tr_maio_hsn); } else { tr_cd := tr_ChanDescH0(cd.chan_nr); @@ -6925,7 +6928,7 @@ private function f_TC_fh_params_gen_tr_ma(in FHParamsTrx fhp, uint3_t tn, in MobileAllocationLV ma) return template MobileAllocationLV { /* Mobile Allocation IE is expected to be empty if hopping is not enabled */ - if (not fhp[tn].enabled) { + if (not fhp.ts[tn].enabled) { return { len := 0, ma := ''B }; } @@ -6934,17 +6937,17 @@ return template MobileAllocationLV { var bitstring ma_mask := ''B; /* Compose the full bit-mask (all channels, up to 1024 entries) */ - for (var integer i := 0; i < lengthof(fhp); i := i + 1) { - for (var integer j := 0; j < lengthof(fhp[i].ma); j := j + 1) { - if (full_mask[fhp[i].ma[j]] == '1'B) + for (var integer i := 0; i < lengthof(fhp.ts); i := i + 1) { + for (var integer j := 0; j < lengthof(fhp.ts[i].ma); j := j + 1) { + if (full_mask[fhp.ts[i].ma[j]] == '1'B) { continue; } - full_mask[fhp[i].ma[j]] := '1'B; + full_mask[fhp.ts[i].ma[j]] := '1'B; } } /* Compose a bit-mask for the given timeslot number */ - for (var integer i := 0; i < lengthof(fhp[tn].ma); i := i + 1) { - slot_mask[fhp[tn].ma[i]] := '1'B; + for (var integer i := 0; i < lengthof(fhp.ts[tn].ma); i := i + 1) { + slot_mask[fhp.ts[tn].ma[i]] := '1'B; } /* Finally, compose the Mobile Allocation bit-mask */ @@ -6975,22 +6978,22 @@ runs on test_CT { /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - for (var integer tn := 0; tn < lengthof(fhp); tn := tn + 1) { + for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); - if (not fhp[tn].enabled) { + if (not fhp.ts[tn].enabled) { f_vty_transceive(BSCVTY, "hopping enabled 0"); f_vty_transceive(BSCVTY, "exit"); /* go back */ continue; } /* Configure HSN / MAIO values */ - f_vty_transceive(BSCVTY, "hopping sequence-number " & int2str(fhp[tn].hsn)); - f_vty_transceive(BSCVTY, "hopping maio " & int2str(fhp[tn].maio)); + f_vty_transceive(BSCVTY, "hopping sequence-number " & int2str(fhp.ts[tn].hsn)); + f_vty_transceive(BSCVTY, "hopping maio " & int2str(fhp.ts[tn].maio)); /* Configure the Mobile Allocation (hopping channels) */ - for (var integer i := 0; i < lengthof(fhp[tn].ma); i := i + 1) { - f_vty_transceive(BSCVTY, "hopping arfcn add " & int2str(fhp[tn].ma[i])); + for (var integer i := 0; i < lengthof(fhp.ts[tn].ma); i := i + 1) { + f_vty_transceive(BSCVTY, "hopping arfcn add " & int2str(fhp.ts[tn].ma[i])); } f_vty_transceive(BSCVTY, "hopping enabled 1"); @@ -7008,12 +7011,12 @@ runs on test_CT { /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - for (var integer tn := 0; tn < lengthof(fhp); tn := tn + 1) { + for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); /* Delete all ARFCNs from the Mobile Allocation (if any) */ - for (var integer i := 0; i < lengthof(fhp[tn].ma); i := i + 1) { - f_vty_transceive(BSCVTY, "hopping arfcn del " & int2str(fhp[tn].ma[i])); + for (var integer i := 0; i < lengthof(fhp.ts[tn].ma); i := i + 1) { + f_vty_transceive(BSCVTY, "hopping arfcn del " & int2str(fhp.ts[tn].ma[i])); } f_vty_transceive(BSCVTY, "hopping enabled 0"); |