diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-11-16 16:41:32 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:07 -0800 |
commit | b14cafd90c84e69cdb77aec2d8553c4d45213b8f (patch) | |
tree | 31207b8e54653391c9ebe2663ac4136691089507 /mpm/python/usrp_mpm/dboard_manager/magnesium.py | |
parent | 688247e5451216e82c3817e75d0c2bcfb70488c9 (diff) | |
download | uhd-b14cafd90c84e69cdb77aec2d8553c4d45213b8f.tar.gz uhd-b14cafd90c84e69cdb77aec2d8553c4d45213b8f.tar.bz2 uhd-b14cafd90c84e69cdb77aec2d8553c4d45213b8f.zip |
mpm: mg: Add dboard sensors for low- and highband LO lock status
- Add LO locked APIs to Magnesium
- Add LO locked sensor APIs for RX/TX and highband/lowband LOs
- Poll all those sensors from magnesium_radio_ctrl_impl
Reviewed-By: Steven Bingler <steven.bingler@ni.com>
Reviewed-By: Trung Tran <trung.tran@ettus.com>
Diffstat (limited to 'mpm/python/usrp_mpm/dboard_manager/magnesium.py')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/magnesium.py | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index 1e24eb046..d3c8c0bb6 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -722,11 +722,19 @@ class Magnesium(DboardManagerBase): either 'tx' or 'rx' """ assert which.lower() in ('tx', 'rx') - return self.cpld.get_lo_lock_status(which) + return self.cpld.get_lo_lock_status(which.upper()) - def get_lowband_tx_lo_locked_sensor(self): + def get_ad9371_lo_lock(self, which): + """ + Return LO lock status (Boolean!) of the lowband LOs. 'which' must be + either 'tx' or 'rx' + """ + return self.mykonos.get_lo_locked(which.upper()) + + def get_lowband_tx_lo_locked_sensor(self, chan): " TX lowband LO lock sensor " - self.log.trace("Querying TX lowband LO lock status...") + self.log.trace("Querying TX lowband LO lock status for chan %d...", + chan) lock_status = self.get_lowband_lo_lock('tx') return { 'name': 'lowband_lo_locked', @@ -735,9 +743,10 @@ class Magnesium(DboardManagerBase): 'value': str(lock_status).lower(), } - def get_lowband_rx_lo_locked_sensor(self): + def get_lowband_rx_lo_locked_sensor(self, chan): " RX lowband LO lock sensor " - self.log.trace("Querying RX lowband LO lock status...") + self.log.trace("Querying RX lowband LO lock status for chan %d...", + chan) lock_status = self.get_lowband_lo_lock('rx') return { 'name': 'lowband_lo_locked', @@ -746,10 +755,10 @@ class Magnesium(DboardManagerBase): 'value': str(lock_status).lower(), } - def get_ad9371_tx_lo_locked_sensor(self): + def get_ad9371_tx_lo_locked_sensor(self, chan): " TX ad9371 LO lock sensor " - self.log.trace("Querying TX AD9371 LO lock status...") - lock_status = True # FIXME + self.log.trace("Querying TX AD9371 LO lock status for chan %d...", chan) + lock_status = self.get_ad9371_lo_lock('tx') return { 'name': 'ad9371_lo_locked', 'type': 'BOOLEAN', @@ -757,10 +766,10 @@ class Magnesium(DboardManagerBase): 'value': str(lock_status).lower(), } - def get_ad9371_rx_lo_locked_sensor(self): + def get_ad9371_rx_lo_locked_sensor(self, chan): " RX ad9371 LO lock sensor " - self.log.trace("Querying RX AD9371 LO lock status...") - lock_status = True # FIXME + self.log.trace("Querying RX AD9371 LO lock status for chan %d...", chan) + lock_status = self.get_ad9371_lo_lock('tx') return { 'name': 'ad9371_lo_locked', 'type': 'BOOLEAN', |