aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/base.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-08 19:23:28 -0800
committerMartin Braun <martin.braun@ettus.com>2018-02-07 14:04:30 -0800
commit852bf3aa10613e80a8b9434b2d69f967b53a2d97 (patch)
tree28800ad095553490d6df401c6ee3a6beaaa5676c /mpm/python/usrp_mpm/periph_manager/base.py
parent88ab35529b5be85654b4b00cd558bc083b692df4 (diff)
downloaduhd-852bf3aa10613e80a8b9434b2d69f967b53a2d97.tar.gz
uhd-852bf3aa10613e80a8b9434b2d69f967b53a2d97.tar.bz2
uhd-852bf3aa10613e80a8b9434b2d69f967b53a2d97.zip
mpm: n310: Return CHDR addresses as part of device_info
Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/base.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 303f7e805..69a20c369 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -407,13 +407,29 @@ class PeriphManagerBase(object):
@no_rpc
def get_device_info(self):
"""
- return the mboard_info dict and add a claimed field
+ Return the mboard_info dict and add a claimed field.
+
+ Will also call into get_device_info_dyn() for additional information.
+ Don't override this function.
"""
result = {"claimed": str(self.claimed)}
result.update(self.mboard_info)
+ result.update(self.get_device_info_dyn())
return result
@no_rpc
+ def get_device_info_dyn(self):
+ """
+ "Dynamic" device info getter. When get_device_info() is called, it
+ will also call into this function to see if there is 'dynamic' info
+ that needs to be returned. The reason to split up these functions is
+ because we don't want anyone to override get_device_info(), but we do
+ want periph managers to be able to inject custom device info data.
+ """
+ self.log.trace("Called get_device_info_dyn(), but not implemented.")
+ return {}
+
+ @no_rpc
def set_connection_type(self, conn_type):
"""
Specify how the RPC client has connected to this MPM instance. Valid