jmri.jmrix.can.adapters.lawicell
Class Reply

java.lang.Object
  extended by jmri.jmrix.AbstractMessage
      extended by jmri.jmrix.AbstractMRReply
          extended by jmri.jmrix.can.adapters.lawicell.Reply
All Implemented Interfaces:
Message

public class Reply
extends AbstractMRReply

Class for replies in a LAWICELL message/reply protocol.

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
Reply()
           
Reply(String s)
           
 
Method Summary
 CanReply createReply()
           
 int getByte(int b)
          Get a hex data byte from the message Data bytes are encoded as two ASCII hex digits.
 int getHeader()
          Get the CAN header as an int
 int getNumBytes()
          Get the number of data bytes
 boolean isExtended()
           
 void setData(int[] d)
           
protected  int skipPrefix(int index)
           
 
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, isUnsolicited, match, maxSize, pollValue, setBinary, setElement, setOpCode, setUnsolicited, skipWhiteSpace, toString, value
 
Methods inherited from class jmri.jmrix.AbstractMessage
getElement, getNumDataElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reply

public Reply()

Reply

public Reply(String s)
Method Detail

createReply

public CanReply createReply()

skipPrefix

protected int skipPrefix(int index)
Specified by:
skipPrefix in class AbstractMRReply

setData

public void setData(int[] d)

isExtended

public boolean isExtended()

getHeader

public int getHeader()
Get the CAN header as an int

Returns:
int the CAN ID

getNumBytes

public int getNumBytes()
Get the number of data bytes

Returns:
int the number of bytes

getByte

public int getByte(int b)
Get a hex data byte from the message

Data bytes are encoded as two ASCII hex digits. The starting position is byte 10 or byte 5, depending on whether this is an extended or standard message

Parameters:
b - The byte offset (0 - 7)
Returns:
The value


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