Package jmri.jmrix.zimo
Class Mx1CommandStation
- java.lang.Object
-
- jmri.jmrix.zimo.Mx1CommandStation
-
- All Implemented Interfaces:
CommandStation
public class Mx1CommandStation extends java.lang.Object implements CommandStation
Defines standard operations for Dcc command stations.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.StringsystemName(package private) java.lang.StringuserName
-
Constructor Summary
Constructors Constructor Description Mx1CommandStation()Mx1CommandStation(java.lang.String systemName)Mx1CommandStation(java.lang.String systemName, java.lang.String userName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbcdToAsc(int hex)Mx1MessagegetReadPagedCVMsg(int cv)java.lang.StringgetSystemPrefix()java.lang.StringgetUserName()Mx1MessagegetWritePagedCVMsg(int cv, int val)Mx1MessageresetModeMsg()booleansendPacket(byte[] packet, int repeats)Send a specific packet to the rails.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.CommandStation
sendAccSignalDecoderPkt, sendAltAccSignalDecoderPkt
-
-
-
-
Field Detail
-
systemName
java.lang.String systemName
-
userName
java.lang.String userName
-
-
Constructor Detail
-
Mx1CommandStation
public Mx1CommandStation(java.lang.String systemName, java.lang.String userName)
-
Mx1CommandStation
public Mx1CommandStation(java.lang.String systemName)
-
Mx1CommandStation
public Mx1CommandStation()
-
-
Method Detail
-
sendPacket
public boolean sendPacket(@Nonnull byte[] packet, int repeats)
Send a specific packet to the rails.This implementation always returns false, as sending a packet isn't implemented for the Zimo command stations
- Specified by:
sendPacketin interfaceCommandStation- Parameters:
packet- Byte array representing the packet, including the error-correction byte.repeats- Number of times to repeat the transmission.- Returns:
trueif the operation succeeds,falseotherwise.
-
getUserName
public java.lang.String getUserName()
- Specified by:
getUserNamein interfaceCommandStation
-
getSystemPrefix
public java.lang.String getSystemPrefix()
- Specified by:
getSystemPrefixin interfaceCommandStation
-
resetModeMsg
public Mx1Message resetModeMsg()
-
getReadPagedCVMsg
public Mx1Message getReadPagedCVMsg(int cv)
-
getWritePagedCVMsg
public Mx1Message getWritePagedCVMsg(int cv, int val)
-
bcdToAsc
public int bcdToAsc(int hex)
-
-