jmri.jmrix.powerline.simulator
Class SpecificMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.powerline.SerialMessage
jmri.jmrix.powerline.simulator.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, 2009, Ken Cameron Copyright (C) 2010
|
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. |
|
Method Summary |
static SpecificMessage |
getExtCmd(int housecode,
int devicecode,
int function,
int dimcode)
|
static SpecificMessage |
getInsteonAddress(int idhighbyte,
int idmiddlebyte,
int idlowbyte)
|
static SpecificMessage |
getInsteonFunction(int idhighbyte,
int idmiddlebyte,
int idlowbyte,
int function,
int flag,
int cmd1,
int cmd2)
|
boolean |
getInterlocked()
|
static SerialMessage |
getPoll(int addr)
|
int |
getResponseLength()
|
static SpecificMessage |
getX10Address(int housecode,
int devicecode)
create an Insteon message with the X10 address |
static SpecificMessage |
getX10AddressDim(int housecode,
int devicecode,
int dimcode)
create an Insteon message with the X10 address and dim steps |
static SpecificMessage |
getX10Function(int housecode,
int function)
|
static SpecificMessage |
getX10FunctionDim(int housecode,
int function,
int dimcode)
|
void |
setInterlocked(boolean v)
|
void |
setResponseLength(int l)
|
String |
toMonitorString()
|
| 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
getPoll
public static SerialMessage getPoll(int addr)
getX10Address
public static SpecificMessage getX10Address(int housecode,
int devicecode)
- create an Insteon message with the X10 address
- Parameters:
housecode - devicecode -
- Returns:
- message
getX10AddressDim
public static SpecificMessage getX10AddressDim(int housecode,
int devicecode,
int dimcode)
- create an Insteon message with the X10 address and dim steps
- Parameters:
housecode - devicecode - dimcode -
- Returns:
- message
getX10FunctionDim
public static SpecificMessage getX10FunctionDim(int housecode,
int function,
int dimcode)
getX10Function
public static SpecificMessage getX10Function(int housecode,
int function)
getExtCmd
public static SpecificMessage getExtCmd(int housecode,
int devicecode,
int function,
int dimcode)
getInsteonAddress
public static SpecificMessage getInsteonAddress(int idhighbyte,
int idmiddlebyte,
int idlowbyte)
getInsteonFunction
public static SpecificMessage getInsteonFunction(int idhighbyte,
int idmiddlebyte,
int idlowbyte,
int function,
int flag,
int cmd1,
int cmd2)
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: