Maven module :un.api : api-device :
Class : un.api.device.usb.USBControl
Extends/Implements : -
Subclasses : -

Send and receive data from device.
author  Johann Sorel


Variables : -
Functions : getDevice, open, writeSync, readSync, dispose




Device manipulated by the control.
return
USBDevice getDevice ()


activate the control.
void open ()


Send data to device.
param  endPoint device end point
param  data to write
param  timeout in milliseconds, 0 for unlimited
return  number of bytes written
throws  DeviceException
public int writeSync (byte endPoint, ByteBuffer data, long timeout)


Read data from device
param  endPoint device end point
param  data to store read bytes
param  timeout in milliseconds, 0 for unlimited
return  number of bytes read
throws  DeviceException
public int readSync (byte endPoint, ByteBuffer data, long timeout)


Release this control.
void dispose ()