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.Enumerate(VendorID as Integer = 0, ProduceID as Integer = 0) as HIDAPIDeviceInfoMBS
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Enumerate the HID Devices.
Notes: This function returns a linked list of all the HID devices attached to the system which match VendorID and ProduceID. If VendorID is set to 0 then any vendor matches. If ProduceID is set to 0 then any product matches. If VendorID and ProduceID are both set to 0, then all HID devices will be returned.
HIDAPIDeviceMBS.Init as Integer
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Initialize the HIDAPI library.
Notes:
This function initializes the HIDAPI library. Calling it is not strictly necessary, as it will be called automatically by Enumerate() and any of the Open*() functions if it is needed. This function should be called at the beginning of execution however, if there is a chance of HIDAPI handles being opened by different threads simultaneously.
This function returns 0 on success and -1 on error.
HIDAPIDeviceMBS.LoadError as String
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: The load error message.
HIDAPIDeviceMBS.LoadLibrary(File as FolderItem) as boolean
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Loads the library.
Notes:
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).

See also:

HIDAPIDeviceMBS.LoadLibrary(Path as string) as boolean
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Loads the library.
Notes:
Returns true on success.
You can load a custom libhidapi.dylib (Mac), libhidapi.so (Linux) or libhidapi.dll (Windows).

See also:

HIDAPIDeviceMBS.Open(VendorID as Integer, ProduceID as Integer, SerialNumber as String = "") as HIDAPIDeviceMBS
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
Notes:
If SerialNumber is "", the first device with the specified VID and PID is opened.
VendorID: The Vendor ID (VID) of the device to open.
ProduceID: The Product ID (PID) of the device to open.
SerialNumber: The Serial Number of the device to open (Optionally "").

This function returns a pointer to a HIDAPIDeviceMBS object on success or nil on failure.
HIDAPIDeviceMBS.OpenPath(path as string) as HIDAPIDeviceMBS
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Open a HID device by its path name.
Notes:
The path name be determined by calling Enumerate(), or a platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
Path: The path name of the device to open
This function returns a pointer to a HIDAPIDeviceMBS object on success or nil on failure.
HIDAPIDeviceMBS.Shutdown as Integer
shared method, USB, MBS USB Plugin (HIDAPI), class HIDAPIDeviceMBS,
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Finalize the HIDAPI library.
Notes:
This function frees all of the static data associated with HIDAPI. It should be called at the end of execution to avoid memory leaks.
This function returns 0 on success and -1 on error.

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




Links
MBS Realbasic PDF Plugins