|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.grapevine.SerialMessage
public class SerialMessage
Contains the data payload of a serial packet.
| Field Summary |
|---|
| Fields inherited from class jmri.jmrix.AbstractMRMessage |
|---|
LONG_TIMEOUT, SHORT_TIMEOUT |
| Fields inherited from class jmri.jmrix.AbstractMessage |
|---|
_dataChars, _nDataChars |
| Constructor Summary | |
|---|---|
SerialMessage()
|
|
SerialMessage(byte[] a)
This ctor interprets the byte array as a sequence of characters to send. |
|
SerialMessage(int len)
|
|
SerialMessage(SerialMessage m)
|
|
SerialMessage(String m)
This ctor interprets the String as the exact sequence to send, byte-for-byte. |
|
| Method Summary | |
|---|---|
String |
format()
Format the reply as human-readable text. |
int |
getAddr()
|
static SerialMessage |
getPoll(int addr)
For Grapevine, which doesn't have a data poll, the poll operation is only used to see that the nodes are present. |
int |
getReplyLen()
|
boolean |
replyExpected()
Is a reply expected to this message? |
void |
setBank(int b)
|
void |
setParity()
|
void |
setParity(int start)
|
void |
setReplyLen(int len)
Set the number of characters expected back from the command station. |
| Methods inherited from class jmri.jmrix.AbstractMRMessage |
|---|
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, setBinary, setNeededMode, setOpCode, setRetries, setTimeout, toString |
| Methods inherited from class jmri.jmrix.AbstractMessage |
|---|
getElement, getNumDataElements, setElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SerialMessage()
public SerialMessage(int len)
public SerialMessage(SerialMessage m)
public SerialMessage(String m)
m - public SerialMessage(byte[] a)
a - Array of bytes to send| Method Detail |
|---|
public boolean replyExpected()
AbstractMRMessageBy default, a reply is expected to every message; either a reply or a timeout is needed before the next message can be sent.
If this returns false, the transmit queue will immediately go on to transmitt the next message (if any).
replyExpected in class AbstractMRMessagepublic int getAddr()
public static SerialMessage getPoll(int addr)
public void setBank(int b)
public void setParity()
public void setParity(int start)
public void setReplyLen(int len)
public int getReplyLen()
public String format()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||