jmri.jmrix.zimo
Class Mx1Message

java.lang.Object
  extended by jmri.jmrix.NetMessage
      extended by jmri.jmrix.zimo.Mx1Message
All Implemented Interfaces:
Serializable

public class Mx1Message
extends NetMessage
implements Serializable

Represents a single command or response on the XpressNet.

Content is represented with ints to avoid the problems with sign-extension that bytes have, and because a Java char is actually a variable number of bytes in Unicode.

Author:
Bob Jacobsen Copyright (C) 2002
See Also:
Serialized Form

Constructor Summary
Mx1Message(int len)
          Create a new object, representing a specific-length message.
 
Method Summary
 boolean checkParity()
          check whether the message has a valid parity in fact check for CR or LF as end of message
 void setParity()
          Set parity to be correct for this implementation.
 
Methods inherited from class jmri.jmrix.NetMessage
getElement, getNumDataElements, getOpCode, getOpCodeHex, highByte, lowByte, setElement, setOpCode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mx1Message

public Mx1Message(int len)
Create a new object, representing a specific-length message.

Parameters:
len - Total bytes in message, including opcode and error-detection byte.
Method Detail

checkParity

public boolean checkParity()
check whether the message has a valid parity in fact check for CR or LF as end of message

Specified by:
checkParity in class NetMessage

setParity

public void setParity()
Description copied from class: NetMessage
Set parity to be correct for this implementation. Note that parity is really a stand-in for whatever error checking, etc needs to be done

Specified by:
setParity in class NetMessage


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