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
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index c02522b..4d357ba 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -321,8 +321,17 @@
}
}
+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 @@
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_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 @@
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 @@
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 @@
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 */
diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 3e24f81..ec74ce5 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -68,7 +68,8 @@
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 @@
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 @@
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