diff options
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 26 | ||||
-rw-r--r-- | Transceiver52M/Transceiver.h | 3 |
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; |