From b5c450dfdffe5b74c8482e222cd782a23fcc0065 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Thu, 29 Mar 2012 18:53:57 -0400 Subject: 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 --- Transceiver52M/Transceiver.cpp | 3 +++ Transceiver52M/Transceiver.h | 6 ------ Transceiver52M/multiTRX.cpp | 6 ------ 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); /* -- cgit v1.2.3