Fix use of osmocom-extended RSL Channel Numbers

Bring our TTCN-3 view of how RSL channel numbers are defined in sync
with that of our other implementations (BTS, libosmocore, trxcon, ...)

Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01
Related: OS#4027
This commit is contained in:
Harald Welte 2019-05-27 17:14:36 +02:00
parent 990a36138b
commit 6b86b3471f
2 changed files with 20 additions and 7 deletions

View File

@ -321,8 +321,17 @@ private function f_cbch_report(CbchTestParsChan pars_chan, charstring id)
}
}
private function t_cbch_chan_nr(CbchTestPars pars, template uint8_t tn) return template RslChannelNr {
if (pars.use_sdcch4) {
return t_RslChanNr_CBCH4(tn);
} else {
return t_RslChanNr_CBCH8(tn);
}
}
/* shared function doing the heavy lifting for most CBCH tests */
private function f_TC_smscb(CbchTestPars pars) runs on test_CT {
var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */
var L1ctlDlMessage dl;
var integer msg_count;
timer T;
@ -344,8 +353,7 @@ private function f_TC_smscb(CbchTestPars pars) runs on test_CT {
T.start(5.0 + 3.0 * int2float(msg_count));
/* Expect this to show up exactly once on the basic CBCH (four blocks) */
alt {
/* FIXME: Channel Nr for SDCCH/8 */
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl {
var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr);
var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload);
log("Tb=", tb, ", CBCH: ", dl, ", block: ", cb);
@ -378,6 +386,7 @@ private function f_TC_smscb(CbchTestPars pars) runs on test_CT {
}
private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT {
var template RslChannelNr t_chan_nr := t_cbch_chan_nr(pars, 0); /* FIXME: TS number */
var L1ctlDlMessage dl;
timer T := 5.0;
@ -389,7 +398,7 @@ private function f_TC_smscb_default_only(CbchTestPars pars) runs on test_CT {
T.start;
alt {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl {
var integer tb := f_cbch_fn2tb(dl.dl_info.frame_nr);
log("CBCH: ", dl);
var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload);
@ -658,6 +667,7 @@ testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT {
basic := valueof(t_CbchPC(msgs_1m_3b_default)),
extended := omit
};
var template RslChannelNr t_chan_nr := t_RslChanNr_CBCH4(0);
var L1ctlDlMessage dl;
timer T := 5.0;
@ -672,7 +682,7 @@ testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT {
T.start;
alt {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl {
[] L1CTL.receive(tr_L1CTL_DATA_IND(t_chan_nr)) -> value dl {
log("CBCH: ", dl);
var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload);
/* detect the proper CBCH messages; check frame number */

View File

@ -68,7 +68,8 @@ module GSM_Types {
RSL_CHAN_NR_RACH ('10001'B),
RSL_CHAN_NR_PCH_AGCH ('10010'B),
RSL_CHAN_NR_OSMO_PDCH ('11000'B),
RSL_CHAN_NR_OSMO_CBCH ('11001'B)
RSL_CHAN_NR_OSMO_CBCH4 ('11001'B),
RSL_CHAN_NR_OSMO_CBCH8 ('11010'B)
} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };
type record RslChanNr2 {
@ -115,7 +116,8 @@ module GSM_Types {
template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
template RslChannelNr t_RslChanNr_CBCH(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template RslChannelNr t_RslChanNr_CBCH4(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);
template RslChannelNr t_RslChanNr_CBCH8(template uint3_t tn) := t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);
template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template uint1_t sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn
@ -138,7 +140,8 @@ module GSM_Types {
template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
template (value) RslChannelNr ts_RslChanNr_CBCH(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template (value) RslChannelNr ts_RslChanNr_CBCH4(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH4);
template (value) RslChannelNr ts_RslChanNr_CBCH8(uint3_t tn) := ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH8);
template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn