jmri.jmrix.can.adapters.gridconnect.canrs
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 varient 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
- Author:
- Andrew Crosland Copyright (C) 2008
| Fields inherited from class jmri.jmrix.AbstractMRTrafficController |
allowUnexpectedReply, AUTORETRYSTATE, cmdListeners, controller, flushReceiveChars, IDLESTATE, istream, mCurrentMode, mCurrentState, mLastSender, mWaitBeforePoll, NORMALMODE, NOTIFIEDSTATE, OKSENDMSGSTATE, ostream, POLLSTATE, PROGRAMINGMODE, rcvException, replyInDispatch, WAITMSGREPLYSTATE, WAITREPLYINNORMMODESTATE, WAITREPLYINPROGMODESTATE, waitTimePoll, xmtException, xmtRunnable |
| Methods inherited from class jmri.jmrix.AbstractMRTrafficController |
addHeaderToOutput, addListener, canReceive, connectionWarn, connectPort, disconnectPort, enterProgModeDelayTime, finalize, getLastSender, getPortName, getSelfLock, handleTimeout, hasTimeouts, newRcvNotifier, notifyMessage, notifyReply, portReadyToSend, portWarn, portWarnTCP, programmerIdle, readByteProtected, receiveLoop, removeListener, reportReceiveLoopException, resetTimeout, sendMessage, setAllowUnexpectedReply, status, terminate, transmitWait, waitForStartOfReply |
MergTrafficController
public MergTrafficController()
instance
public static TrafficController instance()
- static function returning the CanTrafficController instance to use.
- Returns:
- The registered SprogTrafficController instance for general use,
if need be creating one.
newMessage
protected AbstractMRMessage newMessage()
- Description copied from class:
AbstractCanTrafficController
- Get the correct concrete class for the hardware connection message
- Overrides:
newMessage in class GcTrafficController
decodeFromHardware
public CanReply decodeFromHardware(AbstractMRReply m)
- Make a CanReply from a MergReply reply
- Overrides:
decodeFromHardware in class GcTrafficController
encodeForHardware
public AbstractMRMessage encodeForHardware(CanMessage m)
- Encode a CanMessage for the hardware
- Overrides:
encodeForHardware in class GcTrafficController
newReply
protected AbstractMRReply newReply()
- Overrides:
newReply in class GcTrafficController
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: