public abstract class AbstractSerialBidib extends AbstractBidib
| Modifier and Type | Field and Description |
|---|---|
protected Semaphore |
portSemaphore |
protected String |
requestedPortName |
DEFAULT_TIMEOUT| Constructor and Description |
|---|
AbstractSerialBidib() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupAfterClose(SerialMessageReceiver serialMessageReceiver) |
protected BidibMessageProcessor |
createMessageReceiver(NodeFactory nodeFactory) |
protected SerialMessageReceiver |
getSerialMessageReceiver() |
protected abstract void |
internalOpen(String portName,
int baudRate,
Context context) |
protected boolean |
isConnected() |
protected abstract boolean |
isImplAvaiable() |
static boolean |
isInstanceAvailable()
Returns if an instance of ScmSerialBidib is available.
|
abstract boolean |
isOpened() |
void |
open(String portName,
ConnectionListener connectionListener,
Set<NodeListener> nodeListeners,
Set<MessageListener> messageListeners,
Set<TransferListener> transferListeners,
Context context) |
protected void |
receive(byte[] data) |
protected void |
receive(byte[] data,
int len) |
void |
send(byte[] bytes)
Send the bytes to the send queue.
|
protected abstract void |
sendData(byte[] data) |
protected void |
setConnected(boolean connected) |
protected void |
startReceiverAndQueues(SerialMessageReceiver serialMessageReceiver,
Context context) |
protected void |
stopReceiverAndQueues(SerialMessageReceiver serialMessageReceiver) |
getAccessoryNode, getBoosterNode, getCommandStationNode, getConnectionListener, getFirmwarePacketTimeout, getMessageReceiver, getNode, getNodeFactory, getResponseTimeout, getRootNode, getTransferListeners, initialize, registerListeners, releaseRootNode, setConnectionListener, setFirmwarePacketTimeout, setIgnoreWaitTimeout, setResponseTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getPortIdentifiersprotected Semaphore portSemaphore
protected String requestedPortName
protected BidibMessageProcessor createMessageReceiver(NodeFactory nodeFactory)
createMessageReceiver in class AbstractBidibprotected SerialMessageReceiver getSerialMessageReceiver()
public static boolean isInstanceAvailable()
protected void stopReceiverAndQueues(SerialMessageReceiver serialMessageReceiver)
protected void cleanupAfterClose(SerialMessageReceiver serialMessageReceiver)
protected void startReceiverAndQueues(SerialMessageReceiver serialMessageReceiver, Context context)
protected abstract boolean isImplAvaiable()
protected abstract void internalOpen(String portName, int baudRate, Context context) throws Exception
Exceptionpublic void open(String portName, ConnectionListener connectionListener, Set<NodeListener> nodeListeners, Set<MessageListener> messageListeners, Set<TransferListener> transferListeners, Context context) throws PortNotFoundException, PortNotOpenedException
protected boolean isConnected()
protected void setConnected(boolean connected)
public abstract boolean isOpened()
public void send(byte[] bytes)
bytes - the bytes to sendprotected abstract void sendData(byte[] data)
protected void receive(byte[] data)
protected void receive(byte[] data,
int len)
Copyright © 2016. All rights reserved.