Package jmri.jmrix.dccpp
Class DCCppReply
java.lang.Object
jmri.jmrix.AbstractMessage
jmri.jmrix.AbstractMRReply
jmri.jmrix.dccpp.DCCppReply
- All Implemented Interfaces:
Message
Represents a single response from the DCC++ system.
-
Field Summary
FieldsFields inherited from class jmri.jmrix.AbstractMRReply
DEFAULTMAXSIZEFields inherited from class jmri.jmrix.AbstractMessage
_dataChars, _nDataChars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintintintintintintgetCVInt()booleanintintgetElement(int n) Get a particular element in a Message.intbooleanintintintintdoubledoubledoubledoubledoubleintNot really used inside of DCC++.charGet the opcode as a one character string.booleanintbooleanbooleanintintintintbooleanintbuild a propertylist from reply values.Generate properties list for certain repliesintintintintintbooleanintbooleanbooleanintintintintintintintintbooleanbooleanintintintintcharintintintbooleangetValueBool(int idx) doublegetValueDouble(int idx) intgetValueInt(int idx) getValueString(int idx) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisEStop()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprotected static Matcherprotected booleanintmaxSize()static DCCppReplyParses a string and generates a DCCppReply from the string contentsvoidparseReply(String s) voidsetElement(int n, int v) Set a single Data Element at a particular index.protected intskipPrefix(int index) Generate text translations of replies for use in the DCCpp monitor.toString()Override default toString.booleanvalueExists(int idx) Methods inherited from class jmri.jmrix.AbstractMRReply
flush, isBinary, isRetransmittableErrorMsg, isUnsolicited, match, pollValue, setBinary, setOpCode, setUnsolicited, skipWhiteSpace, valueMethods inherited from class jmri.jmrix.AbstractMessage
equals, getNumDataElements, hashCode
-
Field Details
-
myRegex
-
myReply
-
-
Constructor Details
-
DCCppReply
public DCCppReply() -
DCCppReply
-
DCCppReply
-
-
Method Details
-
toString
Override default toString.- Specified by:
toStringin interfaceMessage- Overrides:
toStringin classAbstractMRReply- Returns:
- myReply StringBuilder toString.
-
toMonitorString
Generate text translations of replies for use in the DCCpp monitor.- Returns:
- representation of the DCCppReply as a string.
-
getPropertiesAsString
Generate properties list for certain replies- Returns:
- list of all properties as a string
-
getProperties
build a propertylist from reply values.- Returns:
- properties hashmap
-
parseReply
-
parseDCCppReply
Parses a string and generates a DCCppReply from the string contents- Parameters:
s- String to be parsed- Returns:
- DCCppReply or empty string if not a valid formatted string
-
getOpCode
Not really used inside of DCC++. Just here to play nicely with the inheritance. TODO: If this is unused, can we just not override it and (not) "use" the superclass version? ANSWER: No, we can't because the superclass looks in the _datachars element, which we don't use, and which will contain garbage data. Better to return something meaningful.- Overrides:
getOpCodein classAbstractMRReply- Returns:
- first char of myReply as integer
-
getOpCodeChar
Get the opcode as a one character string.- Returns:
- first char of myReply
-
getElement
Description copied from class:AbstractMessageGet a particular element in a Message.- Specified by:
getElementin interfaceMessage- Overrides:
getElementin classAbstractMessage- Parameters:
n- Element Index.- Returns:
- single element of message.
-
setElement
Description copied from class:AbstractMessageSet a single Data Element at a particular index.- Specified by:
setElementin interfaceMessage- Overrides:
setElementin classAbstractMRReply- Parameters:
n- index of element.v- value of element.
-
getValueBool
-
getValueString
-
valueExists
-
getValueInt
-
getValueDouble
-
skipPrefix
- Specified by:
skipPrefixin classAbstractMRReply
-
maxSize
- Overrides:
maxSizein classAbstractMRReply
-
getLength
-
matches
-
match
-
getStationType
-
getBuildString
-
getVersion
-
getLocoIdInt
-
getSpeedByteInt
-
getFunctionsInt
-
getFunctionsString
-
getRegisterString
-
getRegisterInt
-
getSpeedString
-
getSpeedInt
-
isEStop
-
getDirectionString
-
getDirectionInt
-
getDirectionBool
-
getIsForward
-
getTOIDString
-
getTOIDInt
-
getTOAddressString
-
getTOAddressInt
-
getTOAddressIndexString
-
getTOAddressIndexInt
-
getTOPinInt
-
getTOThrownPositionInt
-
getTOClosedPositionInt
-
getTOProfileInt
-
getTOStateString
-
getTOStateInt
-
getTOIsThrown
-
getTOIsClosed
-
getRosterIDString
-
getRosterIDInt
-
getAutomationIDString
-
getAutomationIDInt
-
getCallbackNumString
-
getCallbackNumInt
-
getCallbackSubString
-
getCallbackSubInt
-
getCVString
-
getCVInt
-
getProgramBitString
-
getProgramBitInt
-
getReadValueString
-
getReadValueInt
-
getPowerDistrictName
-
getPowerDistrictStatus
-
getCurrentString
-
getCurrentInt
-
getMeterName
-
getMeterValue
-
getMeterType
-
getMeterUnit
-
getMeterMinValue
-
getMeterMaxValue
-
getMeterResolution
-
getMeterWarnValue
-
isMeterTypeVolt
-
isMeterTypeCurrent
-
getPowerBool
-
getTurnoutDefNumString
-
getTurnoutDefNumInt
-
getTurnoutDefAddrString
-
getTurnoutDefAddrInt
-
getTurnoutDefSubAddrString
-
getTurnoutDefSubAddrInt
-
getOutputNumString
-
getOutputNumInt
-
getOutputListPinString
-
getOutputListPinInt
-
getOutputListIFlagString
-
getOutputListIFlagInt
-
getOutputListStateString
-
getOutputListStateInt
-
getOutputCmdStateBool
-
getOutputCmdStateString
-
getOutputCmdStateInt
-
getOutputIsHigh
-
getOutputIsLow
-
getSensorDefNumString
-
getSensorDefNumInt
-
getSensorDefPinString
-
getSensorDefPinInt
-
getSensorDefPullupString
-
getSensorDefPullupInt
-
getSensorDefPullupBool
-
getSensorNumString
-
getSensorNumInt
-
getSensorStateString
-
getSensorStateInt
-
getSensorIsActive
-
getSensorIsInactive
-
getCommTypeInt
-
getCommTypeValueString
-
getTurnoutIDList
-
getTurnoutStateString
-
getTurnoutDescString
-
getRosterDescString
-
getRosterFKeysString
-
getRosterIDList
-
getAutomationTypeString
-
getAutomationDescString
-
getAutomationIDList
-
getCurrentMaxesList
-
getCurrentValuesList
-
getTrackManagerLetter
-
getTrackManagerMode
-
getClockMinutesString
-
getClockMinutesInt
-
getClockRateString
-
getClockRateInt
-
isLCDTextReply
-
getLCDTextString
-
getLCDDisplayNumString
-
getLCDDisplayNumInt
-
getLCDLineNumString
-
getLCDLineNumInt
-
isThrottleReply
-
isTurnoutReply
-
isTurnoutCmdReply
-
isProgramReply
-
isProgramReplyV4
-
isProgramLocoIdReply
-
isVerifyReply
-
isProgramBitReply
-
isProgramBitReplyV4
-
isPowerReply
-
isNamedPowerReply
-
isMaxNumSlotsReply
-
isDiagReply
-
isCurrentReply
-
isNamedCurrentReply
-
isMeterReply
-
isSensorReply
-
isSensorDefReply
-
isTurnoutDefReply
-
isTurnoutDefDCCReply
-
isTurnoutDefServoReply
-
isTurnoutDefVpinReply
-
isTurnoutDefLCNReply
-
isMADCFailReply
-
isMADCSuccessReply
-
isStatusReply
-
isOutputReply
-
isOutputDefReply
-
isOutputCmdReply
-
isCommTypeReply
-
isWriteEepromReply
-
isLocoStateReply
-
isTurnoutIDsReply
-
isTurnoutIDReply
-
isRosterIDsReply
-
isRosterIDReply
-
isAutomationIDsReply
-
isAutomationIDReply
-
isCurrentMaxesReply
-
isCurrentValuesReply
-
isClockReply
-
isTrackManagerReply
-
isValidReplyFormat
-