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.String
systemName
(package private) java.lang.String
userName
-
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 int
bcdToAsc(int hex)
Mx1Message
getReadPagedCVMsg(int cv)
java.lang.String
getSystemPrefix()
java.lang.String
getUserName()
Mx1Message
getWritePagedCVMsg(int cv, int val)
Mx1Message
resetModeMsg()
boolean
sendPacket(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:
sendPacket
in interfaceCommandStation
- Parameters:
packet
- Byte array representing the packet, including the error-correction byte.repeats
- Number of times to repeat the transmission.- Returns:
true
if the operation succeeds,false
otherwise.
-
getUserName
public java.lang.String getUserName()
- Specified by:
getUserName
in interfaceCommandStation
-
getSystemPrefix
public java.lang.String getSystemPrefix()
- Specified by:
getSystemPrefix
in 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)
-
-