This interface is implemented by HID Session object and allows you to construct HID reports to be sent to the device.
interface IHIDBuilder {
// Methods
${setData}(reportType: ${HID.ReportType}, data: ${IHIDData}[]): Uint8Array;
${setUsageValue}(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, v: number): Uint8Array;
${setScaledUsageValue}(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, v: number): Uint8Array;
${setUsageValueArray}(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, data: Uint8Array): Uint8Array;
${setUsages}(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
${setButtons}(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
${unsetUsages}(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
${unsetButtons}(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
}
// This interface is not available in managed environment
// This interface is not available in native environment
setData(reportType: ${HID.ReportType}, data: ${IHIDData}[]): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypedataSets a specified set of HID control button and value usages in a HID report.
setUsageValue(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, v: number): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePageusagelinkCollectionlinkCollection is nonzero, the routine only sets the usage, if one exists, in this link collection. If linkCollection is zero, the routine sets the first usage it finds in the top-level collection.vSets a HID control value in a specified HID report.
setScaledUsageValue(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, v: number): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePageusagelinkCollectionlinkCollection is nonzero, the routine only sets the usage, if one exists, in this link collection. If linkCollection is zero, the routine sets the first usage it finds in the top-level collection.vConverts a signed and scaled physical number to a HID usage's logical value, and sets the usage value in a specified HID report.
setUsageValueArray(reportType: ${HID.ReportType}, usagePage: number, usage: number, linkCollection: number, data: Uint8Array): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePageusagelinkCollectionlinkCollection is nonzero, the routine only sets the usage, if one exists, in this link collection. If linkCollection is zero, the routine sets the first usage it finds in the top-level collection.dataSets a HID control usage value array in a specified HID report.
setUsages(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePagelinkCollectionlinkCollection is nonzero, the routine only sets the usages, if they exist, in this link collection. If linkCollection is zero, the routine sets the first usage for each specified usage in the top-level collection.dataSets specified HID control buttons ON (1) in a HID report.
setButtons(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePagelinkCollectionlinkCollection is nonzero, the routine only sets the usages, if they exist, in this link collection. If linkCollection is zero, the routine sets the first usage for each specified usage in the top-level collection.dataSets specified HID control buttons ON (1) in a HID report.
unsetUsages(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePagelinkCollectionlinkCollection is nonzero, the routine only sets the usages, if they exist, in this link collection. If linkCollection is zero, the routine sets the first usage for each specified usage in the top-level collection.dataSets specified HID control button usages OFF (zero) in a HID report.
unsetButtons(reportType: ${HID.ReportType}, usagePage: number, linkCollection: number, data: number[] | Uint16Array): Uint8Array;
// This method is not available in managed environment
// This method is not available in native environment
reportTypeusagePagelinkCollectionlinkCollection is nonzero, the routine only sets the usages, if they exist, in this link collection. If linkCollection is zero, the routine sets the first usage for each specified usage in the top-level collection.dataSets specified HID control button usages OFF (zero) in a HID report.