Class HIDParser | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class HIDParser

    Turns binary HID descriptors into HID.HIDDeviceDescriptor instances.

    Inheritance
    System.Object
    HIDParser
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.Input.Plugins.HID
    Syntax
    public static class HIDParser
    Remarks

    For information about the format, see the Device Class Definition for Human Interface Devices section 6.2.2.

    Methods

    ParseReportDescriptor(Byte*, Int32, ref HID.HIDDeviceDescriptor)

    Declaration
    public static bool ParseReportDescriptor(byte *bufferPtr, int bufferLength, ref HID.HIDDeviceDescriptor deviceDescriptor)
    Parameters
    Type Name Description
    System.Byte* bufferPtr
    System.Int32 bufferLength
    HID.HIDDeviceDescriptor deviceDescriptor
    Returns
    Type Description
    System.Boolean

    ParseReportDescriptor(Byte[], ref HID.HIDDeviceDescriptor)

    Parse a HID report descriptor as defined by section 6.2.2 of the HID specification and add the elements and collections from the descriptor to the given deviceDescriptor.

    Declaration
    public static bool ParseReportDescriptor(byte[] buffer, ref HID.HIDDeviceDescriptor deviceDescriptor)
    Parameters
    Type Name Description
    System.Byte[] buffer

    Buffer containing raw HID report descriptor.

    HID.HIDDeviceDescriptor deviceDescriptor

    HID device descriptor to complete with the information from the report descriptor. Elements and collections will get added to this descriptor.

    Returns
    Type Description
    System.Boolean

    True if the report descriptor was successfully parsed.

    Remarks

    Will also set inputReportSize, outputReportSize, and featureReportSize.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023