jmri.jmrix.oaktree
Class SerialMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.oaktree.SerialMessage
- All Implemented Interfaces:
- Message
public class SerialMessage
- extends AbstractMRMessage
Contains the data payload of a serial
packet.
Note that only the payload, not
the header or trailer, nor the padding DLE characters
are included. These are added during transmission.
- Author:
- Bob Jacobsen Copyright (C) 2001,2003, 2006
| Methods inherited from class jmri.jmrix.AbstractMRMessage |
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeout, toString |
SerialMessage
public SerialMessage(int l)
SerialMessage
public SerialMessage(SerialMessage m,
int l)
SerialMessage
public SerialMessage(String m,
int l)
- This ctor interprets the String as the exact
sequence to send, byte-for-byte.
- Parameters:
m -
SerialMessage
public SerialMessage(byte[] a,
int l)
- This ctor interprets the byte array as
a sequence of characters to send.
- Parameters:
a - Array of bytes to send
setResponseLength
public void setResponseLength(int l)
getResponseLength
public int getResponseLength()
setElement
public void setElement(int element,
int value)
- Override parent method to ensure that message always has
valid error check byte
- Specified by:
setElement in interface Message- Overrides:
setElement in class AbstractMessage
isPoll
public boolean isPoll()
isXmt
public boolean isXmt()
getAddr
public int getAddr()
getPoll
public static SerialMessage getPoll(int addr)
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: