laforge
/
openbts-osmo
Archived
1
0
Fork 0

transceiver: move various radio interface definitions

Move them out of the interface file - primarily for
readability.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
Thomas Tsou 2011-10-10 00:17:01 -04:00
parent 9d0beae1a5
commit 84ba2673e4
2 changed files with 37 additions and 6 deletions

View File

@ -204,5 +204,36 @@ void RadioInterface::driveReceiveRadio() {
rcvCursor -= readSz; rcvCursor -= readSz;
memmove(rcvBuffer,rcvBuffer+2*readSz,sizeof(float) * 2 * rcvCursor); 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;
}

View File

@ -100,10 +100,10 @@ public:
~RadioInterface(); ~RadioInterface();
/** check for underrun, resets underrun value */ /** check for underrun, resets underrun value */
bool isUnderrun() { bool retVal = underrun; underrun = false; return retVal;} bool isUnderrun();
/** attach an existing USRP to this interface */ /** 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 */ /** return the receive FIFO */
VectorFIFO* receiveFIFO() { return &mReceiveFIFO;} VectorFIFO* receiveFIFO() { return &mReceiveFIFO;}
@ -118,10 +118,10 @@ public:
bool tuneRx(double freq); bool tuneRx(double freq);
/** set receive gain */ /** set receive gain */
double setRxGain(double dB) {if (mRadio) return mRadio->setRxGain(dB); else return -1;} double setRxGain(double dB);
/** get receive gain */ /** get receive gain */
double getRxGain(void) {if (mRadio) return mRadio->getRxGain(); else return -1;} double getRxGain(void);
/** drive transmission of GSM bursts */ /** drive transmission of GSM bursts */
void driveTransmitRadio(signalVector &radioBurst, bool zeroBurst); void driveTransmitRadio(signalVector &radioBurst, bool zeroBurst);