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

LinuxHIDInterfaceMBS.Close as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Closes the device.
Notes: Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.DumpTreeToStderr as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Dumps the device tree to stderr.
Example:
dim h as LinuxHIDInterfaceMBS
// open device
call h.DumpTreeToStderr
Notes: Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.DumpTreeToStdout as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Dumps the device tree to stdout.
Example:
dim h as LinuxHIDInterfaceMBS
// open device
call h.DumpTreeToStdout
Notes: Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.ForceOpen(theInterface as integer, Vendor as integer, Product as integer, retries as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Opens the USB device with the given interface index, vendor and product codes.
Example:
dim h as new LinuxHIDInterfaceMBS

const vendor = &h7C0
const product = &h1500
const retries = 3

dim e as integer = h.ForceOpen(0, vendor, product, retries)
Notes:
Vendor or Product code can be kMatchAny (0) to match all devices.
You can use the MatchDevice event to learn which devices are there and return true there to select one.
Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.GetInputReport(path() as integer, data as memoryblock, offset as integer, size as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Reads an input report.
Notes:
Path: The path to the endpoint.
Data: the memoryblock to store the data.
Offset: The offset where to start inside the memoryblock.
Size: the length of the data int he memoryblock.

Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.InterruptRead(EndPoint as integer, mem as memoryblock, size as integer, timeout as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Reads data from an endpoint with timeout.
Notes:
EndPoint: The index of the endpoint.
mem: the memoryblock where to store the data.
size: the length of the data block to read.
timeout: the timeout in milliseconds.

Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.InterruptWrite(EndPoint as integer, mem as memoryblock, size as integer, timeout as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 11.0, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Writes data from an endpoint with timeout.
Notes:
EndPoint: The index of the endpoint.
mem: the memoryblock where to store the data.
size: the length of the data block to read.
timeout: the timeout in milliseconds.

Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.IsOpen as boolean
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Whether the device is opened.
Notes: True if open, false if closed.
LinuxHIDInterfaceMBS.Open(theInterface as integer, Vendor as integer, Product as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Opens the USB device with the given interface index, vendor and product codes.
Example:
dim h as new LinuxHIDInterfaceMBS

const vendor = &h7C0
const product = &h1500

dim e as integer = h.Open(0, vendor, product)
Notes:
Vendor or Product code can be kMatchAny (0) to match all devices.
You can use the MatchDevice event to learn which devices are there and return true there to select one.
Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.Reset
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Resets the device.
Notes: Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.SetOutputReport(path() as integer, data as memoryblock, offset as integer, size as integer) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Writes data to the output.
Example:
dim h as LinuxHIDInterfaceMBS // your interface
dim n as integer // some value

const IOW_PIPE_IO_PINS=0

dim m as MemoryBlock = NewMemoryBlock(4) // a device with 4 byte packets

m.Byte(3)=n
m.Byte(0)=IOW_PIPE_IO_PINS

dim path(-1) as integer

path.Append &h00010000
path.Append 0

dim e as integer = h.SetOutputReport(path, m, 0, m.size)
Notes:
Path: The path to the endpoint.
Data: the data to write.
Offset: The offset where to start inside the memoryblock.
Size: the length of the data int he memoryblock.

Returns error code. See kError* constants.

See also:

LinuxHIDInterfaceMBS.SetOutputReport(path() as integer, data as string) as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Writes data to the output.
Notes:
Path: The path to the endpoint.
Data: the data to write.

Returns error code. See kError* constants.

See also:

LinuxHIDInterfaceMBS.WriteIdentificationToStderr as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Writes identification to stderr.
Notes: Returns error code. See kError* constants.
LinuxHIDInterfaceMBS.WriteIdentificationToStdout as integer
method, USB, MBS USB Plugin (LinuxHID), class LinuxHIDInterfaceMBS,
Plugin version: 10.3, Mac: No, Win: No, Linux: Yes, Console & Web: Yes, Feedback.

Function: Writes identification to stdout.
Notes: Returns error code. See kError* constants.

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




Links
MBS Real Studio Plugins