001package jmri.jmrix.roco.z21;
002/**
003 * Constants to represent values seen in z21 traffic
004 *
005 * @author Paul Bender Copyright (C) 2003-2009
006 *
007 * Variable prefix abreviation keys (Some of these are from the z21 protocol
008 * documentation): LAN_X_ is for constants specific to the XpressNet tunnel
009 * LAN_LOCONET_ is for constants specific to the LocoNet tunnel
010 *
011 * A few variables don't have a prefix. The name should be self explanitory, but
012 * a prefix may be added later.
013 */
014public final class Z21Constants {
015
016    private Z21Constants(){
017        // class of constants.
018    }
019
020    /* XpressNet Tunnel Constants */
021
022    public static final int LAN_X_MESSAGE_TUNNEL = 0x0040;
023
024    /* XpressNet Programming Constants */
025    public static final int LAN_X_CV_READ_XHEADER = 0x23;
026    public static final int LAN_X_CV_READ_DB0 = 0x11;
027    public static final int LAN_X_CV_WRITE_XHEADER = 0x24;
028    public static final int LAN_X_CV_WRITE_DB0 = 0x12;
029    public static final int LAN_X_CV_RESULT_XHEADER = 0x64;
030    public static final int LAN_X_CV_RESULT_DB0 = 0x14;
031
032    /* XpressNet Locomotive Message Constants */
033    public static final int LAN_X_LOCO_INFO_REQUEST_Z21 = 0xF0; // defined in section 4.1 of the protocol documentation.
034    public static final int LAN_X_LOCO_INFO_RESPONSE = 0xEF; // defined in section 4.4 of the protocol documentation.
035    public static final int LAN_X_SET_LOCO_FUNCTION = 0xF8; // defined in section 4.3 of the protocol documentation.
036
037    /* XpressNet Turnout Message Constants */
038    public static final int LAN_X_GET_TURNOUT_INFO = 0x43; // defined in section 5.1 of the protocol documentation.
039    public static final int LAN_X_SET_TURNOUT= 0x53; // defined in section 5.2 of the protocol documentation.
040    public static final int LAN_X_TURNOUT_INFO = 0x43; // defined in section 5.3 of the protocol documentation.
041
042    /* LocoNet Tunnel Constants */
043}