aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioInterface.h
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-10-29 18:34:16 -0400
committerThomas Tsou <tom@tsou.cc>2013-11-15 14:45:20 -0500
commit204a9f135ac2408dd62b55462ebe4b2d10be4f56 (patch)
tree80de459f10c23a103bf80172ba762f2577da0859 /Transceiver52M/radioInterface.h
parent0169b310de2789cbe2ec9a447caae494fbea13d0 (diff)
Transceiver52M: Add multi channel transceiver support
This patch primarily addresses devices with multiple RF front end support. Currently device support is limited to UmTRX. Vectorize transceiver variables to allow multiple asynchronous threads on the upper layer with single downlink and uplink threads driving the UHD I/O interface synchronously. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/radioInterface.h')
-rw-r--r--Transceiver52M/radioInterface.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index 84de1e5..1e58ecb 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -30,19 +30,20 @@ protected:
Thread mAlignRadioServiceLoopThread; ///< thread that synchronizes transmit and receive sections
- VectorFIFO mReceiveFIFO; ///< FIFO that holds receive bursts
+ std::vector<VectorFIFO> mReceiveFIFO; ///< FIFO that holds receive bursts
RadioDevice *mRadio; ///< the USRP object
- int mSPSTx;
- int mSPSRx;
- signalVector *sendBuffer;
- signalVector *recvBuffer;
+ size_t mSPSTx;
+ size_t mSPSRx;
+ size_t mChans;
+ std::vector<signalVector *> sendBuffer;
+ std::vector<signalVector *> recvBuffer;
unsigned sendCursor;
unsigned recvCursor;
- short *convertRecvBuffer;
- short *convertSendBuffer;
+ std::vector<short *> convertRecvBuffer;
+ std::vector<short *> convertSendBuffer;
bool underrun; ///< indicates writes to USRP are too slow
bool overrun; ///< indicates reads from USRP are too slow
@@ -89,43 +90,41 @@ public:
/** constructor */
RadioInterface(RadioDevice* wRadio = NULL,
int receiveOffset = 3,
- int wSPS = 4,
+ size_t sps = 4, size_t chans = 1,
GSM::Time wStartTime = GSM::Time(0));
-
+
/** destructor */
virtual ~RadioInterface();
/** check for underrun, resets underrun value */
bool isUnderrun();
-
- /** attach an existing USRP to this interface */
- void attach(RadioDevice *wRadio, int wRadioOversampling);
/** return the receive FIFO */
- VectorFIFO* receiveFIFO() { return &mReceiveFIFO;}
+ VectorFIFO* receiveFIFO(size_t chan = 0);
/** return the basestation clock */
RadioClock* getClock(void) { return &mClock;};
/** set transmit frequency */
- bool tuneTx(double freq);
+ bool tuneTx(double freq, size_t chan = 0);
/** set receive frequency */
- bool tuneRx(double freq);
+ bool tuneRx(double freq, size_t chan = 0);
/** set receive gain */
- double setRxGain(double dB);
+ double setRxGain(double dB, size_t chan = 0);
/** get receive gain */
- double getRxGain(void);
+ double getRxGain(size_t chan = 0);
/** drive transmission of GSM bursts */
- void driveTransmitRadio(signalVector &radioBurst, bool zeroBurst);
+ void driveTransmitRadio(std::vector<signalVector *> &bursts,
+ std::vector<bool> &zeros);
/** drive reception of GSM bursts */
- void driveReceiveRadio();
+ bool driveReceiveRadio();
- void setPowerAttenuation(double atten);
+ void setPowerAttenuation(double atten, size_t chan = 0);
/** returns the full-scale transmit amplitude **/
double fullScaleInputValue();
@@ -169,7 +168,7 @@ public:
RadioInterfaceResamp(RadioDevice* wRadio = NULL,
int receiveOffset = 3,
- int wSPS = 4,
+ size_t wSPS = 4, size_t chans = 1,
GSM::Time wStartTime = GSM::Time(0));
~RadioInterfaceResamp();