Change in osmo-trx[master]: Transceiver: Log when sending of CLK indications begins

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri May 22 10:32:14 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/18395 )


Change subject: Transceiver: Log when sending of CLK indications begins
......................................................................

Transceiver: Log when sending of CLK indications begins

When the logging category TRXCLK is set to info osmo-trx prints a
logline that informs about the sending of clock indications. In practice
this those log lines are often used to identify that osmo-trx and
osmo-bts are running properly, so it would be helpful, even in
productive use, if there would be an information in the log that the
sending of clock indications has begun. However, the regular printing of
the clock indication log line would soon flood the log. So, lets have an
addional log line that logs only once when the transceiver starts and
quickly informs at loglevel NOTICE that clock indications are now sent.

Change-Id: I6aa88943b76c9a2bf7aed60d6a3d325c1f27820a
Related: OS#2577
---
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
2 files changed, 11 insertions(+), 1 deletion(-)



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

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index d9bda1d..1af3e15 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -278,6 +278,8 @@
 {
   ScopedLock lock(mLock);
 
+  mClkIndSent = false;
+
   if (mOn) {
     LOG(ERR) << "Transceiver already running";
     return true;
@@ -1166,7 +1168,11 @@
 {
   int msgLen;
   char command[50];
-  // FIXME -- This should be adaptive.
+
+  if (!mClkIndSent)
+    LOGC(DTRXCLK, NOTICE) << "Sending CLOCK indications";
+  mClkIndSent = true;
+
   sprintf(command,"IND CLOCK %llu",(unsigned long long) (mTransmitDeadlineClock.FN()+2));
 
   LOGC(DTRXCLK, INFO) << "sending " << command;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 6e0d157..99d5b6c 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -273,6 +273,10 @@
   void reset();
 
   void logRxBurst(size_t chan, const struct trx_ul_burst_ind *bi);
+
+  /* Needed for logging only */
+  bool mClkIndSent;
+
 };
 
 void *RxUpperLoopAdapter(TrxChanThParams *params);

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6aa88943b76c9a2bf7aed60d6a3d325c1f27820a
Gerrit-Change-Number: 18395
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200522/83784d85/attachment.htm>


More information about the gerrit-log mailing list