jmri.jmrix.cmri.serial
Class SerialMessage

java.lang.Object
  extended by jmri.jmrix.AbstractMessage
      extended by jmri.jmrix.AbstractMRMessage
          extended by jmri.jmrix.cmri.serial.SerialMessage
All Implemented Interfaces:
Message

public class SerialMessage
extends AbstractMRMessage

Contains the data payload of a CMRI 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

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 i)
           
SerialMessage(SerialMessage m)
           
SerialMessage(String m)
          This ctor interprets the String as the exact sequence to send, byte-for-byte.
 
Method Summary
static SerialMessage getPoll(int UA)
           
 int getUA()
           
 boolean isInit()
           
 boolean isPoll()
           
 boolean isXmt()
           
 String toString()
           
 
Methods inherited from class jmri.jmrix.AbstractMRMessage
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeout
 
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

SerialMessage

public SerialMessage()

SerialMessage

public SerialMessage(int i)

SerialMessage

public SerialMessage(SerialMessage m)

SerialMessage

public SerialMessage(String m)
This ctor interprets the String as the exact sequence to send, byte-for-byte.

Parameters:
m -

SerialMessage

public SerialMessage(byte[] a)
This ctor interprets the byte array as a sequence of characters to send.

Parameters:
a - Array of bytes to send
Method Detail

toString

public String toString()
Specified by:
toString in interface Message
Overrides:
toString in class AbstractMRMessage

isPoll

public boolean isPoll()

isXmt

public boolean isXmt()

isInit

public boolean isInit()

getUA

public int getUA()

getPoll

public static SerialMessage getPoll(int UA)


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