Package jmri.jmrix.qsi
Class QsiReply
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.qsi.QsiReply
- All Implemented Interfaces:
Message
Carries the reply to an QsiMessage.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intstatic final intFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QsiMessagebooleanint(package private) intvoidsetElement(int n, int v) Set a single Data Element at a particular index.voidsetOpCode(int i) (package private) intskipEqual(int index) (package private) intskipWhiteSpace(int index) booleanstrip()toString()toString(QsiTrafficController controller) intvalue()Extracts Read-CV returned value from a message.Methods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.jmrix.Message
toMonitorString
-
Field Details
-
MAXREPLYLENGTH
- See Also:
-
MAXSIZE
- See Also:
-
-
Constructor Details
-
QsiReply
public QsiReply() -
QsiReply
-
QsiReply
-
QsiReply
-
-
Method Details
-
setOpCode
-
getOpCode
-
setElement
Description copied from class:AbstractMessageSet a single Data Element at a particular index.- Specified by:
setElementin interfaceMessage- Overrides:
setElementin classAbstractMessage- Parameters:
n- index of element.v- value of element.
-
getAck
-
strip
-
getChecksum
-
toString
Description copied from interface:Message -
toString
-
value
Extracts Read-CV returned value from a message.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.
- Returns:
- the value of the read CV or -1 if the reply cannot be parsed.
-
match
-
skipWhiteSpace
-
skipEqual
-