jmri.jmrix.qsi
Class QsiReply

java.lang.Object
  extended by jmri.jmrix.AbstractMessage
      extended by jmri.jmrix.qsi.QsiReply
All Implemented Interfaces:
Message

public class QsiReply
extends AbstractMessage

Carries the reply to an QsiMessage

Author:
Bob Jacobsen Copyright (C) 2007

Field Summary
static int MAXSIZE
           
 
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
 
Constructor Summary
QsiReply()
           
QsiReply(QsiReply m)
           
QsiReply(String s)
           
QsiReply(String s, boolean b)
           
 
Method Summary
static QsiMessage getAck(QsiReply r)
           
 boolean getChecksum()
           
 int getOpCode()
           
 void setElement(int n, int v)
           
 void setOpCode(int i)
           
 boolean strip()
           
 String toString()
           
 int value()
          Extracts Read-CV returned value from a message.
 
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
 

Field Detail

MAXSIZE

public static final int MAXSIZE
See Also:
Constant Field Values
Constructor Detail

QsiReply

public QsiReply()

QsiReply

public QsiReply(QsiReply m)

QsiReply

public QsiReply(String s)

QsiReply

public QsiReply(String s,
                boolean b)
Method Detail

setOpCode

public void setOpCode(int i)

getOpCode

public int getOpCode()

setElement

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

getAck

public static QsiMessage getAck(QsiReply r)

strip

public boolean strip()

getChecksum

public boolean getChecksum()

toString

public String toString()
Specified by:
toString in interface Message
Overrides:
toString in class Object

value

public int value()
Extracts Read-CV returned value from a message. Returns -1 if message can't be parsed. QSI is assumed to not be echoing commands. A reply to a command may include the prompt that was printed after the previous command Reply to a CV read is of the form " = hvv" where vv is the CV value in hex



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