From 19cdfb4148338a94bdc75194e0fadad993c37758 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Mon, 27 Nov 2017 18:21:23 -0800 Subject: mpm: Reset periph manager on update Upon updating certain components (the FPGA, for example), the Peripheral Manager is restarted, and the overlay is reapplied. In order to facilitate this, the RPC server intercepts and handles the update_component function. Tested on the RJ45 ethernet connection. It probably won't work as well if the SFP connection goes down when the overlay is removed. --- mpm/python/usrp_mpm/periph_manager/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mpm/python/usrp_mpm/periph_manager/base.py') diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index 87544e451..2be8c7570 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -352,6 +352,13 @@ class PeriphManagerBase(object): self.log.trace("Resetting SID pool...") self._available_endpoints = list(range(256)) + def tear_down(self): + """ + Tear down all members that need to be specially handled before + deconstruction. + """ + self.log.debug("Teardown called for Peripheral Manager base.") + @no_claim def list_updateable_components(self): """ @@ -456,7 +463,6 @@ class PeriphManagerBase(object): update_func(filepath, metadata) return True - def load_fpga_image(self, target=None): """ load a new fpga image -- cgit v1.2.3