summaryrefslogtreecommitdiffstats
path: root/bts/BTS_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-10 15:15:08 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-12 16:04:22 +0100
commitf8df4cb339425261a7f1bc96c70fa6c99018cf20 (patch)
tree38dbe7b93fed44b02ecb0990027542be3ab959f8 /bts/BTS_Tests.ttcn
parentcc5c1152cca8d610bf541f385fa578564caec12a (diff)
L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx templates
Diffstat (limited to 'bts/BTS_Tests.ttcn')
-rw-r--r--bts/BTS_Tests.ttcn41
1 files changed, 22 insertions, 19 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 32269e2..f3b7a28 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -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);
}