pub struct DeviceModelInfo {
pub entity_count: u8,
pub serial_number: Option<String>,
pub unit_id: [u8; 4],
pub transports: DeviceTransports,
pub model_ids: [u16; 3],
pub extended_model_id: u8,
}Expand description
HID++ DeviceInformation (feature 0x0003) snapshot used to identify a
device against external registries (e.g. the OpenLogi asset index).
model_ids is the per-transport PID array reported by the firmware,
ordered to match the transports flagged in Self::transports (USB,
eQuad, BTLE, Bluetooth) — slots that aren’t enabled stay 0. The Logi
Options+ asset registry’s modelId (e.g. "6b023") is the concatenation
of an extended-model byte and one of these PIDs, so callers usually want
to format extended_model_id + model_ids[N] to match.
Fields§
§entity_count: u8§serial_number: Option<String>HID++ DeviceInformation serial number, when the device supports the optional serial-number function.
unit_id: [u8; 4]§transports: DeviceTransports§model_ids: [u16; 3]§extended_model_id: u8Implementations§
Source§impl DeviceModelInfo
impl DeviceModelInfo
Sourcepub fn config_key(&self) -> String
pub fn config_key(&self) -> String
Stable identifier used to key per-device configuration (button bindings, etc.) and to look up assets in the OpenLogi asset registry.
Format: {extended_model_id:x}{model_ids[0]:04x} — the same string
the depot manifest.json uses for its modelId field. Example: an
MX Master 4 with extended_model_id = 0x02 and model_ids[0] = 0xb042
resolves to "2b042".
Trait Implementations§
Source§impl Clone for DeviceModelInfo
impl Clone for DeviceModelInfo
Source§fn clone(&self) -> DeviceModelInfo
fn clone(&self) -> DeviceModelInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more