Package jmri.jmrix.can.adapters.lawicell
Class Reply
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRReply
jmri.jmrix.can.adapters.lawicell.Reply
- All Implemented Interfaces:
Message
Class for replies in a LAWICELL message/reply protocol.
The Lawicell adapter protocol encodes messages as an ASCII string of up to 24 characters of the form: tiiildd...[CR] Tiiiiiiiildd...[CR] The t or T indicates a standard or extended CAN frame iiiiiiii is the header as hex digits l is the number of bytes of data dd are the (up to) 8 data bytes
RTR Extended frames start with an R, RTR standard frames with r.
-
Field Summary
Fields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZEFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetByte(int b) Get a hex data byte from the messageintGet the CAN header as an intintGet the number of data bytesbooleanbooleanisRtrSet()voidsetData(int[] d) protected intskipPrefix(int index) Methods inherited from class jmri.jmrix.AbstractMRReply
flush, getOpCode, isBinary, isRetransmittableErrorMsg, isUnsolicited, 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
-
Reply
public Reply() -
Reply
-
-
Method Details
-
createReply
-
skipPrefix
- Specified by:
skipPrefixin classAbstractMRReply
-
setData
-
isExtended
-
isRtrSet
-
getHeader
Get the CAN header as an int- Returns:
- int the CAN ID
-
getNumBytes
Get the number of data bytes- Returns:
- int the number of bytes
-
getByte
Get a hex data byte from the messageData bytes are encoded as two ASCII hex digits. The starting position is byte 10 or byte 5, depending on whether this is an extended or standard message
- Parameters:
b- The byte offset (0 - 7)- Returns:
- The value
-