HIDElement.Value
Data associated with a HID element.
Declaration
struct ValueMentioned in
Overview
Elements can have data associated with them. This data could be received as an update from the device to indicate user interaction, or could be provided to the device to alter functionality, such as turning on an LED. As the data for an element could be constantly changing, values should be seen as a snapshot of the element’s data at a specific time, and not valid at any other times.
Element values can be received by a HIDDeviceClient using HIDDeviceClient.Notification.elementUpdates(values:) after the device issues an input report, or requested from the device by providing a HIDDeviceClient.RequestElementUpdate to updateElements(_:timeout:). Element values can be sent to a device by providing a HIDDeviceClient.ProvideElementUpdate to updateElements(_:timeout:).
Topics
Create a HID element from a value
init(element:fromBytes:timestamp:)init(element:fromPhysicalValue:timestamp:)init(element:fromLogicalValueTruncatingIfNeeded:timestamp:)init(element:fromIntegerTruncatingIfNeeded:timestamp:)element