Change in ...osmo-ttcn3-hacks[master]: library/L1CTL_PortType.ttcn: use templates from GSM_RR_Types

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
Mon Sep 9 14:48:45 UTC 2019


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


Change subject: library/L1CTL_PortType.ttcn: use templates from GSM_RR_Types
......................................................................

library/L1CTL_PortType.ttcn: use templates from GSM_RR_Types

Get rid of template t_IMM_ASS, which is a part of L1CTL_Types.ttcn.
Prepare generic (for both CS and PS) template on top of tr_IMM_ASS,
and use it in f_L1CTL_WAIT_IMM_ASS().

Change-Id: I3a410ec3c41e3eefd23071bfb0d80feda82177a5
---
M library/L1CTL_PortType.ttcn
M library/L1CTL_Types.ttcn
2 files changed, 9 insertions(+), 19 deletions(-)



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

diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 3c83c3d..c595b03 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -127,15 +127,23 @@
 	}
 
 	function f_L1CTL_WAIT_IMM_ASS(L1CTL_PT pt, uint8_t ra, GsmFrameNumber rach_fn) return ImmediateAssignment {
+		var template GsmRrMessage rr_imm_ass;
 		var L1ctlDlMessage dl;
 		var GsmRrMessage rr;
 		timer T := 10.0;
+
+		/* Prepare generic template (for both CS and PS) */
+		rr_imm_ass := tr_IMM_ASS(ra, rach_fn);
+		rr_imm_ass.payload.imm_ass.ded_or_tbf := ?;
+		rr_imm_ass.payload.imm_ass.pkt_chan_desc := *;
+		rr_imm_ass.payload.imm_ass.chan_desc := *;
+
 		T.start;
 		alt {
 			[] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
 				rr := dec_GsmRrMessage(dl.payload.data_ind.payload);
 				log("PCH/AGCH DL RR: ", rr);
-				if (match(rr, t_RR_IMM_ASS(ra, rach_fn))) {
+				if (match(rr, rr_imm_ass)) {
 					log("Received IMM.ASS for our RACH!");
 				} else {
 					repeat;
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 77c1f6a..e939f72 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -780,24 +780,6 @@
 		}
 	};
 
-	template ImmediateAssignment t_IMM_ASS(uint8_t ra, GsmFrameNumber fn) := {
-		ded_or_tbf := ?,
-		page_mode := ?,
-		chan_desc := *,
-		pkt_chan_desc := *,
-		req_ref := f_compute_ReqRef(ra, fn),
-		timing_advance := ?,
-		mobile_allocation := ?,
-		rest_octets:= ?
-	};
-
-	template GsmRrMessage t_RR_IMM_ASS(uint8_t ra, GsmFrameNumber fn) := {
-		header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?),
-		payload := {
-			imm_ass := t_IMM_ASS(ra, fn)
-		}
-	};
-
 	const octetstring c_DummyUI := '0303012B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B'O;
 
 /* We use "BYTEORDER(last)" so we get little-endian integers.  Unfortuantely, this also

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15458
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: I3a410ec3c41e3eefd23071bfb0d80feda82177a5
Gerrit-Change-Number: 15458
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/20190909/e9440a82/attachment.htm>


More information about the gerrit-log mailing list