[PATCH] osmo-trx[master]: Move Transceiver::demodulate() to sigProcLib to make it reus...

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

Alexander Chemeris gerrit-no-reply at lists.osmocom.org
Wed Mar 22 18:44:19 UTC 2017


Review at  https://gerrit.osmocom.org/2152

Move Transceiver::demodulate() to sigProcLib to make it reusable.

Change-Id: I2cad47160e53f65612bd1da8998c83a0a22bce9b
---
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
M Transceiver52M/sigProcLib.cpp
M Transceiver52M/sigProcLib.h
4 files changed, 14 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/52/2152/1

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 1ae9f93..65e1c61 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -533,18 +533,6 @@
   }
 }
 
-/*
- * Demodulate GMSK by direct rotation and soft slicing.
- */
-SoftVector *Transceiver::demodulate(signalVector &burst, complex amp,
-                                    float toa, CorrType type)
-{
-  if (type == EDGE)
-	  return demodEdgeBurst(burst, mSPSRx, amp, toa);
-
-  return demodGmskBurst(burst, mSPSRx, amp, toa);
-}
-
 void writeToFile(radioVector *radio_burst, size_t chan)
 {
   GSM::Time time = radio_burst->getTime();
@@ -656,7 +644,7 @@
 
   timingOffset = toa;
 
-  bits = demodulate(*burst, amp, toa, type);
+  bits = demodAnyBurst(*burst, mSPSRx, amp, toa, type);
 
   delete radio_burst;
   return bits;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 3c70e5c..6f9cb92 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -202,10 +202,6 @@
   /** send messages over the clock socket */
   void writeClockInterface(void);
 
-  /** Demodulate burst and output soft bits */
-  SoftVector *demodulate(signalVector &burst,
-                         complex amp, float toa, CorrType type);
-
   int mSPSTx;                          ///< number of samples per Tx symbol
   int mSPSRx;                          ///< number of samples per Rx symbol
   size_t mChans;
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 5995845..ece6fa0 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -2137,6 +2137,15 @@
   return bits;
 }
 
+SoftVector *demodAnyBurst(signalVector &burst, int sps, complex amp,
+                          float toa, CorrType type)
+{
+  if (type == EDGE)
+    return demodEdgeBurst(burst, sps, amp, toa);
+  else
+    return demodGmskBurst(burst, sps, amp, toa);
+}
+
 bool sigProcLibSetup()
 {
   initTrigTables();
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 285b977..fe50508 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -327,4 +327,8 @@
 SoftVector *demodEdgeBurst(signalVector &rxBurst, int sps,
                            complex channel, float TOA);
 
+/** Demodulate burst basde on type and output soft bits */
+SoftVector *demodAnyBurst(signalVector &burst, int sps,
+                          complex amp, float toa, CorrType type);
+
 #endif /* SIGPROCLIB_H */

-- 
To view, visit https://gerrit.osmocom.org/2152
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cad47160e53f65612bd1da8998c83a0a22bce9b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris at gmail.com>



More information about the gerrit-log mailing list