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) NceTrafficController
tc
-
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 boolean
isSensorMessage()
Examine message to see if it is an asynchronous sensor (AIU) state reportboolean
isUnsolicited()
Get flag for Unsolicited.int
pollValue()
Extract poll values from binary replyprotected int
skipPrefix(int index)
java.lang.String
toMonitorString()
int
value()
-
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:
skipPrefix
in classAbstractMRReply
-
value
public int value()
- Overrides:
value
in classAbstractMRReply
-
pollValue
public int pollValue()
Extract poll values from binary reply- Overrides:
pollValue
in 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:AbstractMRReply
Get flag for Unsolicited.- Overrides:
isUnsolicited
in classAbstractMRReply
- Returns:
- true if Unsolicited, else false.
-
toMonitorString
public java.lang.String toMonitorString()
- Returns:
- a human-readable representation of the message.
-
-