jmri.jmrix.can.adapters.gridconnect
Class GridConnectReply

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

public class GridConnectReply
extends AbstractMRReply

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

Author:
Andrew Crosland Copyright (C) 2008

Field Summary
 
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZE
 
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
 
Constructor Summary
GridConnectReply()
           
GridConnectReply(GridConnectReply m)
           
GridConnectReply(int i)
           
GridConnectReply(int[] d)
           
 
Method Summary
 int getByte(int b)
          Get a hex data byte from the message Data bytes are encoded as two ASCII hex digits starting at byte 7 of the message.
 int getElement(int n)
           
 int getID()
          Get the CBUS ID as an int
 int getNumBytes()
          Get the number of data bytes
 int getNumDataElements()
           
 int getPri()
          Get the CBUS Priority as an int
 int maxSize()
           
 void setData(int[] d)
           
 void setElement(int n, int v)
           
 void setNumDataElements(int n)
           
protected  int skipPrefix(int index)
           
 
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, 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

GridConnectReply

public GridConnectReply()

GridConnectReply

public GridConnectReply(int i)

GridConnectReply

public GridConnectReply(int[] d)

GridConnectReply

public GridConnectReply(GridConnectReply m)
Method Detail

skipPrefix

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

getNumDataElements

public int getNumDataElements()
Specified by:
getNumDataElements in interface Message
Overrides:
getNumDataElements in class AbstractMessage

setNumDataElements

public void setNumDataElements(int n)

getElement

public int getElement(int n)
Specified by:
getElement in interface Message
Overrides:
getElement in class AbstractMessage

setElement

public void setElement(int n,
                       int v)
Specified by:
setElement in interface Message
Overrides:
setElement in class AbstractMRReply

maxSize

public int maxSize()
Overrides:
maxSize in class AbstractMRReply

setData

public void setData(int[] d)

getID

public int getID()
Get the CBUS ID as an int

Returns:
int the CBUS ID

getPri

public int getPri()
Get the CBUS Priority as an int

Returns:
int the CBUS priority

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 starting at byte 7 of the message.

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


Copyright © 1997 - 2008 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: SourceForge_Logo