aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-16 13:52:40 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-20 19:17:22 +0200
commitee2ba19cec96347d11e3661077ef3c4c0eb068c2 (patch)
tree2a436186631598e3eda041613c3ec9ea9c276510 /Transceiver52M/device
parent80d053acb9fa979e10c60c590a3fc76ca8decce9 (diff)
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
Diffstat (limited to 'Transceiver52M/device')
-rw-r--r--Transceiver52M/device/common/radioDevice.h9
-rw-r--r--Transceiver52M/device/uhd/UHDDevice.cpp1
2 files changed, 7 insertions, 3 deletions
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 @@ class RadioDevice {
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 @@ void uhd_device::set_channels(bool swap)
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)