Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

LinuxHIDInterfaceMBS.Close as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Closes the device.
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.DumpTreeToStderr as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Dumps the device tree to stderr.
Example:
dim h as LinuxHIDInterfaceMBS
// open device
call h.DumpTreeToStderr
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.DumpTreeToStdout as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Dumps the device tree to stdout.
Example:
dim h as LinuxHIDInterfaceMBS
// open device
call h.DumpTreeToStdout
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.ForceOpen(theInterface as Integer, Vendor as Integer, Product as Integer, retries as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.GetInputReport(path() as Integer, data as memoryblock, offset as Integer, size as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.InterruptRead(EndPoint as Integer, mem as memoryblock, size as Integer, timeout as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.InterruptWrite(EndPoint as Integer, mem as memoryblock, size as Integer, timeout as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 11.0 No No Yes Yes, Linux only No
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.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.IsOpen as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Whether the device is opened.
Notes: True if open, false if closed.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.Open(theInterface as Integer, Vendor as Integer, Product as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.Reset
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Resets the device.
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.SetOutputReport(path() as Integer, data as memoryblock, offset as Integer, size as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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:

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.SetOutputReport(path() as Integer, data as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
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:

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.WriteIdentificationToStderr as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Writes identification to stderr.
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

LinuxHIDInterfaceMBS.WriteIdentificationToStdout as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method USB MBS USB Plugin 10.3 No No Yes Yes, Linux only No
Function: Writes identification to stdout.
Notes: Returns error code. See kError* constants.

Feedback, Comments & Corrections

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




Links
MBS FileMaker blog