From 84ba2673e46b16010615c2edc5c49207918c1afc Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Mon, 10 Oct 2011 00:17:01 -0400 Subject: [PATCH] transceiver: move various radio interface definitions Move them out of the interface file - primarily for readability. Signed-off-by: Thomas Tsou --- .../Transceiver52M/radioInterface.cpp | 35 +++++++++++++++++-- public-trunk/Transceiver52M/radioInterface.h | 8 ++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/public-trunk/Transceiver52M/radioInterface.cpp b/public-trunk/Transceiver52M/radioInterface.cpp index 6a3b771..dd524bd 100644 --- a/public-trunk/Transceiver52M/radioInterface.cpp +++ b/public-trunk/Transceiver52M/radioInterface.cpp @@ -204,5 +204,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/public-trunk/Transceiver52M/radioInterface.h b/public-trunk/Transceiver52M/radioInterface.h index 1216a63..c265a5f 100644 --- a/public-trunk/Transceiver52M/radioInterface.h +++ b/public-trunk/Transceiver52M/radioInterface.h @@ -100,10 +100,10 @@ public: ~RadioInterface(); /** 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;} @@ -118,10 +118,10 @@ public: bool tuneRx(double freq); /** set receive gain */ - double setRxGain(double dB) {if (mRadio) return mRadio->setRxGain(dB); else return -1;} + double setRxGain(double dB); /** get receive gain */ - double getRxGain(void) {if (mRadio) return mRadio->getRxGain(); else return -1;} + double getRxGain(void); /** drive transmission of GSM bursts */ void driveTransmitRadio(signalVector &radioBurst, bool zeroBurst);