pub struct DeviceData {Show 19 fields
pub device_type_id: u32,
pub serial_number: u32,
pub device_name: [u8; 30],
pub device_type_name: [u8; 30],
pub build_date: [u8; 12],
pub activation_code: [u8; 8],
pub firmware_version_major: u8,
pub firmware_version_minor: u8,
pub firmware_revision: u8,
pub user_id: u8,
pub device_type: u8,
pub activated_options: u8,
pub device_lock_status: u8,
pub hw_type: u8,
pub fw_type: u8,
pub product_id: u8,
pub secondary_firmware_version_major: u8,
pub secondary_firmware_version_minor: u8,
pub device_is_bootloader: u8,
}Expand description
Device-specific data
Fields§
§device_type_id: u32§serial_number: u32§device_name: [u8; 30]§device_type_name: [u8; 30]§build_date: [u8; 12]§activation_code: [u8; 8]§firmware_version_major: u8§firmware_version_minor: u8§firmware_revision: u8§user_id: u8§device_type: u8§activated_options: u8§device_lock_status: u8§hw_type: u8§fw_type: u8§product_id: u8§secondary_firmware_version_major: u8§secondary_firmware_version_minor: u8§device_is_bootloader: u8Implementations§
Source§impl DeviceData
Additional types for testing compatibility
impl DeviceData
Additional types for testing compatibility
pub fn device_locked(&self) -> bool
pub fn device_features(&self) -> u8
Sourcepub fn software_version_string(&self) -> String
pub fn software_version_string(&self) -> String
Parse and format the software version from bytes 5 and 6 of device data response Byte 5: bits 4-7 = major-1, bits 0-3 = minor Byte 6: revision number Returns formatted version string like “4.7.15”
pub fn device_name(&self) -> String
Sourcepub fn device_type_name(&self) -> String
pub fn device_type_name(&self) -> String
Get the device type name based on hardware ID, device_type_id, or extracted from device_name
Sourcepub fn build_date_string(&self) -> String
pub fn build_date_string(&self) -> String
Get the build date as a string
Trait Implementations§
Source§impl Clone for DeviceData
impl Clone for DeviceData
Source§fn clone(&self) -> DeviceData
fn clone(&self) -> DeviceData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceData
impl Debug for DeviceData
Source§impl Default for DeviceData
Default implementations for common types
impl Default for DeviceData
Default implementations for common types
Source§impl<'de> Deserialize<'de> for DeviceData
impl<'de> Deserialize<'de> for DeviceData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeviceData
impl RefUnwindSafe for DeviceData
impl Send for DeviceData
impl Sync for DeviceData
impl Unpin for DeviceData
impl UnwindSafe for DeviceData
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