This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14231
Change subject: L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH
......................................................................
L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH
In BTS_Tests.ttcn we used to compose L1ctlDataReq manually. This
can be done by ts_L1CTL_DATA_REQ_SACCH() template itself, so
let's abstract BTS_Tests.ttcn from doing that.
Change-Id: I1ae948bd0314cdf15c21ce4b6346d5e32f1fcf95
---
M bts/BTS_Tests.ttcn
M library/L1CTL_Types.ttcn
2 files changed, 26 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/14231/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 968ed6c..21c697f 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1523,12 +1523,15 @@
var LapdmFrameAB lb := valueof(ts_LAPDm_AB(0, false, false, enc_GsmRrL3Message(meas_rep)));
log("LAPDm: ", lb);
- var L1ctlDataReq data_req := {
- l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)),
- l2_payload := f_pad_oct(enc_LapdmFrameAB(lb), 21, '2B'O)
- }
- log("Sending Measurement Report: ", data_req);
- L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), data_req));
+ var template (value) SacchL1Header l1h := ts_SacchL1Header(
+ g_pars.l1_pars.ms_power_level, false,
+ 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);
+
+ log("Sending Measurement Report: ", l1h, l2);
+ L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), l1h, l2));
repeat;
}
}
@@ -4320,19 +4323,16 @@
private function f_tx_lapdm(template (value) LapdmFrame l,
template (value) RslLinkId link_id) runs on ConnHdlr {
var octetstring l2 := enc_LapdmFrame(valueof(l));
+ var template (value) SacchL1Header l1h;
+
+ /* TODO: we can use an extension of TTCN-3 for padding, i.e. PADDING('2B'O) */
if (valueof(link_id.c) == SACCH) {
- /* prepend dummy L1 header */
- var L1ctlDataReq l1hl2 := {
- l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)),
- l2_payload := f_pad_oct(l2, 21, '2B'O)
- }
- L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, link_id, l1hl2));
+ /* Compose dummy L1 header */
+ l1h := ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta);
+ L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, link_id, l1h, f_pad_oct(l2, 21, '2B'O)));
} else {
/* If required, pad L2 frame with constant 0x2b filling */
- l2 := f_pad_oct(l2, 23, '2B'O);
-
- log("encoding ", l, " to ", l2);
- L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2));
+ L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, f_pad_oct(l2, 23, '2B'O)));
}
}
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index f59d194..2a97099 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -594,13 +594,17 @@
ul_info_tbf := omit,
ul_info_abs := omit,
payload := {
- other := l2_data
+ data_req := {
+ l1header := omit,
+ l2_payload := l2_data
+ }
}
}
template (value) L1ctlUlMessage ts_L1CTL_DATA_REQ_SACCH(template (value) RslChannelNr chan_nr,
template (value) RslLinkId link_id,
- L1ctlDataReq data_req) := {
+ template (value) SacchL1Header l1h,
+ octetstring l2_data) := {
header := ts_L1ctlHeader(L1CTL_DATA_REQ),
ul_info := {
chan_nr := chan_nr,
@@ -610,7 +614,10 @@
ul_info_tbf := omit,
ul_info_abs := omit,
payload := {
- data_req := data_req
+ data_req := {
+ l1header := l1h,
+ l2_payload := l2_data
+ }
}
}
--
To view, visit https://gerrit.osmocom.org/14231
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ae948bd0314cdf15c21ce4b6346d5e32f1fcf95
Gerrit-Change-Number: 14231
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190528/02ce3360/attachment.htm>