Class MarklinMessage
- All Implemented Interfaces:
Message
The MarklinReply class handles the response from the command station.
Packages of length 13 are interpreted as can-bus packages:
4 bytes Can-bus-ID (BigEndian or network order),
1-byte length and
8 bytes of data, if necessary with null bytes to fill in.
The message ID is divided into the areas of lower priority (priority), command (command), response and hash. The communication is based on the following format: Prio - 2 +2bit Command 8 bit Resp - 1 bit Hash - 16bit DLC - 4bit (ie CAN message length) CAN message 8 BYTES Can Message Bytes 0 to 3 are the address bytes, with byte 0 High, byte 3 low
-
Field Summary
FieldsFields inherited from class jmri.jmrix.AbstractMRMessage
LONG_TIMEOUT, SHORT_TIMEOUTFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongstatic MarklinMessageGenerate CAN BOOT command (0xB1).static MarklinMessagestatic MarklinMessagestatic MarklinMessagestatic MarklinMessagestatic MarklinMessagegetQryLocoDirection(int addr) static MarklinMessagegetQryLocoFunction(int addr, int funct) static MarklinMessagegetQryLocoSpeed(int addr) static MarklinMessagegetReadDirectCV(int cv) static MarklinMessagegetReadPagedCV(int cv) static MarklinMessagegetReadRegister(int reg) static MarklinMessagegetSetTurnout(int addr, int state, int power) static MarklinMessagegetWriteDirectCV(int cv, int val) static MarklinMessagegetWritePagedCV(int cv, int val) static MarklinMessagegetWriteRegister(int reg, int val) static MarklinMessagesensorPollMessage(int module) static MarklinMessagesetLocoDirection(int addr, int dir) static MarklinMessagesetLocoEmergencyStop(int addr) static MarklinMessagesetLocoFunction(int addr, int funct, int state) static MarklinMessagesetLocoSpeed(int addr, int speed) static MarklinMessagesetLocoSpeedSteps(int addr, int step) Methods inherited from class jmri.jmrix.AbstractMRMessage
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeout, toStringMethods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCode, setElementMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.jmrix.Message
toMonitorString
-
Field Details
-
MY_UID
-
-
Constructor Details
-
MarklinMessage
-
MarklinMessage
-
MarklinMessage
-
MarklinMessage
-
MarklinMessage
-
-
Method Details
-
getEnableMain
-
getKillMain
-
getCanBoot
Generate CAN BOOT command (0xB1).This command is used to invoke the bootloader update sequence for Märklin devices. According to German language forum research, this is part of the software/bootloader command range used for firmware updates and device initialization.
- Returns:
- MarklinMessage containing the CAN BOOT command
- See Also:
-
getSetTurnout
-
getQryLocoSpeed
-
setLocoSpeed
-
setLocoEmergencyStop
-
setLocoSpeedSteps
-
getQryLocoDirection
-
setLocoDirection
-
getQryLocoFunction
-
setLocoFunction
-
sensorPollMessage
-
getAddress
-
getProgMode
-
getExitProgMode
-
getReadPagedCV
-
getWritePagedCV
-
getReadRegister
-
getWriteRegister
-
getReadDirectCV
-
getWriteDirectCV
-