Manages USB connections and communication. More...
Public Member Functions | |
| UsbHandler (Context context) | |
| Constructor that initializes the USB manager. More... | |
| boolean | setupDevice (UsbDevice device) |
| Sets up the USB device and finds suitable endpoints for communication. More... | |
| void | close () |
| Closes the USB connection and releases the interface. More... | |
| UsbDeviceConnection | getUsbConnection () |
| Gets the current USB device connection. More... | |
| UsbEndpoint | getUsbEndpointIn () |
| Gets the IN endpoint for USB communication. More... | |
| UsbEndpoint | getUsbEndpointOut () |
| Gets the OUT endpoint for USB communication. More... | |
Private Attributes | |
| UsbManager | usbManager |
| UsbDevice | usbDevice |
| UsbInterface | usbInterface |
| UsbDeviceConnection | usbConnection |
| UsbEndpoint | usbEndpointIn |
| UsbEndpoint | usbEndpointOut |
Manages USB connections and communication.
| com.UniPRT.Sdk.Comm.UsbHandler.UsbHandler | ( | Context | context | ) |
Constructor that initializes the USB manager.
| context | The application context. |
References com.UniPRT.Sdk.Comm.UsbHandler.usbManager.
| void com.UniPRT.Sdk.Comm.UsbHandler.close | ( | ) |
Closes the USB connection and releases the interface.
References com.UniPRT.Sdk.Comm.UsbHandler.usbConnection, and com.UniPRT.Sdk.Comm.UsbHandler.usbInterface.
| UsbDeviceConnection com.UniPRT.Sdk.Comm.UsbHandler.getUsbConnection | ( | ) |
Gets the current USB device connection.
References com.UniPRT.Sdk.Comm.UsbHandler.usbConnection.
| UsbEndpoint com.UniPRT.Sdk.Comm.UsbHandler.getUsbEndpointIn | ( | ) |
Gets the IN endpoint for USB communication.
References com.UniPRT.Sdk.Comm.UsbHandler.usbEndpointIn.
| UsbEndpoint com.UniPRT.Sdk.Comm.UsbHandler.getUsbEndpointOut | ( | ) |
Gets the OUT endpoint for USB communication.
References com.UniPRT.Sdk.Comm.UsbHandler.usbEndpointOut.
| boolean com.UniPRT.Sdk.Comm.UsbHandler.setupDevice | ( | UsbDevice | device | ) |
Sets up the USB device and finds suitable endpoints for communication.
| device | The USB device to be set up. |
References com.UniPRT.Sdk.Comm.UsbHandler.usbConnection, com.UniPRT.Sdk.Comm.UsbHandler.usbDevice, com.UniPRT.Sdk.Comm.UsbHandler.usbEndpointIn, com.UniPRT.Sdk.Comm.UsbHandler.usbEndpointOut, com.UniPRT.Sdk.Comm.UsbHandler.usbInterface, and com.UniPRT.Sdk.Comm.UsbHandler.usbManager.
|
private |
|
private |
Referenced by com.UniPRT.Sdk.Comm.UsbHandler.setupDevice().
|
private |
|
private |
|
private |
Referenced by com.UniPRT.Sdk.Comm.UsbHandler.close(), and com.UniPRT.Sdk.Comm.UsbHandler.setupDevice().
|
private |