MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

HIDAPIDeviceMBS.Close
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Close a HID device.
HIDAPIDeviceMBS.Constructor
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: The private constructor.
HIDAPIDeviceMBS.GetFeatureReport(ReportID as Integer, MaxLength as Integer) as MemoryBlock
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Get a feature report from a HID device.
Notes:
Set the first byte of Data to the Report ID of the report to be read. Make sure to allow space for this extra byte in data. Upon return, the first byte will still contain the Report ID, and the report data will start in data.UInt8(1).

ReportID: The report ID to read.

This function returns the number of bytes read plus one for the report ID (which is still in the first byte), or -1 on error.
HIDAPIDeviceMBS.IndexedString(Index as Integer, MaxLen as Integer = 1024) as String
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Get a string from a HID device, based on its string index.
Notes:
Index: The index of the string to get.
maxlen: The maximum length for read buffer.
Returns text read.
HIDAPIDeviceMBS.Read(MaxLength as Integer) as MemoryBlock
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Read an Input report from a HID device.
Notes:
Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.

MaxLength: The number of bytes to read. For devices with multiple reports, make sure to read an extra byte for the report number.

This function returns the actual number of bytes read and -1 on error. If no packet was available to be read and the handle is in non-blocking mode, this function returns 0.
HIDAPIDeviceMBS.ReadTimeOut(MaxLength as Integer, TimeoutMS as Integer) as MemoryBlock
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Read an Input report from a HID device with timeout.
Notes:
Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.

MaxLength: The number of bytes to read. For devices with multiple reports, make sure to read an extra byte for the report number.

TimeoutMS: timeout in milliseconds or -1 for blocking wait.

This function returns the actual number of bytes read and -1 on error. If no packet was available to be read within the timeout period, this function returns 0.
HIDAPIDeviceMBS.SendFeatureReport(data as MemoryBlock) as Integer
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Send a Feature report to the device.
Notes:
Feature reports are sent over the Control endpoint as a Set_Report transfer. The first byte of Data must contain the Report ID. For devices which only support a single report, this must be set to 0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to SendFeatureReport() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to SendFeatureReport(): the Report ID (or 0, for devices which do not use numbered reports), followed by the report data (16 bytes). In this example, the length passed in would be 17.

dat:a The data to send, including the report number as the first byte.

This function returns the actual number of bytes written and -1 on error.

See also:

HIDAPIDeviceMBS.SendFeatureReport(data as String) as Integer
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Send a Feature report to the device.
Notes:
Feature reports are sent over the Control endpoint as a Set_Report transfer. The first byte of Data must contain the Report ID. For devices which only support a single report, this must be set to 0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to SendFeatureReport() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to SendFeatureReport(): the Report ID (or 0, for devices which do not use numbered reports), followed by the report data (16 bytes). In this example, the length passed in would be 17.

dat:a The data to send, including the report number as the first byte.

This function returns the actual number of bytes written and -1 on error.

See also:

HIDAPIDeviceMBS.Write(data as MemoryBlock) as Integer
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Write an Output report to a HID device.
Notes:
The first byte of data must contain the Report ID. For devices which only support a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to Write() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to Write(), the Report ID (or 0x0, for devices with a single report), followed by the report data (16 bytes). In this example, the length passed in would be 17.
Write() will send the data on the first OUT endpoint, if one exists. If it does not, it will send the data through the Control Endpoint (Endpoint 0).

data: The data to send, including the report number as the first byte.

This function returns the actual number of bytes written and -1 on error.

See also:

HIDAPIDeviceMBS.Write(data as String) as Integer
method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Write an Output report to a HID device.
Notes:
The first byte of data must contain the Report ID. For devices which only support a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to Write() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to Write(), the Report ID (or 0x0, for devices with a single report), followed by the report data (16 bytes). In this example, the length passed in would be 17.
Write() will send the data on the first OUT endpoint, if one exists. If it does not, it will send the data through the Control Endpoint (Endpoint 0).

data: The data to send, including the report number as the first byte.

This function returns the actual number of bytes written and -1 on error.

See also:

The items on this page are in the following plugins: MBS USB Plugin.




Links
MBS Real Studio Plugins