Change in osmo-ttcn3-hacks[master]: PCU: derive f_pcuif_rx_imm_ass() from f_establish_tbf()

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
Wed Apr 1 19:37:06 UTC 2020


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


Change subject: PCU: derive f_pcuif_rx_imm_ass() from f_establish_tbf()
......................................................................

PCU: derive f_pcuif_rx_imm_ass() from f_establish_tbf()

Change-Id: I3b49927d0db49555e0bf2bb453449f614c7b9323
---
M pcu/PCU_Tests_RAW.ttcn
1 file changed, 27 insertions(+), 22 deletions(-)



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

diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 3f18400..8e1d349 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -236,29 +236,13 @@
 	desc.final_ack := final_ack;
 }
 
-/* FIXME: properly encode RA (see TS 24.060, table 11.2.5.2) */
-private function f_establish_tbf(out GsmRrMessage rr_imm_ass, uint8_t bts_nr := 0,
-				 uint16_t ra := oct2int('3A'O), uint8_t is_11bit := 0,
-				 PCUIF_BurstType burst_type := BURST_TYPE_0,
-				 TimingAdvance ta := 0)
+private function f_pcuif_rx_imm_ass(out GsmRrMessage rr_imm_ass,
+				    template GsmRrMessage t_imm_ass := ?,
+				    uint8_t bts_nr := 0)
 runs on RAW_PCU_Test_CT return boolean {
 	var PCUIF_Message pcu_msg;
-	var GsmRrMessage rr_msg;
-	var uint32_t fn;
 	timer T;
 
-	/* FIXME: ask the BTS component to give us the current TDMA fn */
-	fn := 1337 + ta;
-
-	/* Send RACH.ind */
-	log("Sending RACH.ind on fn=", fn, " with RA=", ra, ", TA=", ta);
-	BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0,
-				   ra := ra, is_11bit := is_11bit,
-				   burst_type := burst_type,
-				   fn := fn, arfcn := 871,
-				   qta := ta * 4));
-
-	/* Expect Immediate (TBF) Assignment on TS0/AGCH */
 	T.start(2.0);
 	alt {
 	[] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0,
@@ -267,9 +251,7 @@
 		rr_imm_ass := dec_GsmRrMessage(pcu_msg.u.data_req.data);
 		log("Rx Immediate Assignment: ", rr_imm_ass);
 
-		/* Make sure this assignment is for us
-		 * TODO: Uplink or Downlink TBF? */
-		if (match(rr_imm_ass, tr_IMM_TBF_ASS(?, ra, fn))) {
+		if (match(rr_imm_ass, t_imm_ass)) {
 			setverdict(pass);
 			return true;
 		}
@@ -286,6 +268,29 @@
 	return false;
 }
 
+/* FIXME: properly encode RA (see TS 24.060, table 11.2.5.2) */
+private function f_establish_tbf(out GsmRrMessage rr_imm_ass, uint8_t bts_nr := 0,
+				 uint16_t ra := oct2int('3A'O), uint8_t is_11bit := 0,
+				 PCUIF_BurstType burst_type := BURST_TYPE_0,
+				 TimingAdvance ta := 0)
+runs on RAW_PCU_Test_CT return boolean {
+	var uint32_t fn;
+
+	/* FIXME: ask the BTS component to give us the current TDMA fn */
+	fn := 1337 + ta;
+
+	/* Send RACH.ind */
+	log("Sending RACH.ind on fn=", fn, " with RA=", ra, ", TA=", ta);
+	BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0,
+				   ra := ra, is_11bit := is_11bit,
+				   burst_type := burst_type,
+				   fn := fn, arfcn := 871,
+				   qta := ta * 4));
+
+	/* Expect Immediate (TBF) Assignment on TS0/AGCH */
+	return f_pcuif_rx_imm_ass(rr_imm_ass, tr_IMM_TBF_ASS(?, ra, fn), bts_nr);
+}
+
 private function f_imm_ass_verify_ul_tbf_ass(GsmRrMessage rr_imm_ass, out PacketUlAssign ul_tbf_ass)
 runs on RAW_PCU_Test_CT return boolean {
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17705
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: I3b49927d0db49555e0bf2bb453449f614c7b9323
Gerrit-Change-Number: 17705
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200401/2b9df4e7/attachment.htm>


More information about the gerrit-log mailing list