jmri.jmrix.powerline.cm11
Class SpecificMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.powerline.SerialMessage
jmri.jmrix.powerline.cm11.SpecificMessage
- All Implemented Interfaces:
- Message
public class SpecificMessage
- extends SerialMessage
Contains the data payload of a serial
packet.
The transmission protocol can come in one of several forms:
- If the interlocked parameter is false (default),
the packet is just sent. If the response length is not zero,
a reply of that length is expected.
- If the interlocked parameter is true, the transmission
will require a CRC interlock, which will be automatically added.
(Design note: this is done to make sure that the messages
remain atomic)
- Author:
- Bob Jacobsen Copyright (C) 2001,2003, 2006, 2007, 2008
|
Constructor Summary |
SpecificMessage(byte[] a,
int l)
This ctor interprets the byte array as
a sequence of characters to send. |
SpecificMessage(int l)
|
SpecificMessage(String m,
int l)
This ctor interprets the String as the exact
sequence to send, byte-for-byte. |
| Methods inherited from class jmri.jmrix.AbstractMRMessage |
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeout, toString |
SpecificMessage
public SpecificMessage(int l)
SpecificMessage
public SpecificMessage(String m,
int l)
- This ctor interprets the String as the exact
sequence to send, byte-for-byte.
- Parameters:
m - messagel - response length in bytes
SpecificMessage
public SpecificMessage(byte[] a,
int l)
- This ctor interprets the byte array as
a sequence of characters to send.
- Parameters:
a - Array of bytes to send
setInterlocked
public void setInterlocked(boolean v)
- Overrides:
setInterlocked in class SerialMessage
getInterlocked
public boolean getInterlocked()
- Overrides:
getInterlocked in class SerialMessage
toMonitorString
public String toMonitorString()
- Specified by:
toMonitorString in class SerialMessage
setResponseLength
public void setResponseLength(int l)
- Overrides:
setResponseLength in class SerialMessage
getResponseLength
public int getResponseLength()
- Overrides:
getResponseLength in class SerialMessage
isPoll
public boolean isPoll()
- Overrides:
isPoll in class SerialMessage
isXmt
public boolean isXmt()
- Overrides:
isXmt in class SerialMessage
getAddr
public int getAddr()
- Overrides:
getAddr in class SerialMessage
getPoll
public static SerialMessage getPoll(int addr)
setCM11Time
public static SpecificMessage setCM11Time(int housecode)
getAddress
public static SpecificMessage getAddress(int housecode,
int devicecode)
getAddressDim
public static SpecificMessage getAddressDim(int housecode,
int devicecode,
int dimcode)
getFunctionDim
public static SpecificMessage getFunctionDim(int housecode,
int function,
int dimcode)
getFunction
public static SpecificMessage getFunction(int housecode,
int function)
getExtCmd
public static SpecificMessage getExtCmd(int housecode,
int devicecode,
int function,
int dimcode)
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: