Change in osmo-trx[master]: radioDevice: Drop unused RSSI param from readSamples API

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

laforge gerrit-no-reply at lists.osmocom.org
Mon Mar 16 10:31:47 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17475 )

Change subject: radioDevice: Drop unused RSSI param from readSamples API
......................................................................

radioDevice: Drop unused RSSI param from readSamples API

The out "RSSI" parameter is only filled by USRPDevice, and not used at
all by any user of the API (radioInterface*.cpp).

RSSI seems to be computed nowadays in the common path in
Transceiver::pullRadioVector().

Change-Id: I06c2ea5a9891d170bc468f952bbf2a7e64d95784
---
M Transceiver52M/device/common/radioDevice.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/lms/LMSDevice.h
M Transceiver52M/device/uhd/UHDDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.h
M Transceiver52M/device/usrp1/USRPDevice.cpp
M Transceiver52M/device/usrp1/USRPDevice.h
7 files changed, 11 insertions(+), 14 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/Transceiver52M/device/common/radioDevice.h b/Transceiver52M/device/common/radioDevice.h
index 26903e8..c504b3a 100644
--- a/Transceiver52M/device/common/radioDevice.h
+++ b/Transceiver52M/device/common/radioDevice.h
@@ -77,12 +77,10 @@
 	@param overrun Set if read buffer has been overrun, e.g. data not being read fast enough
 	@param timestamp The timestamp of the first samples to be read
 	@param underrun Set if radio does not have data to transmit, e.g. data not being sent fast enough
-	@param RSSI The received signal strength of the read result
 	@return The number of samples actually read
   */
   virtual int readSamples(std::vector<short *> &bufs, int len, bool *overrun,
-                          TIMESTAMP timestamp = 0xffffffff, bool *underrun = 0,
-                          unsigned *RSSI = 0) = 0;
+                          TIMESTAMP timestamp = 0xffffffff, bool *underrun = 0) = 0;
   /**
         Write samples to the radio.
         @param buf Contains the data to be written.
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 884cc28..0cd8002 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -739,7 +739,7 @@
 
 // NOTE: Assumes sequential reads
 int LMSDevice::readSamples(std::vector < short *>&bufs, int len, bool * overrun,
-			   TIMESTAMP timestamp, bool * underrun, unsigned *RSSI)
+			   TIMESTAMP timestamp, bool * underrun)
 {
 	int rc, num_smpls, expect_smpls;
 	ssize_t avail_smpls;
diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h
index 755f6c4..c2fd2f6 100644
--- a/Transceiver52M/device/lms/LMSDevice.h
+++ b/Transceiver52M/device/lms/LMSDevice.h
@@ -106,12 +106,11 @@
 	@param overrun Set if read buffer has been overrun, e.g. data not being read fast enough
 	@param timestamp The timestamp of the first samples to be read
 	@param underrun Set if LMS does not have data to transmit, e.g. data not being sent fast enough
-	@param RSSI The received signal strength of the read result
 	@return The number of samples actually read
 	*/
 	int readSamples(std::vector < short *>&buf, int len, bool * overrun,
 			TIMESTAMP timestamp = 0xffffffff, bool * underrun =
-			NULL, unsigned *RSSI = NULL);
+			NULL);
 	/**
 	Write samples to the LMS.
 	@param buf Contains the data to be written.
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp
index 5d267c8..ddb6631 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -721,7 +721,7 @@
 }
 
 int uhd_device::readSamples(std::vector<short *> &bufs, int len, bool *overrun,
-			    TIMESTAMP timestamp, bool *underrun, unsigned *RSSI)
+			    TIMESTAMP timestamp, bool *underrun)
 {
 	ssize_t rc;
 	uhd::time_spec_t ts;
diff --git a/Transceiver52M/device/uhd/UHDDevice.h b/Transceiver52M/device/uhd/UHDDevice.h
index d485a8e..4809b25 100644
--- a/Transceiver52M/device/uhd/UHDDevice.h
+++ b/Transceiver52M/device/uhd/UHDDevice.h
@@ -74,7 +74,7 @@
 	enum TxWindowType getWindowType() { return tx_window; }
 
 	int readSamples(std::vector<short *> &bufs, int len, bool *overrun,
-			TIMESTAMP timestamp, bool *underrun, unsigned *RSSI);
+			TIMESTAMP timestamp, bool *underrun);
 
 	int writeSamples(std::vector<short *> &bufs, int len, bool *underrun,
 			 TIMESTAMP timestamp, bool isControl);
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 766a228..5eaca07 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -365,7 +365,7 @@
 
 // NOTE: Assumes sequential reads
 int USRPDevice::readSamples(std::vector<short *> &bufs, int len, bool *overrun,
-                            TIMESTAMP timestamp, bool *underrun, unsigned *RSSI)
+                            TIMESTAMP timestamp, bool *underrun)
 {
 #ifndef SWLOOPBACK
   if (!m_uRx)
@@ -433,8 +433,10 @@
 	*underrun = true;
 	LOGC(DDEV, DEBUG) << "UNDERRUN in TRX->USRP interface";
       }
-      if (RSSI) *RSSI = (word0 >> 21) & 0x3f;
-
+#if 0
+      /* FIXME: Do something with this ? */
+      unsigned RSSI = (word0 >> 21) & 0x3f;
+#endif
       if (!isAligned) continue;
 
       unsigned cursorStart = pktTimestamp - timeStart + dataStart;
diff --git a/Transceiver52M/device/usrp1/USRPDevice.h b/Transceiver52M/device/usrp1/USRPDevice.h
index 47f2a43..0cf5ec3 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.h
+++ b/Transceiver52M/device/usrp1/USRPDevice.h
@@ -117,12 +117,10 @@
 	@param overrun Set if read buffer has been overrun, e.g. data not being read fast enough
 	@param timestamp The timestamp of the first samples to be read
 	@param underrun Set if USRP does not have data to transmit, e.g. data not being sent fast enough
-	@param RSSI The received signal strength of the read result
 	@return The number of samples actually read
   */
   int readSamples(std::vector<short *> &buf, int len, bool *overrun,
-                  TIMESTAMP timestamp = 0xffffffff, bool *underrun = NULL,
-                  unsigned *RSSI = NULL);
+                  TIMESTAMP timestamp = 0xffffffff, bool *underrun = NULL);
   /**
         Write samples to the USRP.
         @param buf Contains the data to be written.

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

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


More information about the gerrit-log mailing list