Change in osmo-ttcn3-hacks[master]: BSSMAP_Templates: add tr_BSSMAP_IE_Cause and tr_BSSMAP_SAPInReject

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
Fri Aug 28 18:03:20 UTC 2020


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

Change subject: BSSMAP_Templates: add tr_BSSMAP_IE_Cause and tr_BSSMAP_SAPInReject
......................................................................

BSSMAP_Templates: add tr_BSSMAP_IE_Cause and tr_BSSMAP_SAPInReject

Change-Id: Ibf80419df4d198a1aa6f52087bd9356231de65f5
Related: SYS#5047, OS#4728
---
M library/BSSMAP_Templates.ttcn
1 file changed, 44 insertions(+), 0 deletions(-)

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



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 2496a1b..694e3e8 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -148,6 +148,22 @@
 	extensionCauseValue := '0'B,
 	spare1 := omit
 }
+template BSSMAP_IE_Cause tr_BSSMAP_IE_Cause(template (present) myBSSMAP_Cause val) := {
+	elementIdentifier := '04'O,
+	lengthIndicator := ?,
+	causeValue := f_tr_causeValue(val),
+	extensionCauseValue := ?,
+	spare1 := *
+}
+private function f_tr_causeValue(template (present) myBSSMAP_Cause val)
+return template (present) BIT7 {
+	if (istemplatekind(val, "?")) {
+		return ?;
+	} else {
+		var integer int_val := enum2int(valueof(val));
+		return int2bit(valueof(int_val), 7);
+	}
+}
 
 template (value) BSSMAP_IE_SpeechVersion ts_BSSMAP_IE_SpeechVersion(SpeechVersion val) := {
 	elementIdentifier := '40'O,
@@ -1625,6 +1641,34 @@
 	}
 }
 
+template PDU_BSSAP tr_BSSMAP_SAPInReject(template (present) GsmSapi sapi := ?,
+					 template BSSMAP_IE_Cause cause := ?)
+modifies tr_BSSAP_BSSMAP := {
+	pdu := {
+		bssmap := {
+			sAPInReject := {
+				messageType := '25'O,
+				dLCI := {
+					elementIdentifier := '18'O,
+					sapiValue := f_tr_SAPI(sapi),
+					spare := ?,
+					c1 := ?, c2 := ?
+				},
+				cause := cause
+			}
+		}
+	}
+}
+
+private function f_tr_SAPI(template (present) GsmSapi sapi)
+return template (present) BIT3 {
+	if (istemplatekind(sapi, "?")) {
+		return ?;
+	} else {
+		return int2bit(valueof(sapi), 3);
+	}
+}
+
 
 
 } with { encode "RAW" };

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19872
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: Ibf80419df4d198a1aa6f52087bd9356231de65f5
Gerrit-Change-Number: 19872
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/20200828/fa692171/attachment.htm>


More information about the gerrit-log mailing list