Change in ...osmo-ttcn3-hacks[master]: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

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

pespin gerrit-no-reply at lists.osmocom.org
Wed Jun 19 10:52:15 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510 )

Change subject: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
......................................................................

lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

Function will be re-used in forthcoming commits.

Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
---
M library/BSSMAP_Templates.ttcn
M library/RAN_Emulation.ttcnpp
2 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index b377358..9015680 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -402,6 +402,11 @@
 	cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5))
 }
 
+function f_bssmap_ie_cic_2_int(BSSMAP_IE_CircuitIdentityCode cic_ie) return integer {
+	var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
+	return cic;
+}
+
 template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,
 									    uint16_t udp_port,
 									    integer len) := {
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index cd0c867..de5b7f3 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -422,7 +422,7 @@
 		    ispresent(bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode)) {
 			var BSSMAP_IE_CircuitIdentityCode cic_ie :=
 				bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode;
-			var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
+			var integer cic := f_bssmap_ie_cic_2_int(cic_ie);
 			f_comp_store_cic(client, cic);
 		}
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510
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: Ifc7444ecca1571959ed83b43d3c7461c637686ae
Gerrit-Change-Number: 14510
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.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/20190619/3f51c54a/attachment.htm>


More information about the gerrit-log mailing list