Transceiver52M: Remove unused code

This includes unknown and unused variables, functions, and
non-relevant documentation.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
Thomas Tsou 2013-11-15 16:13:59 -05:00
parent d3fccea05f
commit 477b77c558
6 changed files with 3 additions and 68 deletions

View File

@ -1,15 +0,0 @@
Basic model:
Have channel H = {h_0, h_1, ..., h_{K-1}}.
Have received sequence Y = {y_0, ..., y_{K+N}}.
Have transmitted sequence X = {x_0, ..., x_{N-1}}.
Denote state S_n = {x_n, x_{n-1}, ..., x_{n-L}}.
Define a bag as an unordered collection with two operations, add and take.
We have three bags:
S: a bag of survivors.
F: a bag of available data structures.
At time n, start with a non-empty bag S of survivors from time n-1.
Take a member out of S, and create all possible branches and their corresponding metrics. If metric ratio is above T, discard branch. Otherwise, check branch against entry in pruning table P. If branch metric is smaller than the existing entry's metric in P, then replace entry with branch. Otherwise, discard branch.
Once all possible branches of S have been created and pruned, S should be empty.Empty pruning table back into S, thus P is now empty. Repeat.

View File

@ -628,12 +628,11 @@ void Transceiver::driveControl(size_t chan)
sprintf(response, "RSP ADJPOWER 0 %d", mPower);
}
}
#define FREQOFFSET 0//11.2e3
else if (strcmp(command,"RXTUNE")==0) {
// tune receiver
int freqKhz;
sscanf(buffer,"%3s %s %d",cmdcheck,command,&freqKhz);
mRxFreq = freqKhz*1.0e3+FREQOFFSET;
mRxFreq = freqKhz * 1e3;
if (!mRadioInterface->tuneRx(mRxFreq, chan)) {
LOG(ALERT) << "RX failed to tune";
sprintf(response,"RSP RXTUNE 1 %d",freqKhz);
@ -645,8 +644,7 @@ void Transceiver::driveControl(size_t chan)
// tune txmtr
int freqKhz;
sscanf(buffer,"%3s %s %d",cmdcheck,command,&freqKhz);
//freqKhz = 890e3;
mTxFreq = freqKhz*1.0e3+FREQOFFSET;
mTxFreq = freqKhz * 1e3;
if (!mRadioInterface->tuneTx(mTxFreq, chan)) {
LOG(ALERT) << "TX failed to tune";
sprintf(response,"RSP TXTUNE 1 %d",freqKhz);
@ -706,23 +704,7 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
uint64_t frameNum = 0;
for (int i = 0; i < 4; i++)
frameNum = (frameNum << 8) | (0x0ff & buffer[i+1]);
/*
if (GSM::Time(frameNum,timeSlot) > mTransmitDeadlineClock + GSM::Time(51,0)) {
// stale burst
//LOG(DEBUG) << "FAST! "<< GSM::Time(frameNum,timeSlot);
//writeClockInterface();
}*/
/*
DAB -- Just let these go through the demod.
if (GSM::Time(frameNum,timeSlot) < mTransmitDeadlineClock) {
// stale burst from GSM core
LOG(NOTICE) << "STALE packet on GSM->TRX interface at time "<< GSM::Time(frameNum,timeSlot);
return false;
}
*/
// periodically update GSM core clock
LOG(DEBUG) << "mTransmitDeadlineClock " << mTransmitDeadlineClock
<< " mLastClockUpdateTime " << mLastClockUpdateTime;

View File

@ -38,7 +38,7 @@ RadioInterface::RadioInterface(RadioDevice *wRadio,
int wReceiveOffset, GSM::Time wStartTime)
: mRadio(wRadio), mSPSTx(sps), mSPSRx(1), mChans(chans), mMIMO(diversity),
sendCursor(0), recvCursor(0), underrun(false), overrun(false),
receiveOffset(wReceiveOffset), mOn(false), loadTest(false)
receiveOffset(wReceiveOffset), mOn(false)
{
mClock.set(wStartTime);
}

View File

@ -59,10 +59,6 @@ protected:
bool mOn; ///< indicates radio is on
bool loadTest;
int mNumARFCNs;
signalVector *finalVec, *finalVec9;
private:
/** format samples to USRP */

View File

@ -1135,26 +1135,6 @@ bool multVector(signalVector &x,
return true;
}
void offsetVector(signalVector &x,
complex offset)
{
signalVector::iterator xP = x.begin();
signalVector::iterator xPEnd = x.end();
if (!x.isReal()) {
while (xP < xPEnd) {
*xP += offset;
xP++;
}
}
else {
while (xP < xPEnd) {
*xP = xP->real() + offset;
xP++;
}
}
}
bool generateMidamble(int sps, int tsc)
{
bool status = true;

View File

@ -146,14 +146,6 @@ complex peakDetect(const signalVector &rxBurst,
void scaleVector(signalVector &x,
complex scale);
/**
Add a constant offset to a vecotr.
@param x The vector of interest.
@param offset The offset.
*/
void offsetVector(signalVector &x,
complex offset);
/**
Generate a modulated GSM midamble, stored within the library.
@param gsmPulse The GSM pulse used for modulation.