Skip to main content

Module device

Module device 

Source
Expand description

Serializable device-model types.

These mirror the HID++ types from the hidpp crate but live here so the CLI and any future GUI can depend on them without dragging in the protocol crate or its async transport.

Structs§

BatteryInfo
Battery snapshot for one paired device, as last polled over HID++.
Capabilities
What a device can be configured to do, derived from the HID++ feature table it reports (feature 0x0001). This is the source of truth for which configuration panels the UI offers — a panel shows iff the device exposes the feature that drives it. Gating on capability rather than on DeviceKind is what keeps a misclassified device from losing its panels (issue #127): kind is an identity guess, capability is what the firmware actually announced.
DeviceInventory
One receiver and its paired devices — the unit the agent’s inventory snapshot is made of.
DeviceModelInfo
HID++ DeviceInformation (feature 0x0003) snapshot used to identify a device against external registries (e.g. the OpenLogi asset index).
DeviceTransports
Mirror of hidpp’s DeviceTransport bitfield — one bool per protocol the device firmware exposes. The shape is dictated by HID++ feature 0x0003; a state machine doesn’t fit since a single device can announce multiple transports simultaneously.
PairedDevice
One device in the agent’s inventory snapshot: a receiver pairing slot, or a direct (Bluetooth/wired) attachment under its synthetic ReceiverInfo. Embedded in DeviceInventory, so its field order is IPC wire format — see that type’s contract.
ReceiverInfo
Identity of an enumerated receiver — no paired-device state (that lives in DeviceInventory::paired). For a direct (Bluetooth/wired) device, a synthetic entry mirroring the device’s own HID identity fills this role.

Enums§

BatteryLevel
Coarse battery bucket reported by the device firmware.
BatteryStatus
Charging state. Mirrors hidpp 0.2’s BatteryStatus plus Unknown for values added in future protocol versions.
DeviceKind
What a paired peripheral is. Mirrors hidpp::receiver::bolt::BoltDeviceKind but is owned by us so consumers don’t depend on hidpp.