Change in osmocom-bb[master]: trx_toolkit: use 'TRXC' and 'TRXD' in logging messages

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

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon Jan 14 23:52:33 UTC 2019


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12560 )

Change subject: trx_toolkit: use 'TRXC' and 'TRXD' in logging messages
......................................................................

trx_toolkit: use 'TRXC' and 'TRXD' in logging messages

One can confuse TRX control interface with libosmoctrl's one.
TRX toolkit is not using libosmoctrl, and will never do. But,
in order to avoid this confusion, and potential confusion of
DATA interface, let's call them 'TRXC' and 'TRXD' in logging.

Change-Id: I67b1e850094cf8e279777c45c7544886be42a009
---
M src/target/trx_toolkit/README
M src/target/trx_toolkit/ctrl_cmd.py
M src/target/trx_toolkit/ctrl_if.py
M src/target/trx_toolkit/data_if.py
M src/target/trx_toolkit/transceiver.py
5 files changed, 12 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/target/trx_toolkit/README b/src/target/trx_toolkit/README
index 91b6099..09800b0 100644
--- a/src/target/trx_toolkit/README
+++ b/src/target/trx_toolkit/README
@@ -32,3 +32,8 @@
     versa. Also provides some capabilities for filtering bursts
     by direction, frame and timeslot numbers, and for recording
     captured messages to a binary file.
+
+Please note that TRX toolkit is not using libosmocore's CTRL
+interface, so 'CTRL' in scope of this code base actually means
+control interface of TRX or control protocol. In order to avoid
+possible confusion, we use 'TRXC' and 'TRXD' in logging.
diff --git a/src/target/trx_toolkit/ctrl_cmd.py b/src/target/trx_toolkit/ctrl_cmd.py
index 28815c2..bdacb64 100755
--- a/src/target/trx_toolkit/ctrl_cmd.py
+++ b/src/target/trx_toolkit/ctrl_cmd.py
@@ -51,7 +51,7 @@
 			self.argv.bind_addr, self.argv.bind_port)
 
 		# Debug print
-		log.info("Init CTRL interface (%s)" \
+		log.info("Init TRXC interface (%s)" \
 			% self.ctrl_link.desc_link())
 
 	def parse_argv(self):
@@ -109,7 +109,7 @@
 			self.ctrl_link.send("CMD %s\0" % cmd)
 
 	def print_prompt(self):
-		sys.stdout.write("CTRL# ")
+		sys.stdout.write("TRXC# ")
 		sys.stdout.flush()
 
 	def sig_handler(self, signum, frame):
diff --git a/src/target/trx_toolkit/ctrl_if.py b/src/target/trx_toolkit/ctrl_if.py
index a1c19f0..902af18 100644
--- a/src/target/trx_toolkit/ctrl_if.py
+++ b/src/target/trx_toolkit/ctrl_if.py
@@ -29,7 +29,7 @@
 class CTRLInterface(UDPLink):
 	def __init__(self, *udp_link_args):
 		UDPLink.__init__(self, *udp_link_args)
-		log.debug("Init CTRL interface (%s)" % self.desc_link())
+		log.debug("Init TRXC interface (%s)" % self.desc_link())
 
 	def handle_rx(self):
 		# Read data from socket
@@ -37,7 +37,7 @@
 		data = data.decode()
 
 		if not self.verify_req(data):
-			log.error("Wrong data on CTRL interface")
+			log.error("Wrong data on TRXC interface")
 			return
 
 		# Attempt to parse a command
diff --git a/src/target/trx_toolkit/data_if.py b/src/target/trx_toolkit/data_if.py
index b1ba1e5..027fd85 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -30,7 +30,7 @@
 class DATAInterface(UDPLink):
 	def __init__(self, *udp_link_args):
 		UDPLink.__init__(self, *udp_link_args)
-		log.debug("Init DATA interface (%s)" % self.desc_link())
+		log.debug("Init TRXD interface (%s)" % self.desc_link())
 
 	def recv_raw_data(self):
 		data, _ = self.sock.recvfrom(512)
diff --git a/src/target/trx_toolkit/transceiver.py b/src/target/trx_toolkit/transceiver.py
index 4eb210b..b15c10f 100644
--- a/src/target/trx_toolkit/transceiver.py
+++ b/src/target/trx_toolkit/transceiver.py
@@ -180,13 +180,13 @@
 
 		# Make sure that transceiver is configured and running
 		if not self.running:
-			log.warning("(%s) RX DATA message (%s), but transceiver "
+			log.warning("(%s) RX TRXD message (%s), but transceiver "
 				"is not running => dropping..." % (self, msg.desc_hdr()))
 			return None
 
 		# Make sure that indicated timeslot is configured
 		if msg.tn not in self.ts_list:
-			log.warning("(%s) RX DATA message (%s), but timeslot is not "
+			log.warning("(%s) RX TRXD message (%s), but timeslot is not "
 				"configured => dropping..." % (self, msg.desc_hdr()))
 			return None
 

-- 
To view, visit https://gerrit.osmocom.org/12560
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I67b1e850094cf8e279777c45c7544886be42a009
Gerrit-Change-Number: 12560
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190114/47157cdc/attachment.htm>


More information about the gerrit-log mailing list