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.can.TrafficController
_canid
-
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 MergTrafficController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CanReplydecodeFromHardware(AbstractMRReply m)Make a CanReply from a MergReply reply.AbstractMRMessageencodeForHardware(CanMessage m)Encode a CanMessage for the hardware.protected AbstractMRMessagenewMessage()Get new message for hardware protocol.protected AbstractMRReplynewReply()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.TrafficController
getCanid, setCanId, setCanId
-
Methods inherited from class jmri.jmrix.can.AbstractCanTrafficController
addCanConsoleListener, addCanListener, distributeOneReply, enterNormalMode, enterProgMode, forwardToPort, handleOneIncomingReply, pollMessage, pollReplyHandler, removeCanListener
-
Methods inherited from class jmri.jmrix.AbstractMRTrafficController
addConsoleListener, addHeaderToOutput, addListener, canReceive, connectionWarn, connectPort, disconnectPort, distributeReply, enterProgModeDelayTime, 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, 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.can.CanInterface
status
-
-
-
-
Constructor Detail
-
MergTrafficController
public MergTrafficController()
-
-
Method Detail
-
newMessage
protected AbstractMRMessage newMessage()
Description copied from class:GcTrafficControllerGet new message for hardware protocol.- Overrides:
newMessagein classGcTrafficController- Returns:
- New GridConnect Message.
-
decodeFromHardware
public CanReply decodeFromHardware(AbstractMRReply m)
Make a CanReply from a MergReply reply. Make a CanReply from a GridConnect reply.- Overrides:
decodeFromHardwarein classGcTrafficController
-
encodeForHardware
public AbstractMRMessage encodeForHardware(CanMessage m)
Encode a CanMessage for the hardware. Encode a CanMessage for the hardware.- Overrides:
encodeForHardwarein classGcTrafficController
-
newReply
protected AbstractMRReply newReply()
New reply from hardware.- Overrides:
newReplyin classGcTrafficController
-
-