public class DeviceUsbCdc extends Device
MAX_BUFFER_SIZE, MAX_STREAM_SIZE
Constructor and Description |
---|
DeviceUsbCdc(android.content.Context context)
Create an instance of the DeviceUsbCdc class
|
Modifier and Type | Method and Description |
---|---|
void |
connect(java.lang.String address)
Attempts to connect to the appliance using an instance of the Device class.
|
void |
destroy()
Destroy an instance and release resources.
|
void |
disconnect()
An instance of the Device class closes the connection to the device to which the device is connected.
|
java.lang.String |
getAddress()
Returns address of device
|
java.lang.String |
getName()
Returns name of device.
|
void |
listen()
An instance of the Device class waits for the device to connect.
|
void |
waitConnection() |
void |
write(byte[] data)
Write data to the device.
|
getReader, getState, setStateChangedListener
public DeviceUsbCdc(android.content.Context context)
context
- Activity that owns the DeviceUsbCdc objectpublic void destroy()
Device
public java.lang.String getName()
Device
public java.lang.String getAddress()
Device
getAddress
in class Device
public void connect(java.lang.String address)
Device
public void waitConnection()
waitConnection
in class Device
public void listen()
Device
public void disconnect()
Device
disconnect
in class Device
public void write(byte[] data) throws java.lang.Exception
Device