Class DebugReader
- java.lang.Object
-
- org.bidib.jbidibc.purejavacomm.debug.DebugReader
-
- All Implemented Interfaces:
DebugInterface
public class DebugReader extends Object implements DebugInterface
-
-
Constructor Summary
Constructors Constructor Description DebugReader(DebugMessageProcessor messageReceiver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.bidib.jbidibc.messages.ConnectionListenergetConnectionListener()DebugMessageProcessorgetMessageReceiver()List<String>getPortIdentifiers()voidinitialize()booleanisOpened()voidopen(String portName, int baudRate, org.bidib.jbidibc.messages.ConnectionListener connectionListener, org.bidib.jbidibc.messages.helpers.Context context)voidsend(byte[] content)voidsend(String message, LineEndingEnum lineEnding)Send the bytes of the message to the outputstream and add <CR>+<LF>.voidsetConnectionListener(org.bidib.jbidibc.messages.ConnectionListener connectionListener)
-
-
-
Constructor Detail
-
DebugReader
public DebugReader(DebugMessageProcessor messageReceiver)
-
-
Method Detail
-
initialize
public void initialize()
- Specified by:
initializein interfaceDebugInterface
-
getPortIdentifiers
public List<String> getPortIdentifiers()
- Specified by:
getPortIdentifiersin interfaceDebugInterface
-
getMessageReceiver
public DebugMessageProcessor getMessageReceiver()
- Specified by:
getMessageReceiverin interfaceDebugInterface
-
getConnectionListener
public org.bidib.jbidibc.messages.ConnectionListener getConnectionListener()
- Returns:
- the connectionListener
-
setConnectionListener
public void setConnectionListener(org.bidib.jbidibc.messages.ConnectionListener connectionListener)
- Parameters:
connectionListener- the connectionListener to set
-
close
public void close()
- Specified by:
closein interfaceDebugInterface
-
isOpened
public boolean isOpened()
- Specified by:
isOpenedin interfaceDebugInterface
-
open
public void open(String portName, int baudRate, org.bidib.jbidibc.messages.ConnectionListener connectionListener, org.bidib.jbidibc.messages.helpers.Context context) throws org.bidib.jbidibc.messages.exception.PortNotFoundException, org.bidib.jbidibc.messages.exception.PortNotOpenedException
- Specified by:
openin interfaceDebugInterface- Throws:
org.bidib.jbidibc.messages.exception.PortNotFoundExceptionorg.bidib.jbidibc.messages.exception.PortNotOpenedException
-
send
public void send(String message, LineEndingEnum lineEnding)
Send the bytes of the message to the outputstream and add <CR>+<LF>.- Specified by:
sendin interfaceDebugInterface- Parameters:
bytes- the bytes to send
-
send
public void send(byte[] content)
- Specified by:
sendin interfaceDebugInterface
-
-