public abstract class AbstractSerialBidib extends AbstractBidib
| Modifier and Type | Field and Description |
|---|---|
protected Semaphore |
portSemaphore |
protected Object |
receiveLock |
protected String |
requestedPortName |
DEFAULT_TIMEOUT| Constructor and Description |
|---|
AbstractSerialBidib() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupAfterClose(BidibMessageProcessor bidibMessageProcessor) |
protected int |
contactInterface()
Contact the interface and get the magic
|
protected BidibMessageProcessor |
createMessageReceiver(NodeRegistry nodeRegistry) |
protected abstract void |
internalOpen(String portName,
Context context) |
protected boolean |
isConnected() |
protected abstract boolean |
isImplAvaiable() |
abstract boolean |
isOpened() |
protected void |
notifyStatusKey(String messageKey) |
void |
open(String portName,
ConnectionListener connectionListener,
Set<NodeListener> nodeListeners,
Set<MessageListener> messageListeners,
Set<TransferListener> transferListeners,
Context context) |
protected void |
setConnected(boolean connected) |
protected void |
startReceiverAndQueues(BidibMessageProcessor serialMessageReceiver,
Context context) |
protected void |
stopReceiverAndQueues(BidibMessageProcessor serialMessageReceiver) |
findNode, fireCtsChanged, getAccessoryNode, getBoosterNode, getCommandStationNode, getConnectionListener, getFirmwarePacketTimeout, getMessageReceiver, getNode, getNodeRegistry, getResponseTimeout, getRootNode, initialize, receive, registerListeners, releaseRootNode, send, sendData, setConnectionListener, setFirmwarePacketTimeout, setIgnoreWaitTimeout, setResponseTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getPortIdentifiersprotected Semaphore portSemaphore
protected String requestedPortName
protected Object receiveLock
protected BidibMessageProcessor createMessageReceiver(NodeRegistry nodeRegistry)
createMessageReceiver in class AbstractBidibprotected void stopReceiverAndQueues(BidibMessageProcessor serialMessageReceiver)
stopReceiverAndQueues in class AbstractBidibprotected void cleanupAfterClose(BidibMessageProcessor bidibMessageProcessor)
cleanupAfterClose in class AbstractBidibprotected void startReceiverAndQueues(BidibMessageProcessor serialMessageReceiver, Context context)
startReceiverAndQueues in class AbstractBidibprotected abstract boolean isImplAvaiable()
protected abstract void internalOpen(String portName, Context context) throws Exception
Exceptionprotected void notifyStatusKey(String messageKey)
messageKey - the message key to notifypublic 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()
protected int contactInterface()
throws ProtocolException
ProtocolException - a ProtocolNoAnswerException is thrown if the interface node does not answerCopyright © 2018. All rights reserved.