---
title: "init(element:fromBytes:timestamp:)"
framework: corehid
role: symbol
role_heading: Initializer
path: "corehid/hidelement/value/init(element:frombytes:timestamp:)"
---

# init(element:fromBytes:timestamp:)

Creates a value for an HID element.

## Declaration

```swift
init(element: HIDElement, fromBytes: Data, timestamp: SuspendingClock.Instant)
```

## Parameters

- `element`: The element associated with this data.
- `fromBytes`: The data as an array of bytes.
- `timestamp`: The time that the value was created.

## Discussion

Discussion The created value can be used to send a request to the associated device to update it’s current value for the element using HIDDeviceClient.ProvideElementUpdate.

## See Also

### Create a HID element from a value

- [init(element:fromPhysicalValue:timestamp:)](corehid/hidelement/value/init(element:fromphysicalvalue:timestamp:).md)
- [init(element:fromLogicalValueTruncatingIfNeeded:timestamp:)](corehid/hidelement/value/init(element:fromlogicalvaluetruncatingifneeded:timestamp:).md)
- [init(element:fromIntegerTruncatingIfNeeded:timestamp:)](corehid/hidelement/value/init(element:fromintegertruncatingifneeded:timestamp:).md)
- [element](corehid/hidelement/value/element.md)
