Change in ...osmo-trx[master]: Move multi-ARFCN chan amount modification from UHDDevice to parent class

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
Fri Sep 20 17:29:05 UTC 2019


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

Change subject: Move multi-ARFCN chan amount modification from UHDDevice to parent class
......................................................................

Move multi-ARFCN chan amount modification from UHDDevice to parent class

This way switch is applied correctly to parent structures and features
can be used later by other children classes (other devices).

Change-Id: I24d6c66bb3195ba2513b4a67daa14cdfbacdce6d
---
M Transceiver52M/device/common/radioDevice.h
M Transceiver52M/device/uhd/UHDDevice.cpp
2 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/Transceiver52M/device/common/radioDevice.h b/Transceiver52M/device/common/radioDevice.h
index 1d85204..d27a52c 100644
--- a/Transceiver52M/device/common/radioDevice.h
+++ b/Transceiver52M/device/common/radioDevice.h
@@ -171,12 +171,17 @@
   std::vector<std::string> tx_paths, rx_paths;
   std::vector<struct device_counters> m_ctr;
 
-  RadioDevice(size_t tx_sps, size_t rx_sps, InterfaceType type, size_t chans, double offset,
+  RadioDevice(size_t tx_sps, size_t rx_sps, InterfaceType type, size_t chan_num, double offset,
               const std::vector<std::string>& tx_paths,
               const std::vector<std::string>& rx_paths):
-		tx_sps(tx_sps), rx_sps(rx_sps), iface(type), chans(chans), lo_offset(offset),
+		tx_sps(tx_sps), rx_sps(rx_sps), iface(type), chans(chan_num), lo_offset(offset),
 		tx_paths(tx_paths), rx_paths(rx_paths)
 	{
+		if (iface == MULTI_ARFCN) {
+			LOGC(DDEV, INFO) << "Multi-ARFCN: "<< chan_num << " logical chans -> 1 physical chans";
+			chans = 1;
+		}
+
 		m_ctr.resize(chans);
 		for (size_t i = 0; i < chans; i++) {
 			memset(&m_ctr[i], 0, sizeof(m_ctr[i]));
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp
index 809bade..604bb44 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -382,7 +382,6 @@
 		if (dev_type != B200 && dev_type != B210)
 			throw std::invalid_argument("Device does not support MCBTS");
 		dev_type = B2XX_MCBTS;
-		chans = 1;
 	}
 
 	if (chans > dev_param_map.at(dev_key(dev_type, tx_sps, rx_sps)).channels)

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I24d6c66bb3195ba2513b4a67daa14cdfbacdce6d
Gerrit-Change-Number: 15542
Gerrit-PatchSet: 3
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/20190920/ee41204d/attachment.htm>


More information about the gerrit-log mailing list