Change in ...osmo-trx[master]: Transceiver: Support SETFORMAT command

pespin gerrit-no-reply at lists.osmocom.org
Fri Jul 19 11:44:16 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/14665 )

Change subject: Transceiver: Support SETFORMAT command
......................................................................

Transceiver: Support SETFORMAT command

Only old v0 is supported so far.

Related: OS#4006
Change-Id: If9fc22f9987238a5ff870df7718de4efc9e04289
---
M Transceiver52M/Transceiver.cpp
1 file changed, 14 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 6bbf3a3..080afd1 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -868,6 +868,20 @@
     mStates[chan].chanType[timeslot] = (ChannelCombination) corrCode;
     setModulus(timeslot, chan);
     sprintf(response,"RSP SETSLOT 0 %d %d",timeslot,corrCode);
+  } else if (match_cmd(command, "SETFORMAT", &params)) {
+    // set TRXD protocol version
+    unsigned version_recv;
+    sscanf(params, "%u", &version_recv);
+    LOGC(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;
+      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;
+      sprintf(response, "RSP SETFORMAT %u %u", version_recv, version_recv);
+    }
   } else if (match_cmd(command, "_SETBURSTTODISKMASK", &params)) {
     // debug command! may change or disapear without notice
     // set a mask which bursts to dump to disk

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: If9fc22f9987238a5ff870df7718de4efc9e04289
Gerrit-Change-Number: 14665
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190719/1bd31127/attachment.html>


More information about the gerrit-log mailing list