jmri.jmrix.powerline.cp290
Class SpecificMessage

java.lang.Object
  extended by jmri.jmrix.AbstractMessage
      extended by jmri.jmrix.AbstractMRMessage
          extended by jmri.jmrix.powerline.SerialMessage
              extended by jmri.jmrix.powerline.cp290.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:

Author:
Bob Jacobsen Copyright (C) 2001,2003, 2006, 2007, 2008

Field Summary
 
Fields inherited from class jmri.jmrix.AbstractMRMessage
LONG_TIMEOUT, SHORT_TIMEOUT
 
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
 
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
 int getAddr()
           
static SpecificMessage getAddress(int housecode, int devicecode)
           
static SpecificMessage getAddressDim(int housecode, int devicecode, int dimcode)
           
static SpecificMessage getFunction(int housecode, int function)
           
static SpecificMessage getFunctionDim(int housecode, int function, int dimcode)
           
static SerialMessage getPoll(int addr)
           
 int getResponseLength()
           
 boolean isPoll()
           
 boolean isXmt()
           
 void setResponseLength(int l)
           
 String toMonitorString()
          Translate packet to text
 
Methods inherited from class jmri.jmrix.powerline.SerialMessage
getInterlocked, setInterlocked
 
Methods inherited from class jmri.jmrix.AbstractMRMessage
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, 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

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 - message
l - 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
Method Detail

toMonitorString

public String toMonitorString()
Translate packet to text

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)

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)


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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads