mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-02 21:03:16 +00:00
transceiver: move various radio interface definitions
Move them out of the interface file - primarily for readability. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2674 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
@@ -215,5 +215,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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -98,10 +98,10 @@ public:
|
|||||||
int getSamplesPerSymbol() { return samplesPerSymbol;}
|
int getSamplesPerSymbol() { return samplesPerSymbol;}
|
||||||
|
|
||||||
/** 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;}
|
||||||
@@ -109,19 +109,18 @@ public:
|
|||||||
/** return the basestation clock */
|
/** return the basestation clock */
|
||||||
RadioClock* getClock(void) { return &mClock;};
|
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 */
|
/** set transmit frequency */
|
||||||
bool tuneTx(double freq);
|
bool tuneTx(double freq);
|
||||||
|
|
||||||
/** set receive frequency */
|
/** set receive frequency */
|
||||||
bool tuneRx(double freq);
|
bool tuneRx(double freq);
|
||||||
|
|
||||||
|
/** set receive gain */
|
||||||
|
double setRxGain(double dB);
|
||||||
|
|
||||||
|
/** get receive gain */
|
||||||
|
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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user