aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device/uhd
diff options
context:
space:
mode:
Diffstat (limited to 'Transceiver52M/device/uhd')
-rw-r--r--Transceiver52M/device/uhd/UHDDevice.cpp13
-rw-r--r--Transceiver52M/device/uhd/UHDDevice.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp
index 5b38df4..3b59291 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -310,6 +310,19 @@ double uhd_device::getRxGain(size_t chan)
return rx_gains[chan];
}
+double uhd_device::getTxGain(size_t chan)
+{
+ if (iface == MULTI_ARFCN)
+ chan = 0;
+
+ if (chan >= tx_gains.size()) {
+ LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
+ return 0.0f;
+ }
+
+ return tx_gains[chan];
+}
+
/*
Parse the UHD device tree and mboard name to find out what device we're
dealing with. We need the window type so that the transceiver knows how to
diff --git a/Transceiver52M/device/uhd/UHDDevice.h b/Transceiver52M/device/uhd/UHDDevice.h
index 944578a..44f7ebb 100644
--- a/Transceiver52M/device/uhd/UHDDevice.h
+++ b/Transceiver52M/device/uhd/UHDDevice.h
@@ -96,6 +96,7 @@ public:
double minRxGain(void) { return rx_gain_min; }
double setTxGain(double db, size_t chan);
+ double getTxGain(size_t chan = 0);
double maxTxGain(void) { return tx_gain_max; }
double minTxGain(void) { return tx_gain_min; }