Class ConcentratorTrafficController
- java.lang.Object
-
- jmri.jmrix.AbstractMRTrafficController
-
- jmri.jmrix.rfid.RfidTrafficController
-
- jmri.jmrix.rfid.merg.concentrator.ConcentratorTrafficController
-
- All Implemented Interfaces:
RfidInterface
public class ConcentratorTrafficController extends RfidTrafficController
Converts Stream-based I/O to/from messages. The "SerialInterface" side sends/receives message objects.The connection to a SerialPortController is via a pair of *Streams, which then carry sequences of characters for transmission. Note that this processing is handled in an independent thread.
This maintains a list of nodes, but doesn't currently do anything with it.
- Since:
- 2.11.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
sendInterlock
-
Fields inherited from class jmri.jmrix.rfid.RfidTrafficController
adapterMemo, logDebug
-
Fields inherited from class jmri.jmrix.AbstractMRTrafficController
allowUnexpectedReply, AUTORETRYSTATE, cmdListeners, connectionError, controller, flushReceiveChars, IDLESTATE, istream, listenerQueue, maxRcvExceptionCount, mCurrentMode, mCurrentState, mLastSender, msgQueue, mWaitBeforePoll, NORMALMODE, NOTIFIEDSTATE, OKSENDMSGSTATE, ostream, POLLSTATE, PROGRAMINGMODE, rcvException, rcvThread, replyInDispatch, threadStopRequest, timeoutFlag, timeouts, WAITMSGREPLYSTATE, WAITREPLYINNORMMODESTATE, WAITREPLYINPROGMODESTATE, waitTimePoll, xmtException, xmtRunnable, xmtThread
-
-
Constructor Summary
Constructors Constructor Description ConcentratorTrafficController(RfidSystemConnectionMemo memo, java.lang.String range)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
endOfMessage(AbstractMRReply msg)
This is a default, null implementation, which must be overridden in an adapter-specific subclass.protected void
forwardToPort(AbstractMRMessage m, AbstractMRListener reply)
Actually transmit the next message to the port.java.lang.String
getRange()
RfidMessage
getRfidMessage(int length)
Get a message of a specific length for filling in.protected AbstractMRReply
newReply()
This is a default, null implementation, which must be overridden in an adapter-specific subclass.void
sendInitString()
-
Methods inherited from class jmri.jmrix.rfid.RfidTrafficController
addRfidListener, enterNormalMode, enterProgMode, forwardMessage, forwardReply, getAdapterMemo, getReporterManager, getSensorManager, pollMessage, pollReplyHandler, removeRfidListener, sendRfidMessage, setAdapterMemo, setReporterManager, setSensorManager
-
Methods inherited from class jmri.jmrix.AbstractMRTrafficController
addConsoleListener, addHeaderToOutput, addListener, addTrailerToOutput, canReceive, connectionWarn, connectPort, disconnectPort, distributeReply, enterProgModeDelayTime, getLastSender, getPortName, getSynchronizeRx, handleOneIncomingReply, handleTimeout, hasTimeouts, lengthOfByteStream, loadChars, newRcvNotifier, notifyMessage, notifyReply, portReadyToSend, portWarn, portWarnTCP, programmerIdle, readByteProtected, receiveLoop, recovery, removeListener, reportReceiveLoopException, resetTimeout, sendMessage, setAllowUnexpectedReply, setSynchronizeRx, status, terminate, terminateThreads, transmitLoop, transmitWait, unexpectedReplyStateError, waitForStartOfReply, warnOnTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.rfid.RfidInterface
status
-
-
-
-
Field Detail
-
sendInterlock
boolean sendInterlock
-
-
Constructor Detail
-
ConcentratorTrafficController
public ConcentratorTrafficController(RfidSystemConnectionMemo memo, java.lang.String range)
-
-
Method Detail
-
sendInitString
public void sendInitString()
- Specified by:
sendInitString
in classRfidTrafficController
-
getRfidMessage
public RfidMessage getRfidMessage(int length)
Description copied from class:RfidTrafficController
Get a message of a specific length for filling in.This is a default, null implementation, which must be overridden in an adapter-specific subclass.
- Overrides:
getRfidMessage
in classRfidTrafficController
- Parameters:
length
- message length.- Returns:
- the RfidMessage.
-
forwardToPort
protected void forwardToPort(AbstractMRMessage m, AbstractMRListener reply)
Description copied from class:AbstractMRTrafficController
Actually transmit the next message to the port.- Overrides:
forwardToPort
in classRfidTrafficController
- Parameters:
m
- the message to sendreply
- the Listener sending the message, often provided as 'this'- See Also:
AbstractMRTrafficController.sendMessage(AbstractMRMessage, AbstractMRListener)
-
newReply
protected AbstractMRReply newReply()
Description copied from class:RfidTrafficController
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
- Overrides:
newReply
in classRfidTrafficController
-
getRange
public java.lang.String getRange()
- Overrides:
getRange
in classRfidTrafficController
-
endOfMessage
protected boolean endOfMessage(AbstractMRReply msg)
Description copied from class:RfidTrafficController
This is a default, null implementation, which must be overridden in an adapter-specific subclass.
- Overrides:
endOfMessage
in classRfidTrafficController
-
-