public class DebugReader extends Object implements DebugInterface
| Constructor and Description |
|---|
DebugReader(DebugMessageProcessor messageReceiver) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the port.
|
ConnectionListener |
getConnectionListener() |
DebugMessageProcessor |
getMessageReceiver() |
List<String> |
getPortIdentifiers() |
boolean |
isOpened() |
void |
open(String portName,
int baudRate,
ConnectionListener connectionListener,
Context context)
Open connection to the specified port.
|
void |
send(byte[] content) |
void |
send(String message)
Send the bytes of the message to the outputstream and add <CR>+<LF>.
|
void |
setConnectionListener(ConnectionListener connectionListener) |
public DebugReader(DebugMessageProcessor messageReceiver)
public List<String> getPortIdentifiers()
getPortIdentifiers in interface DebugInterfacepublic DebugMessageProcessor getMessageReceiver()
getMessageReceiver in interface DebugInterfacepublic ConnectionListener getConnectionListener()
public void setConnectionListener(ConnectionListener connectionListener)
connectionListener - the connectionListener to setpublic void close()
DebugInterfaceclose in interface DebugInterfacepublic boolean isOpened()
isOpened in interface DebugInterfacepublic void open(String portName, int baudRate, ConnectionListener connectionListener, Context context) throws PortNotFoundException, PortNotOpenedException
DebugInterfaceopen in interface DebugInterfaceportName - the port identifierbaudRate - the baud rate to useconnectionListener - the connection listenercontext - the contextPortNotFoundExceptionPortNotOpenedExceptionpublic void send(String message)
send in interface DebugInterfacebytes - the bytes to sendpublic void send(byte[] content)
send in interface DebugInterfacecontent - the content to sendCopyright © 2016. All rights reserved.