Package jmri.jmrix.mrc
Class MrcPackets
- java.lang.Object
-
- jmri.jmrix.mrc.MrcPackets
-
public class MrcPackets extends java.lang.Object
Some of the message formats used in this class are Copyright MRC, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Mrc Inc for separate permission.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACCESSORYPACKETCMD
(package private) static int[]
ACCESSORYPACKETHEADER
(package private) static int
ACCESSORYPACKETLENGTH
static int
ADDTOCONSISTPACKETCMD
(package private) static int[]
ADDTOCONSISTPACKETHEADER
(package private) static int
ADDTOCONSISTPACKETLENGTH
static int
ADDTOROUTEPACKETCMD
(package private) static int[]
ADDTOROUTEPACKETHEADER
(package private) static int
ADDTOROUTEPACKETLENGTH
(package private) static int[]
BADCMDRECEIVED
static int
BADCMDRECEIVEDCODE
static int
CLEARCONSISTPACKETCMD
(package private) static int[]
CLEARCONSISTPACKETHEADER
(package private) static int
CLEARCONSISTPACKETLENGTH
static int
CLEARROUTEPACKETCMD
(package private) static int[]
CLEARROUTEPACKETHEADER
(package private) static int
CLEARROUTEPACKETLENGTH
static int
FUNCTIONGROUP1PACKETCMD
(package private) static int[]
FUNCTIONGROUP1PACKETHEADER
static int
FUNCTIONGROUP2PACKETCMD
(package private) static int[]
FUNCTIONGROUP2PACKETHEADER
static int
FUNCTIONGROUP3PACKETCMD
(package private) static int[]
FUNCTIONGROUP3PACKETHEADER
static int
FUNCTIONGROUP4PACKETCMD
(package private) static int[]
FUNCTIONGROUP4PACKETHEADER
static int
FUNCTIONGROUP5PACKETCMD
(package private) static int[]
FUNCTIONGROUP5PACKETHEADER
static int
FUNCTIONGROUP6PACKETCMD
(package private) static int[]
FUNCTIONGROUP6PACKETHEADER
(package private) static int
FUNCTIONGROUPLENGTH
(package private) static int[]
GOODCMDRECEIVED
static int
GOODCMDRECEIVEDCODE
(package private) static int[]
LOCODBLCONTROL
static int
LOCODBLCONTROLCODE
(package private) static int[]
LOCOSOLECONTROL
static int
LOCOSOLECONTROLCODE
(package private) static int[]
POWEROFF
static int
POWEROFFCMD
(package private) static int[]
POWERON
static int
POWERONCMD
(package private) static int[]
PROGCMDSENT
static int
PROGCMDSENTCODE
static int
READCVCMD
(package private) static int[]
READCVHEADER
(package private) static int[]
READCVHEADERREPLY
static int
READCVHEADERREPLYCODE
(package private) static int
READCVPACKETLENGTH
(package private) static int[]
READDECODERADDRESS
static int
READDECODERADDRESSCMD
static int
ROUTECONTROLPACKETCMD
(package private) static int[]
ROUTECONTROLPACKETHEADER
(package private) static int
ROUTECONTROLPACKETLENGTH
static int
SETCLOCKAMPMCMD
(package private) static int[]
SETCLOCKAMPMHEADER
static int
SETCLOCKRATIOCMD
(package private) static int[]
SETCLOCKRATIOHEADER
static int
SETCLOCKTIMECMD
(package private) static int[]
SETCLOCKTIMEHEADER
static int
THROTTLEPACKETCMD
(package private) static int[]
THROTTLEPACKETHEADER
(package private) static int
THROTTLEPACKETLENGTH
static int
WRITECVPOMCMD
(package private) static int[]
WRITECVPOMHEADER
static int
WRITECVPROGCMD
(package private) static int[]
WRITECVPROGHEADER
-
Constructor Summary
Constructors Constructor Description MrcPackets()
-
Method Summary
-
-
-
Field Detail
-
THROTTLEPACKETCMD
public static final int THROTTLEPACKETCMD
- See Also:
- Constant Field Values
-
THROTTLEPACKETHEADER
static final int[] THROTTLEPACKETHEADER
-
THROTTLEPACKETLENGTH
static final int THROTTLEPACKETLENGTH
- See Also:
- Constant Field Values
-
FUNCTIONGROUP1PACKETCMD
public static final int FUNCTIONGROUP1PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP1PACKETHEADER
static final int[] FUNCTIONGROUP1PACKETHEADER
-
FUNCTIONGROUP2PACKETCMD
public static final int FUNCTIONGROUP2PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP2PACKETHEADER
static final int[] FUNCTIONGROUP2PACKETHEADER
-
FUNCTIONGROUP3PACKETCMD
public static final int FUNCTIONGROUP3PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP3PACKETHEADER
static final int[] FUNCTIONGROUP3PACKETHEADER
-
FUNCTIONGROUP4PACKETCMD
public static final int FUNCTIONGROUP4PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP4PACKETHEADER
static final int[] FUNCTIONGROUP4PACKETHEADER
-
FUNCTIONGROUP5PACKETCMD
public static final int FUNCTIONGROUP5PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP5PACKETHEADER
static final int[] FUNCTIONGROUP5PACKETHEADER
-
FUNCTIONGROUP6PACKETCMD
public static final int FUNCTIONGROUP6PACKETCMD
- See Also:
- Constant Field Values
-
FUNCTIONGROUP6PACKETHEADER
static final int[] FUNCTIONGROUP6PACKETHEADER
-
FUNCTIONGROUPLENGTH
static final int FUNCTIONGROUPLENGTH
- See Also:
- Constant Field Values
-
ADDTOCONSISTPACKETCMD
public static final int ADDTOCONSISTPACKETCMD
- See Also:
- Constant Field Values
-
ADDTOCONSISTPACKETHEADER
static final int[] ADDTOCONSISTPACKETHEADER
-
ADDTOCONSISTPACKETLENGTH
static final int ADDTOCONSISTPACKETLENGTH
- See Also:
- Constant Field Values
-
CLEARCONSISTPACKETCMD
public static final int CLEARCONSISTPACKETCMD
- See Also:
- Constant Field Values
-
CLEARCONSISTPACKETHEADER
static final int[] CLEARCONSISTPACKETHEADER
-
CLEARCONSISTPACKETLENGTH
static final int CLEARCONSISTPACKETLENGTH
- See Also:
- Constant Field Values
-
ROUTECONTROLPACKETCMD
public static final int ROUTECONTROLPACKETCMD
- See Also:
- Constant Field Values
-
ROUTECONTROLPACKETHEADER
static final int[] ROUTECONTROLPACKETHEADER
-
ROUTECONTROLPACKETLENGTH
static final int ROUTECONTROLPACKETLENGTH
- See Also:
- Constant Field Values
-
CLEARROUTEPACKETCMD
public static final int CLEARROUTEPACKETCMD
- See Also:
- Constant Field Values
-
CLEARROUTEPACKETHEADER
static final int[] CLEARROUTEPACKETHEADER
-
CLEARROUTEPACKETLENGTH
static final int CLEARROUTEPACKETLENGTH
- See Also:
- Constant Field Values
-
ADDTOROUTEPACKETCMD
public static final int ADDTOROUTEPACKETCMD
- See Also:
- Constant Field Values
-
ADDTOROUTEPACKETHEADER
static final int[] ADDTOROUTEPACKETHEADER
-
ADDTOROUTEPACKETLENGTH
static final int ADDTOROUTEPACKETLENGTH
- See Also:
- Constant Field Values
-
ACCESSORYPACKETCMD
public static final int ACCESSORYPACKETCMD
- See Also:
- Constant Field Values
-
ACCESSORYPACKETHEADER
static final int[] ACCESSORYPACKETHEADER
-
ACCESSORYPACKETLENGTH
static final int ACCESSORYPACKETLENGTH
- See Also:
- Constant Field Values
-
WRITECVPOMCMD
public static final int WRITECVPOMCMD
- See Also:
- Constant Field Values
-
WRITECVPOMHEADER
static final int[] WRITECVPOMHEADER
-
WRITECVPROGCMD
public static final int WRITECVPROGCMD
- See Also:
- Constant Field Values
-
WRITECVPROGHEADER
static final int[] WRITECVPROGHEADER
-
READDECODERADDRESSCMD
public static final int READDECODERADDRESSCMD
- See Also:
- Constant Field Values
-
READDECODERADDRESS
static final int[] READDECODERADDRESS
-
READCVCMD
public static final int READCVCMD
- See Also:
- Constant Field Values
-
READCVHEADER
static final int[] READCVHEADER
-
PROGCMDSENTCODE
public static final int PROGCMDSENTCODE
- See Also:
- Constant Field Values
-
PROGCMDSENT
static final int[] PROGCMDSENT
-
READCVHEADERREPLYCODE
public static final int READCVHEADERREPLYCODE
- See Also:
- Constant Field Values
-
READCVHEADERREPLY
static final int[] READCVHEADERREPLY
-
READCVPACKETLENGTH
static final int READCVPACKETLENGTH
- See Also:
- Constant Field Values
-
SETCLOCKRATIOCMD
public static final int SETCLOCKRATIOCMD
- See Also:
- Constant Field Values
-
SETCLOCKRATIOHEADER
static final int[] SETCLOCKRATIOHEADER
-
SETCLOCKTIMECMD
public static final int SETCLOCKTIMECMD
- See Also:
- Constant Field Values
-
SETCLOCKTIMEHEADER
static final int[] SETCLOCKTIMEHEADER
-
SETCLOCKAMPMCMD
public static final int SETCLOCKAMPMCMD
- See Also:
- Constant Field Values
-
SETCLOCKAMPMHEADER
static final int[] SETCLOCKAMPMHEADER
-
LOCOSOLECONTROLCODE
public static final int LOCOSOLECONTROLCODE
- See Also:
- Constant Field Values
-
LOCOSOLECONTROL
static final int[] LOCOSOLECONTROL
-
LOCODBLCONTROLCODE
public static final int LOCODBLCONTROLCODE
- See Also:
- Constant Field Values
-
LOCODBLCONTROL
static final int[] LOCODBLCONTROL
-
GOODCMDRECEIVEDCODE
public static final int GOODCMDRECEIVEDCODE
- See Also:
- Constant Field Values
-
GOODCMDRECEIVED
static final int[] GOODCMDRECEIVED
-
BADCMDRECEIVEDCODE
public static final int BADCMDRECEIVEDCODE
- See Also:
- Constant Field Values
-
BADCMDRECEIVED
static final int[] BADCMDRECEIVED
-
POWERONCMD
public static final int POWERONCMD
- See Also:
- Constant Field Values
-
POWERON
static final int[] POWERON
-
POWEROFFCMD
public static final int POWEROFFCMD
- See Also:
- Constant Field Values
-
POWEROFF
static final int[] POWEROFF
-
-
Constructor Detail
-
MrcPackets
public MrcPackets()
-
-
Method Detail
-
getAddToConsistPacketLength
public static int getAddToConsistPacketLength()
-
getClearConsistPacketLength
public static int getClearConsistPacketLength()
-
getRouteControlPacketLength
public static int getRouteControlPacketLength()
-
getClearRoutePacketLength
public static int getClearRoutePacketLength()
-
getAddToRoutePacketLength
public static int getAddToRoutePacketLength()
-
getAccessoryPacketLength
public static int getAccessoryPacketLength()
-
getWriteCVPROGPacketLength
public static int getWriteCVPROGPacketLength()
-
getWriteCVPOMPacketLength
public static int getWriteCVPOMPacketLength()
-
getSetClockRatioPacketLength
public static int getSetClockRatioPacketLength()
-
getSetClockAmPmPacketLength
public static int getSetClockAmPmPacketLength()
-
getFunctionPacketLength
public static int getFunctionPacketLength()
-
getReadDecoderAddressLength
public static int getReadDecoderAddressLength()
-
getSetClockTimePacketLength
public static int getSetClockTimePacketLength()
-
getThrottlePacketLength
public static int getThrottlePacketLength()
-
getReadCVPacketLength
public static int getReadCVPacketLength()
-
getReadCVPacketReplyLength
public static int getReadCVPacketReplyLength()
-
getPowerOnPacketLength
public static int getPowerOnPacketLength()
-
getPowerOffPacketLength
public static int getPowerOffPacketLength()
-
startsWith
public static boolean startsWith(MrcMessage source, int[] match)
-
toString
public static java.lang.String toString(MrcMessage m)
-
appendClockMessage
static void appendClockMessage(MrcMessage m, java.lang.StringBuilder txt)
Adds the description of the clock's mode to a message being built- Parameters:
m
- clock info messagetxt
- build description of clock info onto this
-
validCheckSum
public static boolean validCheckSum(MrcMessage m)
-
-