001package jmri.jmrix.tams;
002
003/**
004 * Constants to represent values seen in Tams traffic
005 *
006 * @author  Jan Boen 151216
007 * @author Based on work from Kevin Dickerson
008 */
009public final class TamsConstants {
010
011    // Various bit masks
012    public final static int XPWRMASK = 0x08;  //bit 3 of XStatus 
013    public final static int XSENMASK = 0x04;  //bit 2 of XEvent
014    public final static int XLOKMASK = 0x01;  //bit 0 of XEvent
015    public final static int XTRNMASK = 0x18;  //bits 4 and 5 of XEvent
016
017    // Various other elements
018    public final static int EOM80 = 0x80;  //80h as end of message
019    public final static int EOM00 = 0x00;  //00h as end of message 
020    public final static int POLLMSG = 0x00;  //first byte for a Poll related TamsMessage 
021    public final static int MASKFF = 0xff;  //ffh as mask 
022   
023    // System Commands
024    public final static int LEADINGX = 0x58;
025    public final static int XSTATUS = 0xA2;
026    public final static int XEVENT = 0xC8;
027    public final static int XSENSOR = 0x98;
028    public final static int XSENSOFF = 0x99;
029    public final static int XEVTSEN = 0xCB;
030    public final static int XEVTLOK = 0xC9;
031    public final static int XEVTTRN = 0xCA;
032    public final static int XPWROFF = 0xA6;
033    public final static int XPWRON = 0xA7;
034}