Change in ...osmo-trx[master]: Transceiver: Drop use of GSM::Time from trx_ul_burst_ind

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Jul 4 22:09:41 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/14642 )

Change subject: Transceiver: Drop use of GSM::Time from trx_ul_burst_ind
......................................................................

Transceiver: Drop use of GSM::Time from trx_ul_burst_ind

Use of that class is really not needed since we don't need to do any
calculation with those values, so we can simply store the final values
in the struct.

Related: OS#4006
Change-Id: Iadf2683d7f52138a2248598641f3b702252f325d
---
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
2 files changed, 11 insertions(+), 7 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index a6a32f0..6e678ac 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -558,6 +558,7 @@
   float toa, max = -1.0, avg = 0.0;
   int max_i = -1;
   signalVector *burst;
+  GSM::Time burstTime;
   TransceiverState *state = &mStates[chan];
 
   /* Blocking FIFO read */
@@ -566,8 +567,10 @@
     return false;
 
   /* Set time and determine correlation type */
-  bi->burstTime = radio_burst->getTime();
-  CorrType type = expectedCorrType(bi->burstTime, chan);
+  burstTime = radio_burst->getTime();
+  bi->fn = burstTime.FN();
+  bi->tn = burstTime.TN();
+  CorrType type = expectedCorrType(burstTime, chan);
 
   /* Enable 8-PSK burst detection if EDGE is enabled */
   if (mEdge && (type == TSC))
@@ -576,7 +579,7 @@
   /* Debug: dump bursts to disk */
   /* bits 0-7  - chan 0 timeslots
    * bits 8-15 - chan 1 timeslots */
-  if (mWriteBurstToDiskMask & ((1<<bi->burstTime.TN()) << (8*chan)))
+  if (mWriteBurstToDiskMask & ((1<<bi->tn) << (8*chan)))
     writeToFile(radio_burst, chan);
 
   /* No processing if the timeslot is off.
@@ -913,7 +916,7 @@
 {
   LOG(DEBUG) << std::fixed << std::right
     << " chan: "   << chan
-    << " time: "   << bi->burstTime
+    << " time: "   << bi->tn << ":" << bi->fn
     << " RSSI: "   << std::setw(5) << std::setprecision(1) << (bi->rssi - rssiOffset)
                    << "dBFS/" << std::setw(6) << -bi->rssi << "dBm"
     << " noise: "  << std::setw(5) << std::setprecision(1) << (bi->noise - rssiOffset)
@@ -939,8 +942,8 @@
   struct trxd_hdr_v0* pkt = (struct trxd_hdr_v0*)burstString;
   pkt->common.version = 0;
   pkt->common.reserved = 0;
-  pkt->common.tn = bi.burstTime.TN();
-  osmo_store32be(bi.burstTime.FN(), &pkt->common.fn);
+  pkt->common.tn = bi.tn;
+  osmo_store32be(bi.fn, &pkt->common.fn);
   pkt->v0.rssi = bi.rssi;
   osmo_store16be(TOAint, &pkt->v0.toa);
   SoftVector::iterator burstItr = bi.rxBurst->begin();
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 7963519..9975823 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -38,7 +38,8 @@
 struct trx_ul_burst_ind {
         SoftVector *rxBurst;
         unsigned nbits; // number of symbols per slot in rxBurst, not counting guard periods
-        GSM::Time burstTime;
+        uint32_t fn; // TDMA frame number
+        uint8_t tn; // TDMA time-slot number
         double rssi; // in dBFS
         double toa;  // in symbols
         double noise; // noise level in dBFS

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14642
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Iadf2683d7f52138a2248598641f3b702252f325d
Gerrit-Change-Number: 14642
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190704/1812050e/attachment.htm>


More information about the gerrit-log mailing list