From 95025a2389760c411f2ff4a0cc0f6534152afdee Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 15 Jan 2019 03:47:57 +0700 Subject: 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 --- src/target/trx_toolkit/README | 5 +++++ src/target/trx_toolkit/ctrl_cmd.py | 4 ++-- src/target/trx_toolkit/ctrl_if.py | 4 ++-- src/target/trx_toolkit/data_if.py | 2 +- src/target/trx_toolkit/transceiver.py | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/target') diff --git a/src/target/trx_toolkit/README b/src/target/trx_toolkit/README index 91b6099b..09800b0a 100644 --- a/src/target/trx_toolkit/README +++ b/src/target/trx_toolkit/README @@ -32,3 +32,8 @@ Brief description of available applications: 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 28815c28..bdacb64e 100755 --- a/src/target/trx_toolkit/ctrl_cmd.py +++ b/src/target/trx_toolkit/ctrl_cmd.py @@ -51,7 +51,7 @@ class Application(ApplicationBase): 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 @@ class Application(ApplicationBase): 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 a1c19f02..902af18c 100644 --- a/src/target/trx_toolkit/ctrl_if.py +++ b/src/target/trx_toolkit/ctrl_if.py @@ -29,7 +29,7 @@ from udp_link import UDPLink 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 @@ class CTRLInterface(UDPLink): 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 b1ba1e56..027fd854 100644 --- a/src/target/trx_toolkit/data_if.py +++ b/src/target/trx_toolkit/data_if.py @@ -30,7 +30,7 @@ from data_msg import * 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 4eb210bd..b15c10fe 100644 --- a/src/target/trx_toolkit/transceiver.py +++ b/src/target/trx_toolkit/transceiver.py @@ -180,13 +180,13 @@ class Transceiver: # 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 -- cgit v1.2.3