From 44b117be95dac3dd15c988e4e7d01b49f82d1a0c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 28 Nov 2017 18:29:39 -0800 Subject: mpm: mg: Add ref lock sensor Note: The sensor API for this lives in n310, but it queries the dboards for a ref lock status, which is now no longer a stub. --- mpm/python/usrp_mpm/dboard_manager/magnesium.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mpm/python/usrp_mpm/dboard_manager/magnesium.py') diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index e1301b699..ae854ec81 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -753,6 +753,21 @@ class Magnesium(DboardManagerBase): ########################################################################## # Sensors ########################################################################## + def get_ref_lock(self): + """ + Returns True if the LMK reference is locked. + + Note: This does not return a sensor dict. The sensor API call is + in the motherboard class. + """ + if self.lmk is None: + self.log.debug("LMK object not yet initialized, defaulting to " \ + "no ref locked!") + return False + lmk_lock_status = self.lmk.check_plls_locked() + self.log.trace("LMK lock status is: {}".format(lmk_lock_status)) + return lmk_lock_status + def get_lowband_lo_lock(self, which): """ Return LO lock status (Boolean!) of the lowband LOs. 'which' must be -- cgit v1.2.3