public class DebugMessageReceiver extends Object implements DebugMessageProcessor
| Modifier and Type | Field and Description |
|---|---|
protected AtomicBoolean |
running |
| Constructor and Description |
|---|
DebugMessageReceiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageListener(DebugMessageListener listener) |
static String |
bytesToStringUTFCustom(byte[] bytes) |
void |
disable()
Disable the message processor.
|
void |
enable()
Enable the message processor.
|
void |
processMessages(ByteArrayOutputStream output)
Process the messages in the provided byte array output stream.
|
void |
receive(gnu.io.SerialPort port)
Receive messages from the configured port
|
void |
removeMessageListener(DebugMessageListener listener) |
protected AtomicBoolean running
public void addMessageListener(DebugMessageListener listener)
public void removeMessageListener(DebugMessageListener listener)
public void processMessages(ByteArrayOutputStream output)
DebugMessageProcessorprocessMessages in interface DebugMessageProcessoroutput - the output stream that contains the messagespublic void disable()
DebugMessageProcessordisable in interface DebugMessageProcessorpublic void enable()
DebugMessageProcessorenable in interface DebugMessageProcessorpublic void receive(gnu.io.SerialPort port)
receive in interface DebugMessageProcessorport - the serial port instancepublic static String bytesToStringUTFCustom(byte[] bytes)
Copyright © 2018. All rights reserved.