L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx templates

Change-Id: I9c8be0856516a6a168795c792f76d14c08c3dabb
This commit is contained in:
Harald Welte 2018-03-10 15:15:08 +01:00
parent cc5c1152cc
commit f8df4cb339
5 changed files with 128 additions and 75 deletions

View File

@ -149,8 +149,8 @@ template (value) LocationAreaIdentification ts_LAI_default := {
}
/* Default SYSTEM INFORMATION 3 */
template SystemInformation ts_SI3_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18),
template (value) SystemInformation ts_SI3_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18),
payload := {
si3 := {
cell_id := 23,
@ -179,8 +179,8 @@ template SystemInformation ts_SI3_default := {
}
}
template SystemInformation ts_SI2_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_2, 22),
template (value) SystemInformation ts_SI2_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_2, 22),
payload := {
si2 := {
bcch_freq_list := '00000000000000000000000000000000'O,
@ -190,8 +190,8 @@ template SystemInformation ts_SI2_default := {
}
}
template SystemInformation ts_SI4_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_4, 12), /* no CBCH / restoct */
template (value) SystemInformation ts_SI4_default := {
header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_4, 12), /* no CBCH / restoct */
payload := {
si4 := {
lai := ts_LAI_default,
@ -324,11 +324,13 @@ private function f_trxc_connect() runs on ConnHdlr {
}
private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr {
f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi)));
var TrxcMessage ret;
ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi)));
}
private function f_trx_fake_toffs256(int16_t toffs256) runs on ConnHdlr {
f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256)));
var TrxcMessage ret;
ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256)));
}
/* first function started in ConnHdlr component */
@ -632,8 +634,9 @@ private function f_main_trxc_connect() runs on test_CT {
}
private function f_rach_toffs(int16_t toffs256, boolean expect_pass) runs on test_CT {
var TrxcMessage ret;
/* tell fake_trx to use a given timing offset for all bursts */
f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256)));
ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256)));
f_sleep(0.5);
/* Transmit RACH request + wait for confirmation */
@ -708,23 +711,23 @@ template LapdmFrameB ts_LAPDm_B(LapdmSapi sapi, boolean c_r, boolean p, octetstr
/* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */
altstep as_l1_sacch() runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
[] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl {
log("SACCH received: ", l1_dl.payload.data_ind.payload);
var GsmRrL3Message meas_rep := valueof(ts_MEAS_REP(true, 23, 23, 0, 0, omit));
var LapdmFrameB lb := valueof(ts_LAPDm_B(0, false, false, enc_GsmRrL3Message(meas_rep)));
log("LAPDm: ", lb);
var octetstring pl := '0000'O & enc_LapdmFrameB(lb);
L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0), pl));
L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0), pl));
repeat;
}
}
altstep as_l1_dcch() runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
[] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl {
log("DCCH received: ", l1_dl.payload.data_ind.payload);
var octetstring pl := '010301'O;
L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl));
L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl));
repeat;
}
}
@ -950,7 +953,7 @@ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
f_est_dchan();
f_sleep(2.0);
L1CTL.send(t_L1CTL_DM_REL_REQ(g_chan_nr));
L1CTL.send(ts_L1CTL_DM_REL_REQ(g_chan_nr));
timer T := 40.0;
T.start;
@ -990,10 +993,10 @@ function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean {
altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids)
runs on test_CT {
var L1ctlDlMessage dl;
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_DummyUI)) {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_DummyUI)) {
repeat;
}
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
var octetstring without_plen :=
substr(dl.payload.data_ind.payload, 1, lengthof(dl.payload.data_ind.payload)-1);
var PDU_ML3_NW_MS rr := dec_PDU_ML3_NW_MS(without_plen);
@ -1582,7 +1585,7 @@ function f_l1_sample_si(L1CTL_PT pt, float duration := 8.0) return SystemInforma
T.start;
alt {
[] pt.receive(t_L1CTL_DATA_IND(t_RslChanNr_BCCH(0), ?)) -> value l1_dl {
[] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_BCCH(0), ?)) -> value l1_dl {
/* somehow dec_SystemInformation will try to decode even non-RR as SI */
if (not (l1_dl.payload.data_ind.payload[1] == '06'O)) {
log("Ignoring non-RR SI ", l1_dl);
@ -2079,7 +2082,7 @@ testcase TC_pcu_data_req_agch() runs on test_CT {
T.start;
alt {
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_PCU_DATA)) {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_PCU_DATA)) {
setverdict(pass);
}
[] L1CTL.receive { repeat; }
@ -2102,7 +2105,7 @@ testcase TC_pcu_data_req_imm_ass_pch() runs on test_CT {
timer T := 0.5;
T.start;
alt {
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, imm_ass)) {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, imm_ass)) {
/* TODO: verify paging group */
setverdict(pass);
}

View File

@ -114,7 +114,12 @@ module GSM_RR_Types {
BIT2 zero_one
} with { variant "" };
template L2PseudoLength t_L2Pseudolength(template uint6_t len) := {
template L2PseudoLength tr_L2Pseudolength(template uint6_t len) := {
l2_plen := len,
zero_one := '01'B
};
template (value) L2PseudoLength ts_L2Pseudolength(uint6_t len) := {
l2_plen := len,
zero_one := '01'B
};
@ -127,12 +132,20 @@ module GSM_RR_Types {
} with { variant "" };
template RrHeader t_RrHeader(RrMessageType msg_type, template uint6_t len) := {
l2_plen := t_L2Pseudolength(len),
l2_plen := tr_L2Pseudolength(len),
skip_indicator := 0,
rr_protocol_discriminator := 6,
message_type := msg_type
};
template (value) RrHeader ts_RrHeader(RrMessageType msg_type, uint6_t len) := {
l2_plen := ts_L2Pseudolength(len),
skip_indicator := 0,
rr_protocol_discriminator := 6,
message_type := msg_type
};
type record RrL3Header {
uint4_t skip_indicator,
uint4_t rr_protocol_discriminator,

View File

@ -36,14 +36,18 @@ module L1CTL_PortType {
function f_L1CTL_FBSB(L1CTL_PT pt, Arfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) {
timer T := 5.0;
for (var integer i := 0; i < 10; i := i+1) {
pt.send(t_L1CTL_FBSB_REQ(arfcn, t_L1CTL_FBSB_F_ALL, 0, ccch_mode, 63));
pt.send(ts_L1CTL_FBSB_REQ(arfcn, valueof(t_L1CTL_FBSB_F_ALL), 0, ccch_mode, 57));
T.start
alt {
[] pt.receive(t_L1CTL_FBSB_CONF(0)) { return; };
[] pt.receive(t_L1CTL_FBSB_CONF(?)) { }
[i == 9] pt.receive(t_L1CTL_FBSB_CONF(?)) {
[] pt.receive(tr_L1CTL_FBSB_CONF(0)) { return; };
[i >= 9] pt.receive(tr_L1CTL_FBSB_CONF(?)) {
setverdict(fail, "FBSB Failed with non-zero return code");
self.stop;
};
[] pt.receive(tr_L1CTL_FBSB_CONF(?)) {
pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL));
pt.receive;
}
[] pt.receive { repeat; };
[] T.timeout { setverdict(fail, "Timeout in FBSB") };
}
@ -55,9 +59,9 @@ module L1CTL_PortType {
var GsmFrameNumber fn;
timer T := 2.0;
T.start
pt.send(t_L1CTL_RACH_REQ(ra, combined, offset))
pt.send(ts_L1CTL_RACH_REQ(ra, combined, offset))
alt {
[] pt.receive(t_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr };
[] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr };
[] pt.receive { repeat; };
[] T.timeout { setverdict(fail, "Timeout in RACH") };
}
@ -65,7 +69,7 @@ module L1CTL_PortType {
}
function f_L1CTL_PARAM(L1CTL_PT pt, uint8_t ta, uint8_t tx_power) {
pt.send(t_L1CTL_PAR_REQ(ta, tx_power));
pt.send(ts_L1CTL_PAR_REQ(ta, tx_power));
}
function f_L1CTL_WAIT_IMM_ASS(L1CTL_PT pt, uint8_t ra, GsmFrameNumber rach_fn) return ImmediateAssignment {
@ -74,7 +78,7 @@ module L1CTL_PortType {
timer T := 10.0;
T.start;
alt {
[] pt.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
[] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
rr := dec_GsmRrMessage(dl.payload.data_ind.payload);
log("PCH/AGCN DL RR: ", rr);
if (match(rr, t_RR_IMM_ASS(ra, rach_fn))) {
@ -96,7 +100,7 @@ module L1CTL_PortType {
timer T := 10.0;
T.start;
alt {
[] pt.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
[] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
rr := dec_GsmRrMessage(dl.payload.data_ind.payload);
log("PCH/AGCN DL RR: ", rr);
if (match(rr, t_RR_IMM_ASS_TBF_DL(tlli))) {
@ -115,9 +119,9 @@ module L1CTL_PortType {
function f_L1CTL_TBF_CFG(L1CTL_PT pt, boolean is_uplink, TfiUsfArr tfi_usf) {
timer T := 2.0;
T.start;
pt.send(t_L1CTL_TBF_CFG_REQ(is_uplink, tfi_usf));
pt.send(ts_L1CTL_TBF_CFG_REQ(is_uplink, tfi_usf));
alt {
[] pt.receive(t_L1CTL_TBF_CFG_CONF(is_uplink)) {}
[] pt.receive(tr_L1CTL_TBF_CFG_CONF(is_uplink)) {}
[] pt.receive { repeat };
[] T.timeout { setverdict(fail, "Timeout waiting for TBF-CFG.conf") };
}
@ -126,7 +130,7 @@ module L1CTL_PortType {
/* Send DM_EST_REQ from parameters derived from IMM ASS */
function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass) {
pt.send(t_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc));
pt.send(ts_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc));
}
function f_connect_reset(L1CTL_PT pt, charstring l1ctl_sock_path := m_l1ctl_sock_path) {

View File

@ -96,7 +96,13 @@ module L1CTL_Types {
OCT2 padding
} with { variant "" };
template L1ctlHeader t_L1ctlHeader(template L1ctlMsgType msg_type) := {
template L1ctlHeader tr_L1ctlHeader(template L1ctlMsgType msg_type) := {
msg_type := msg_type,
flags := ?,
padding := ?
};
template (value) L1ctlHeader ts_L1ctlHeader(L1ctlMsgType msg_type) := {
msg_type := msg_type,
flags := { padding := '0000000'B, f_done := false },
padding := '0000'O
@ -135,7 +141,7 @@ module L1CTL_Types {
boolean rx_traffic_ind
} with { variant "" };
template L1ctlAudioMode t_L1CTL_AudioModeNone := { '0000'B, false, false, false, false };
template (value) L1ctlAudioMode t_L1CTL_AudioModeNone := { '0000'B, false, false, false, false };
type record L1ctlTchModeConf {
L1ctlTchMode tch_mode,
@ -214,7 +220,7 @@ module L1CTL_Types {
boolean fb0
} with { variant "FIELDORDER(msb)" };
template L1ctlFbsbFlags t_L1CTL_FBSB_F_ALL := {
template (value) L1ctlFbsbFlags t_L1CTL_FBSB_F_ALL := {
padding := '00000'B,
sb := true,
fb1 := true,
@ -234,9 +240,8 @@ module L1CTL_Types {
} with { variant "" };
type record L1ctlCcchModeReq {
L1ctlTchMode tch_mode,
L1ctlAudioMode audio_mode,
OCT2 padding
L1ctlCcchMode ccch_mode,
OCT3 padding
} with { variant "" };
type record L1ctlTchModeReq {
@ -369,8 +374,8 @@ module L1CTL_Types {
/* for generating RESET_REQ */
template L1ctlUlMessage t_L1ctlResetReq(template L1ctlResetType rst_type) := {
header := t_L1ctlHeader(L1CTL_RESET_REQ),
template (value) L1ctlUlMessage t_L1ctlResetReq(L1ctlResetType rst_type) := {
header := ts_L1ctlHeader(L1CTL_RESET_REQ),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := omit,
@ -383,8 +388,11 @@ module L1CTL_Types {
};
/* for generating FBSB_REQ */
template L1ctlUlMessage t_L1CTL_FBSB_REQ(template Arfcn arfcn, template L1ctlFbsbFlags flags, uint8_t sync_info_idx, L1ctlCcchMode ccch_mode, GsmRxLev rxlev_exp) := {
header := t_L1ctlHeader(L1CTL_FBSB_REQ),
template (value) L1ctlUlMessage ts_L1CTL_FBSB_REQ(Arfcn arfcn, L1ctlFbsbFlags flags,
uint8_t sync_info_idx,
L1ctlCcchMode ccch_mode,
GsmRxLev rxlev_exp) := {
header := ts_L1ctlHeader(L1CTL_FBSB_REQ),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := omit,
@ -404,8 +412,8 @@ module L1CTL_Types {
};
/* for matching against incoming FBSB_CONF */
template L1ctlDlMessage t_L1CTL_FBSB_CONF(template uint8_t result) := {
header := t_L1ctlHeader(L1CTL_FBSB_CONF),
template L1ctlDlMessage tr_L1CTL_FBSB_CONF(template uint8_t result) := {
header := tr_L1ctlHeader(L1CTL_FBSB_CONF),
dl_info := ?,
payload := {
fbsb_conf := {
@ -416,8 +424,29 @@ module L1CTL_Types {
}
};
template L1ctlUlMessage t_L1CTL_RACH_REQ(uint8_t ra, uint8_t combined, uint16_t offset) := {
header := t_L1ctlHeader(L1CTL_RACH_REQ),
template (value) L1ctlUlMessage ts_L1CTL_CCCH_MODE_REQ(L1ctlCcchMode ccch_mode) := {
header := ts_L1ctlHeader(L1CTL_CCCH_MODE_REQ),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := omit,
payload := {
ccch_mode_req := {
ccch_mode := ccch_mode,
padding := '000000'O
}
}
};
template L1ctlUlMessage ts_L1CTL_CCCH_MODE_CONF := {
header := ts_L1ctlHeader(L1CTL_CCCH_MODE_CONF),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := omit,
payload := ?
};
template L1ctlUlMessage ts_L1CTL_RACH_REQ(uint8_t ra, uint8_t combined, uint16_t offset) := {
header := ts_L1ctlHeader(L1CTL_RACH_REQ),
ul_info := {
chan_nr := t_RslChanNr_RACH(0),
link_id := ts_RslLinkID_DCCH(0),
@ -434,8 +463,8 @@ module L1CTL_Types {
}
}
template (value) L1ctlUlMessage t_L1CTL_PAR_REQ(uint8_t ta, uint8_t tx_power) := {
header := t_L1ctlHeader(L1CTL_PARAM_REQ),
template L1ctlUlMessage ts_L1CTL_PAR_REQ(uint8_t ta, uint8_t tx_power) := {
header := ts_L1ctlHeader(L1CTL_PARAM_REQ),
ul_info := {
chan_nr := t_RslChanNr_RACH(0),
link_id := ts_RslLinkID_DCCH(0),
@ -452,8 +481,8 @@ module L1CTL_Types {
}
}
template L1ctlUlMessage t_L1CTL_DM_EST_REQ(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) := {
header := t_L1ctlHeader(L1CTL_DM_EST_REQ),
template L1ctlUlMessage ts_L1CTL_DM_EST_REQ(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) := {
header := ts_L1ctlHeader(L1CTL_DM_EST_REQ),
ul_info := {
chan_nr := chan_nr,
link_id := ts_RslLinkID_DCCH(0),
@ -473,8 +502,8 @@ module L1CTL_Types {
}
}
template L1ctlUlMessage t_L1CTL_DM_REL_REQ(RslChannelNr chan_nr) := {
header := t_L1ctlHeader(L1CTL_DM_REL_REQ),
template L1ctlUlMessage ts_L1CTL_DM_REL_REQ(RslChannelNr chan_nr) := {
header := ts_L1ctlHeader(L1CTL_DM_REL_REQ),
ul_info := {
chan_nr := chan_nr,
link_id := ts_RslLinkID_DCCH(0),
@ -487,8 +516,10 @@ module L1CTL_Types {
}
}
template L1ctlUlMessage t_L1CTL_DATA_REQ(template RslChannelNr chan_nr, template RslLinkId link_id, octetstring l2_data) := {
header := t_L1ctlHeader(L1CTL_DATA_REQ),
template (value) L1ctlUlMessage ts_L1CTL_DATA_REQ(template (value) RslChannelNr chan_nr,
template (value) RslLinkId link_id,
octetstring l2_data) := {
header := ts_L1ctlHeader(L1CTL_DATA_REQ),
ul_info := {
chan_nr := chan_nr,
link_id := link_id,
@ -501,8 +532,8 @@ module L1CTL_Types {
}
}
template L1ctlUlMessage t_L1CTL_TBF_CFG_REQ(boolean is_uplink, TfiUsfArr tfi_usf) := {
header := t_L1ctlHeader(L1CTL_TBF_CFG_REQ),
template (value) L1ctlUlMessage ts_L1CTL_TBF_CFG_REQ(boolean is_uplink, TfiUsfArr tfi_usf) := {
header := ts_L1ctlHeader(L1CTL_TBF_CFG_REQ),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := omit,
@ -516,8 +547,8 @@ module L1CTL_Types {
}
};
template L1ctlDlMessage t_L1CTL_TBF_CFG_CONF(template boolean is_uplink) := {
header := t_L1ctlHeader(L1CTL_TBF_CFG_CONF),
template L1ctlDlMessage tr_L1CTL_TBF_CFG_CONF(template boolean is_uplink) := {
header := tr_L1ctlHeader(L1CTL_TBF_CFG_CONF),
dl_info := omit,
payload := {
tbf_cfg_conf := {
@ -529,8 +560,10 @@ module L1CTL_Types {
}
};
template L1ctlUlMessage t_L1CTL_DATA_TBF_REQ(octetstring l2_data, L1ctlGprsCs cs := L1CTL_CS1, uint8_t tbf_nr := 0) := {
header := t_L1ctlHeader(L1CTL_DATA_TBF_REQ),
template (value) L1ctlUlMessage ts_L1CTL_DATA_TBF_REQ(octetstring l2_data,
L1ctlGprsCs cs := L1CTL_CS1,
uint8_t tbf_nr := 0) := {
header := ts_L1ctlHeader(L1CTL_DATA_TBF_REQ),
ul_info := omit,
ul_info_tbf := {
tbf_nr := tbf_nr,
@ -543,11 +576,11 @@ module L1CTL_Types {
}
}
template L1ctlUlMessage t_L1CTL_DATA_ABS_REQ(octetstring l2_data, Arfcn arfcn,
template (value) L1ctlUlMessage ts_L1CTL_DATA_ABS_REQ(octetstring l2_data, Arfcn arfcn,
uint8_t ts, GsmFrameNumber fn,
L1ctlGprsCs cs := L1CTL_CS1,
uint8_t tbf_nr := 0) := {
header := t_L1ctlHeader(L1CTL_DATA_ABS_REQ),
header := ts_L1ctlHeader(L1CTL_DATA_ABS_REQ),
ul_info := omit,
ul_info_tbf := omit,
ul_info_abs := {
@ -566,17 +599,17 @@ module L1CTL_Types {
/* for matching against incoming RACH_CONF */
template L1ctlDlMessage t_L1CTL_RACH_CONF := {
header := t_L1ctlHeader(L1CTL_RACH_CONF),
template L1ctlDlMessage tr_L1CTL_RACH_CONF := {
header := tr_L1ctlHeader(L1CTL_RACH_CONF),
dl_info := ?,
payload := ?
};
/* for matching against incoming DATA_IND */
template L1ctlDlMessage t_L1CTL_DATA_IND(template RslChannelNr chan_nr,
template L1ctlDlMessage tr_L1CTL_DATA_IND(template RslChannelNr chan_nr,
template RslLinkId link_id := ?,
template octetstring l2_data := ?) := {
header := t_L1ctlHeader(L1CTL_DATA_IND),
header := tr_L1ctlHeader(L1CTL_DATA_IND),
dl_info := {
chan_nr := chan_nr,
link_id := link_id,

View File

@ -165,7 +165,7 @@ module LAPDm_RAW_PT {
/* release the dedicated radio channel */
private function f_release_dcch() runs on lapdm_CT {
L1CTL.send(t_L1CTL_DM_REL_REQ(chan_desc.chan_nr));
L1CTL.send(ts_L1CTL_DM_REL_REQ(chan_desc.chan_nr));
set_ph_state(PH_STATE_BCH);
}
@ -386,7 +386,7 @@ module LAPDm_RAW_PT {
}
/* forward CCCH SAPI from L1CTL to User */
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_BCCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_BCCH(0))) -> value dl {
lpd.sacch := false;
lpd.sapi := 0;
lpd.lapdm.bbis := dec_LapdmFrameBbis(dl.payload.data_ind.payload);
@ -394,7 +394,7 @@ module LAPDm_RAW_PT {
}
/* forward BCCH SAPI from L1CTL to User */
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
lpd.sacch := false;
lpd.sapi := 0;
lpd.lapdm.bbis := dec_LapdmFrameBbis(dl.payload.data_ind.payload);
@ -425,7 +425,7 @@ module LAPDm_RAW_PT {
alt {
/* decode any received DATA frames for the dedicated channel and pass them up */
[] L1CTL.receive(t_L1CTL_DATA_IND(chan_desc.chan_nr)) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(chan_desc.chan_nr)) -> value dl {
if (dl.dl_info.link_id.c == SACCH) {
lpd.sacch := true;
/* FIXME: how to deal with UI frames in B4 format (lo length!) */
@ -447,7 +447,7 @@ module LAPDm_RAW_PT {
link_id := valueof(ts_RslLinkID_DCCH(lpd.sapi));
}
buf := enc_LapdmFrame(lpd.lapdm);
L1CTL.send(t_L1CTL_DATA_REQ(chan_desc.chan_nr, link_id, buf));
L1CTL.send(ts_L1CTL_DATA_REQ(chan_desc.chan_nr, link_id, buf));
}
/* Release dedicated channel */
@ -465,7 +465,7 @@ module LAPDm_RAW_PT {
alt {
/* decode + forward any blocks from L1 to L23*/
[] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PDCH(?))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(?))) -> value dl {
rpdi.block := dec_RlcmacDlBlock(dl.payload.data_ind.payload);
/* FIXME: Filter based on g_tbf_dl */
rpdi.fn := dl.dl_info.frame_nr;
@ -482,10 +482,10 @@ module LAPDm_RAW_PT {
var octetstring buf;
if (ischosen(rpdr.dyn)) {
buf := enc_RlcmacUlBlock(rpdr.dyn.block);
L1CTL.send(t_L1CTL_DATA_TBF_REQ(buf, L1CTL_CS1, rpdr.dyn.tbf_id));
L1CTL.send(ts_L1CTL_DATA_TBF_REQ(buf, L1CTL_CS1, rpdr.dyn.tbf_id));
} else {
buf := enc_RlcmacUlBlock(rpdr.abs.block);
L1CTL.send(t_L1CTL_DATA_ABS_REQ(buf, rpdr.abs.arfcn,
L1CTL.send(ts_L1CTL_DATA_ABS_REQ(buf, rpdr.abs.arfcn,
rpdr.abs.ts_nr, rpdr.abs.fn,
L1CTL_CS1, rpdr.abs.tbf_id));
}