pub struct DeviceState {
pub info: DeviceInfo,
pub hardware_id: HardwareId,
pub auth_level: u8,
pub adcqueue_enabled: bool,
}Expand description
Device state populated by initialization
Contains all information gathered during device init:
- Device info (model, versions, serials)
- Hardware ID (used for authentication)
- Authentication state
Fields§
§info: DeviceInfoDevice information (model, firmware, serials, etc.)
hardware_id: HardwareIdHardware ID used for authentication
auth_level: u8Authentication level (0 = not authenticated, 1+ = authenticated)
adcqueue_enabled: boolWhether AdcQueue streaming is enabled
Implementations§
Source§impl DeviceState
impl DeviceState
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if device is authenticated
Sourcepub fn firmware_version(&self) -> &str
pub fn firmware_version(&self) -> &str
Get firmware version
Trait Implementations§
Source§impl Clone for DeviceState
impl Clone for DeviceState
Source§impl Debug for DeviceState
impl Debug for DeviceState
Auto Trait Implementations§
impl Freeze for DeviceState
impl RefUnwindSafe for DeviceState
impl Send for DeviceState
impl Sync for DeviceState
impl Unpin for DeviceState
impl UnsafeUnpin for DeviceState
impl UnwindSafe for DeviceState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more