diff options
author | Thomas Tsou <ttsou@vt.edu> | 2012-03-29 18:53:57 -0400 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-06-24 01:51:02 +0400 |
commit | b5c450dfdffe5b74c8482e222cd782a23fcc0065 (patch) | |
tree | f9b98243e08a7caeff88744ff958129c68d70800 /Transceiver52M | |
parent | afb04f8b631b6727db0bc62802f2bf50cf39503a (diff) |
multi-arfcn, trx: attach FIFO's internally in transceiver
The original split-transceiver abstraction did not maintain
internal instances of the radio interface or drive loop.
The FIFO's were attached through external calls. The control
loop, however, made such an approach overly difficult, so
the transceiver now maintains pointers to the aforementioned
objects. In doing so, we no longer need external attachment
calls to setup the FIFO's.
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 3 | ||||
-rw-r--r-- | Transceiver52M/Transceiver.h | 6 | ||||
-rw-r--r-- | Transceiver52M/multiTRX.cpp | 6 | ||||
-rw-r--r-- | Transceiver52M/runTransceiver.cpp | 2 |
4 files changed, 3 insertions, 14 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 0d7776f..81b0aad 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -75,6 +75,9 @@ Transceiver::Transceiver(int wBasePort, gsmPulse = generateGSMPulse(2,mSamplesPerSymbol); LOG(DEBUG) << "gsmPulse: " << *gsmPulse; + mTransmitPriorityQueue = mDriveLoop->priorityQueue(mChannel); + mReceiveFIFO = mRadioInterface->receiveFIFO(mChannel); + txFullScale = mRadioInterface->fullScaleInputValue(); rxFullScale = mRadioInterface->fullScaleOutputValue(); diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h index 1b4e181..840f87b 100644 --- a/Transceiver52M/Transceiver.h +++ b/Transceiver52M/Transceiver.h @@ -138,12 +138,6 @@ public: /** shutdown (teardown threads) the Transceiver */ void shutdown(); - /** attach the radioInterface receive FIFO */ - void receiveFIFO(VectorFIFO *wFIFO) { mReceiveFIFO = wFIFO;} - - /** attach the radioInterface transmit FIFO */ - void transmitQueue(VectorQueue *wQ) { mTransmitPriorityQueue = wQ; } - protected: /** drive reception and demodulation of GSM bursts */ diff --git a/Transceiver52M/multiTRX.cpp b/Transceiver52M/multiTRX.cpp index 8ce9ae0..b93d9f0 100644 --- a/Transceiver52M/multiTRX.cpp +++ b/Transceiver52M/multiTRX.cpp @@ -82,22 +82,16 @@ int main(int argc, char *argv[]) LOG(NOTICE) << "Creating TRX0"; trx0 = new Transceiver(5700, "127.0.0.1", SAMPSPERSYM, radio, drive, 0); - trx0->receiveFIFO(radio->receiveFIFO(0)); - trx0->transmitQueue(drive->priorityQueue(0)); radio->activateChan(0); trx0->start(); LOG(NOTICE) << "Creating TRX1"; trx1 = new Transceiver(6700, "127.0.0.1", SAMPSPERSYM, radio, drive, 1); - trx1->receiveFIFO(radio->receiveFIFO(1)); - trx1->transmitQueue(drive->priorityQueue(1)); radio->activateChan(1); trx1->start(); LOG(NOTICE) << "Creating TRX2"; trx2 = new Transceiver(7700, "127.0.0.1", SAMPSPERSYM, radio, drive, 4); - trx2->receiveFIFO(radio->receiveFIFO(4)); - trx2->transmitQueue(drive->priorityQueue(4)); radio->activateChan(4); trx2->start(); diff --git a/Transceiver52M/runTransceiver.cpp b/Transceiver52M/runTransceiver.cpp index 441edf9..acbea72 100644 --- a/Transceiver52M/runTransceiver.cpp +++ b/Transceiver52M/runTransceiver.cpp @@ -120,8 +120,6 @@ int main(int argc, char *argv[]) const char *addr = gConfig.getStr("TRX.IP").c_str(); DriveLoop *drive = new DriveLoop(SAMPSPERSYM,GSM::Time(3,0),radio); Transceiver *trx = new Transceiver(port, addr, SAMPSPERSYM, radio, drive, 0); - trx->receiveFIFO(radio->receiveFIFO(0)); - trx->transmitQueue(drive->priorityQueue(0)); radio->activateChan(0); /* |