Package jmri.jmrix.tams
Class TamsMessage
- java.lang.Object
-
- jmri.jmrix.AbstractMessage
-
- jmri.jmrix.AbstractMRMessage
-
- jmri.jmrix.tams.TamsMessage
-
- All Implemented Interfaces:
Message
public class TamsMessage extends AbstractMRMessage
Encodes a message to a Tams MasterControl command station.The
TamsReply
class handles the response from the command station.Based on work by Bob Jacobsen and Kevin Dickerson
-
-
Field Summary
Fields Modifier and Type Field Description static int
POLLTIMEOUT
-
Fields inherited from class jmri.jmrix.AbstractMRMessage
LONG_TIMEOUT, SHORT_TIMEOUT
-
Fields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars
-
-
Constructor Summary
Constructors Constructor Description TamsMessage()
TamsMessage(int i)
TamsMessage(int[] m)
TamsMessage(java.lang.String m)
TamsMessage(TamsMessage m)
-
Method Summary
-
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
equals, getNumDataElements, hashCode, setElement
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.Message
toMonitorString
-
-
-
-
Field Detail
-
POLLTIMEOUT
public static final int POLLTIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TamsMessage
public TamsMessage()
-
TamsMessage
public TamsMessage(int i)
-
TamsMessage
public TamsMessage(TamsMessage m)
-
TamsMessage
public TamsMessage(java.lang.String m)
-
TamsMessage
public TamsMessage(int[] m)
-
-
Method Detail
-
getElement
public int getElement(int n)
Description copied from class:AbstractMessage
Get a particular element in a Message.- Specified by:
getElement
in interfaceMessage
- Overrides:
getElement
in classAbstractMessage
- Parameters:
n
- Element Index.- Returns:
- single element of message.
-
getReplyType
public char getReplyType()
-
setReplyType
public void setReplyType(char rt)
-
getReplyOneByte
public boolean getReplyOneByte()
-
setReplyOneByte
public void setReplyOneByte(boolean rob)
-
getReplyLastByte
public int getReplyLastByte()
-
setReplyLastByte
public void setReplyLastByte(int rlb)
-
setXPwrOff
public static TamsMessage setXPwrOff()
-
setXPwrOn
public static TamsMessage setXPwrOn()
-
getXStatus
public static TamsMessage getXStatus()
-
getXEvtSen
public static TamsMessage getXEvtSen()
-
getXEvtLok
public static TamsMessage getXEvtLok()
-
getXEvtTrn
public static TamsMessage getXEvtTrn()
-
setXSR
public static TamsMessage setXSR()
-
setXSensOff
public static TamsMessage setXSensOff()
-
getReadPagedCV
public static TamsMessage getReadPagedCV(int cv)
-
getWritePagedCV
public static TamsMessage getWritePagedCV(int cv, int val)
-
getReadRegister
public static TamsMessage getReadRegister(int reg)
-
getWriteRegister
public static TamsMessage getWriteRegister(int reg, int val)
-
getReadDirectByteCV
public static TamsMessage getReadDirectByteCV(int cv)
-
getWriteDirectByteCV
public static TamsMessage getWriteDirectByteCV(int cv, int val)
-
getReadDirectBitCV
public static TamsMessage getReadDirectBitCV(int cv)
-
getWriteDirectBitCV
public static TamsMessage getWriteDirectBitCV(int cv, int bit, int val)
-
getWriteOpsModeCVMsg
public static TamsMessage getWriteOpsModeCVMsg(int adr, int cv, int val)
-
getWriteOpsModeAccCVMsg
public static TamsMessage getWriteOpsModeAccCVMsg(int adr, int cv, int val)
-
-