library/L1CTL_Types: fix definition of L1ctlDmEstReq
In osmocom-bb 'struct l1ctl_dm_est_req' is defined as follows: struct l1ctl_dm_est_req { uint8_t tsc; uint8_t h; union { struct l1ctl_h0 h0; struct l1ctl_h1 h1; }, uint8_t tch_mode; uint8_t audio_mode; } __attribute__((packed)); so the overall size of the union is size of the biggest member: sizeof(struct l1ctl_h0) is 2 sizeof(struct l1ctl_h1) is 132 Therefore we need to fix our definitions: - introduce 'record L1ctlH0' (with padding), - introduce 'union L1ctlH0H1': - move hopping indicator to L1ctl{H0,H1}, - use it as 'TAG' in 'union L1ctlH0H1'. Change-Id: I53964f794260f0676cc2771a7acbb679befb06d5 Related: OS#4799
This commit is contained in:
parent
fe052960b2
commit
2cdb97f166
|
@ -296,8 +296,15 @@ module L1CTL_Types {
|
||||||
octetstring l2_payload
|
octetstring l2_payload
|
||||||
} with { variant "" };
|
} with { variant "" };
|
||||||
|
|
||||||
|
type record L1ctlH0 {
|
||||||
|
uint8_t h,
|
||||||
|
Arfcn arfcn,
|
||||||
|
octetstring padding length(130)
|
||||||
|
} with { variant "" };
|
||||||
|
|
||||||
type record length(0..64) of Arfcn L1ctlMA;
|
type record length(0..64) of Arfcn L1ctlMA;
|
||||||
type record L1ctlH1 {
|
type record L1ctlH1 {
|
||||||
|
uint8_t h,
|
||||||
uint8_t hsn,
|
uint8_t hsn,
|
||||||
uint8_t maio,
|
uint8_t maio,
|
||||||
uint8_t n,
|
uint8_t n,
|
||||||
|
@ -314,15 +321,17 @@ module L1CTL_Types {
|
||||||
* variant (ma) "PADDING(128)" */
|
* variant (ma) "PADDING(128)" */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type union L1ctlH0H1 {
|
||||||
|
L1ctlH0 h0,
|
||||||
|
L1ctlH1 h1
|
||||||
|
} with { variant "TAG(h0, h = 0; h1, h = 1)" };
|
||||||
|
|
||||||
type record L1ctlDmEstReq {
|
type record L1ctlDmEstReq {
|
||||||
GsmTsc tsc,
|
GsmTsc tsc,
|
||||||
uint8_t h,
|
L1ctlH0H1 h0h1,
|
||||||
Arfcn arfcn optional,
|
|
||||||
L1ctlH1 hopping optional,
|
|
||||||
L1ctlTchMode tch_mode,
|
L1ctlTchMode tch_mode,
|
||||||
L1ctlAudioMode audio_mode
|
L1ctlAudioMode audio_mode
|
||||||
} with { variant (arfcn) "PRESENCE(h = 0)"
|
} with { variant "" };
|
||||||
variant (hopping) "PRESENCE(h = 1)" };
|
|
||||||
|
|
||||||
type record L1ctlReset {
|
type record L1ctlReset {
|
||||||
L1ctlResetType reset_type,
|
L1ctlResetType reset_type,
|
||||||
|
@ -590,9 +599,13 @@ module L1CTL_Types {
|
||||||
modifies ts_L1CTL_DM_EST_REQ := {
|
modifies ts_L1CTL_DM_EST_REQ := {
|
||||||
payload := {
|
payload := {
|
||||||
dm_est_req := {
|
dm_est_req := {
|
||||||
|
h0h1 := {
|
||||||
|
h0 := {
|
||||||
h := 0,
|
h := 0,
|
||||||
arfcn := { false, arfcn },
|
arfcn := { false, arfcn },
|
||||||
hopping := omit
|
padding := f_pad_oct(''O, 130, '00'O)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -605,9 +618,9 @@ module L1CTL_Types {
|
||||||
modifies ts_L1CTL_DM_EST_REQ := {
|
modifies ts_L1CTL_DM_EST_REQ := {
|
||||||
payload := {
|
payload := {
|
||||||
dm_est_req := {
|
dm_est_req := {
|
||||||
|
h0h1 := {
|
||||||
|
h1 := {
|
||||||
h := 1,
|
h := 1,
|
||||||
arfcn := omit,
|
|
||||||
hopping := {
|
|
||||||
hsn := hsn,
|
hsn := hsn,
|
||||||
maio := maio,
|
maio := maio,
|
||||||
n := sizeof(ma),
|
n := sizeof(ma),
|
||||||
|
@ -619,6 +632,7 @@ module L1CTL_Types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template L1ctlUlMessage ts_L1CTL_DM_REL_REQ(RslChannelNr chan_nr) := {
|
template L1ctlUlMessage ts_L1CTL_DM_REL_REQ(RslChannelNr chan_nr) := {
|
||||||
header := ts_L1ctlHeader(L1CTL_DM_REL_REQ),
|
header := ts_L1ctlHeader(L1CTL_DM_REL_REQ),
|
||||||
|
|
Loading…
Reference in New Issue