RemoteConnectorpublic class Rs232RemoteConnector extends StreamRemoteConnector
StreamRemoteConnector.StreamStateexecutor, logger, START_OF_MSG, state| Constructor | Description |
|---|---|
Rs232RemoteConnector(String portName,
int baud,
MenuCommandProtocol protocol,
ScheduledExecutorService executor) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
getAtLeastBytes(ByteBuffer inputBuffer,
int len) |
Reads at least the number of bytes requested waiting if need be for more data.
|
String |
getConnectionName() |
Gets the name of this connector locally
|
protected void |
sendInternal(ByteBuffer outputBuffer) |
performs a send of all bytes in the output buffer until the output buffer is empty
|
void |
start() |
Starts the communication channel, so it will attempt to connect with the configured device
|
void |
stop() |
Stops the library and attempts to also stop any threads and other resources associated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, doesBufferHaveEOM, isConnected, logByteBuffer, notifyConnection, processMessagesOnConnection, readCompleteMessage, registerConnectionChangeListener, registerConnectorListener, sendMenuCommandpublic Rs232RemoteConnector(String portName, int baud, MenuCommandProtocol protocol, ScheduledExecutorService executor)
public void start()
RemoteConnectorpublic void stop()
RemoteConnectorpublic String getConnectionName()
RemoteConnectorprotected void sendInternal(ByteBuffer outputBuffer) throws IOException
StreamRemoteConnectorsendInternal in class StreamRemoteConnectoroutputBuffer - the buffer data to be sentIOException - if there are problems writingprotected void getAtLeastBytes(ByteBuffer inputBuffer, int len) throws IOException
StreamRemoteConnectorgetAtLeastBytes in class StreamRemoteConnectorinputBuffer - the buffer to read fromlen - the minimum number of bytes neededIOException - if there are problems reading.Copyright © 2018. All rights reserved.