Change in osmo-ttcn3-hacks[master]: library/RLCMAC_CSN1_Types: add EGPRS Packet Channel Request definition

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
Wed Apr 1 19:37:05 UTC 2020


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


Change subject: library/RLCMAC_CSN1_Types: add EGPRS Packet Channel Request definition
......................................................................

library/RLCMAC_CSN1_Types: add EGPRS Packet Channel Request definition

Change-Id: I762b932ed67d9e67a5e13290209cc9017dd650a7
---
M library/RLCMAC_CSN1_Types.ttcn
1 file changed, 104 insertions(+), 0 deletions(-)



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

diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index 1bb6232..d397dc0 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -703,5 +703,109 @@
 		}
 	}
 
+	/* 3GPP TS 44.060, table 11.2.5a.2 "EGPRS PACKET CHANNEL REQUEST" */
+	type union EGPRSPktChRequest {
+		EGPRSPktChRequest_OnePhase		one_phase,
+		EGPRSPktChRequest_Short			short, // deprecated
+		EGPRSPktChRequest_OnePhaseRedLatency	one_phase_red,
+		EGPRSPktChRequest_TwoPhase		two_phase,
+		EGPRSPktChRequest_Signalling		signalling,
+		EGPRSPktChRequest_OnePhaseUnack		one_phase_unack,
+		EGPRSPktChRequest_Dedicated		dedicated,
+		EGPRSPktChRequest_Emergency		emergency,
+		EGPRSPktChRequest_TwoPhaseIPA		two_phase_ipa,
+		EGPRSPktChRequest_SignallingIPA		signalling_ipa
+	} with {
+		variant "BITORDER(lsb)"
+		variant "TAG (
+			one_phase,		tag = '0'B;
+			short,			tag = '100'B;
+			one_phase_red,		tag = '101'B;
+			two_phase,		tag = '110000'B;
+			signalling,		tag = '110011'B;
+			one_phase_unack,	tag = '110101'B;
+			dedicated,		tag = '110110'B;
+			emergency,		tag = '110111'B;
+			two_phase_ipa,		tag = '111000'B;
+			signalling_ipa,		tag = '111001'B;
+		)"
+	};
+
+	type record EGPRSPktChRequest_OnePhase {
+		BIT1		tag, // '0'B
+		BIT5		multislot_class,
+		BIT2		priority,
+		BIT3		random_bits
+	};
+
+	/* NOTE: deprecated and shall not be used */
+	type record EGPRSPktChRequest_Short {
+		BIT3		tag, // '100'B
+		BIT3		nr_of_blocks,
+		BIT2		priority,
+		BIT3		random_bits
+	};
+
+	type record EGPRSPktChRequest_OnePhaseRedLatency {
+		BIT3		tag, // '101'B
+		BIT3		multislot_class_group,
+		BIT2		priority,
+		BIT3		random_bits
+	};
+
+	type record EGPRSPktChRequest_TwoPhase {
+		BIT6		tag, // '110000'B
+		BIT2		priority,
+		BIT3		random_bits
+	};
+
+	type record EGPRSPktChRequest_Signalling {
+		BIT6		tag, // '110011'B
+		BIT5		random_bits
+	};
+
+	type record EGPRSPktChRequest_OnePhaseUnack {
+		BIT6		tag, // '110101'B
+		BIT5		random_bits
+	};
+
+	type record EGPRSPktChRequest_Dedicated {
+		BIT6		tag, // '110110'B
+		BIT5		random_bits
+	};
+
+	type record EGPRSPktChRequest_Emergency{
+		BIT6		tag, // '110111'B
+		BIT5		random_bits
+	};
+
+	type record EGPRSPktChRequest_TwoPhaseIPA {
+		BIT6		tag, // '111000'B
+		BIT2		priority,
+		BIT3		random_bits
+	};
+
+	type record EGPRSPktChRequest_SignallingIPA {
+		BIT6		tag, // '111001'B
+		BIT5		random_bits
+	};
+
+	/* TITAN violates length restrictions on returned type, so we cannot do '... return BIT11'.
+	 * Keep this function private as it returns octet-aligned bitstring (+5 padding bits). */
+	private external function enc_EGPRSPktChRequestInternal(in EGPRSPktChRequest req) return bitstring
+		with { extension "prototype(convert) encode(RAW)" };
+
+	function enc_EGPRSPktChRequest2bits(in EGPRSPktChRequest req) return BIT11
+	{
+		var bitstring ra11_pad := enc_EGPRSPktChRequestInternal(req);
+		return substr(ra11_pad, 0, 11); /* TITAN adds 5 padding bits */
+	}
+
+	function enc_EGPRSPktChRequest2uint(in EGPRSPktChRequest req) return uint16_t
+	{
+		var BIT11 ra11 := enc_EGPRSPktChRequest2bits(req);
+		return bit2int(ra11);
+	}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17704
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: I762b932ed67d9e67a5e13290209cc9017dd650a7
Gerrit-Change-Number: 17704
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/20200401/7c3e9620/attachment.htm>


More information about the gerrit-log mailing list