Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types: get rid of version 9 compatibility glue

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
Tue Mar 23 13:41:09 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23460 )

Change subject: library/PCUIF_Types: get rid of version 9 compatibility glue
......................................................................

library/PCUIF_Types: get rid of version 9 compatibility glue

Change-Id: Ia9f366ca1fdad700a90ca3367e43523f7bac39a1
Related: OS#5083
---
M bts/BTS_Tests.ttcn
M library/PCUIF_Types.ttcn
M pcu/PCUIF_Components.ttcn
M pcu/PCU_Tests.ttcn
4 files changed, 95 insertions(+), 194 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1e96dcb..2dc6635 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -5687,7 +5687,7 @@
 
 	for (var integer i := 0; i < mp_transceiver_num; i := i + 1) {
 		for (var integer tn := 0; tn < 8; tn := tn + 1) {
-			if (info_ind.trx.v10[i].pdch_mask[tn] != '1'B) {
+			if (info_ind.trx[i].pdch_mask[tn] != '1'B) {
 				/* Skip inactive timeslots */
 				continue;
 			}
@@ -5708,7 +5708,7 @@
 				tr_ts := tr_PCUIF_InfoTrxTsH0;
 			}
 
-			var PCUIF_InfoTrxTs ts := info_ind.trx.v10[i].ts[tn];
+			var PCUIF_InfoTrxTs ts := info_ind.trx[i].ts[tn];
 			log("Checking timeslot #", tn, " of trx#", i, ": ", ts);
 			if (not match(ts, tr_ts)) {
 				setverdict(fail, "Hopping parameters do not match: ",
@@ -5720,7 +5720,7 @@
 	}
 }
 
-/* Verify IPv4 NSVC address in the INFO.ind message (version >= 10) */
+/* Verify IPv4 NSVC address in the INFO.ind message */
 testcase TC_pcu_socket_nsvc_ipv4() runs on test_CT {
 	f_init_vty_bsc();
 	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip 127.127.127.127");
@@ -5729,23 +5729,19 @@
 	f_init();
 
 	var PCUIF_RemoteAddr remote_addr := g_pcu_last_info.u.info_ind.remote_addr;
-	if (not ischosen(remote_addr.v10)) {
-		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
-					log2str("Unexpected remote_addr: ", remote_addr));
-	}
+	var template PCUIF_RemoteAddr tr_remote_addr := {
+		addr_type := { PCUIF_ADDR_TYPE_IPV4, ? },
+		addr := { f_inet_addr("127.127.127.127"), ? }
+	};
 
-	if (remote_addr.v10.addr_type[0] != PCUIF_ADDR_TYPE_IPV4) {
-		setverdict(fail, "Received address family is not IPv4");
-	}
-
-	if (substr(remote_addr.v10.addr[0], 0, 4) != f_inet_addr("127.127.127.127")) {
-		setverdict(fail, "Unexpected address: ", remote_addr.v10.addr[0]);
+	if (not match(remote_addr, tr_remote_addr)) {
+		setverdict(fail, "NSVC address ", remote_addr, " does not match ", tr_remote_addr);
 	}
 
 	setverdict(pass);
 }
 
-/* Verify IPv4 NSVC address in the INFO.ind message (version >= 10) */
+/* Verify IPv4 NSVC address in the INFO.ind message */
 testcase TC_pcu_socket_nsvc_ipv6() runs on test_CT {
 	f_init_vty_bsc();
 	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip fd00::ca:ff:ee");
@@ -5753,17 +5749,13 @@
 	f_init();
 
 	var PCUIF_RemoteAddr remote_addr := g_pcu_last_info.u.info_ind.remote_addr;
-	if (not ischosen(remote_addr.v10)) {
-		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
-					log2str("Unexpected remote_addr: ", remote_addr));
-	}
+	var template PCUIF_RemoteAddr tr_remote_addr := {
+		addr_type := { PCUIF_ADDR_TYPE_IPV6, ? },
+		addr := { f_inet6_addr("fd00::ca:ff:ee"), ? }
+	};
 
-	if (remote_addr.v10.addr_type[0] != PCUIF_ADDR_TYPE_IPV6) {
-		setverdict(fail, "Received address family is not IPv6");
-	}
-
-	if (remote_addr.v10.addr[0] != f_inet6_addr("fd00::ca:ff:ee")) {
-		setverdict(fail, "Unexpected address: ", remote_addr.v10.addr[0]);
+	if (not match(remote_addr, tr_remote_addr)) {
+		setverdict(fail, "NSVC address ", remote_addr, " does not match ", tr_remote_addr);
 	}
 
 	setverdict(pass);
@@ -5779,7 +5771,7 @@
 	var PCUIF_send_data sd;
 
 	[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) -> value sd {
-		var BIT8 pdch_mask := f_PCUIF_ver_INFO_PDCHMask_get(sd.data.u.info_ind, trx_nr);
+		var BIT8 pdch_mask := sd.data.u.info_ind.trx[trx_nr].pdch_mask;
 		if (substr(pdch_mask, g_chan_nr.tn, 1) != exp) {
 			repeat;
 		}
@@ -7358,12 +7350,9 @@
 		execute( TC_dyn_osmo_pdch_double_act() );
 		execute( TC_dyn_ipa_pdch_act_deact() );
 		execute( TC_dyn_ipa_pdch_act_tchf_act_nack() );
-
-		if (PCUIF_Types.mp_pcuif_version >= 10) {
-			execute( TC_pcu_info_ind_fh_params() );
-			execute( TC_pcu_socket_nsvc_ipv4() );
-			execute( TC_pcu_socket_nsvc_ipv6() );
-		}
+		execute( TC_pcu_info_ind_fh_params() );
+		execute( TC_pcu_socket_nsvc_ipv4() );
+		execute( TC_pcu_socket_nsvc_ipv6() );
 	} else {
 		log("PCU socket path not available, skipping PCU tests");
 	}
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 96b2bac..2216a0e 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -153,30 +153,14 @@
 } with { variant (ma) "BYTEORDER(first), BITORDER(msb)" };
 private type record length(8) of PCUIF_InfoTrxTs PCUIF_InfoTrxTsList;
 
-/* Version >= 10 specific coding */
-private type record PCUIF_InfoV10Trx {
+private type record PCUIF_InfoTrx {
 	uint16_t		arfcn,
 	BIT8			pdch_mask,
 	OCT1			spare,
 	uint32_t		hLayer1,
 	PCUIF_InfoTrxTsList	ts
 } with { variant (pdch_mask) "BITORDER(msb)" };
-type record length(8) of PCUIF_InfoV10Trx PCUIF_InfoV10TrxList;
-
-/* Version <= 9 specific coding */
-private type record PCUIF_InfoV09Trx {
-	uint16_t	arfcn,
-	BIT8		pdch_mask,
-	OCT1		spare,
-	OCT8		tsc,
-	uint32_t	hLayer1
-} with { variant (pdch_mask) "BITORDER(msb)" };
-private type record length(8) of PCUIF_InfoV09Trx PCUIF_InfoV09TrxList;
-
-type union PCUIF_InfoTrxs {
-	PCUIF_InfoV09TrxList	v09,
-	PCUIF_InfoV10TrxList	v10
-} with { variant "" };
+type record length(8) of PCUIF_InfoTrx PCUIF_InfoTrxs;
 
 type record PCUIF_info_ind {
 	uint32_t	version,
@@ -216,20 +200,6 @@
 	record length(2) of uint16_t	local_port,
 	record length(2) of uint16_t	remote_port,
 	PCUIF_RemoteAddr		remote_addr
-} with {
-	/* NOTE: TITAN is not smart enough to handle 'version < 10' and 'version > 9',
-	 * so we cannot support more than two versions at the same time here. Sigh. */
-	variant (trx) "CROSSTAG(v09, version = 9; v10, version = 10)"
-	variant (remote_addr) "CROSSTAG(v09, version = 9; v10, version = 10)"
-};
-
-type union PCUIF_RemoteAddr {
-	PCUIF_RemoteAddrV09		v09,
-	PCUIF_RemoteAddrV10		v10
-} with { variant "" };
-
-type record PCUIF_RemoteAddrV09 {
-	record length(2) of OCT4	addr
 } with { variant "" };
 
 type enumerated PCUIF_AddrType {
@@ -238,7 +208,7 @@
 	PCUIF_ADDR_TYPE_IPV6		('29'O)
 } with { variant "FIELDLENGTH(8)" };
 
-type record PCUIF_RemoteAddrV10 {
+type record PCUIF_RemoteAddr {
 	record length(2) of PCUIF_AddrType	addr_type,
 	record length(2) of octetstring		addr length(16)
 } with { variant "" };
@@ -822,9 +792,10 @@
 	ma := ma
 };
 
-template (value) PCUIF_InfoV10Trx ts_PCUIF_InfoV10Trx(template (value) uint16_t arfcn := 871,
-						      template (value) BIT8 pdch_mask := '00000001'B,
-						      template (value) uint3_t tsc := 7) := {
+template (value) PCUIF_InfoTrx
+ts_PCUIF_InfoTrx(template (value) uint16_t arfcn := 871,
+		 template (value) BIT8 pdch_mask := '00000001'B,
+		 template (value) uint3_t tsc := 7) := {
 	arfcn := arfcn,
 	pdch_mask := pdch_mask,
 	spare := '00'O,
@@ -837,34 +808,16 @@
 	}
 };
 
-template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09Trx(template (value) uint16_t arfcn := 871,
-						      template (value) BIT8 pdch_mask := '00000001'B,
-						      OCT1 tsc := '07'O) := {
-	arfcn := arfcn,
-	pdch_mask := pdch_mask,
-	spare := '00'O,
-	tsc := tsc & tsc & tsc & tsc & tsc & tsc & tsc & tsc,
-	hLayer1 := 0
-}
-
-template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09TrxNULL := ts_PCUIF_InfoV09Trx(0, '00000000'B, '00'O);
-
-template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV09Trxs_def(uint16_t base_arfcn) := {
-	v09 := {
-		ts_PCUIF_InfoV09Trx(arfcn := base_arfcn + 0), ts_PCUIF_InfoV09TrxNULL,
-		ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL,
-		ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL,
-		ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL
-	}
-};
-
-template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV10Trxs_def(uint16_t base_arfcn) := {
-	v10 := {
-		ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 0), ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 1),
-		ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 2), ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 3),
-		ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 4), ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 5),
-		ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 6), ts_PCUIF_InfoV10Trx(arfcn := base_arfcn + 7)
-	}
+template (value) PCUIF_InfoTrxs
+ts_PCUIF_InfoTrxs_def(uint16_t base_arfcn) := {
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 0),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 1),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 2),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 3),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 4),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 5),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 6),
+	ts_PCUIF_InfoTrx(arfcn := base_arfcn + 7)
 };
 
 template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr,
@@ -1005,39 +958,12 @@
 }
 
 
-/* TODO: remove this as soon as we drop version 9 support */
-function f_PCUIF_ver_INFO_Trxs(uint16_t base_arfcn)
-return PCUIF_InfoTrxs {
-	if (PCUIF_Types.mp_pcuif_version >= 10) {
-		return valueof(ts_PCUIF_InfoV10Trxs_def(base_arfcn));
-	} else {
-		return valueof(ts_PCUIF_InfoV09Trxs_def(base_arfcn));
-	}
-}
-
-function f_PCUIF_ver_INFO_PDCHMask_get(in PCUIF_info_ind info, uint8_t trx_nr)
-return BIT8 {
-	if (PCUIF_Types.mp_pcuif_version >= 10) {
-		return info.trx.v10[trx_nr].pdch_mask;
-	} else {
-		return info.trx.v09[trx_nr].pdch_mask;
-	}
-}
-
-function f_PCUIF_ver_INFO_PDCHMask_set(inout PCUIF_info_ind info, BIT8 pdch_mask,
-				       template (present) uint8_t trx_nr := ?)
+function f_PCUIF_PDCHMask_set(inout PCUIF_info_ind info, BIT8 pdch_mask,
+			      template (present) uint8_t trx_nr := ?)
 {
-	if (PCUIF_Types.mp_pcuif_version >= 10) {
-		for (var integer nr := 0; nr < lengthof(info.trx.v10); nr := nr + 1) {
-			if (match(nr, trx_nr)) {
-				info.trx.v10[nr].pdch_mask := pdch_mask;
-			}
-		}
-	} else {
-		for (var integer nr := 0; nr < lengthof(info.trx.v09); nr := nr + 1) {
-			if (match(nr, trx_nr)) {
-				info.trx.v09[nr].pdch_mask := pdch_mask;
-			}
+	for (var integer nr := 0; nr < lengthof(info.trx); nr := nr + 1) {
+		if (match(nr, trx_nr)) {
+			info.trx[nr].pdch_mask := pdch_mask;
 		}
 	}
 }
@@ -1054,31 +980,21 @@
 }
 
 /* TODO: second (redundant) NSVC connection is not (yet) supported */
-function f_PCUIF_ver_INFO_RemoteAddr(PCUIF_AddrType addr_type,
-				     charstring addr)
+function f_PCUIF_RemoteAddr(PCUIF_AddrType addr_type,
+			    charstring addr_str)
 return PCUIF_RemoteAddr {
 	var PCUIF_RemoteAddr remote_addr;
 
-	if (PCUIF_Types.mp_pcuif_version >= 10) {
-		remote_addr.v10.addr_type[0] := addr_type;
-		if (addr_type == PCUIF_ADDR_TYPE_IPV4)  {
-			remote_addr.v10.addr[0] := f_inet_addr(addr);
-		} else {
-			remote_addr.v10.addr[0] := f_inet6_addr(addr);
-		}
-		remote_addr.v10.addr_type[1] := PCUIF_ADDR_TYPE_UNSPEC;
-		remote_addr.v10.addr[1] := f_pad_oct(''O, 16, '00'O);
+	remote_addr.addr_type[0] := addr_type;
+	if (addr_type == PCUIF_ADDR_TYPE_IPV4)  {
+		remote_addr.addr[0] := f_inet_addr(addr_str);
 	} else {
-		if (addr_type != PCUIF_ADDR_TYPE_IPV4) {
-			testcase.stop("NSVC address type := ", addr_type,
-				      "is not supported in version := ",
-				      PCUIF_Types.mp_pcuif_version);
-		}
-		/* v9 requires the IP in host byte order */
-		remote_addr.v09.addr[0] := f_inet_haddr(addr);
-		remote_addr.v09.addr[1] := f_pad_oct(''O, 4, '00'O);
+		remote_addr.addr[0] := f_inet6_addr(addr_str);
 	}
 
+	remote_addr.addr_type[1] := PCUIF_ADDR_TYPE_UNSPEC;
+	remote_addr.addr[1] := f_pad_oct(''O, 16, '00'O);
+
 	return remote_addr;
 }
 
diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn
index 27cf56d..6a24ed6 100644
--- a/pcu/PCUIF_Components.ttcn
+++ b/pcu/PCUIF_Components.ttcn
@@ -350,19 +350,18 @@
 runs on RAW_PCU_BTS_CT
 {
 	var PCUIF_Message pcu_msg;
-	var PCUIF_InfoV10TrxList trx_list := g_info_ind.trx.v10;
 
 	/* Find an active TS: */
 	for (var uint8_t ts_nr := 0; ts_nr < 8; ts_nr := ts_nr + 1) {
-		for (var integer trx_nr := 0; trx_nr < lengthof(trx_list); trx_nr := trx_nr + 1) {
-			if (trx_list[trx_nr].pdch_mask[ts_nr] == '0'B) {
+		for (var integer trx_nr := 0; trx_nr < lengthof(g_info_ind.trx); trx_nr := trx_nr + 1) {
+			if (g_info_ind.trx[trx_nr].pdch_mask[ts_nr] == '0'B) {
 				continue; /* TRX+TS not activated */
 			}
 
 			/* Send empty DATA.ind to set up FN */
 			pcu_msg := valueof(ts_PCUIF_DATA_IND(bts_nr, trx_nr, ts_nr, 0 /* FIXME */,
 							     PCU_IF_SAPI_PDTCH, ''O, start_fn,
-							     trx_list[trx_nr].arfcn,
+							     g_info_ind.trx[trx_nr].arfcn,
 							     rssi := -80, ber10k := 0,
 							     ta_offs_qbits := 0, lqual_cb := 10));
 			PCUIF.send(pcu_msg);
@@ -377,12 +376,11 @@
 {
 	var PCUIF_Message pcu_msg;
 	var boolean has_msg, use_msg;
-	var PCUIF_InfoV10TrxList trx_list := g_info_ind.trx.v10;
 
 	for (var uint8_t ts_nr := 0; ts_nr < 8; ts_nr := ts_nr + 1) {
-		for (var integer trx_nr := 0; trx_nr < lengthof(trx_list); trx_nr := trx_nr + 1) {
+		for (var integer trx_nr := 0; trx_nr < lengthof(g_info_ind.trx); trx_nr := trx_nr + 1) {
 			//var charstring prefix := "BTS=" & int2str(bts_nr) & ",TRX=" & int2str(trx_nr) & ",TS=" & int2str(ts_nr) & ",FN=" & int2str(fn) & ": ";
-			if (trx_list[trx_nr].pdch_mask[ts_nr] == '0'B) {
+			if (g_info_ind.trx[trx_nr].pdch_mask[ts_nr] == '0'B) {
 				//log(prefix, "disabled");
 				continue; /* TRX+TS not activated */
 			}
@@ -406,7 +404,7 @@
 				/* NOPE.ind: */
 				pcu_msg := valueof(ts_PCUIF_DATA_IND(bts_nr, trx_nr, ts_nr, 0 /* FIXME */,
 								     PCU_IF_SAPI_PDTCH, ''O, fn,
-								     trx_list[trx_nr].arfcn,
+								     g_info_ind.trx[trx_nr].arfcn,
 								     rssi := -80, ber10k := 0,
 								     ta_offs_qbits := 0, lqual_cb := 10));
 				//log(prefix, "DATA.ind (len=0)");
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index cac423a..bea9ddd 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -79,7 +79,7 @@
 := {
 	version := PCUIF_Types.mp_pcuif_version,
 	flags := flags,
-	trx := f_PCUIF_ver_INFO_Trxs(GPRS_Components.mp_base_arfcn),
+	trx := ts_PCUIF_InfoTrxs_def(GPRS_Components.mp_base_arfcn),
 	bsic := 7,
 	mcc := 262,
 	mnc := 42,
@@ -109,7 +109,7 @@
 	nsvci := { mp_nsconfig.nsvc[0].nsvci, 0 },
 	local_port := { mp_nsconfig.nsvc[0].provider.ip.remote_udp_port, 0 },
 	remote_port := { mp_nsconfig.nsvc[0].provider.ip.local_udp_port, 0 },
-	remote_addr := f_PCUIF_ver_INFO_RemoteAddr(
+	remote_addr := f_PCUIF_RemoteAddr(
 		f_PCUIF_AF2addr_type(mp_nsconfig.nsvc[0].provider.ip.address_family), mp_nsconfig.nsvc[0].provider.ip.local_ip)
 }
 
@@ -2644,8 +2644,8 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Only 1 TRX with 8 PDCH */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11111111'B, 0);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '11111111'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -2703,8 +2703,8 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Only 1 TRX with 8 PDCH */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11111111'B, 0);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '11111111'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -2752,8 +2752,8 @@
 	ms := g_ms[0]; /* We only use first MS in this test */
 
 	/* Only 1 TRX with 8 PDCH */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11111111'B, 0);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '11111111'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3378,8 +3378,8 @@
 	info_ind := valueof(ts_PCUIF_INFO_default);
 
 	/* Only the first TRX is enabled. */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000001'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '00000001'B, 0);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3425,7 +3425,7 @@
 					     in GsmRrMessage rr_msg)
 {
 	var ImmediateAssignment ia := rr_msg.payload.imm_ass;
-	var PCUIF_InfoTrxTs ts := info_ind.trx.v10[0].ts[ia.pkt_chan_desc.tn];
+	var PCUIF_InfoTrxTs ts := info_ind.trx[0].ts[ia.pkt_chan_desc.tn];
 
 	var template PacketChannelDescription tr_pkt_chan_desc := {
 		channel_Type_spare := ?,
@@ -3465,7 +3465,7 @@
 	var GprsMS ms := valueof(t_GprsMS_def);
 
 	/* Enable frequency hopping on TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
+	info_ind.trx[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3486,7 +3486,7 @@
 	var GprsMS ms := valueof(t_GprsMS_def);
 
 	/* Enable frequency hopping on TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
+	info_ind.trx[0].ts[7] := f_TC_pcuif_fh_params_gen(32);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3504,7 +3504,7 @@
 	var GprsMS ms := valueof(t_GprsMS_def);
 
 	/* Enable frequency hopping on TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(16);
+	info_ind.trx[0].ts[7] := f_TC_pcuif_fh_params_gen(16);
 
 	/* Initialize NS/BSSGP side */
 	f_init_bssgp();
@@ -3528,7 +3528,7 @@
 					     in FrequencyParameters fp)
 {
 	/* FIXME: TRX0/TS7 is a hard-coded expectation, make it configurable */
-	var PCUIF_InfoTrxTs ts := info_ind.trx.v10[0].ts[7];
+	var PCUIF_InfoTrxTs ts := info_ind.trx[0].ts[7];
 
 	/* Table 12.8.1: Frequency Parameters information elements */
 	var template FrequencyParameters tr_fp := {
@@ -3566,7 +3566,7 @@
 	var uint32_t poll_fn;
 
 	/* Enable frequency hopping on TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
+	info_ind.trx[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3608,7 +3608,7 @@
 	var uint32_t poll_fn;
 
 	/* Enable frequency hopping on TRX0/TS7 */
-	info_ind.trx.v10[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
+	info_ind.trx[0].ts[7] := f_TC_pcuif_fh_params_gen(33);
 
 	/* Initialize NS/BSSGP side */
 	f_init_bssgp();
@@ -3678,10 +3678,10 @@
 	info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
 	/* Only the 3 first TRX are enabled. The enabled ones all have same
 	   amount of resources, hence same amount of initial resources. */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (3 .. 7));
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000011'B, 0);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00001100'B, 1);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11000000'B, 2);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (3 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '00000011'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00001100'B, 1);
+	f_PCUIF_PDCHMask_set(info_ind, '11000000'B, 2);
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3695,9 +3695,9 @@
 
 	/* Check if all TBFs are allocated on different TRX in an uniform way */
 	for (i := 0; i < num_ms; i := i + 1) {
-		if (g_ms[i].ul_tbf.arfcn != info_ind.trx.v10[i mod 3].arfcn) {
+		if (g_ms[i].ul_tbf.arfcn != info_ind.trx[i mod 3].arfcn) {
 			setverdict(fail, "Got assigned ARFCN ", g_ms[i].ul_tbf.arfcn,
-				   " vs exp ", info_ind.trx.v10[i mod 3].arfcn);
+				   " vs exp ", info_ind.trx[i mod 3].arfcn);
 			f_shutdown(__BFILE__, __LINE__);
 		}
 	}
@@ -3728,8 +3728,8 @@
 
 	info_ind := valueof(ts_PCUIF_INFO_default);
 	/* Only use 1 PDCH to make sure both end up in the same slot: */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000001'B, 0);
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+	f_PCUIF_PDCHMask_set(info_ind, '00000001'B, 0);
+	f_PCUIF_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3929,7 +3929,7 @@
 	f_init_bssgp();
 
 	/* Explicitly set the given PDCH slot-mask to all transceivers */
-	f_PCUIF_ver_INFO_PDCHMask_set(info_ind, pdch_mask);
+	f_PCUIF_PDCHMask_set(info_ind, pdch_mask);
 
 	/* Allocate 56 GprsMS instances (maximum for 8 PDCH slots) */
 	f_init_gprs_ms(7 * 8);
@@ -5679,20 +5679,18 @@
 
 	execute( TC_mo_ping_pong_with_ul_racap_egprs_only() );
 
-	/* Frequency hopping specific test cases */
-	if (PCUIF_Types.mp_pcuif_version >= 10) {
-		/* Immediate Assignment on AGCH/PCH */
-		execute( TC_pcuif_fh_imm_ass_ul_egprs() );
-		execute( TC_pcuif_fh_imm_ass_ul() );
-		execute( TC_pcuif_fh_imm_ass_dl() );
-		/* Packet Uplink/Downlink Assignment on PACCH */
-		execute( TC_pcuif_fh_pkt_ass_ul() );
-		execute( TC_pcuif_fh_pkt_ass_dl() );
-		execute( TC_multitrx_multims_alloc() );
-		execute( TC_dl_multislot_tbf_ms_class_from_sgsn() );
-		execute( TC_dl_multislot_tbf_ms_class_from_2phase() );
-		execute( TC_ul_multislot_tbf_ms_class_from_2phase() );
-	}
+	/* Immediate Assignment on AGCH/PCH */
+	execute( TC_pcuif_fh_imm_ass_ul_egprs() );
+	execute( TC_pcuif_fh_imm_ass_ul() );
+	execute( TC_pcuif_fh_imm_ass_dl() );
+	/* Packet Uplink/Downlink Assignment on PACCH */
+	execute( TC_pcuif_fh_pkt_ass_ul() );
+	execute( TC_pcuif_fh_pkt_ass_dl() );
+	execute( TC_multitrx_multims_alloc() );
+	execute( TC_dl_multislot_tbf_ms_class_from_sgsn() );
+	execute( TC_dl_multislot_tbf_ms_class_from_2phase() );
+	execute( TC_ul_multislot_tbf_ms_class_from_2phase() );
+
 	execute( TC_multiplex_dl_gprs_egprs() );
 
 	execute( TC_pcuif_info_ind_subsequent() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23460
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: Ia9f366ca1fdad700a90ca3367e43523f7bac39a1
Gerrit-Change-Number: 23460
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210323/5d315d02/attachment.htm>


More information about the gerrit-log mailing list