Package jmri.jmrix.xpa
Class XpaMessage
java.lang.Object
jmri.jmrix.xpa.XpaMessage
- All Implemented Interfaces:
Message
Encodes a message to an XpressNet command station via an XPA and a modem.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) static XpaMessagegetDecSpeedMsg(int address, int steps) Get a message for a "Decrease Speed" command to a specific locomotive on the layout.(package private) static XpaMessagestatic XpaMessagegetDeviceSettingMsg(int setting) (package private) static XpaMessagegetDirForwardMsg(int address) (package private) static XpaMessagegetDirReverseMsg(int address) intgetElement(int n) Get a particular element in a Message.(package private) static XpaMessage(package private) static XpaMessagegetFunctionMsg(int address, int function) (package private) static XpaMessagegetIdleMsg(int address) (package private) static XpaMessagegetIncSpeedMsg(int address, int steps) Get a message for an "Increase Speed" command to a specific locomotive on the layout.intGet the number of data elements in a Message.(package private) static XpaMessagegetSwitchNormalMsg(int address) (package private) static XpaMessagegetSwitchReverseMsg(int address) inthashCode()voidsetElement(int n, int v) Set a single Data Element at a particular index.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.jmrix.Message
toMonitorString
-
Field Details
-
MAX_SIZE
- See Also:
-
-
Constructor Details
-
XpaMessage
-
XpaMessage
-
XpaMessage
public XpaMessage() -
XpaMessage
-
-
Method Details
-
equals
-
hashCode
-
getNumDataElements
Description copied from interface:MessageGet the number of data elements in a Message.- Specified by:
getNumDataElementsin interfaceMessage- Returns:
- number elements.
-
getElement
Description copied from interface:MessageGet a particular element in a Message.- Specified by:
getElementin interfaceMessage- Parameters:
n- Element Index.- Returns:
- single element of message.
-
setElement
Description copied from interface:MessageSet a single Data Element at a particular index.- Specified by:
setElementin interfaceMessage- Parameters:
n- index of element.v- value of element.
-
toString
Description copied from interface:Message -
getDefaultInitMsg
-
getEStopMsg
-
getIdleMsg
-
getIncSpeedMsg
Get a message for an "Increase Speed" command to a specific locomotive on the layout. To make calculations easy, this uses a single speed step increase.- Parameters:
address- throttle loco address for messagesteps- amount of speed steps to change to increase- Returns:
- message for the requested change
-
getDecSpeedMsg
Get a message for a "Decrease Speed" command to a specific locomotive on the layout. To make calculations easy, this uses a single speed step decrease.- Parameters:
address- throttle loco address for messagesteps- amount of speed steps to change to decrease- Returns:
- message for the requested change
-
getDirForwardMsg
-
getDirReverseMsg
-
getFunctionMsg
-
getSwitchNormalMsg
-
getSwitchReverseMsg
-
getDeviceSettingMsg
-