fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41897?usp=email )


Change subject: bts: use existing API in as_l1_sacch_loop()
......................................................................

bts: use existing API in as_l1_sacch_loop()

Change-Id: I5ab2988152b948e457c3cfa4930df484c170d053
---
M bts/BTS_Tests.ttcn
1 file changed, 6 insertions(+), 22 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/97/41897/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index b060cbd..20c16a3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -825,7 +825,8 @@
                payload := { meas_rep := { meas_res := valueof(meas_res) } }
        };

-       /* TITAN has weird (and often unusable) padding model, so we pad here 
manaully */
+       /* According to 3GPP TS 44.018, section 10.5.2.20, we should pad with 
zeroes.
+        * TITAN has weird (and often unusable) padding model, so we pad here 
manaully. */
        l2 := f_pad_oct(enc_LapdmFrameAB(valueof(ts_LAPDm_AB(0, meas_rep))), 
21, '00'O);

        log(%definitionId, "(): Tx SACCH L1 header: ", l1h);
@@ -2168,28 +2169,11 @@
 }

 /* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */
-private altstep as_l1_sacch_loop() runs on ConnHdlr {
-       var template (value) LapdmFrameAB lb;
-       var L1ctlMessage l1_dl;
+private altstep as_l1_sacch_loop(boolean do_apply := true) runs on ConnHdlr {
+       var SacchL1Header l1h;

-       [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) 
-> value l1_dl {
-               log("SACCH received: ", l1_dl.payload.data_ind.payload);
-
-               lb := ts_LAPDm_AB(0, ts_MEAS_REP(g_pars.l1_pars.meas_valid,
-                                                
g_pars.l1_pars.meas_ul.full.rxlev,
-                                                
g_pars.l1_pars.meas_ul.sub.rxlev,
-                                                
g_pars.l1_pars.meas_ul.full.rxqual,
-                                                
g_pars.l1_pars.meas_ul.sub.rxqual));
-               log("LAPDm: ", lb);
-
-               var template (value) SacchL1Header l1h := ts_SacchL1Header(
-                       g_pars.l1_pars.ms_power_level, 
g_pars.l1_pars.ms_actual_ta);
-
-               /* According to 3GPP TS 44.018, section 10.5.2.20, we should 
pad with zeroes */
-               var octetstring l2 := f_pad_oct(enc_LapdmFrameAB(valueof(lb)), 
21, '00'O);
-
-               log("Sending Measurement Report: ", l1h, l2);
-               L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, 
ts_RslLinkID_SACCH(0), l1h, l2));
+       [] as_l1_sacch_l1h(l1h, do_apply) {
+               f_send_meas_rep(ts_MeasurementResults);
                repeat;
                }
        /* dequeue (ignore) L1CTL DATA.cnf for UL SACCH (SAPI=0) */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41897?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5ab2988152b948e457c3cfa4930df484c170d053
Gerrit-Change-Number: 41897
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to