bts: f_tx_lapdm: Build SacchL1Header with proper values

Change-Id: I2c77d9d6262bd4763b3fb53a4a595d2c61f45f4b
This commit is contained in:
Pau Espin 2018-10-10 15:56:39 +02:00 committed by Harald Welte
parent 4860473c7b
commit a0fb42a11c
1 changed files with 11 additions and 7 deletions

View File

@ -3318,14 +3318,18 @@ private function f_tx_lapdm(template (value) LapdmFrame l,
var octetstring l2 := enc_LapdmFrame(valueof(l));
if (valueof(link_id.c) == SACCH) {
/* prepend dummy L1 header */
l2 := '0000'O & l2;
var L1ctlDataReq l1hl2 := {
l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)),
l2_payload := f_pad_oct(l2, 21, '2B'O)
}
L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, link_id, l1hl2));
} else {
/* If required, pad L2 frame with constant 0x2b filling */
l2 := f_pad_oct(l2, 23, '2B'O);
log("encoding ", l, " to ", l2);
L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2));
}
/* If required, pad L2 frame with constant 0x2b filling */
l2 := f_pad_oct(l2, 23, '2B'O);
log("encoding ", l, " to ", l2);
L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2));
}
type record RllTestCase {