jmri.jmrix.can.adapters.gridconnect.canrs
Class MergReply

java.lang.Object
  extended by jmri.jmrix.AbstractMessage
      extended by jmri.jmrix.AbstractMRReply
          extended by jmri.jmrix.can.adapters.gridconnect.GridConnectReply
              extended by jmri.jmrix.can.adapters.gridconnect.canrs.MergReply
All Implemented Interfaces:
Message

public class MergReply
extends GridConnectReply

Class for replies in a MERG GridConnect based message/reply protocol.

The GridConnect protocol encodes messages as an ASCII string of up to 24 characters of the form: :ShhhhNd0d1d2d3d4d5d6d7; hhhh is the two byte (11 useful bits) header The S indicates a standard CAN frame :XhhhhhhhhNd0d1d2d3d4d5d6d7; The X indicates an extended CAN frame Strict Gridconnect protocol allows a variable number of header characters, e.g., a header value of 0x123 could be encoded as S123, X123, S0123 or X00000123. MERG hardware uses a fixed 4 or 8 byte header when sending GridConnectMessages to the computer. The 11 bit standard header is left justified in these 4 bytes. The 29 bit standard header is sent as <11 bit SID><0><1><0>< 18 bit EID> N or R indicates a normal or remote frame, in position 6 or 10 d0 - d7 are the (up to) 8 data bytes

Author:
Andrew Crosland Copyright (C) 2008, Bob Jacobsen Copyright (C) 2008

Field Summary
 
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZE
 
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
 
Constructor Summary
MergReply()
           
MergReply(String s)
           
 
Method Summary
 int getHeader()
          Get the CAN header from MERG format in digits 2 to 9
 
Methods inherited from class jmri.jmrix.can.adapters.gridconnect.GridConnectReply
createReply, getByte, getElement, getNumBytes, getNumDataElements, isExtended, isRtr, maxSize, setData, setElement, setNumDataElements, skipPrefix
 
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, isUnsolicited, match, pollValue, setBinary, setOpCode, setUnsolicited, skipWhiteSpace, toString, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MergReply

public MergReply()

MergReply

public MergReply(String s)
Method Detail

getHeader

public int getHeader()
Get the CAN header from MERG format in digits 2 to 9

Overrides:
getHeader in class GridConnectReply
Returns:
the CAN header as an int


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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads