Package jmri.jmrix.dcc4pc
Class Dcc4PcMessage
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRMessage
jmri.jmrix.dcc4pc.Dcc4PcMessage
- All Implemented Interfaces:
Message
Encodes a message to the DCC4PC Interface.
The Dcc4PcReply class handles the response from the command station.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) boolean(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) booleanstatic final int(package private) int(package private) static final int(package private) static final intFields inherited from class jmri.jmrix.AbstractMRMessage
LONG_TIMEOUT, SHORT_TIMEOUTFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
ConstructorsConstructorDescriptionDcc4PcMessage(byte[] packet) Creates a new Dcc4PcMessage containing a byte array to represent a packet to outputDcc4PcMessage(int i) -
Method Summary
Modifier and TypeMethodDescriptionintgetBoard()static Dcc4PcMessagestatic Dcc4PcMessagegetDescription(int address) static Dcc4PcMessagegetEnabledInputs(int address) static Dcc4PcMessagebyte[]Get formatted message for direct output to stream - this is the final format of the message as a byte arraystatic Dcc4PcMessagegetInfo()static Dcc4PcMessagegetInfo(int address) intstatic Dcc4PcMessagestatic Dcc4PcMessagestatic Dcc4PcMessagestatic Dcc4PcMessagegetSerialNumber(int address) booleanbooleanstatic Dcc4PcMessagepollBoard(int address) static Dcc4PcMessageresetBoardData(int address) voidsetElement(int n, int v) Set a single Data Element at a particular index.voidsetForChildBoard(boolean boo) toString()Methods inherited from class jmri.jmrix.AbstractMRMessage
addIntAsFourHex, addIntAsThree, addIntAsThreeHex, addIntAsTwoHex, getNeededMode, getOpCode, getOpCodeHex, getRetries, getTimeout, isBinary, replyExpected, setBinary, setNeededMode, setOpCode, setRetries, setTimeoutMethods inherited from class jmri.jmrix.AbstractMessage
equals, getElement, getNumDataElements, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.jmrix.Message
toMonitorString
-
Field Details
-
MAXSIZE
- See Also:
-
childBoard
boolean childBoard -
isResponse
boolean isResponse -
board
int board -
messageType
int messageType -
INFO
- See Also:
-
DESC
- See Also:
-
SERIAL
- See Also:
-
CHILDENABLEDINPUTS
- See Also:
-
CHILDRESET
- See Also:
-
CHILDPOLL
- See Also:
-
RESPONSE
- See Also:
-
-
Constructor Details
-
Dcc4PcMessage
-
Dcc4PcMessage
Creates a new Dcc4PcMessage containing a byte array to represent a packet to output- Parameters:
packet- The contents of the packet
-
Dcc4PcMessage
-
Dcc4PcMessage
-
-
Method Details
-
setForChildBoard
-
isForChildBoard
-
setElement
Set a single Data Element at a particular index.- Specified by:
setElementin interfaceMessage- Overrides:
setElementin classAbstractMessage- Parameters:
n- index of element.v- value of element.
-
toString
- Specified by:
toStringin interfaceMessage- Overrides:
toStringin classAbstractMRMessage
-
getFormattedMessage
Get formatted message for direct output to stream - this is the final format of the message as a byte array- Returns:
- the formatted message as a byte array
-
getProgMode
-
getExitProgMode
-
isGetResponse
-
getBoard
-
getMessageType
-
getInfo
-
getDescription
-
getSerialNumber
-
resetBoardData
-
pollBoard
-
getEnabledInputs
-
getInfo
-
getResponse
-
getDescription
-
getSerialNumber
-