Package jmri.jmrix.dcc4pc
Class Dcc4PcReply
- java.lang.Object
-
- jmri.jmrix.AbstractMessage
-
- jmri.jmrix.AbstractMRReply
-
- jmri.jmrix.dcc4pc.Dcc4PcReply
-
- All Implemented Interfaces:
Message
public class Dcc4PcReply extends AbstractMRReply
Dcc4PcReply.java Carries the reply to a Dcc4PcMessage
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanerrorstatic intFAILEDstatic intINCOMPLETEstatic intmaxSize(package private) Dcc4PcMessageorigMsg(package private) booleanstripRunstatic intSUCCESS-
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZE
-
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
-
-
Constructor Summary
Constructors Constructor Description Dcc4PcReply()Dcc4PcReply(byte[] packet)Dcc4PcReply(java.lang.String replyString)Dcc4PcReply(Dcc4PcReply m)Create a new Dcc4PcReply as a deep copy of an existing Dcc4PcReply
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBoard()int[]getDataAsArray()byte[]getFormattedReply()intgetMessageType()Dcc4PcMessagegetOriginalRequest()booleanisError()Is this reply indicating that a general error has occurred?intmatch(java.lang.String s)Returns the index of String s in the replyintmaxSize()voidsetError(boolean boo)protected voidsetOriginalRequest(Dcc4PcMessage msg)protected intskipPrefix(int index)voidstrip()java.lang.StringtoHexString()Returns a hex string representation of this Dcc4PcReply.java.lang.StringtoString()-
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, isUnsolicited, pollValue, setBinary, setElement, setOpCode, setUnsolicited, skipWhiteSpace, value
-
Methods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.Message
toMonitorString
-
-
-
-
Field Detail
-
maxSize
public static final int maxSize
- See Also:
- Constant Field Values
-
error
boolean error
-
FAILED
public static final int FAILED
- See Also:
- Constant Field Values
-
INCOMPLETE
public static final int INCOMPLETE
- See Also:
- Constant Field Values
-
SUCCESS
public static final int SUCCESS
- See Also:
- Constant Field Values
-
stripRun
boolean stripRun
-
origMsg
Dcc4PcMessage origMsg
-
-
Constructor Detail
-
Dcc4PcReply
public Dcc4PcReply()
-
Dcc4PcReply
public Dcc4PcReply(byte[] packet)
-
Dcc4PcReply
public Dcc4PcReply(Dcc4PcReply m)
Create a new Dcc4PcReply as a deep copy of an existing Dcc4PcReply- Parameters:
m- the Dcc4PcReply to copy
-
Dcc4PcReply
public Dcc4PcReply(java.lang.String replyString)
-
-
Method Detail
-
skipPrefix
protected int skipPrefix(int index)
- Specified by:
skipPrefixin classAbstractMRReply
-
setError
public void setError(boolean boo)
-
isError
public boolean isError()
Is this reply indicating that a general error has occurred?- Returns:
- true if error, else false.
-
strip
public void strip()
-
toHexString
public java.lang.String toHexString()
Returns a hex string representation of this Dcc4PcReply.- Returns:
- hex string format of Reply using 0x format.
-
match
public int match(java.lang.String s)
Returns the index of String s in the reply- Overrides:
matchin classAbstractMRReply
-
getDataAsArray
public int[] getDataAsArray()
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceMessage- Overrides:
toStringin classAbstractMRReply
-
getFormattedReply
public byte[] getFormattedReply()
-
maxSize
public int maxSize()
- Overrides:
maxSizein classAbstractMRReply
-
getOriginalRequest
public Dcc4PcMessage getOriginalRequest()
-
setOriginalRequest
protected void setOriginalRequest(Dcc4PcMessage msg)
-
getBoard
public int getBoard()
-
getMessageType
public int getMessageType()
-
-