public class

UsbDeviceUtilities

extends Object
java.lang.Object
   ↳ com.openxc.interfaces.usb.UsbDeviceUtilities

Class Overview

Stateless utilities for finding and opening USB devices. The URI format expected by these functions is: usb://vendor_id/device_id where both vendor ID and device ID are hex values without a "0x" prefix. An example valid URI is "usb://04d8/0053".

Summary

Fields
public static URI DEFAULT_USB_DEVICE_URI
Public Constructors
UsbDeviceUtilities()
Public Methods
static int productFromUri(URI uri)
Return an integer product ID from a URI specifying a USB device.
static int vendorFromUri(URI uri)
Return an integer vendor ID from a URI specifying a USB device.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static URI DEFAULT_USB_DEVICE_URI

Public Constructors

public UsbDeviceUtilities ()

Public Methods

public static int productFromUri (URI uri)

Return an integer product ID from a URI specifying a USB device.

Parameters
uri the USB device URI
Throws
DataSourceResourceException If the URI doesn't match the format usb://vendor_id/device_id

public static int vendorFromUri (URI uri)

Return an integer vendor ID from a URI specifying a USB device.

Parameters
uri the USB device URI
Throws
DataSourceResourceException If the URI doesn't match the format usb://vendor_id/device_id