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>
master
Thomas Tsou 11 years ago
parent 9d0beae1a5
commit 84ba2673e4
  1. 35
      public-trunk/Transceiver52M/radioInterface.cpp
  2. 8
      public-trunk/Transceiver52M/radioInterface.h

@ -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;
}

@ -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);