Change in osmo-ttcn3-hacks[master]: PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Sep 5 18:10:49 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990 )


Change subject: PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()
......................................................................

PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()

Change-Id: I297b52410afafedad51d5b51734e946c4d62e8d2
Related: SYS#4868, OS#4547
---
M pcu/PCU_Tests.ttcn
1 file changed, 19 insertions(+), 30 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/19990/1

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 9bcf9c6..2d20975 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2161,6 +2161,15 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* Randomly generate a set of hopping parameters for one timeslot */
+private function f_TC_pcuif_fh_params_gen(integer ma_len)
+return template (value) PCUIF_InfoTrxTs {
+	return ts_PCUIF_InfoTrxTsH1(tsc := f_rnd_int(7),
+				    hsn := f_rnd_int(63),
+				    maio := f_rnd_int(63),
+				    ma := f_rnd_bitstring(ma_len));
+}
+
 private function f_TC_pcuif_fh_check_imm_ass(in PCUIF_info_ind info_ind,
 					     in GsmRrMessage rr_msg)
 {
@@ -2210,12 +2219,8 @@
 	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
 	var GprsMS ms := valueof(t_GprsMS_def);
 
-	/* Enable frequency hopping of TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
-		tsc := f_rnd_int(7),
-		hsn := f_rnd_int(63),
-		maio := f_rnd_int(63),
-		ma := f_rnd_bitstring(32));
+	/* Enable frequency hopping on TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -2235,12 +2240,8 @@
 	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
 	var GprsMS ms := valueof(t_GprsMS_def);
 
-	/* Enable frequency hopping of TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
-		tsc := f_rnd_int(7),
-		hsn := f_rnd_int(63),
-		maio := f_rnd_int(63),
-		ma := f_rnd_bitstring(32));
+	/* Enable frequency hopping on TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -2257,12 +2258,8 @@
 	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
 	var GprsMS ms := valueof(t_GprsMS_def);
 
-	/* Enable frequency hopping of TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
-		tsc := f_rnd_int(7),
-		hsn := f_rnd_int(63),
-		maio := f_rnd_int(63),
-		ma := f_rnd_bitstring(16));
+	/* Enable frequency hopping on TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(16);
 
 	/* Initialize NS/BSSGP side */
 	f_init_bssgp();
@@ -2331,12 +2328,8 @@
 	var GprsMS ms := valueof(t_GprsMS_def);
 	var uint32_t poll_fn;
 
-	/* Enable frequency hopping of TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
-		tsc := f_rnd_int(7),
-		hsn := f_rnd_int(63),
-		maio := f_rnd_int(63),
-		ma := f_rnd_bitstring(33));
+	/* Enable frequency hopping on TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -2377,12 +2370,8 @@
 	var RlcmacDlBlock dl_block;
 	var uint32_t poll_fn;
 
-	/* Enable frequency hopping of TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
-		tsc := f_rnd_int(7),
-		hsn := f_rnd_int(63),
-		maio := f_rnd_int(63),
-		ma := f_rnd_bitstring(33));
+	/* Enable frequency hopping on TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
 
 	/* Initialize NS/BSSGP side */
 	f_init_bssgp();

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I297b52410afafedad51d5b51734e946c4d62e8d2
Gerrit-Change-Number: 19990
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200905/15b0c035/attachment.htm>


More information about the gerrit-log mailing list