Change in ...osmo-trx[master]: Transceiver: Store TRXD version per channel

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 22 15:50:42 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/14897


Change subject: Transceiver: Store TRXD version per channel
......................................................................

Transceiver: Store TRXD version per channel

The setting is negotiatied by osmo-bts-trx on each channel, so let's
keep and use state per channel instead of overwriting the state from
different channels.
Take the chance to change related log lines to also print the channel
number.

Change-Id: If9cf95e89d38d0155ab48b8c0977ca5f381c2aad
---
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
2 files changed, 9 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/97/14897/1

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 17e0476..01a0e9b 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -127,7 +127,7 @@
     mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans), mExtRACH(false), mEdge(false),
     mOn(false), mForceClockInterface(false),
     mTxFreq(0.0), mRxFreq(0.0), mTSC(0), mMaxExpectedDelayAB(0), mMaxExpectedDelayNB(0),
-    mWriteBurstToDiskMask(0), mVersionTRXD(0)
+    mWriteBurstToDiskMask(0)
 {
   txFullScale = mRadioInterface->fullScaleInputValue();
   rxFullScale = mRadioInterface->fullScaleOutputValue();
@@ -196,6 +196,7 @@
   mTxPriorityQueues.resize(mChans);
   mReceiveFIFO.resize(mChans);
   mStates.resize(mChans);
+  mVersionTRXD.resize(mChans);
 
   /* Filler table retransmissions - support only on channel 0 */
   if (filler == FILLER_DUMMY)
@@ -883,14 +884,14 @@
     // set TRXD protocol version
     unsigned version_recv;
     sscanf(params, "%u", &version_recv);
-    LOGC(DTRXCTRL, INFO) << "BTS requests TRXD version switch: " << version_recv;
+    LOGCHAN(chan, DTRXCTRL, INFO) << "BTS requests TRXD version switch: " << version_recv;
     if (version_recv > TRX_DATA_FORMAT_VER) {
-      LOGC(DTRXCTRL, INFO) << "rejecting TRXD version " << version_recv
-                           << "in favor of " <<  TRX_DATA_FORMAT_VER;
+      LOGCHAN(chan, DTRXCTRL, INFO) << "rejecting TRXD version " << version_recv
+                                    << "in favor of " <<  TRX_DATA_FORMAT_VER;
       sprintf(response, "RSP SETFORMAT %u %u", TRX_DATA_FORMAT_VER, version_recv);
     } else {
-      LOGC(DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
-      mVersionTRXD = version_recv;
+      LOGCHAN(chan, DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
+      mVersionTRXD[chan] = version_recv;
       sprintf(response, "RSP SETFORMAT %u %u", version_recv, version_recv);
     }
   } else if (match_cmd(command, "_SETBURSTTODISKMASK", &params)) {
@@ -1021,7 +1022,7 @@
   if (!bi.idle)
        logRxBurst(chan, &bi);
 
-  switch (mVersionTRXD) {
+  switch (mVersionTRXD[chan]) {
     case 0:
       trxd_send_burst_ind_v0(chan, mDataSockets[chan], &bi);
       break;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index aa2a716..be67b33 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -216,8 +216,8 @@
   unsigned mMaxExpectedDelayAB;        ///< maximum expected time-of-arrival offset in GSM symbols for Access Bursts (RACH)
   unsigned mMaxExpectedDelayNB;        ///< maximum expected time-of-arrival offset in GSM symbols for Normal Bursts
   unsigned mWriteBurstToDiskMask;      ///< debug: bitmask to indicate which timeslots to dump to disk
-  unsigned mVersionTRXD;               ///< Format version to use for TRXD protocol communication
 
+  std::vector<unsigned> mVersionTRXD;  ///< Format version to use for TRXD protocol communication, per channel
   std::vector<TransceiverState> mStates;
 
   /** Start and stop I/O threads through the control socket API */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14897
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: If9cf95e89d38d0155ab48b8c0977ca5f381c2aad
Gerrit-Change-Number: 14897
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190722/b87ac9dd/attachment.htm>


More information about the gerrit-log mailing list