<!--
{
  "availability" : [
    "driverkit: 19.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HIDDriverKit",
  "identifier" : "/documentation/HIDDriverKit/IOHIDElement/getDataValue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HIDDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOHIDElement@F@getDataValue#i#"
  },
  "title" : "getDataValue"
}
-->

# getDataValue

Gets the data value.

```
virtual OSData * getDataValue(IOOptionBits options);
```

## Parameters

`options`

Optional options to pass in. Options are defined in the IOHIDValueOptions enumerator in - [`IOHIDValueOptions`](/documentation/HIDDriverKit/IOHIDValueOptions).

## Return Value

Returns an OSData representation of the element value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)