aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/radioInterface.cpp35
-rw-r--r--Transceiver52M/radioInterface.h17
2 files changed, 41 insertions, 11 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 1482eb6..a3c933f 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -215,5 +215,36 @@ void RadioInterface::driveReceiveRadio() {
rcvCursor -= readSz;
memmove(rcvBuffer,rcvBuffer+2*readSz,sizeof(float) * 2 * rcvCursor);
}
-}
-
+}
+
+bool RadioInterface::isUnderrun()
+{
+ bool retVal = underrun;
+ underrun = false;
+
+ return retVal;
+}
+
+void RadioInterface::attach(RadioDevice *wRadio, int wRadioOversampling)
+{
+ if (!mOn) {
+ mRadio = wRadio;
+ mRadioOversampling = SAMPSPERSYM;
+ }
+}
+
+double RadioInterface::setRxGain(double dB)
+{
+ if (mRadio)
+ return mRadio->setRxGain(dB);
+ else
+ return -1;
+}
+
+double RadioInterface::getRxGain()
+{
+ if (mRadio)
+ return mRadio->getRxGain();
+ else
+ return -1;
+}
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index 9b5c2b1..31716b3 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -98,10 +98,10 @@ public:
int getSamplesPerSymbol() { return samplesPerSymbol;}
/** check for underrun, resets underrun value */
- bool isUnderrun() { bool retVal = underrun; underrun = false; return retVal;}
+ bool isUnderrun();
/** attach an existing USRP to this interface */
- void attach(RadioDevice *wRadio, int wRadioOversampling) {if (!mOn) {mRadio = wRadio; mRadioOversampling = SAMPSPERSYM;} }
+ void attach(RadioDevice *wRadio, int wRadioOversampling);
/** return the receive FIFO */
VectorFIFO* receiveFIFO() { return &mReceiveFIFO;}
@@ -109,19 +109,18 @@ public:
/** return the basestation clock */
RadioClock* getClock(void) { return &mClock;};
- /** set receive gain */
- double setRxGain(double dB) {if (mRadio) return mRadio->setRxGain(dB); else return -1;}
-
- /** get receive gain */
- double getRxGain(void) {if (mRadio) return mRadio->getRxGain(); else return -1;}
-
-
/** set transmit frequency */
bool tuneTx(double freq);
/** set receive frequency */
bool tuneRx(double freq);
+ /** set receive gain */
+ double setRxGain(double dB);
+
+ /** get receive gain */
+ double getRxGain(void);
+
/** drive transmission of GSM bursts */
void driveTransmitRadio(signalVector &radioBurst, bool zeroBurst);