GSM_Types: Fix encoding of RSL Channel numbers

This commit is contained in:
Harald Welte 2017-07-30 00:49:56 +02:00
parent bda65a31f5
commit c84d847f01
1 changed files with 6 additions and 5 deletions

View File

@ -496,22 +496,22 @@ module GSM_Types {
RSL_CHAN_NR_BCCH ('10'H), RSL_CHAN_NR_BCCH ('10'H),
RSL_CHAN_NR_RACH ('11'H), RSL_CHAN_NR_RACH ('11'H),
RSL_CHAN_NR_PCH_AGCH ('12'H) RSL_CHAN_NR_PCH_AGCH ('12'H)
} with { variant "FIELDLENGTH(5)" }; } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };
type record RslChanNr2 { type record RslChanNr2 {
BIT4 tag ('0001'B), BIT4 tag ('0001'B),
uint1_t sub_chan uint1_t sub_chan
} with { variant "FIELDLENGTH(5)" }; } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };
type record RslChanNr4 { type record RslChanNr4 {
BIT3 tag ('001'B), BIT3 tag ('001'B),
uint2_t sub_chan uint2_t sub_chan
} with { variant "FIELDLENGTH(5)" }; } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };
type record RslChanNr8 { type record RslChanNr8 {
BIT2 tag ('01'B), BIT2 tag ('01'B),
uint3_t sub_chan uint3_t sub_chan
} with { variant "FIELDLENGTH(5)" }; } with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };
type union RslChanNrU { type union RslChanNrU {
RslChanNr0 ch0, RslChanNr0 ch0,
@ -524,12 +524,13 @@ module GSM_Types {
sdcch8, tag = '01'B; sdcch8, tag = '01'B;
ch0, OTHERWISE)" ch0, OTHERWISE)"
variant "FIELDLENGTH(5)" variant "FIELDLENGTH(5)"
variant "FIELDORDER(msb)"
}; };
type record RslChannelNr { type record RslChannelNr {
RslChanNrU u, RslChanNrU u,
uint3_t tn uint3_t tn
} with { variant "FIELDLENGTH(8)" }; } with { variant "FIELDLENGTH(8)" variant "FIELDORDER(msb)" };
template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := { template RslChannelNr t_RslChanNr0(template uint3_t tn, template RslChanNr0 cht) := {
u := { ch0 := cht }, u := { ch0 := cht },