Package jmri.jmrix.nce
Class NceReply
- java.lang.Object
-
- jmri.jmrix.AbstractMessage
-
- jmri.jmrix.AbstractMRReply
-
- jmri.jmrix.nce.NceReply
-
- All Implemented Interfaces:
Message
public class NceReply extends AbstractMRReply
Carries the reply to an NceMessage.Some rudimentary support is provided for the "binary" option.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NceTrafficControllertc-
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZE
-
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
-
-
Constructor Summary
Constructors Constructor Description NceReply(NceTrafficController tc)NceReply(NceTrafficController tc, java.lang.String s)NceReply(NceTrafficController tc, NceReply l)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisSensorMessage()Examine message to see if it is an asynchronous sensor (AIU) state reportbooleanisUnsolicited()Get flag for Unsolicited.intpollValue()Extract poll values from binary replyprotected intskipPrefix(int index)java.lang.StringtoMonitorString()intvalue()-
Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, match, maxSize, setBinary, setElement, setOpCode, setUnsolicited, skipWhiteSpace, toString
-
Methods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCode
-
-
-
-
Constructor Detail
-
NceReply
public NceReply(NceTrafficController tc)
-
NceReply
public NceReply(NceTrafficController tc, java.lang.String s)
-
NceReply
public NceReply(NceTrafficController tc, NceReply l)
-
-
Method Detail
-
skipPrefix
protected int skipPrefix(int index)
- Specified by:
skipPrefixin classAbstractMRReply
-
value
public int value()
- Overrides:
valuein classAbstractMRReply
-
pollValue
public int pollValue()
Extract poll values from binary reply- Overrides:
pollValuein classAbstractMRReply
-
isSensorMessage
public boolean isSensorMessage()
Examine message to see if it is an asynchronous sensor (AIU) state report- Returns:
- true if message asynch sensor message Boudreau: Improved detection to check three bytes and message length of exactly 3 KSC 24 Aug 2024 - seems to never match a reply
-
isUnsolicited
public boolean isUnsolicited()
Description copied from class:AbstractMRReplyGet flag for Unsolicited.- Overrides:
isUnsolicitedin classAbstractMRReply- Returns:
- true if Unsolicited, else false.
-
toMonitorString
public java.lang.String toMonitorString()
- Returns:
- a human-readable representation of the message.
-
-