Package jmri.jmrix.grapevine
Class SerialReply
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRReply
jmri.jmrix.grapevine.SerialReply
- All Implemented Interfaces:
Message
Contains the data payload of a serial reply packet. Note that it's _only_ the
payload.
-
Field Summary
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZEFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new SerialReply instance.Create a new SerialReply instance from a string.Copy a Reply to a new SerialReply instance. -
Method Summary
Modifier and TypeMethodDescriptionformat()Format the reply as human-readable text.intgetAddr()Is reply to poll message.intgetBank()booleanisError()booleanbooleanbooleanbooleanGet flag for Unsolicited.voidsetNumDataElements(int len) protected intskipPrefix(int index) Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, match, maxSize, pollValue, setBinary, setElement, setOpCode, setUnsolicited, skipWhiteSpace, toString, valueMethods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.jmrix.Message
toMonitorString
-
Constructor Details
-
SerialReply
public SerialReply()Create a new SerialReply instance. -
SerialReply
Copy a Reply to a new SerialReply instance.- Parameters:
l- the reply to copy
-
SerialReply
Create a new SerialReply instance from a string.- Parameters:
s- String to use as reply content
-
-
Method Details
-
getAddr
Is reply to poll message.- Returns:
- true if reply to a poll message, else false.
-
isUnsolicited
Description copied from class:AbstractMRReplyGet flag for Unsolicited.- Overrides:
isUnsolicitedin classAbstractMRReply- Returns:
- true if Unsolicited, else false.
-
skipPrefix
- Specified by:
skipPrefixin classAbstractMRReply
-
getBank
-
isError
-
isFromParallelSensor
-
isFromOldSerialSensor
-
isFromNewSerialSensor
-
setNumDataElements
-
format
Format the reply as human-readable text.Since Grapevine doesn't distinguish between message and reply, this uses the Message method.
- Returns:
- human readable text of reply.
-