pub struct DeviceInfo {
pub model: String,
pub hw_version: String,
pub mfg_date: String,
pub fw_version: String,
pub fw_date: String,
pub serial_id: String,
pub uuid: String,
}Expand description
Device information parsed from memory blocks
Fields§
§model: StringModel name (e.g., “KM003C”)
hw_version: StringHardware version (e.g., “2.1”)
mfg_date: StringManufacturing date (e.g., “2022.11.7”)
fw_version: StringFirmware version (e.g., “1.9.9”)
fw_date: StringFirmware build date (e.g., “2025.9.22”)
serial_id: StringSerial ID from calibration (e.g., “007965”)
uuid: StringUUID/hash from calibration
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn parse_device_info(&mut self, data: &[u8])
pub fn parse_device_info(&mut self, data: &[u8])
Parse DeviceInfo1 block (64 bytes from 0x420)
Layout:
- 0x00-0x0F: reserved
- 0x10-0x1B: model (12 bytes, null-terminated)
- 0x1C-0x27: hw_version (12 bytes, null-terminated)
- 0x28-0x3F: mfg_date (24 bytes, null-terminated)
Sourcepub fn parse_firmware_info(&mut self, data: &[u8])
pub fn parse_firmware_info(&mut self, data: &[u8])
Parse FirmwareInfo block (64 bytes from 0x4420)
Layout:
- 0x00-0x03: magic (0x00004000 or 0xFFFFFFFF if invalid)
- 0x10-0x1B: model (12 bytes)
- 0x1C-0x27: fw_version (12 bytes, null-terminated)
- 0x28-0x33: fw_date (12 bytes, null-terminated)
Sourcepub fn parse_calibration(&mut self, data: &[u8])
pub fn parse_calibration(&mut self, data: &[u8])
Parse CalibrationData block (64 bytes from 0x3000C00)
Layout:
- 0x00-0x06: serial_id (7 bytes, space-padded)
- 0x07-0x26: UUID (32 bytes hex string)
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§impl Debug for DeviceInfo
impl Debug for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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