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
This commit is contained in:
Vadim Yanitskiy 2019-01-15 03:47:57 +07:00
parent 6b040c6e06
commit 95025a2389
5 changed files with 12 additions and 7 deletions

View File

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

View File

@ -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):

View File

@ -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

View File

@ -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)

View File

@ -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