[PATCH] osmo-ttcn3-hacks[master]: RSL_Types: More templates, f_rsl_find_ie() for finding an IE...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jan 29 21:07:17 UTC 2018


Review at  https://gerrit.osmocom.org/6180

RSL_Types: More templates, f_rsl_find_ie() for finding an IE in a message

Change-Id: Id7fa7d672c1fde97882fa44959501e8bf7b8dc0b
---
M library/RSL_Types.ttcn
1 file changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index b3d758b..765a91e 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -909,6 +909,15 @@
 		msg_type := RSL_MT_MODE_MODIFY_NACK
 	}
 
+	/* 8.4.14: BTS <- BSC */
+	template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := {
+		msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
+		msg_type := RSL_MT_RF_CHAN_REL,
+		ies := {
+			tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr})
+		}
+	}
+
 	/* 8.4.19 BTS -> BSC */
 	template RSL_Message ts_RSL_RF_CHAN_REL_ACK(RslChannelNr chan_nr) :=
 		ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
@@ -1160,5 +1169,16 @@
 	}
 
 
+	function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean {
+		for (var integer i := 0; i < sizeof(msg.ies); i := i+1) {
+			if (msg.ies[i].iei == iei) {
+				ret := msg.ies[i].body;
+				return true;
+			}
+		}
+		return false;
+	}
+
+
 
 } with { encode "RAW" ; variant "FIELDORDER(msb)" }

-- 
To view, visit https://gerrit.osmocom.org/6180
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7fa7d672c1fde97882fa44959501e8bf7b8dc0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list