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) int
endAtElement
(package private) java.util.List<java.lang.String>
headerDetails
(package private) int
objectId
(package private) java.lang.String
replyType
-
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 boolean
containsEnd()
Check for last line starts with"<END "
.static java.lang.String
getContentDetail(java.lang.String str)
static java.lang.String
getContentDetails(java.lang.String line, java.lang.String item)
java.lang.String[]
getContents()
get the contents of the reply, excluding the header and footerint
getEcosObjectId()
java.util.List<java.lang.String>
getReplyHeaderDetails()
java.lang.String
getReplyType()
int
getResultCode()
Get the Result Code.(package private) boolean
isEvent()
Is this EcosReply actually an independent<EVENT
message?boolean
isReply()
boolean
isUnsolicited()
Get flag for Unsolicited.int
maxSize()
protected int
skipPrefix(int index)
int
value()
-
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:
maxSize
in classAbstractMRReply
-
skipPrefix
protected int skipPrefix(int index)
- Specified by:
skipPrefix
in classAbstractMRReply
-
value
public int value()
- Overrides:
value
in 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<EVENT
message?- Returns:
- true if it is an independent message
-
isUnsolicited
public boolean isUnsolicited()
Description copied from class:AbstractMRReply
Get flag for Unsolicited.- Overrides:
isUnsolicited
in 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)
-
-