Skip to content

Commit

Permalink
trx/radio_if.py: print type of RadioInterface
Browse files Browse the repository at this point in the history
Change-Id: I6c1ba8546caec122cd1ea0ed87656f691abec068
  • Loading branch information
axilirator committed Jan 22, 2019
1 parent 3120ba7 commit b6f6f47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/trx/radio_if.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,18 @@ class RadioInterface(gr.top_block):
# basically, the DL freq. of ARFCN 0
DUMMY_FREQ = 935e6

# Human-readable description
def __str__(self):
return "(generic)"

def __init__(self, phy_args, phy_sample_rate,
phy_rx_gain, phy_tx_gain, phy_ppm,
phy_rx_antenna, phy_tx_antenna,
phy_freq_offset, trx_bind_addr,
trx_remote_addr, trx_base_port):

print("[i] Init Radio interface (L:%s:%u <-> R:%s:%u)"
% (trx_bind_addr, trx_base_port + 2,
print("[i] Init %s Radio interface (L:%s:%u <-> R:%s:%u)"
% (self, trx_bind_addr, trx_base_port + 2,
trx_remote_addr, trx_base_port + 102))

# PHY specific variables
Expand Down
4 changes: 4 additions & 0 deletions python/trx/radio_if_uhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
from radio_if import RadioInterface

class RadioInterfaceUHD(RadioInterface):
# Human-readable description
def __str__(self):
return "UHD"

@property
def phy_proc_delay(self):
# FIXME: shall be measured (automatically?) for
Expand Down

0 comments on commit b6f6f47

Please sign in to comment.