BTS_Tests: make ts_LapdmAddr / ts_LAPDm_AB more friendly

Change-Id: I35f84ebd6cb884f3ab63d1c2b77d8ed61acd5c74
changes/18/21318/4
Vadim Yanitskiy 2 years ago committed by fixeria
parent 95339434cd
commit 5351ccf85e
  1. 22
      bts/BTS_Tests.ttcn

@ -1829,7 +1829,9 @@ testcase TC_ho_rach() runs on test_CT {
* Measurement Processing / Reporting
***********************************************************************/
private template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := {
private template (value) LapdmAddressField
ts_LapdmAddr(template (value) LapdmSapi sapi,
template (value) boolean c_r) := {
spare := '0'B,
lpd := 0,
sapi := sapi,
@ -1837,22 +1839,28 @@ private template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) :=
ea := true
}
private template LapdmFrameAB ts_LAPDm_AB(LapdmSapi sapi, boolean c_r, boolean p, octetstring pl) := {
private template (value) LapdmFrameAB
ts_LAPDm_AB(template (value) LapdmSapi sapi,
template (value) GsmRrL3Message l3,
template (value) boolean c_r := false,
template (value) boolean p := false) := {
addr := ts_LapdmAddr(sapi, c_r),
ctrl := ts_LapdmCtrlUI(p),
ctrl := ts_LapdmCtrlUI(valueof(p)),
len := 0, /* overwritten */
m := false,
el := 1,
payload := pl
payload := enc_GsmRrL3Message(valueof(l3))
}
/* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */
private altstep as_l1_sacch() runs on ConnHdlr {
var template (value) LapdmFrameAB lb;
var L1ctlDlMessage 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, mp_rxlev_exp, mp_rxlev_exp));
var LapdmFrameAB lb := valueof(ts_LAPDm_AB(0, false, false, enc_GsmRrL3Message(meas_rep)));
lb := ts_LAPDm_AB(0, ts_MEAS_REP(true, mp_rxlev_exp, mp_rxlev_exp));
log("LAPDm: ", lb);
var template (value) SacchL1Header l1h := ts_SacchL1Header(
@ -1860,7 +1868,7 @@ private altstep as_l1_sacch() runs on ConnHdlr {
g_pars.l1_pars.ms_actual_ta);
/* TODO: we can use an extension of TTCN-3 for that, i.e. PADDING('2B'O) */
var octetstring l2 := f_pad_oct(enc_LapdmFrameAB(lb), 21, '2B'O);
var octetstring l2 := f_pad_oct(enc_LapdmFrameAB(valueof(lb)), 21, '2B'O);
log("Sending Measurement Report: ", l1h, l2);
L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), l1h, l2));

Loading…
Cancel
Save