<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17704">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">library/RLCMAC_CSN1_Types: add EGPRS Packet Channel Request definition<br><br>Change-Id: I762b932ed67d9e67a5e13290209cc9017dd650a7<br>---<br>M library/RLCMAC_CSN1_Types.ttcn<br>1 file changed, 104 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/17704/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn</span><br><span>index 1bb6232..d397dc0 100644</span><br><span>--- a/library/RLCMAC_CSN1_Types.ttcn</span><br><span>+++ b/library/RLCMAC_CSN1_Types.ttcn</span><br><span>@@ -703,5 +703,109 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* 3GPP TS 44.060, table 11.2.5a.2 "EGPRS PACKET CHANNEL REQUEST" */</span><br><span style="color: hsl(120, 100%, 40%);">+ type union EGPRSPktChRequest {</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_OnePhase one_phase,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_Short short, // deprecated</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_OnePhaseRedLatency one_phase_red,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_TwoPhase two_phase,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_Signalling signalling,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_OnePhaseUnack one_phase_unack,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_Dedicated dedicated,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_Emergency emergency,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_TwoPhaseIPA two_phase_ipa,</span><br><span style="color: hsl(120, 100%, 40%);">+ EGPRSPktChRequest_SignallingIPA signalling_ipa</span><br><span style="color: hsl(120, 100%, 40%);">+ } with {</span><br><span style="color: hsl(120, 100%, 40%);">+ variant "BITORDER(lsb)"</span><br><span style="color: hsl(120, 100%, 40%);">+ variant "TAG (</span><br><span style="color: hsl(120, 100%, 40%);">+ one_phase, tag = '0'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ short, tag = '100'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ one_phase_red, tag = '101'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ two_phase, tag = '110000'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ signalling, tag = '110011'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ one_phase_unack, tag = '110101'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ dedicated, tag = '110110'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ emergency, tag = '110111'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ two_phase_ipa, tag = '111000'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ signalling_ipa, tag = '111001'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ )"</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_OnePhase {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT1 tag, // '0'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 multislot_class,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 priority,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* NOTE: deprecated and shall not be used */</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_Short {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 tag, // '100'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 nr_of_blocks,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 priority,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_OnePhaseRedLatency {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 tag, // '101'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 multislot_class_group,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 priority,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_TwoPhase {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '110000'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 priority,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_Signalling {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '110011'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_OnePhaseUnack {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '110101'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_Dedicated {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '110110'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_Emergency{</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '110111'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_TwoPhaseIPA {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '111000'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 priority,</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ type record EGPRSPktChRequest_SignallingIPA {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT6 tag, // '111001'B</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT5 random_bits</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* TITAN violates length restrictions on returned type, so we cannot do '... return BIT11'.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Keep this function private as it returns octet-aligned bitstring (+5 padding bits). */</span><br><span style="color: hsl(120, 100%, 40%);">+ private external function enc_EGPRSPktChRequestInternal(in EGPRSPktChRequest req) return bitstring</span><br><span style="color: hsl(120, 100%, 40%);">+ with { extension "prototype(convert) encode(RAW)" };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ function enc_EGPRSPktChRequest2bits(in EGPRSPktChRequest req) return BIT11</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ var bitstring ra11_pad := enc_EGPRSPktChRequestInternal(req);</span><br><span style="color: hsl(120, 100%, 40%);">+ return substr(ra11_pad, 0, 11); /* TITAN adds 5 padding bits */</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ function enc_EGPRSPktChRequest2uint(in EGPRSPktChRequest req) return uint16_t</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ var BIT11 ra11 := enc_EGPRSPktChRequest2bits(req);</span><br><span style="color: hsl(120, 100%, 40%);">+ return bit2int(ra11);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> </span><br><span> } with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17704">change 17704</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17704"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I762b932ed67d9e67a5e13290209cc9017dd650a7 </div>
<div style="display:none"> Gerrit-Change-Number: 17704 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>