<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20087">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">library: GSM_Types: fix extra indention tab<br><br>The top level context doesn't have an indent.<br><br>Change-Id: Ifece2e9fa782f173665e10fa9174403cccac7eb6<br>---<br>M library/GSM_Types.ttcn<br>1 file changed, 202 insertions(+), 202 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/87/20087/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn</span><br><span>index 8625cc3..5340fee 100644</span><br><span>--- a/library/GSM_Types.ttcn</span><br><span>+++ b/library/GSM_Types.ttcn</span><br><span>@@ -12,223 +12,223 @@</span><br><span> </span><br><span> module GSM_Types {</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- import from General_Types all;</span><br><span style="color: hsl(0, 100%, 40%);">- import from Osmocom_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+import from General_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+import from Osmocom_Types all;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type integer GsmArfcn (0..1023);</span><br><span style="color: hsl(0, 100%, 40%);">- type integer UmtsArfcn (0..16383);</span><br><span style="color: hsl(0, 100%, 40%);">- type integer UmtsScramblingCode (0..511);</span><br><span style="color: hsl(0, 100%, 40%);">- const integer GsmMaxFrameNumber := 26*51*2048;</span><br><span style="color: hsl(0, 100%, 40%);">- type integer GsmFrameNumber (0..GsmMaxFrameNumber);</span><br><span style="color: hsl(0, 100%, 40%);">- type integer GsmRxLev (0..63);</span><br><span style="color: hsl(0, 100%, 40%);">- type integer GsmTsc (0..7) with { variant "FIELDLENGTH(8)" };</span><br><span style="color: hsl(0, 100%, 40%);">- type uint32_t GsmTmsi;</span><br><span style="color: hsl(0, 100%, 40%);">- type OCT4 GprsTlli;</span><br><span style="color: hsl(0, 100%, 40%);">- type hexstring GsmMcc length(3);</span><br><span style="color: hsl(0, 100%, 40%);">- type hexstring GsmMnc length(2 .. 3);</span><br><span style="color: hsl(0, 100%, 40%);">- type uint16_t GsmLac;</span><br><span style="color: hsl(0, 100%, 40%);">- type uint16_t GsmCellId;</span><br><span style="color: hsl(120, 100%, 40%);">+type integer GsmArfcn (0..1023);</span><br><span style="color: hsl(120, 100%, 40%);">+type integer UmtsArfcn (0..16383);</span><br><span style="color: hsl(120, 100%, 40%);">+type integer UmtsScramblingCode (0..511);</span><br><span style="color: hsl(120, 100%, 40%);">+const integer GsmMaxFrameNumber := 26*51*2048;</span><br><span style="color: hsl(120, 100%, 40%);">+type integer GsmFrameNumber (0..GsmMaxFrameNumber);</span><br><span style="color: hsl(120, 100%, 40%);">+type integer GsmRxLev (0..63);</span><br><span style="color: hsl(120, 100%, 40%);">+type integer GsmTsc (0..7) with { variant "FIELDLENGTH(8)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type uint32_t GsmTmsi;</span><br><span style="color: hsl(120, 100%, 40%);">+type OCT4 GprsTlli;</span><br><span style="color: hsl(120, 100%, 40%);">+type hexstring GsmMcc length(3);</span><br><span style="color: hsl(120, 100%, 40%);">+type hexstring GsmMnc length(2 .. 3);</span><br><span style="color: hsl(120, 100%, 40%);">+type uint16_t GsmLac;</span><br><span style="color: hsl(120, 100%, 40%);">+type uint16_t GsmCellId;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type enumerated GprsCodingScheme {</span><br><span style="color: hsl(0, 100%, 40%);">- CS1, CS2, CS3, CS4</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(120, 100%, 40%);">+type enumerated GprsCodingScheme {</span><br><span style="color: hsl(120, 100%, 40%);">+ CS1, CS2, CS3, CS4</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- function f_gprs_blocksize(GprsCodingScheme cs) return integer {</span><br><span style="color: hsl(0, 100%, 40%);">- select (cs) {</span><br><span style="color: hsl(0, 100%, 40%);">- case (CS1) { return 22 }</span><br><span style="color: hsl(0, 100%, 40%);">- case (CS2) { return 32 }</span><br><span style="color: hsl(0, 100%, 40%);">- case (CS3) { return 38 }</span><br><span style="color: hsl(0, 100%, 40%);">- case (CS3) { return 52 }</span><br><span style="color: hsl(0, 100%, 40%);">- case else {</span><br><span style="color: hsl(0, 100%, 40%);">- setverdict(fail, "Invalid GPRS CS ", cs);</span><br><span style="color: hsl(0, 100%, 40%);">- mtc.stop;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(120, 100%, 40%);">+function f_gprs_blocksize(GprsCodingScheme cs) return integer {</span><br><span style="color: hsl(120, 100%, 40%);">+ select (cs) {</span><br><span style="color: hsl(120, 100%, 40%);">+ case (CS1) { return 22 }</span><br><span style="color: hsl(120, 100%, 40%);">+ case (CS2) { return 32 }</span><br><span style="color: hsl(120, 100%, 40%);">+ case (CS3) { return 38 }</span><br><span style="color: hsl(120, 100%, 40%);">+ case (CS3) { return 52 }</span><br><span style="color: hsl(120, 100%, 40%);">+ case else {</span><br><span style="color: hsl(120, 100%, 40%);">+ setverdict(fail, "Invalid GPRS CS ", cs);</span><br><span style="color: hsl(120, 100%, 40%);">+ mtc.stop;</span><br><span> }</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* 10.5.2.8 */</span><br><span style="color: hsl(0, 100%, 40%);">- type enumerated ChannelNeeded {</span><br><span style="color: hsl(0, 100%, 40%);">- CHAN_NEED_ANY (0),</span><br><span style="color: hsl(0, 100%, 40%);">- CHAN_NEED_SDCCH (1),</span><br><span style="color: hsl(0, 100%, 40%);">- CHAN_NEED_TCH_F (2),</span><br><span style="color: hsl(0, 100%, 40%);">- CHAN_NEED_TCH_H (3)</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(0, 100%, 40%);">- type record ChannelNeeded12 {</span><br><span style="color: hsl(0, 100%, 40%);">- ChannelNeeded second,</span><br><span style="color: hsl(0, 100%, 40%);">- ChannelNeeded first</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "" };</span><br><span style="color: hsl(120, 100%, 40%);">+/* 10.5.2.8 */</span><br><span style="color: hsl(120, 100%, 40%);">+type enumerated ChannelNeeded {</span><br><span style="color: hsl(120, 100%, 40%);">+ CHAN_NEED_ANY (0),</span><br><span style="color: hsl(120, 100%, 40%);">+ CHAN_NEED_SDCCH (1),</span><br><span style="color: hsl(120, 100%, 40%);">+ CHAN_NEED_TCH_F (2),</span><br><span style="color: hsl(120, 100%, 40%);">+ CHAN_NEED_TCH_H (3)</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type record ChannelNeeded12 {</span><br><span style="color: hsl(120, 100%, 40%);">+ ChannelNeeded second,</span><br><span style="color: hsl(120, 100%, 40%);">+ ChannelNeeded first</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "" };</span><br><span> </span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* TS 48.058 9.3.1 Channel Number IE */</span><br><span style="color: hsl(0, 100%, 40%);">- type enumerated RslChanNr0 {</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_INVALID ('00000'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_Bm_ACCH ('00001'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_BCCH ('10000'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_RACH ('10001'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_PCH_AGCH ('10010'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_OSMO_PDCH ('11000'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_OSMO_CBCH4 ('11001'B),</span><br><span style="color: hsl(0, 100%, 40%);">- RSL_CHAN_NR_OSMO_CBCH8 ('11010'B)</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span style="color: hsl(120, 100%, 40%);">+/* TS 48.058 9.3.1 Channel Number IE */</span><br><span style="color: hsl(120, 100%, 40%);">+type enumerated RslChanNr0 {</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_INVALID ('00000'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_Bm_ACCH ('00001'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_BCCH ('10000'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_RACH ('10001'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_PCH_AGCH ('10010'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_OSMO_PDCH ('11000'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_OSMO_CBCH4 ('11001'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ RSL_CHAN_NR_OSMO_CBCH8 ('11010'B)</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type record RslChanNr2 {</span><br><span style="color: hsl(0, 100%, 40%);">- BIT4 tag ('0001'B),</span><br><span style="color: hsl(0, 100%, 40%);">- uint1_t sub_chan</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type record RslChanNr2 {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT4 tag ('0001'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ uint1_t sub_chan</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type record RslChanNr4 {</span><br><span style="color: hsl(0, 100%, 40%);">- BIT3 tag ('001'B),</span><br><span style="color: hsl(0, 100%, 40%);">- uint2_t sub_chan</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type record RslChanNr4 {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT3 tag ('001'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ uint2_t sub_chan</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type record RslChanNr8 {</span><br><span style="color: hsl(0, 100%, 40%);">- BIT2 tag ('01'B),</span><br><span style="color: hsl(0, 100%, 40%);">- uint3_t sub_chan</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type record RslChanNr8 {</span><br><span style="color: hsl(120, 100%, 40%);">+ BIT2 tag ('01'B),</span><br><span style="color: hsl(120, 100%, 40%);">+ uint3_t sub_chan</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type union RslChanNrU {</span><br><span style="color: hsl(0, 100%, 40%);">- RslChanNr0 ch0,</span><br><span style="color: hsl(0, 100%, 40%);">- RslChanNr2 lm,</span><br><span style="color: hsl(0, 100%, 40%);">- RslChanNr4 sdcch4,</span><br><span style="color: hsl(0, 100%, 40%);">- RslChanNr8 sdcch8</span><br><span style="color: hsl(0, 100%, 40%);">- } with {</span><br><span style="color: hsl(0, 100%, 40%);">- variant "TAG(lm, tag = '0001'B;</span><br><span style="color: hsl(0, 100%, 40%);">- sdcch4, tag = '001'B;</span><br><span style="color: hsl(0, 100%, 40%);">- sdcch8, tag = '01'B;</span><br><span style="color: hsl(0, 100%, 40%);">- ch0, OTHERWISE)"</span><br><span style="color: hsl(0, 100%, 40%);">- variant "FIELDLENGTH(5)"</span><br><span style="color: hsl(0, 100%, 40%);">- variant "FIELDORDER(msb)"</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(120, 100%, 40%);">+type union RslChanNrU {</span><br><span style="color: hsl(120, 100%, 40%);">+ RslChanNr0 ch0,</span><br><span style="color: hsl(120, 100%, 40%);">+ RslChanNr2 lm,</span><br><span style="color: hsl(120, 100%, 40%);">+ RslChanNr4 sdcch4,</span><br><span style="color: hsl(120, 100%, 40%);">+ RslChanNr8 sdcch8</span><br><span style="color: hsl(120, 100%, 40%);">+} with {</span><br><span style="color: hsl(120, 100%, 40%);">+ variant "TAG(lm, tag = '0001'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ sdcch4, tag = '001'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ sdcch8, tag = '01'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ ch0, OTHERWISE)"</span><br><span style="color: hsl(120, 100%, 40%);">+ variant "FIELDLENGTH(5)"</span><br><span style="color: hsl(120, 100%, 40%);">+ variant "FIELDORDER(msb)"</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- type record RslChannelNr {</span><br><span style="color: hsl(0, 100%, 40%);">- RslChanNrU u,</span><br><span style="color: hsl(0, 100%, 40%);">- uint3_t tn</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(8)" variant "FIELDORDER(msb)" };</span><br><span style="color: hsl(120, 100%, 40%);">+type record RslChannelNr {</span><br><span style="color: hsl(120, 100%, 40%);">+ RslChanNrU u,</span><br><span style="color: hsl(120, 100%, 40%);">+ uint3_t tn</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(8)" variant "FIELDORDER(msb)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { ch0 := cht },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { ch0 := cht },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</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%);">+template RslChannelNr t_RslChanNr_RACH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_RACH);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_BCCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_BCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_CBCH4(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_CBCH8(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template uint1_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { lm := { tag := '0001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_SDCCH4(template uint3_t tn, template uint2_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template RslChannelNr t_RslChanNr_SDCCH8(template uint3_t tn, template uint3_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</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%);">+template (value) RslChannelNr ts_RslChanNr0(uint3_t tn, RslChanNr0 cht) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { ch0 := cht },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_RACH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_RACH);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_BCCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_BCCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_CBCH4(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_CBCH8(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { lm := { tag := '0001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_SDCCH4(uint3_t tn, uint2_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RslChannelNr ts_RslChanNr_SDCCH8(uint3_t tn, uint3_t sub_slot) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(120, 100%, 40%);">+ tn := tn</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%);">+/* TS 48.058 9.3.2 Link ID */</span><br><span style="color: hsl(120, 100%, 40%);">+type enumerated RslLinkIdC {</span><br><span style="color: hsl(120, 100%, 40%);">+ FACCH_SDCCH (0),</span><br><span style="color: hsl(120, 100%, 40%);">+ SACCH (1),</span><br><span style="color: hsl(120, 100%, 40%);">+ OSMO_PTCCH (2) /* Osmocom (trxcon) specific extension */</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+type enumerated RslSapi0Prio {</span><br><span style="color: hsl(120, 100%, 40%);">+ SAPI0_PRIO_NORMAL (0),</span><br><span style="color: hsl(120, 100%, 40%);">+ SAPI0_PRIO_HIGH (1),</span><br><span style="color: hsl(120, 100%, 40%);">+ SAPI0_PRIO_LOW (2)</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+type uint3_t GsmSapi;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+type record RslLinkId {</span><br><span style="color: hsl(120, 100%, 40%);">+ RslLinkIdC c,</span><br><span style="color: hsl(120, 100%, 40%);">+ boolean na,</span><br><span style="color: hsl(120, 100%, 40%);">+ RslSapi0Prio prio,</span><br><span style="color: hsl(120, 100%, 40%);">+ GsmSapi sapi</span><br><span style="color: hsl(120, 100%, 40%);">+} with { variant "" };</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template RslLinkId tr_RslLinkId := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ prio := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := ?</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%);">+template RslLinkId tr_RslLinkID_DCCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := FACCH_SDCCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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%);">+template RslLinkId tr_RslLinkID_SACCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := SACCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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%);">+template RslLinkId tr_RslLinkID_OSMO_PTCCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := OSMO_PTCCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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%);">+template (value) RslLinkId ts_RslLinkID_DCCH(GsmSapi sapi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := FACCH_SDCCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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%);">+template (value) RslLinkId ts_RslLinkID_SACCH(GsmSapi sapi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := SACCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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%);">+template (value) RslLinkId ts_RslLinkID_OSMO_PTCCH(GsmSapi sapi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ c := OSMO_PTCCH,</span><br><span style="color: hsl(120, 100%, 40%);">+ na := false,</span><br><span style="color: hsl(120, 100%, 40%);">+ prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(120, 100%, 40%);">+ sapi := sapi</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 f_hex_is_odd_length(hexstring digits) return bitstring {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (lengthof(digits) rem 2 == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return '1'B;</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ return '0'B;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_RACH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_RACH);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_BCCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_BCCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_CBCH4(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_CBCH8(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template uint1_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { lm := { tag := '0001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_SDCCH4(template uint3_t tn, template uint2_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- template RslChannelNr t_RslChanNr_SDCCH8(template uint3_t tn, template uint3_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr0(uint3_t tn, RslChanNr0 cht) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { ch0 := cht },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_RACH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_RACH);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_BCCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_BCCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_CBCH4(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_CBCH8(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { lm := { tag := '0001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_SDCCH4(uint3_t tn, uint2_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslChannelNr ts_RslChanNr_SDCCH8(uint3_t tn, uint3_t sub_slot) := {</span><br><span style="color: hsl(0, 100%, 40%);">- u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },</span><br><span style="color: hsl(0, 100%, 40%);">- tn := tn</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- /* TS 48.058 9.3.2 Link ID */</span><br><span style="color: hsl(0, 100%, 40%);">- type enumerated RslLinkIdC {</span><br><span style="color: hsl(0, 100%, 40%);">- FACCH_SDCCH (0),</span><br><span style="color: hsl(0, 100%, 40%);">- SACCH (1),</span><br><span style="color: hsl(0, 100%, 40%);">- OSMO_PTCCH (2) /* Osmocom (trxcon) specific extension */</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- type enumerated RslSapi0Prio {</span><br><span style="color: hsl(0, 100%, 40%);">- SAPI0_PRIO_NORMAL (0),</span><br><span style="color: hsl(0, 100%, 40%);">- SAPI0_PRIO_HIGH (1),</span><br><span style="color: hsl(0, 100%, 40%);">- SAPI0_PRIO_LOW (2)</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "FIELDLENGTH(2)" };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- type uint3_t GsmSapi;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- type record RslLinkId {</span><br><span style="color: hsl(0, 100%, 40%);">- RslLinkIdC c,</span><br><span style="color: hsl(0, 100%, 40%);">- boolean na,</span><br><span style="color: hsl(0, 100%, 40%);">- RslSapi0Prio prio,</span><br><span style="color: hsl(0, 100%, 40%);">- GsmSapi sapi</span><br><span style="color: hsl(0, 100%, 40%);">- } with { variant "" };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template RslLinkId tr_RslLinkId := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := ?,</span><br><span style="color: hsl(0, 100%, 40%);">- na := ?,</span><br><span style="color: hsl(0, 100%, 40%);">- prio := ?,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := ?</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template RslLinkId tr_RslLinkID_DCCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := FACCH_SDCCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template RslLinkId tr_RslLinkID_SACCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := SACCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template RslLinkId tr_RslLinkID_OSMO_PTCCH(template GsmSapi sapi) modifies tr_RslLinkId := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := OSMO_PTCCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslLinkId ts_RslLinkID_DCCH(GsmSapi sapi) := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := FACCH_SDCCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslLinkId ts_RslLinkID_SACCH(GsmSapi sapi) := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := SACCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- template (value) RslLinkId ts_RslLinkID_OSMO_PTCCH(GsmSapi sapi) := {</span><br><span style="color: hsl(0, 100%, 40%);">- c := OSMO_PTCCH,</span><br><span style="color: hsl(0, 100%, 40%);">- na := false,</span><br><span style="color: hsl(0, 100%, 40%);">- prio := SAPI0_PRIO_NORMAL,</span><br><span style="color: hsl(0, 100%, 40%);">- sapi := sapi</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- function f_hex_is_odd_length(hexstring digits) return bitstring {</span><br><span style="color: hsl(0, 100%, 40%);">- if (lengthof(digits) rem 2 == 1) {</span><br><span style="color: hsl(0, 100%, 40%);">- return '1'B;</span><br><span style="color: hsl(0, 100%, 40%);">- } else {</span><br><span style="color: hsl(0, 100%, 40%);">- return '0'B;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> </span><br><span> /* TS 04.12 Section 3.3.1 Block type */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20087">change 20087</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/+/20087"/><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: Ifece2e9fa782f173665e10fa9174403cccac7eb6 </div>
<div style="display:none"> Gerrit-Change-Number: 20087 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>