Change in osmo-ttcn3-hacks[master]: bsc: replace octet string with decmatch when matching RR RELEASE

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
Wed Feb 6 08:10:14 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12819 )

Change subject: bsc: replace octet string with decmatch when matching RR RELEASE
......................................................................

bsc: replace octet string with decmatch when matching RR RELEASE

The 'decmatch' keyword allows us to match the decoded version of some
octetstring, which is very useful in the situations where we have
the L3 message only as octetstring but want to check if it matches
some L3 template.

Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
---
M bsc/BSC_Tests.ttcn
M bsc/BSC_Tests_LCLS.ttcn
M library/L3_Templates.ttcn
3 files changed, 34 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 5ac8191..555aac8 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -62,7 +62,6 @@
 const integer NUM_TCHH_PER_BTS := 2;
 const integer NUM_TCHF_PER_BTS := 4;
 const integer NUM_SDCCH_PER_BTS := 4;
-template octetstring t_l3_rr_chan_rel := '060D??*'O;
 
 
 /* per-BTS state which we keep */
@@ -872,7 +871,7 @@
 		got_deact_sacch := true;
 		repeat;
 	}
-	[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, t_l3_rr_chan_rel))) {
+	[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) {
 		got_rr_chan_rel := true;
 		repeat;
 	}
@@ -2816,7 +2815,7 @@
 	[] RSL.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
 			log("Got Deact SACCH");
 		}
-	[] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, t_l3_rr_chan_rel)) {
+	[] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch tr_RRM_RR_RELEASE)) {
 			log("Got RR Release");
 		}
 	[] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn
index 0fada93..67ccecf 100644
--- a/bsc/BSC_Tests_LCLS.ttcn
+++ b/bsc/BSC_Tests_LCLS.ttcn
@@ -702,7 +702,7 @@
 	var myBSSMAP_Cause cause_val := GSM0808_CAUSE_CALL_CONTROL;
 	CONN_A.send(ts_BSSMAP_ClearCommand(enum2int(cause_val)));
 	interleave {
-	[] CONN_A.receive(tr_RSL_DATA_REQ(?, tr_RslLinkID_DCCH(0), t_l3_rr_chan_rel));
+	[] CONN_A.receive(tr_RSL_DATA_REQ(?, tr_RslLinkID_DCCH(0), decmatch tr_RRM_RR_RELEASE));
 	[] CONN_A.receive(tr_RSL_DEACT_SACCH(?));
 	[] CONN_A.receive(tr_RSL_RF_CHAN_REL(?)) -> value rsl {
 		var RSL_IE_Body ieb;
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 3978498..0b714d3 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -660,6 +660,37 @@
 	}
 }
 
+template PDU_ML3_NW_MS tr_RRM_RR_RELEASE(template OCT1 cause := ?) := {
+	discriminator := '0110'B,
+	tiOrSkip := {
+		skipIndicator := '0000'B
+	},
+	msgs := {
+		rrm := {
+			channelRelease := {
+				messageType := '00001101'B,
+				rRCause := {
+					valuePart := cause
+				},
+				bARange := *,
+				groupChannelDescription := *,
+				groupCipherKeyNumber := *,
+				gPRSResumption := *,
+				bAListPref := *,
+				uTRANFrequencyList := *,
+				cellChannelDescr := *,
+				cellSelectionIndicator := *,
+				enhanced_DTM_CS_Release_Indication := *,
+				vGCS_Ciphering_Parameters := *,
+				group_Channel_Description_2 := *,
+				talkerIdentity := *,
+				talkerPriorityStatus := *,
+				vGCS_AMR_Configuration := *,
+				individual_Priorities := *
+			}
+		}
+	}
+}
 
 
 template PDU_ML3_MS_NW ts_ML3_MO := {

-- 
To view, visit https://gerrit.osmocom.org/12819
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
Gerrit-Change-Number: 12819
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190206/1f7141e1/attachment.htm>


More information about the gerrit-log mailing list