summaryrefslogtreecommitdiffstats
path: root/sysinfo
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-16 18:53:58 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-16 18:53:58 +0200
commit0c8d5c07ee5233d7c6f764d53cdc32d1f0a0418b (patch)
tree9a2533c01054316a5f255448dda39054cd4dedba /sysinfo
parent0b1e5b84a3746c6f64317e498acad4fd2cd261d6 (diff)
GSM_Types: Add RSL channel number IE encoder/decoder
Diffstat (limited to 'sysinfo')
-rw-r--r--sysinfo/GSM_Types.ttcn63
1 files changed, 63 insertions, 0 deletions
diff --git a/sysinfo/GSM_Types.ttcn b/sysinfo/GSM_Types.ttcn
index 3313d7c..ecc714b 100644
--- a/sysinfo/GSM_Types.ttcn
+++ b/sysinfo/GSM_Types.ttcn
@@ -441,5 +441,68 @@ module GSM_Types {
other, OTHERWISE;
)" }
+ /* TS 48.058 9.3.1 Channel Number IE */
+ type enumerated RslChanNr0 {
+ RSL_CHAN_NR_INVALID ('00'H),
+ RSL_CHAN_NR_Bm_ACCH ('01'H),
+ RSL_CHAN_NR_BCCH ('10'H),
+ RSL_CHAN_NR_RACH ('11'H),
+ RSL_CHAN_NR_PCH_AGCH ('12'H)
+ } with { variant "FIELDLENGTH(5)" };
+
+ type record RslChanNr2 {
+ BIT4 tag ('0001'B),
+ uint1_t sub_chan
+ } with { variant "FIELDLENGTH(5)" };
+
+ type record RslChanNr4 {
+ BIT3 tag ('001'B),
+ uint2_t sub_chan
+ } with { variant "FIELDLENGTH(5)" };
+
+ type record RslChanNr8 {
+ BIT2 tag ('01'B),
+ uint3_t sub_chan
+ } with { variant "FIELDLENGTH(5)" };
+
+ type union RslChanNrU {
+ RslChanNr0 ch0,
+ RslChanNr2 lm,
+ RslChanNr4 sdcch4,
+ RslChanNr8 sdcch8
+ } with {
+ variant "TAG(lm, tag = '0001'B;
+ sdcch4, tag = '001'B;
+ sdcch8, tag = '01'B;
+ ch0, OTHERWISE)"
+ variant "FIELDLENGTH(5)"
+ };
+
+ type record RslChannelNr {
+ RslChanNrU u,
+ uint3_t tn
+ } with { variant "FIELDLENGTH(8)" };
+
+ template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := {
+ u := { ch0 := cht },
+ tn := tn
+ }
+
+ template RslChannelNr t_RslChanNr_RACH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_RACH);
+ template RslChannelNr t_RslChanNr_BCCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_BCCH);
+ template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
+ template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
+ template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, uint1_t sub_slot) := {
+ u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
+ tn := tn
+ }
+ template RslChannelNr t_RslChanNr_SDCCH4(template uint3_t tn, template uint2_t sub_slot) := {
+ u := { sdcch4 := { tag := '001'B, sub_chan := sub_slot } },
+ tn := tn
+ }
+ template RslChannelNr t_RslChanNr_SDCCH8(template uint3_t tn, template uint3_t sub_slot) := {
+ u := { sdcch8 := { tag := '01'B, sub_chan := sub_slot } },
+ tn := tn
+ }
} with { encode "RAW"; variant "FIELDORDER(msb)" }