Class MergTrafficController
java.lang.Object
jmri.jmrix.AbstractMRTrafficController
jmri.jmrix.can.AbstractCanTrafficController
jmri.jmrix.can.TrafficController
jmri.jmrix.can.adapters.gridconnect.GcTrafficController
jmri.jmrix.can.adapters.gridconnect.canrs.MergTrafficController
- All Implemented Interfaces:
CanInterface
public class MergTrafficController extends GcTrafficController
Traffic controller for the MERG variant of the GridConnect protocol.
MERG CAN-RS/CAN-USB uses messages transmitted as an ASCII string of up to 24 characters of the form: :ShhhhNd0d1d2d3d4d5d6d7; The S indicates a standard CAN frame hhhh is the two byte header (11 useful bits), left justified on send to adapter N or R indicates a normal or remote frame d0 - d7 are the (up to) 8 data bytes
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier
-
Field Summary
Fields inherited from class jmri.jmrix.can.adapters.gridconnect.GcTrafficController
BOOTMODE, NORMAL
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, WAITMSGREPLYSTATE, WAITREPLYINNORMMODESTATE, WAITREPLYINPROGMODESTATE, waitTimePoll, xmtException, xmtRunnable, xmtThread
-
Constructor Summary
Constructors Constructor Description MergTrafficController()
-
Method Summary
Modifier and Type Method Description CanReply
decodeFromHardware(AbstractMRReply m)
Make a CanReply from a MergReply replyAbstractMRMessage
encodeForHardware(CanMessage m)
Encode a CanMessage for the hardwareprotected AbstractMRMessage
newMessage()
Get new message for hardware protocol.protected AbstractMRReply
newReply()
New reply from hardware.Methods inherited from class jmri.jmrix.can.adapters.gridconnect.GcTrafficController
addTrailerToOutput, endOfMessage, forwardMessage, forwardReply, getgcState, isBootMode, lengthOfByteStream, loadChars, sendCanMessage, sendCanReply, setgcState
Methods inherited from class jmri.jmrix.can.AbstractCanTrafficController
addCanListener, distributeOneReply, enterNormalMode, enterProgMode, forwardToPort, handleOneIncomingReply, pollMessage, pollReplyHandler, removeCanListener
Methods inherited from class jmri.jmrix.AbstractMRTrafficController
addHeaderToOutput, addListener, canReceive, connectionWarn, connectPort, disconnectPort, distributeReply, enterProgModeDelayTime, finalize, getLastSender, getPortName, getSynchronizeRx, handleTimeout, hasTimeouts, newRcvNotifier, notifyMessage, notifyReply, portReadyToSend, portWarn, portWarnTCP, programmerIdle, readByteProtected, receiveLoop, recovery, removeListener, reportReceiveLoopException, resetTimeout, sendMessage, setAllowUnexpectedReply, setSynchronizeRx, status, terminate, terminateThreads, transmitLoop, transmitWait, unexpectedReplyStateError, waitForStartOfReply
-
Constructor Details
-
Method Details
-
newMessage
Description copied from class:GcTrafficController
Get new message for hardware protocol.- Overrides:
newMessage
in classGcTrafficController
- Returns:
- New GridConnect Message.
-
decodeFromHardware
Make a CanReply from a MergReply reply- Overrides:
decodeFromHardware
in classGcTrafficController
-
encodeForHardware
Encode a CanMessage for the hardware- Overrides:
encodeForHardware
in classGcTrafficController
-
newReply
Description copied from class:GcTrafficController
New reply from hardware.- Overrides:
newReply
in classGcTrafficController
-