Package jmri.jmrix.ecos
Class EcosReply
- java.lang.Object
-
- jmri.jmrix.AbstractMessage
-
- jmri.jmrix.AbstractMRReply
-
- jmri.jmrix.ecos.EcosReply
-
- All Implemented Interfaces:
Message
public class EcosReply extends AbstractMRReply
Carries the reply to an EcosMessage.Some rudimentary support is provided for the "binary" option.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intendAtElement(package private) java.util.List<java.lang.String>headerDetails(package private) intobjectId(package private) java.lang.StringreplyType-
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZE
-
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsEnd()Check for last line starts with"<END ".static java.lang.StringgetContentDetail(java.lang.String str)static java.lang.StringgetContentDetails(java.lang.String line, java.lang.String item)java.lang.String[]getContents()get the contents of the reply, excluding the header and footerintgetEcosObjectId()java.util.List<java.lang.String>getReplyHeaderDetails()java.lang.StringgetReplyType()intgetResultCode()Get the Result Code.(package private) booleanisEvent()Is this EcosReply actually an independent<EVENTmessage?booleanisReply()booleanisUnsolicited()Get flag for Unsolicited.intmaxSize()protected intskipPrefix(int index)intvalue()-
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, match, pollValue, setBinary, setElement, setOpCode, setUnsolicited, skipWhiteSpace, toString
-
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
-
endAtElement
int endAtElement
-
replyType
java.lang.String replyType
-
headerDetails
java.util.List<java.lang.String> headerDetails
-
objectId
int objectId
-
-
Method Detail
-
maxSize
public int maxSize()
- Overrides:
maxSizein classAbstractMRReply
-
skipPrefix
protected int skipPrefix(int index)
- Specified by:
skipPrefixin classAbstractMRReply
-
value
public int value()
- Overrides:
valuein classAbstractMRReply
-
containsEnd
public boolean containsEnd()
Check for last line starts with"<END ".- Returns:
- true if contains END, else false.
-
getResultCode
public int getResultCode()
Get the Result Code.- Returns:
- result code, else -1 if the end code has not been found.
-
isEvent
boolean isEvent()
Is this EcosReply actually an independent<EVENTmessage?- Returns:
- true if it is an independent message
-
isUnsolicited
public boolean isUnsolicited()
Description copied from class:AbstractMRReplyGet flag for Unsolicited.- Overrides:
isUnsolicitedin classAbstractMRReply- Returns:
- true if Unsolicited, else false.
-
isReply
public boolean isReply()
-
getReplyType
public java.lang.String getReplyType()
-
getReplyHeaderDetails
public java.util.List<java.lang.String> getReplyHeaderDetails()
-
getEcosObjectId
public int getEcosObjectId()
-
getContents
public java.lang.String[] getContents()
get the contents of the reply, excluding the header and footer- Returns:
- array with reply values.
-
getContentDetail
public static java.lang.String getContentDetail(java.lang.String str)
-
getContentDetails
public static java.lang.String getContentDetails(java.lang.String line, java.lang.String item)
-
-