diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-01 15:42:32 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-01 15:42:32 -0700 |
commit | e75919bc9e1cb1b5f8f69b5a5aabed9b3a1a53d9 (patch) | |
tree | 861b82a27b20e715aa81138baf26f4acd54f9895 /host/lib/usrp/usrp2/usrp2_iface.hpp | |
parent | 11e856ebca352af1b0444aec6d57ea61c0b48037 (diff) | |
download | uhd-e75919bc9e1cb1b5f8f69b5a5aabed9b3a1a53d9.tar.gz uhd-e75919bc9e1cb1b5f8f69b5a5aabed9b3a1a53d9.tar.bz2 uhd-e75919bc9e1cb1b5f8f69b5a5aabed9b3a1a53d9.zip |
usrp2: added the concept of device locking to usrp2/nseries devices
Each iface instance can lock itself to a particular device.
When the device is locked, it cannot be discovered through find.
Locking works by having a lock thread periodically update
a register in the firmware that says when the device was last locked.
The find routine can determine if a device is locked by checking
the difference between the current time and this register.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.hpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_iface.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp index 08f3955f1..e4d1a166b 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.hpp +++ b/host/lib/usrp/usrp2/usrp2_iface.hpp @@ -66,6 +66,12 @@ public: //! Get the canonical name for this device virtual const std::string get_cname(void) = 0; + //! Lock the device to this iface + virtual void lock_device(bool lock) = 0; + + //! Is this device locked? + virtual bool is_device_locked(void) = 0; + /*! * Register map selected from USRP2/USRP2+. */ |