aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/e31x.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2022-07-04 14:33:51 +0200
committerskooNI <60897865+skooNI@users.noreply.github.com>2022-07-20 15:57:20 -0500
commit54990c55f8ca4568c3281325636f15d02bb31f3f (patch)
treee2b5d06fd327ba21ead9ebf5ae54094898c45b21 /mpm/python/usrp_mpm/periph_manager/e31x.py
parent807e19c107fcc316988b8f58a16a5b5613d3354f (diff)
downloaduhd-54990c55f8ca4568c3281325636f15d02bb31f3f.tar.gz
uhd-54990c55f8ca4568c3281325636f15d02bb31f3f.tar.bz2
uhd-54990c55f8ca4568c3281325636f15d02bb31f3f.zip
mpm: Factor out transport API into PeriphManagerBase
All MPM devices use identical implementations of the transport API. Minor differences between the actual lines of code in the various transport adapters are due to minor optimizations, such as hard-coding 'udp' as the only valid transport type for the N3xx series. This change moves the implementation of the transport API calls (get_chdr_link_options() and get_chdr_link_types()) into PeriphManagerBase. The class attributes _xport_adapter_mgrs is also declared in that class, but defining them is left up to the individual device implementations.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/e31x.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/e31x.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/e31x.py b/mpm/python/usrp_mpm/periph_manager/e31x.py
index 4d5e8f3cd..beda96822 100644
--- a/mpm/python/usrp_mpm/periph_manager/e31x.py
+++ b/mpm/python/usrp_mpm/periph_manager/e31x.py
@@ -393,8 +393,6 @@ class e31x(ZynqComponents, PeriphManagerBase):
self._do_not_reload = \
str2bool(args.get("no_reload_fpga")) or args.get("no_reload_fpga") == ""
result = super(e31x, self).init(args)
- for xport_mgr in itervalues(self._xport_mgrs):
- xport_mgr.init(args)
return result
def apply_idle_overlay(self):
@@ -434,8 +432,6 @@ class e31x(ZynqComponents, PeriphManagerBase):
"Cannot run deinit(), device was never fully initialized!")
return
super(e31x, self).deinit()
- for xport_mgr in itervalues(self._xport_mgrs):
- xport_mgr.deinit()
if not self._do_not_reload:
self.tear_down()
# Reset back to value from _default_args (mpm.conf)
@@ -473,31 +469,6 @@ class e31x(ZynqComponents, PeriphManagerBase):
self.log.trace("Found idle overlay: %s", idle_overlay)
return is_idle
-
- ###########################################################################
- # Transport API
- ###########################################################################
- def get_chdr_link_types(self):
- """
- See PeriphManagerBase.get_chdr_link_types() for docs.
- """
- assert self.mboard_info['rpc_connection'] in ('remote', 'local')
- return ["udp"]
-
- def get_chdr_link_options(self, xport_type):
- """
- See PeriphManagerBase.get_chdr_link_options() for docs.
- """
- if xport_type not in self._xport_mgrs:
- self.log.warning("Can't get link options for unknown link type: `{}'."
- .format(xport_type))
- return []
- if xport_type == "udp":
- return self._xport_mgrs[xport_type].get_chdr_link_options(
- self.mboard_info['rpc_connection'])
- # else:
- return self._xport_mgrs[xport_type].get_chdr_link_options()
-
###########################################################################
# Device info
###########################################################################