library: L1CTL: rework GPRS related message definitions
The old GPRS related messages are no longer valid. Use the new message
definitions supported by both trxcon and virtphy since recently.
Comment out lines referencing the old definitions in LAPDm_RAW_PT.ttcn.
This module contains an implementation of the RLC/MAC abstraction
layer, which is currently not used anywhere.
Change-Id: Ib8f4459480bbe12584a6fa71882f745f03c5055d
Related: osmocom-bb.git I9567d64f9d00262e36147e8d7e541e5e246bda5f
Related: OS#5500
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index e08f243..d901664 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -5303,6 +5303,14 @@
* PCU Socket related tests
***********************************************************************/
+/* Tune the L1 to PDCH on the given timeslot number */
+private function f_TC_pcu_l1ctl_est_pdch(uint3_t tn) runs on test_CT {
+ var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_PDCH(tn), ts_RSL_ChanMode_SIGN));
+ if (mp_freq_hop_enabled and mp_transceiver_num > 1)
+ { f_resolve_fh_params(pars.fhp, tn); }
+ f_l1ctl_est_dchan(L1CTL, pars);
+}
+
/* Verify no RTS before ACT_REQ; verify RTS after ACT_REQ */
friend function f_TC_pcu_act_req(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, boolean exp_success)
runs on test_CT {
@@ -5499,60 +5507,53 @@
/* Send DATA.req on invalid BTS */
testcase TC_pcu_data_req_wrong_bts() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
f_TC_pcu_act_req(0, 0, 7, true);
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(23, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false);
}
/* Send DATA.req on invalid TRX */
testcase TC_pcu_data_req_wrong_trx() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
f_TC_pcu_act_req(0, 0, 7, true);
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(0, 100, 7, PCU_IF_SAPI_PDTCH, data, false, false);
}
/* Send DATA.req on invalid timeslot */
testcase TC_pcu_data_req_wrong_ts() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
f_TC_pcu_act_req(0, 0, 7, true);
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(0, 0, 70, PCU_IF_SAPI_PDTCH, data, false, false);
}
/* Send DATA.req on timeslot that hasn't been activated */
testcase TC_pcu_data_req_ts_inactive() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ /* intentionally not calling f_TC_pcu_act_req() */
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data, false, false);
}
@@ -5572,11 +5573,11 @@
T.start;
alt {
- [expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) {
- /* FIXME: why is fn of DATA_IND different to fn of RTS / DATA_REQ above? */
+ [expect_data] L1CTL.receive(tr_L1CTL_GPRS_DL_BLOCK_IND(tn := ts_nr, data := data)) {
+ /* FIXME: why is fn of DL BLOCK.ind different to fn of RTS / DATA_REQ above? */
setverdict(pass);
}
- [not expect_data] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PDCH(ts_nr), ?, data)) -> value rx_dl {
+ [not expect_data] L1CTL.receive(tr_L1CTL_GPRS_DL_BLOCK_IND(tn := ts_nr, data := data)) -> value rx_dl {
setverdict(fail, "Received unexpected ", rx_dl);
}
[] L1CTL.receive {
@@ -5608,31 +5609,26 @@
}
testcase TC_pcu_data_req_pdtch() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
f_TC_pcu_act_req(0, 0, 7, true);
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PDTCH, data); //c_PCU_DATA);
}
-/* FIXME: PTTCH has nothing to do with TBFs */
testcase TC_pcu_data_req_ptcch() runs on test_CT {
- var TfiUsfArr tua := f_TfiUsfArrInit();
var octetstring data := '0000'O & f_rnd_octstring(21);
f_virtphy_common();
f_TC_pcu_act_req(0, 0, 7, true);
- f_TfiUsfArrSet(tua, 7, 0);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
- f_sleep(1.0);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
f_pcu_to_l1(0, 0, 7, PCU_IF_SAPI_PTCCH, data);
}
@@ -5679,11 +5675,9 @@
/* Activate PDCH channel on TS7 */
f_TC_pcu_act_req(0, 0, 7, true);
- /* Tune trxcon to that PDCH channel */
- var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_PDCH(7), ts_RSL_ChanMode_SIGN));
- if (mp_freq_hop_enabled and mp_transceiver_num > 1)
- { f_resolve_fh_params(pars.fhp, pars.chan_nr.tn); }
- f_l1ctl_est_dchan(L1CTL, pars);
+ /* Tune the L1 to that PDCH channel */
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_DL_TBF_CFG_REQ(0, '00000001'B));
/* Verify PTCCH/U: send several access bursts, make sure they're received */
for (var integer i := 0; i < 16; i := i + 1) {
@@ -5702,25 +5696,13 @@
* let's give it more time in case if we miss the beginning. */
T.start(2.0 * 2.0 * 52.0 * 4.615 / 1000.0);
alt {
- /* PDCH is considered as traffic in trxcon => expect TRAFFIC.ind */
- [] L1CTL.receive(tr_L1CTL_TRAFFIC_IND(chan_nr := t_RslChanNr_PDCH(7),
- link_id := tr_RslLinkID_OSMO_PTCCH(?),
- frame := data)) -> value dl {
- log("Rx PTCCH/D data (traffic) block on L1CTL: ", dl);
- setverdict(pass);
- T.stop;
- }
- /* Other PHYs (e.g. virt_phy) may consider PDCH as data => expect DATA.ind */
- [] L1CTL.receive(tr_L1CTL_DATA_IND(chan_nr := t_RslChanNr_PDCH(7),
- link_id := tr_RslLinkID_OSMO_PTCCH(?),
- l2_data := data)) -> value dl {
- log("Rx PTCCH/D data block on L1CTL: ", dl);
+ [] L1CTL.receive(tr_L1CTL_GPRS_DL_BLOCK_IND(fn := ?, tn := 7, data := data)) {
setverdict(pass);
T.stop;
}
[] L1CTL.receive { repeat; }
[] T.timeout {
- setverdict(fail, "Timeout waiting for DATA.ind on L1CTL");
+ setverdict(fail, "Timeout waiting DL BLOCK.ind with PTCCH/D");
}
}
}
@@ -5895,9 +5877,9 @@
/* PCUIF_DATA.ind is encapsulated into a supplementary record */
sdt := t_SD_PCUIF_MSGT(g_pcu_conn_id, PCU_IF_MSG_DATA_IND);
- /* Send a random PDTCH frame over Um */
- L1CTL.send(ts_L1CTL_TRAFFIC_REQ(ts_RslChanNr_PDCH(7), ts_RslLinkID_DCCH(0),
- '0000'O & f_rnd_octstring(21)));
+ /* Send a random PDTCH frame over Um
+ * FIXME: we need to wait for a DL block and user Fn from there. */
+ L1CTL.send(ts_L1CTL_GPRS_UL_BLOCK_REQ(0, 7, '0000'O & f_rnd_octstring(21)));
T.start;
alt {
@@ -5944,10 +5926,8 @@
f_TC_pcu_act_req(0, 0, 7, true);
/* Tune trxcon to that PDCH channel on TS7 */
- var ConnHdlrPars pars := valueof(t_Pars(ts_RslChanNr_PDCH(7), ts_RSL_ChanMode_SIGN));
- if (mp_freq_hop_enabled and mp_transceiver_num > 1)
- { f_resolve_fh_params(pars.fhp, pars.chan_nr.tn); }
- f_l1ctl_est_dchan(L1CTL, pars);
+ f_TC_pcu_l1ctl_est_pdch(7);
+ L1CTL.send(ts_L1CTL_GPRS_UL_TBF_CFG_REQ(0, '00000001'B));
/* C/I in centiBels, test range: -256 .. +1280, step 128 */
for (var int16_t i := -256; i <= 1280; i := i + 128) {
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index d84cee4..07c536c 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -229,21 +229,6 @@
return rr.payload.imm_ass;
}
- function f_L1CTL_TBF_CFG(L1CTL_PT pt, boolean is_uplink, TfiUsfArr tfi_usf) {
- timer T := 2.0;
- T.start;
- pt.send(ts_L1CTL_TBF_CFG_REQ(is_uplink, tfi_usf));
- alt {
- [] pt.receive(tr_L1CTL_TBF_CFG_CONF(is_uplink)) {}
- [] pt.receive { repeat };
- [] T.timeout {
- setverdict(fail, "Timeout waiting for L1CTL_TBF_CFG_CONF");
- mtc.stop;
- };
- }
- T.stop;
- }
-
/* Send DM_EST_REQ from parameters derived from IMM ASS */
function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass, L1ctlMA ma := {}) {
/* FIXME: handle Packet Channel Description */
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 9162eea..192091e 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -16,8 +16,6 @@
import from GSM_RR_Types all;
import from Osmocom_Types all;
- type uint32_t uint32_le with { variant "BYTEORDER(first)" };
-
type enumerated L1ctlMsgType {
L1CTL_NONE,
L1CTL_FBSB_REQ,
@@ -51,12 +49,11 @@
L1CTL_TRAFFIC_CONF,
L1CTL_TRAFFIC_IND,
L1CTL_BURST_IND,
- L1CTL_TBF_CFG_REQ,
- L1CTL_TBF_CFG_CONF,
- L1CTL_DATA_TBF_REQ,
- L1CTL_DATA_TBF_CONF,
- L1CTL_EXT_RACH_REQ,
- L1CTL_DATA_ABS_REQ /*!< FIXME: no such message in OsmocomBB */
+ L1CTL_GPRS_UL_TBF_CFG_REQ,
+ L1CTL_GPRS_DL_TBF_CFG_REQ,
+ L1CTL_GPRS_UL_BLOCK_REQ,
+ L1CTL_GPRS_DL_BLOCK_IND,
+ L1CTL_EXT_RACH_REQ
} with { variant "FIELDLENGTH(8)" };
type enumerated L1ctlCcchMode {
@@ -72,22 +69,6 @@
NEIGH_MODE_SB
} with { variant "FIELDLENGTH(8)" };
- type enumerated L1ctlGprsCs {
- L1CTL_CS1 (1),
- L1CTL_CS2,
- L1CTL_CS3,
- L1CTL_CS4,
- L1CTL_MCS1,
- L1CTL_MCS2,
- L1CTL_MCS3,
- L1CTL_MCS4,
- L1CTL_MCS5,
- L1CTL_MCS6,
- L1CTL_MCS7,
- L1CTL_MCS8,
- L1CTL_MCS9
- } with { variant "FIELDLENGTH(8)" };
-
type enumerated L1ctlResetType {
L1CTL_RES_T_BOOT (0),
L1CTL_RES_T_FULL,
@@ -200,22 +181,6 @@
OCT2 padding
} with { variant "" };
- type record L1ctlUlTbfInfo {
- uint8_t tbf_nr,
- L1ctlGprsCs cs,
- OCT2 padding
- } with { variant "" };
-
- type record L1ctlUlAbsInfo {
- uint8_t tbf_nr,
- L1ctlGprsCs cs,
- uint8_t ts_nr,
- OCT1 padding,
- uint32_le fn,
- GsmBandArfcn arfcn,
- OCT2 padding2
- } with { variant "" };
-
type record L1ctlFbsbFlags {
BIT5 padding,
boolean sb,
@@ -342,14 +307,47 @@
variant (data) "BYTEORDER(first)"
}
- type record length(8) of uint8_t TfiUsfArr;
- type record L1ctlTbfCfgReq {
- uint8_t tbf_nr,
- boolean is_uplink,
- OCT2 padding,
- TfiUsfArr tfi_usf
- } with { variant (is_uplink) "FIELDLENGTH(8)" };
+ /* payload of L1CTL_GPRS_UL_TBF_CFG_REQ */
+ type record L1ctlGprsUlTbfCfgReq {
+ uint8_t tbf_ref,
+ BIT8 slotmask,
+ OCT2 pad ('0000'O)
+ } with { variant (slotmask) "BITORDER(msb)" };
+
+ /* payload of L1CTL_GPRS_DL_TBF_CFG_REQ */
+ type record L1ctlGprsDlTbfCfgReq {
+ uint8_t tbf_ref,
+ BIT8 slotmask,
+ uint8_t dl_tfi,
+ OCT1 pad ('00'O)
+ } with { variant (slotmask) "BITORDER(msb)" };
+
+ /* part of L1CTL_GPRS_{UL,DL}_BLOCK_{REQ,IND} */
+ type record L1ctlGprsBlockHdr {
+ uint32_t fn,
+ uint8_t tn,
+ OCT3 pad ('000000'O)
+ } with { variant "" };
+
+ /* payload of L1CTL_GPRS_UL_BLOCK_REQ */
+ type record L1ctlGprsUlBlockReq {
+ L1ctlGprsBlockHdr hdr,
+ octetstring data
+ } with { variant (data) "BYTEORDER(first)" };
+
+ /* payload of L1CTL_GPRS_DL_BLOCK_IND */
+ type record L1ctlGprsDlBlockInd {
+ L1ctlGprsBlockHdr hdr,
+ record {
+ uint16_t ber10k, /* Bit Error Rate */
+ int16_t ci_cb, /* C/I in centiBels */
+ uint8_t rx_level /* RxLev 0..63 */
+ } meas,
+ uint8_t usf,
+ octetstring data
+ } with { variant (data) "BYTEORDER(first)" };
+
type union L1ctlMsgPayload {
L1ctlFbsbReq fbsb_req,
@@ -376,8 +374,10 @@
L1ctlTrafficReq traffic_req,
L1ctlTrafficReq traffic_ind,
/* TODO: L1CTL_BURST_IND */
- L1ctlTbfCfgReq tbf_cfg_req,
- L1ctlTbfCfgReq tbf_cfg_conf,
+ L1ctlGprsUlTbfCfgReq ul_tbf_cfg_req,
+ L1ctlGprsDlTbfCfgReq dl_tbf_cfg_req,
+ L1ctlGprsUlBlockReq ul_block_req,
+ L1ctlGprsDlBlockInd dl_block_ind,
L1ctlExtRachReq ext_rach_req,
octetstring other
} with {
@@ -388,8 +388,6 @@
L1ctlHeader header,
L1ctlUlInfo ul_info optional,
L1ctlDlInfo dl_info optional,
- L1ctlUlTbfInfo ul_info_tbf optional,
- L1ctlUlAbsInfo ul_info_abs optional,
L1ctlMsgPayload payload optional
} with { variant (ul_info) "PRESENCE(header.msg_type = L1CTL_RACH_REQ,
header.msg_type = L1CTL_EXT_RACH_REQ,
@@ -406,8 +404,6 @@
header.msg_type = L1CTL_DATA_CONF,
header.msg_type = L1CTL_TRAFFIC_IND,
header.msg_type = L1CTL_TRAFFIC_CONF)"
- variant (ul_info_tbf) "PRESENCE(header.msg_type = L1CTL_DATA_TBF_REQ)"
- variant (ul_info_abs) "PRESENCE(header.msg_type = L1CTL_DATA_ABS_REQ)"
variant (payload) "CROSSTAG(fbsb_req, header.msg_type = L1CTL_FBSB_REQ;
fbsb_conf, header.msg_type = L1CTL_FBSB_CONF;
data_ind, header.msg_type = L1CTL_DATA_IND;
@@ -432,8 +428,10 @@
traffic_req, header.msg_type = L1CTL_TRAFFIC_REQ;
traffic_ind, header.msg_type = L1CTL_TRAFFIC_IND;
/* TODO: burst_ind, header.msg_type = L1CTL_BURST_IND */
- tbf_cfg_req, header.msg_type = L1CTL_TBF_CFG_REQ;
- tbf_cfg_conf, header.msg_type = L1CTL_TBF_CFG_CONF;
+ ul_tbf_cfg_req, header.msg_type = L1CTL_GPRS_UL_TBF_CFG_REQ;
+ dl_tbf_cfg_req, header.msg_type = L1CTL_GPRS_DL_TBF_CFG_REQ;
+ ul_block_req, header.msg_type = L1CTL_GPRS_UL_BLOCK_REQ;
+ dl_block_ind, header.msg_type = L1CTL_GPRS_DL_BLOCK_IND;
ext_rach_req, header.msg_type = L1CTL_EXT_RACH_REQ;
other, OTHERWISE;
)" };
@@ -455,15 +453,12 @@
-
/* for generating RESET_REQ */
template (value) L1ctlMessage
t_L1ctlResetReq(template (value) L1ctlResetType rst_type) := {
header := ts_L1ctlHeader(L1CTL_RESET_REQ),
ul_info := omit,
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
reset_req := {
reset_type := rst_type,
@@ -482,8 +477,6 @@
header := ts_L1ctlHeader(L1CTL_FBSB_REQ),
ul_info := omit,
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
fbsb_req := {
arfcn := arfcn,
@@ -505,8 +498,6 @@
header := tr_L1ctlHeader(L1CTL_FBSB_CONF),
ul_info := omit,
dl_info := ?,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
fbsb_conf := {
initial_freq_err := ?,
@@ -521,8 +512,6 @@
header := ts_L1ctlHeader(L1CTL_CCCH_MODE_REQ),
ul_info := omit,
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
ccch_mode_req := {
ccch_mode := ccch_mode,
@@ -540,8 +529,6 @@
header := ts_L1ctlHeader(L1CTL_TCH_MODE_REQ),
ul_info := omit,
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
tch_mode_req := {
tch_mode := tch_mode,
@@ -561,8 +548,6 @@
header := tr_L1ctlHeader(msg_type),
ul_info := *,
dl_info := *,
- ul_info_tbf := *,
- ul_info_abs := *,
payload := *
}
@@ -581,8 +566,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
rach_req := {
ra := ra,
@@ -605,8 +588,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
ext_rach_req := {
ra11 := ra11,
@@ -627,8 +608,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
par_req := {
ta := ta,
@@ -649,8 +628,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
dm_est_req := {
tsc := tsc,
@@ -713,8 +690,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := omit
}
@@ -729,8 +704,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
data_req := {
l1header := omit,
@@ -751,8 +724,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
data_req := {
l1header := l1h,
@@ -772,8 +743,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
traffic_req := {
data := frame
@@ -781,92 +750,11 @@
}
};
- template (value) L1ctlMessage
- ts_L1CTL_TBF_CFG_REQ(template (value) boolean is_uplink,
- template (value) TfiUsfArr tfi_usf) := {
- header := ts_L1ctlHeader(L1CTL_TBF_CFG_REQ),
- ul_info := omit,
- dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
- payload := {
- tbf_cfg_req := {
- tbf_nr := 0,
- is_uplink := is_uplink,
- padding := '0000'O,
- tfi_usf := tfi_usf
- }
- }
- };
-
- template L1ctlMessage
- tr_L1CTL_TBF_CFG_CONF(template (present) boolean is_uplink) := {
- header := tr_L1ctlHeader(L1CTL_TBF_CFG_CONF),
- ul_info := omit,
- dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
- payload := {
- tbf_cfg_conf := {
- tbf_nr := 0,
- is_uplink := is_uplink,
- padding := ?,
- tfi_usf := ?
- }
- }
- };
-
- template (value) L1ctlMessage
- ts_L1CTL_DATA_TBF_REQ(octetstring l2_data,
- template (value) L1ctlGprsCs cs := L1CTL_CS1,
- template (value) uint8_t tbf_nr := 0) := {
- header := ts_L1ctlHeader(L1CTL_DATA_TBF_REQ),
- ul_info := omit,
- dl_info := omit,
- ul_info_tbf := {
- tbf_nr := tbf_nr,
- cs := cs,
- padding := '0000'O
- },
- ul_info_abs := omit,
- payload := {
- other := l2_data
- }
- }
-
- template (value) L1ctlMessage
- ts_L1CTL_DATA_ABS_REQ(octetstring l2_data,
- template (value) GsmBandArfcn arfcn,
- template (value) uint8_t ts,
- template (value) GsmFrameNumber fn,
- template (value) L1ctlGprsCs cs := L1CTL_CS1,
- template (value) uint8_t tbf_nr := 0) := {
- header := ts_L1ctlHeader(L1CTL_DATA_ABS_REQ),
- ul_info := omit,
- dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := {
- tbf_nr := tbf_nr,
- cs := cs,
- ts_nr := ts,
- padding := '00'O,
- fn := fn,
- arfcn := arfcn,
- padding2 := '0000'O
- },
- payload := {
- other := l2_data
- }
- }
-
-
/* for matching against incoming RACH_CONF */
template L1ctlMessage tr_L1CTL_RACH_CONF := {
header := tr_L1ctlHeader(L1CTL_RACH_CONF),
ul_info := omit,
dl_info := ?,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := *
};
@@ -892,8 +780,6 @@
num_biterr := num_biterr,
fire_crc := fire_crc
},
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
data_ind := {
payload := l2_data
@@ -918,8 +804,6 @@
num_biterr := num_biterr,
fire_crc := fire_crc
},
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
data_ind := {
payload := l2_data
@@ -946,8 +830,6 @@
num_biterr := num_biterr,
fire_crc := fire_crc
},
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
traffic_ind := {
data := frame
@@ -966,8 +848,6 @@
padding := '0000'O
},
dl_info := omit,
- ul_info_tbf := omit,
- ul_info_abs := omit,
payload := {
crypto_req := {
algo := algo,
@@ -977,6 +857,163 @@
}
};
+
+ template (value) L1ctlMessage
+ ts_L1CTL_GPRS_UL_TBF_CFG_REQ(template (value) uint8_t tbf_ref,
+ template (value) BIT8 slotmask := '00000000'B) := {
+ header := ts_L1ctlHeader(L1CTL_GPRS_UL_TBF_CFG_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ ul_tbf_cfg_req := {
+ tbf_ref := tbf_ref,
+ slotmask := slotmask,
+ pad := '0000'O
+ }
+ }
+ };
+ template L1ctlMessage
+ tr_L1CTL_GPRS_UL_TBF_CFG_REQ(template (present) uint8_t tbf_ref := ?,
+ template (present) BIT8 slotmask := ?) := {
+ header := tr_L1ctlHeader(L1CTL_GPRS_UL_TBF_CFG_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ ul_tbf_cfg_req := {
+ tbf_ref := tbf_ref,
+ slotmask := slotmask,
+ pad := ?
+ }
+ }
+ };
+
+ template (value) L1ctlMessage
+ ts_L1CTL_GPRS_DL_TBF_CFG_REQ(template (value) uint8_t tbf_ref,
+ template (value) BIT8 slotmask := '00000000'B,
+ template (value) uint5_t dl_tfi := 0) := {
+ header := ts_L1ctlHeader(L1CTL_GPRS_DL_TBF_CFG_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ dl_tbf_cfg_req := {
+ tbf_ref := tbf_ref,
+ slotmask := slotmask,
+ dl_tfi := dl_tfi,
+ pad := '00'O
+ }
+ }
+ };
+ template L1ctlMessage
+ tr_L1CTL_GPRS_DL_TBF_CFG_REQ(template (present) uint8_t tbf_ref := ?,
+ template (present) BIT8 slotmask := ?,
+ template (present) uint5_t dl_tfi := ?) := {
+ header := tr_L1ctlHeader(L1CTL_GPRS_DL_TBF_CFG_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ dl_tbf_cfg_req := {
+ tbf_ref := tbf_ref,
+ slotmask := slotmask,
+ dl_tfi := dl_tfi,
+ pad := ?
+ }
+ }
+ };
+
+ template (value) L1ctlMessage
+ ts_L1CTL_GPRS_UL_BLOCK_REQ(template (value) GsmFrameNumber fn,
+ template (value) uint3_t tn,
+ template (value) octetstring data) := {
+ header := ts_L1ctlHeader(L1CTL_GPRS_UL_BLOCK_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ ul_block_req := {
+ hdr := {
+ fn := fn,
+ tn := tn,
+ pad := '000000'O
+ },
+ data := data
+ }
+ }
+ };
+ template L1ctlMessage
+ tr_L1CTL_GPRS_UL_BLOCK_REQ(template (present) GsmFrameNumber fn := ?,
+ template (present) uint3_t tn := ?,
+ template (present) octetstring data := ?) := {
+ header := tr_L1ctlHeader(L1CTL_GPRS_UL_BLOCK_REQ),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ ul_block_req := {
+ hdr := {
+ fn := fn,
+ tn := tn,
+ pad := ?
+ },
+ data := data
+ }
+ }
+ };
+
+ template (value) L1ctlMessage
+ ts_L1CTL_GPRS_DL_BLOCK_IND(template (value) GsmFrameNumber fn,
+ template (value) uint3_t tn,
+ template (value) uint3_t usf,
+ template (value) octetstring data,
+ template (value) uint16_t ber10k := 0,
+ template (value) int16_t ci_cb := 180 /* 18 dB */,
+ template (value) GsmRxLev rx_level := 63) := {
+ header := ts_L1ctlHeader(L1CTL_GPRS_DL_BLOCK_IND),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ dl_block_ind := {
+ hdr := {
+ fn := fn,
+ tn := tn,
+ pad := '000000'O
+ },
+ meas := {
+ ber10k := ber10k,
+ ci_cb := ci_cb,
+ rx_level := rx_level
+ },
+ usf := usf,
+ data := data
+ }
+ }
+ };
+ template L1ctlMessage
+ tr_L1CTL_GPRS_DL_BLOCK_IND(template (present) GsmFrameNumber fn := ?,
+ template (present) uint3_t tn := ?,
+ template (present) uint3_t usf := ?,
+ template (present) octetstring data := ?,
+ template (present) uint16_t ber10k := ?,
+ template (present) int16_t ci_cb := ?,
+ template (present) GsmRxLev rx_level := ?) := {
+ header := tr_L1ctlHeader(L1CTL_GPRS_DL_BLOCK_IND),
+ ul_info := omit,
+ dl_info := omit,
+ payload := {
+ dl_block_ind := {
+ hdr := {
+ fn := fn,
+ tn := tn,
+ pad := ?
+ },
+ meas := {
+ ber10k := ber10k,
+ ci_cb := ci_cb,
+ rx_level := rx_level
+ },
+ usf := usf,
+ data := data
+ }
+ }
+ };
+
const octetstring c_DummyUI := '0303012B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B'O;
/* We use "BYTEORDER(last)" so we get little-endian integers. Unfortuantely, this also
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index 643b7e5..f7c18b5 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -21,6 +21,8 @@
import from LAPDm_Types all;
import from RLCMAC_Types all;
+ type record length(8) of uint8_t TfiUsfArr;
+
/* request to tune to a given ARFCN and start BCCH decoding */
type record BCCH_tune_req {
GsmBandArfcn arfcn,
@@ -322,7 +324,7 @@
/* Important: ARFCN, TN, TSC, USF, USF_GRANULARITY, CH_CODING_CMD */
f_TfiUsfArrSet(tua, imm_ass.pkt_chan_desc.tn, pkt_ul_ass.dynamic.usf);
- f_L1CTL_TBF_CFG(L1CTL, true, tua);
+ // FIXME: f_L1CTL_TBF_CFG(L1CTL, true, tua);
return true;
/* FIXME: Single Block Allocation */
} else if (match(pkt_ul_ass, tr_PacketUlSglAssign)) {
@@ -337,8 +339,8 @@
private function f_release_tbf() runs on lapdm_CT {
var TfiUsfArr tua := f_TfiUsfArrInit();
/* send "all timeslots unused" for both UL and DL */
- f_L1CTL_TBF_CFG(L1CTL, true, tua);
- f_L1CTL_TBF_CFG(L1CTL, false, tua);
+ // FIXME: f_L1CTL_TBF_CFG(L1CTL, true, tua);
+ // FIXME: f_L1CTL_TBF_CFG(L1CTL, false, tua);
/* L1 will then fall back to BCCH/CCCH */
set_ph_state(PH_STATE_BCH);
}
@@ -374,7 +376,7 @@
mtc.stop;
}
g_tbf_dl[tbf_nr] := tbf_dl_req.pars;
- f_L1CTL_TBF_CFG(L1CTL, false, tbf_dl_req.pars.tfi);
+ // FIXME: f_L1CTL_TBF_CFG(L1CTL, false, tbf_dl_req.pars.tfi);
set_ph_state(PH_STATE_TBF);
log("Established DL TBF ", tbf_nr, ": ", tbf_dl_req.pars);
}
@@ -537,12 +539,12 @@
var octetstring buf;
if (ischosen(rpdr.dyn)) {
buf := enc_RlcmacUlBlock(rpdr.dyn.block);
- L1CTL.send(ts_L1CTL_DATA_TBF_REQ(buf, L1CTL_CS1, rpdr.dyn.tbf_id));
+ // FIXME: L1CTL.send(ts_L1CTL_DATA_TBF_REQ(buf, L1CTL_CS1, rpdr.dyn.tbf_id));
} else {
buf := enc_RlcmacUlBlock(rpdr.abs.block);
- L1CTL.send(ts_L1CTL_DATA_ABS_REQ(buf, rpdr.abs.arfcn,
- rpdr.abs.ts_nr, rpdr.abs.fn,
- L1CTL_CS1, rpdr.abs.tbf_id));
+ // FIXME: L1CTL.send(ts_L1CTL_DATA_ABS_REQ(buf, rpdr.abs.arfcn,
+ // rpdr.abs.ts_nr, rpdr.abs.fn,
+ // L1CTL_CS1, rpdr.abs.tbf_id));
}
}