aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2014-10-06 11:43:48 -0700
committerThomas Tsou <tom@tsou.cc>2014-10-06 19:16:40 -0700
commit25021dfe5a2fdd1a0f1e73c74638dab8ad411944 (patch)
treea2d6f132d18618cf583a360c609ffd6b026030b7 /Transceiver52M
parente287598e6b9ebf46c73263f62767250cc96b10ab (diff)
ms: Add SETRXMASK command
Create 64-bit multiframe masks for each physical slot. These are set through the SETRXMASK command with first and second arguemnts timeslot and mask respectively. Modulus value of 102 is currently not handled and will cause all receive bursts on that slot to be disabled in MS tracking mode. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/Transceiver.cpp26
-rw-r--r--Transceiver52M/Transceiver.h3
2 files changed, 28 insertions, 1 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 1e76ec0..2d1690f 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -113,6 +113,9 @@ Transceiver::Transceiver(int wBasePort,
txFullScale = mRadioInterface->fullScaleInputValue();
rxFullScale = mRadioInterface->fullScaleOutputValue();
+
+ for (int i = 0; i < 8; i++)
+ mRxSlotMask[i] = 0;
}
Transceiver::~Transceiver()
@@ -310,6 +313,18 @@ Transceiver::CorrType Transceiver::expectedCorrType(GSM::Time currTime,
unsigned burstTN = currTime.TN();
unsigned burstFN = currTime.FN();
+ if (state->mode == TRX_MODE_MS_TRACK) {
+ /* 102 modulus case currently unhandled */
+ if (state->fillerModulus[burstTN] > 52)
+ return OFF;
+
+ int modFN = burstFN % state->fillerModulus[burstTN];
+ if ((1 << modFN) & mRxSlotMask[burstTN])
+ return TSC;
+ else
+ return OFF;
+ }
+
switch (state->chanType[burstTN]) {
case NONE:
return OFF;
@@ -874,6 +889,17 @@ void Transceiver::driveControl(size_t chan)
setModulus(timeslot, chan);
sprintf(response,"RSP SETSLOT 0 %d %d",timeslot,corrCode);
}
+ else if (!strcmp(command,"SETRXMASK")) {
+ int slot;
+ unsigned long long mask;
+ sscanf(buffer,"%3s %s %d %llu", cmdcheck, command, &slot, &mask);
+ if ((slot < 0) || (slot > 7)) {
+ sprintf(response, "RSP SETRXMASK 1");
+ } else {
+ mRxSlotMask[slot] = mask;
+ sprintf(response, "RSP SETRXMASK 0 %d %llu", slot, mask);
+ }
+ }
else if (!strcmp(command, "SYNC")) {
mStates[0].mode = TRX_MODE_MS_ACQUIRE;
sprintf(response,"RSP SYNC 0");
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index e31a9a9..f328fb9 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -182,7 +182,8 @@ private:
double mRxFreq; ///< the receive frequency
int mPower; ///< the transmit power in dB
unsigned mTSC; ///< the midamble sequence code
- unsigned mMaxExpectedDelay; ///< maximum expected time-of-arrival offset in GSM symbols
+ unsigned mMaxExpectedDelay; ///< maximum TOA offset in GSM symbols
+ unsigned long long mRxSlotMask[8]; ///< MS - enabled multiframe slot mask
int mBSIC; ///< MS - detected BSIC
std::vector<TransceiverState> mStates;