Package jmri.jmrix.easydcc
Class EasyDccMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.easydcc.EasyDccMessage
- All Implemented Interfaces:
Message
public class EasyDccMessage extends AbstractMRMessage
Encodes a message to an EasyDCC command station.
The EasyDccReply
class handles the response from the command station.
-
Field Summary
Fields Modifier and Type Field Description protected static int
LONG_TIMEOUT
-
Constructor Summary
Constructors Constructor Description EasyDccMessage()
EasyDccMessage(int i)
EasyDccMessage(String s)
EasyDccMessage(EasyDccMessage m)
-
Method Summary
Modifier and Type Method Description static EasyDccMessage
getAddConsistNormal(int ConsistAddress, DccLocoAddress LocoAddress)
Get a static message to add a locomotive to a Standard Consist in the normal direction.static EasyDccMessage
getAddConsistReverse(int ConsistAddress, DccLocoAddress LocoAddress)
Get a static message to add a locomotive to a Standard Consist in the reverse direction.static EasyDccMessage
getDisplayConsist(int ConsistAddress)
Get a static message to display a Standard Consist.static EasyDccMessage
getEnableMain()
static EasyDccMessage
getExitProgMode()
static EasyDccMessage
getKillConsist(int ConsistAddress)
Get a static message to delete a Standard Consist.static EasyDccMessage
getKillMain()
static EasyDccMessage
getProgMode()
static EasyDccMessage
getReadPagedCV(int cv)
static EasyDccMessage
getReadRegister(int reg)
static EasyDccMessage
getSubtractConsist(int ConsistAddress, DccLocoAddress LocoAddress)
Get a static message to subtract a locomotive from a Standard Consist.static EasyDccMessage
getWritePagedCV(int cv, int val)
static EasyDccMessage
getWriteRegister(int reg, int val)
boolean
isEnableMain()
boolean
isKillMain()
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, getElement, getNumDataElements, hashCode, setElement
-
Field Details
-
LONG_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
isKillMain
-
isEnableMain
-
getEnableMain
-
getKillMain
-
getAddConsistNormal
Get a static message to add a locomotive to a Standard Consist in the normal direction.- Parameters:
ConsistAddress
- a consist address in the range 1-255LocoAddress
- a jmri.DccLocoAddress object representing the locomotive to add- Returns:
- an EasyDccMessage of the form GN cc llll
-
getAddConsistReverse
Get a static message to add a locomotive to a Standard Consist in the reverse direction.- Parameters:
ConsistAddress
- a consist address in the range 1-255LocoAddress
- a jmri.DccLocoAddress object representing the locomotive to add- Returns:
- an EasyDccMessage of the form GS cc llll
-
getSubtractConsist
Get a static message to subtract a locomotive from a Standard Consist.- Parameters:
ConsistAddress
- a consist address in the range 1-255LocoAddress
- a jmri.DccLocoAddress object representing the locomotive to remove- Returns:
- an EasyDccMessage of the form GS cc llll
-
getKillConsist
Get a static message to delete a Standard Consist.- Parameters:
ConsistAddress
- a consist address in the range 1-255- Returns:
- an EasyDccMessage of the form GK cc
-
getDisplayConsist
Get a static message to display a Standard Consist.- Parameters:
ConsistAddress
- a consist address in the range 1-255- Returns:
- an EasyDccMessage of the form GD cc
-
getProgMode
-
getExitProgMode
-
getReadPagedCV
-
getWritePagedCV
-
getReadRegister
-
getWriteRegister
-