Package jmri.jmrix.cmri.serial
Class SerialMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.cmri.serial.SerialMessage
- All Implemented Interfaces:
Message
public class SerialMessage extends AbstractMRMessage
Contains the data payload of a CMRI serial packet.
Note that only the payload, not the header or trailer, nor the padding DLE characters are included. These are added during transmission.
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
POLL_TIMEOUT
-
Constructor Summary
Constructors Constructor Description SerialMessage()
SerialMessage(byte[] a)
This ctor interprets the byte array as a sequence of characters to send.SerialMessage(int i)
SerialMessage(String m)
This ctor interprets the String as the exact sequence to send, byte-for-byte.SerialMessage(SerialMessage m)
-
Method Summary
Methods inherited from class jmri.jmrix.AbstractMRMessage
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeout
Methods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCode, setElement
-
Field Details
-
POLL_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Details
-
SerialMessage
public SerialMessage() -
SerialMessage
-
SerialMessage
-
SerialMessage
This ctor interprets the String as the exact sequence to send, byte-for-byte.- Parameters:
m
- message string.
-
SerialMessage
This ctor interprets the byte array as a sequence of characters to send.- Parameters:
a
- Array of bytes to send
-
-
Method Details