Change in osmo-ttcn3-hacks[master]: library: implement SI3 Rest Octets as per 3GPP TS 44.018

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
Sat May 2 10:15:50 UTC 2020


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


Change subject: library: implement SI3 Rest Octets as per 3GPP TS 44.018
......................................................................

library: implement SI3 Rest Octets as per 3GPP TS 44.018

Change-Id: Iaf86f1451a956bf1deef0a9d98fa0513aeb8164b
Signed-off-by: Vadim Yanitskiy <axilirator at gmail.com>
---
M bts/gen_links.sh
A library/GSM_RestOctets.ttcn
2 files changed, 120 insertions(+), 1 deletion(-)



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

diff --git a/bts/gen_links.sh b/bts/gen_links.sh
index b6921fa..7aa8398 100755
--- a/bts/gen_links.sh
+++ b/bts/gen_links.sh
@@ -33,7 +33,7 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_VTY_Functions.ttcn GSM_SystemInformation.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
+FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_VTY_Functions.ttcn GSM_SystemInformation.ttcn GSM_RestOctets.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
 #FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
 #FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn RSL_Types.ttcn RSL_Emulation.ttcn AbisOML_Types.ttcn "
diff --git a/library/GSM_RestOctets.ttcn b/library/GSM_RestOctets.ttcn
new file mode 100644
index 0000000..8f0346d
--- /dev/null
+++ b/library/GSM_RestOctets.ttcn
@@ -0,0 +1,119 @@
+/**
+ * GSM Rest Octets definitions as per 3GPP TS 44.018.
+ *
+ * (C) 2020 Vadim Yanitskiy <axilirator at gmail.com>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+module GSM_RestOctets {
+
+import from General_Types all;
+import from Osmocom_Types all;
+
+/* 10.5.2.34 SI 3 Rest Octets */
+type record SI3RestOctets {
+	SelectionParamsOpt	sel_params,
+	PowerOffsetOpt		pwr_offset,
+	BIT1			si_2ter_ind,
+	BIT1			early_cm_ind,
+	SchedIfAndWhere		sched_where,
+	GPRSIndicatorOpt	gprs_ind,
+	BIT1			umts_early_cm_ind,
+	SI2quaterIndicatorOpt	si2_quater_ind,
+	BIT1			iu_mode_ind ('1'B) optional,
+	SI21IndicatorOpt	si21_ind optional
+	/* ... spare padding ... */
+} with {
+	variant (si_2ter_ind) "CSN.1 L/H"
+	variant (early_cm_ind) "CSN.1 L/H"
+	variant (umts_early_cm_ind) "CSN.1 L/H"
+
+	/* If Iu mode is not supported in the cell, the Iu Indicator is not sent
+	 * within this cell. Iu Indicator is included if and only if GPRS is
+	 * not supported, and Iu mode is supported in the cell. */
+	variant (iu_mode_ind) "PRESENCE(gprs_ind.presence = '0'B)"
+	/* SI21 field is only present if 'WHERE' information is not present. */
+	variant (si21_ind) "PRESENCE(sched_where.presence = '0'B)"
+};
+
+/* Selection Parameters */
+type record SelectionParams {
+	boolean			cbq,
+	uint6_t			cr_offset,
+	uint3_t			temp_offset,
+	uint5_t			penalty_time
+} with {
+	variant (cbq) "FIELDLENGTH(1)"
+};
+
+/* Optional Selection Parameters: L | H < Selection Parameters > */
+type record SelectionParamsOpt {
+	BIT1			presence, // L/H
+	SelectionParams		params optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (params) "PRESENCE(presence = '1'B)"
+};
+
+/* Optional Power Offset: L | H < Power Offset bit(2) > */
+type record PowerOffsetOpt {
+	BIT1			presence, // L/H
+	uint2_t			offset optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (offset) "PRESENCE(presence = '1'B)"
+};
+
+/* Scheduling if and where: L | H < WHERE bit(3) > */
+type record SchedIfAndWhere {
+	BIT1			presence, // L/H
+	uint3_t			where optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (where) "PRESENCE(presence = '1'B)"
+};
+
+type record GPRSIndicator {
+	uint3_t			ra_colour,
+	BIT1			si13_pos
+} with { variant "" };
+
+/* Optional GPRS Indicator: L | H < GPRS Indicator > */
+type record GPRSIndicatorOpt {
+	BIT1			presence, // L/H
+	GPRSIndicator		ind optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (ind) "PRESENCE(presence = '1'B)"
+};
+
+/* Optional SI2quater Indicator: L | H < SI2quater Indicator > */
+type record SI2quaterIndicatorOpt {
+	BIT1			presence, // L/H
+	BIT1			ind optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (ind) "PRESENCE(presence = '1'B)"
+};
+
+/* Optional SI21 Indicator: L | H < SI21 Position > */
+type record SI21IndicatorOpt {
+	BIT1			presence, // L/H
+	BIT1			pos optional
+} with {
+	variant (presence) "CSN.1 L/H"
+	variant (pos) "PRESENCE(presence = '1'B)"
+};
+
+external function enc_SI3RestOctets(in SI3RestOctets ro) return octetstring
+	with { extension "prototype(convert) encode(RAW)" };
+external function dec_SI3RestOctets(in octetstring stream) return SI3RestOctets
+	with { extension "prototype(convert) decode(RAW)" };
+
+
+} with { encode "RAW"; variant "FIELDORDER(msb)" }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17995
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: Iaf86f1451a956bf1deef0a9d98fa0513aeb8164b
Gerrit-Change-Number: 17995
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/20200502/844fdcda/attachment.htm>


More information about the gerrit-log mailing list