aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorLars Amsel <lars.amsel@ni.com>2020-02-13 11:02:32 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-06-03 09:34:37 -0500
commit60a147a6a16ced611ab1a7dfdb233d3bd01a0d65 (patch)
treedf6ffb7e1c4d30aa07b666ead7274092ebdc92fe /mpm
parent6cf75cf3386c03862b41726ae926eaf6baa7059d (diff)
downloaduhd-60a147a6a16ced611ab1a7dfdb233d3bd01a0d65.tar.gz
uhd-60a147a6a16ced611ab1a7dfdb233d3bd01a0d65.tar.bz2
uhd-60a147a6a16ced611ab1a7dfdb233d3bd01a0d65.zip
mpm: Remove helper classes from RPC API
All public callables are exported as part of the RPC API. Because classes are callable in Python they are now protected to prevent export. Having theses inner helper classes marked as protected also matches better their purpose as the are not meant to be used outside the class.
Diffstat (limited to 'mpm')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index a40f86d06..53426a615 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -57,7 +57,7 @@ class PeriphManagerBase(object):
be implemented here. Motherboard specific information can be stored in
separate motherboard classes derived from this class
"""
- class EepromSearch(Enum):
+ class _EepromSearch(Enum):
"""
List supported ways of searching EEPROM files.
"""
@@ -76,7 +76,7 @@ class PeriphManagerBase(object):
description = "MPM Device"
# EEPROM layout used by this class. Defaults to legacy which uses eeprom.py
# to read EEPROM data
- eeprom_search = EepromSearch.LEGACY
+ eeprom_search = _EepromSearch.LEGACY
# Address of the motherboard EEPROM. This could be something like
# "e0005000.i2c". This value will be passed to get_eeprom_paths() tos
# determine a full path to an EEPROM device.
@@ -365,15 +365,15 @@ class PeriphManagerBase(object):
This is a wrapper call to switch between the support EEPROM layouts.
"""
- if not self.eeprom_search in self.EepromSearch:
+ if not self.eeprom_search in self._EepromSearch:
self.log.warning("%s is not a valid EEPROM layout type. "
"Skipping readout.")
return
self._eeprom_head, self._eeprom_rawdata = {}, b""
- if self.eeprom_search == self.EepromSearch.LEGACY:
+ if self.eeprom_search == self._EepromSearch.LEGACY:
self._read_mboard_eeprom_legacy()
- elif self.eeprom_search == self.EepromSearch.SYMBOL:
+ elif self.eeprom_search == self._EepromSearch.SYMBOL:
self._read_mboard_eeprom_by_symbol()
self.log.trace("Found EEPROM metadata: `{}'"
@@ -546,21 +546,21 @@ class PeriphManagerBase(object):
"""
Read back EEPROM info from the daughterboards
"""
- if not self.eeprom_search in self.EepromSearch:
+ if not self.eeprom_search in self._EepromSearch:
self.log.warning("%s is not a valid EEPROM search type. "
"Skipping readout.")
return []
- if self.eeprom_search == self.EepromSearch.LEGACY:
+ if self.eeprom_search == self._EepromSearch.LEGACY:
return self._get_dboard_info_legacy()
- if self.eeprom_search == self.EepromSearch.SYMBOL:
+ if self.eeprom_search == self._EepromSearch.SYMBOL:
return self._get_dboard_info_by_symbol()
def _get_aux_board_info(self):
"""
Read back EEPROM info from all auxiliary boards
"""
- if self.eeprom_search == self.EepromSearch.LEGACY:
+ if self.eeprom_search == self._EepromSearch.LEGACY:
#legacy has no support for aux board EEPROM read
return {}
self.log.debug("Read aux boards EEPROMs")