path: root/Transceiver52M/radioInterface.h
diff options
authorThomas Tsou <tom@tsou.cc>2013-04-08 14:18:26 -0400
committerThomas Tsou <tom@tsou.cc>2013-10-18 13:03:41 -0400
commitcb69f084107367eb1a95cd0e6ef3a379361f3e7c (patch)
tree7e06d370c266df839da53437275aeff1eb9235a7 /Transceiver52M/radioInterface.h
parent312e387630c6a2d6a6b0c7fc80f3661acfdfd0ed (diff)
Transceiver52M: Set resampling option automatically based on device
Remove the built time resampling selection and link both options. Move the normal push/pullBuffer() calls back to the base class and overload them in the inherited resampling class. USRP2/N2xx devices are the only devices that require resampling so return that resampling is necessary on the device open(), which is the point at which the device type will be known. The GSM transceiver only operates at a whole number multiple of the GSM rate and doesn't care about the actual device rate and if resampling is used. Therefore GSM specific portion of the transceiver should only need to submit the samples-per-symbol value to the device interface. Then, the device should be able to determine the appropriate sample rate (400 ksps or 270.833 ksps) and if resampling is appropriate. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/radioInterface.h')
1 files changed, 20 insertions, 3 deletions
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index 216cf3e..94d8917 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -31,7 +31,7 @@ static const unsigned gSlotLen = 148; ///< number of symbols per slot, not
/** class to interface the transceiver with the USRP */
class RadioInterface {
Thread mAlignRadioServiceLoopThread; ///< thread that synchronizes transmit and receive sections
@@ -63,6 +63,8 @@ private:
int mNumARFCNs;
signalVector *finalVec, *finalVec9;
/** format samples to USRP */
int radioifyVector(signalVector &wVector,
float *floatVector,
@@ -73,10 +75,10 @@ private:
int unRadioifyVector(float *floatVector, signalVector &wVector);
/** push GSM bursts into the transmit buffer */
- void pushBuffer(void);
+ virtual void pushBuffer(void);
/** pull GSM bursts from the receive buffer */
- void pullBuffer(void);
+ virtual void pullBuffer(void);
@@ -154,3 +156,18 @@ protected:
/** synchronization thread loop */
void *AlignRadioServiceLoopAdapter(RadioInterface*);
+class RadioInterfaceResamp : public RadioInterface {
+ void pushBuffer();
+ void pullBuffer();
+ RadioInterfaceResamp(RadioDevice* wRadio = NULL,
+ int receiveOffset = 3,
+ GSM::Time wStartTime = GSM::Time(0));