Package jmri.jmrix.roco.z21
Class RocoZ21CommandStation
java.lang.Object
jmri.jmrix.lenz.LenzCommandStation
jmri.jmrix.roco.RocoCommandStation
jmri.jmrix.roco.z21.RocoZ21CommandStation
- All Implemented Interfaces:
CommandStation
Defines the standard/common routines used in multiple classes related to
a Roco z21 Command Station.
This class keeps track of the broadcast flags associated with the currently connected Roco Z21 Command Station.
Brief descriptions of the flags are as follows (loosely translated from section 2.16 of the manual from the German with the aid of google translate).
- 0x00000001 send XpressNet related information (track power on/off, programming mode, short circuit, broadcast stop, locomotive information, turnout information).
- 0x00000002 send data changes that occur on the RMBUS.
- 0x00000004 (deprecated by Roco) send Railcom Data
- 0x00000100 send changes in system state (such as track voltage)
- 0x00010000 send changes to locomotives on XpressNet (must also have 0x00000001 set.
- 0x01000000 forward LocoNet data to the client. Does not send Locomotive or turnout data.
- 0x02000000 send Locomotive specific LocoNet data to the client.
- 0x04000000 send Turnout specific LocoNet data to the client.
- 0x08000000 send Occupancy information from LocoNet to the client
- 0x00040000 Automatically send updates for Railcom data to the client
- 0x00080000 send CAN detector messages to the client
- 0x00020000 send CAN booster status messages to the client.
- 0x00000010 send Fast Clock time messages to the client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs flag bit 0x00020000, which tells the command station to send CAN booster data to the client set.booleanIs flag bit 0x00080000, which tells the command station to send CAN detector data to the client set.booleanIs flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage) set?intget the hardware version.booleanIs flag bit 0x02000000 which tells the command station to send Locomotive specific LocoNet data to the client set?booleanIs flag bit 0x01000000 which tells the command station to send LocoNet data,except Locomotive and Turnout data, to the client set?booleanIs flag bit 0x08000000 which tells the command station to send Occupancy information from LocoNet to the client set?booleanIs flag bit 0x04000000 which tells the command station to send Turnout specific LocoNet data to the client set?booleanIs flag bit 0x00040000, which tells the command station to automatically send Railcom data to the client set.booleanIs flag bit 0x00000004, which tells the command station to send Railcom data to the client set (this flag may no longer be supported by Roco).booleanIs flag bit 0x00000002 which tells the command station to send data changes on the RMBus to the client set?intget the serial number.floatget the software version.booleanIs flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage) set?booleanIs flag bit 0x00010000 which tells the command station to send XpressNet related locomoitve information to the client set?booleanIs flag bit 0x00000001 which tells the command station to send XpressNet related information (track power on/off, programming mode, short circuit, broadcast stop, locomotive information, turnout information) set?intget the current value of the broadcast flags as an intget the current value of the broadcast flags as a stringstatic StringgetZ21BroadcastFlagsString(int flags) Get the value of the specified broadcast flags as a stringvoidsetCanBoosterFlag(boolean flag) Set flag bit 0x00020000, which tells the command station to send CAN detector data to the client.voidsetCanDetectorFlag(boolean flag) Set flag bit 0x00080000, which tells the command station to send CAN detector data to the client.voidsetFastClockFlag(boolean flag) Set flag bit 0x00000010 which tells the command station to send changes in the fast clock to.voidsetHardwareVersion(int hv) set the hardware version associated with this Z21 command station.voidsetLocoNetLocomotiveMessagesFlag(boolean flag) Set flag bit 0x02000000 which tells the command station to send Locomotive specific LocoNet data to the client.voidsetLocoNetMessagesFlag(boolean flag) Set flag bit 0x01000000 which tells the command station to send LocoNet data,except Locomotive and Turnout data, to the client.voidsetLocoNetOccupancyMessagesFlag(boolean flag) Set flag bit 0x08000000 which tells the command station to send Occupancy information from LocoNet to the clientvoidsetLocoNetTurnoutMessagesFlag(boolean flag) Set flag bit 0x04000000 which tells the command station to send Turnout specific LocoNet data to the client set?voidsetRailComAutomaticFlag(boolean flag) Set flag bit 0x00040000, which tells the command station to automatically send Railcom data to the client set.voidsetRailComMessagesFlag(boolean flag) Set flag bit 0x00000004, which tells the command station to send Railcom data to the client set (this flag may no longer be supported by Roco).voidsetRMBusMessagesFlag(boolean flag) Set flag bit 0x00000002 which tells the command station to send data changes on the RMBus to the client set?voidsetSerialNumber(int sn) set the serial number associated with this Z21 command station.voidsetSoftwareVersion(float sv) set the software version associated with this Z21 command station.voidsetSystemStatusMessagesFlag(boolean flag) Set flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage).voidsetXPressNetLocomotiveMessagesFlag(boolean flag) Set flag bit 0x00010000 which tells the command station to send XpressNet related locomoitve information to the client.voidsetXPressNetMessagesFlag(boolean flag) Set flag bit 0x00000001 which tells the command station to send XpressNet related information (track power on/off, programming mode, short circuit, broadcast stop, locomotive information, turnout information).voidsetZ21BroadcastFlags(int flags) set the current value of the broadcast flags as an intMethods inherited from class jmri.jmrix.lenz.LenzCommandStation
calcLocoAddress, getCommandStationSoftwareVersion, getCommandStationSoftwareVersionBCD, getCommandStationType, getDCCAddressHigh, getDCCAddressLow, getSystemPrefix, getUserName, getVersionString, isOpsModePossible, sendPacket, setCommandStationSoftwareVersion, setCommandStationSoftwareVersion, setCommandStationType, setCommandStationType, setSystemConnectionMemo, setTrafficControllerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.CommandStation
sendAccSignalDecoderPkt, sendAltAccSignalDecoderPkt
-
Constructor Details
-
RocoZ21CommandStation
public RocoZ21CommandStation()
-
-
Method Details
-
getSerialNumber
get the serial number.- Returns:
- serial number of the connected Z21 command station
-
setSerialNumber
set the serial number associated with this Z21 command station.- Parameters:
sn- serial number
-
getSoftwareVersion
get the software version.- Returns:
- software version of the connected Z21 command station
-
setSoftwareVersion
set the software version associated with this Z21 command station.- Parameters:
sv- software version
-
getHardwareVersion
get the hardware version.- Returns:
- hardware version of the connected Z21 command station
-
setHardwareVersion
set the hardware version associated with this Z21 command station.- Parameters:
hv- software version
-
getZ21BroadcastFlags
get the current value of the broadcast flags as an int- Returns:
- value representing the broadcast flags.
-
setZ21BroadcastFlags
set the current value of the broadcast flags as an int- Parameters:
flags- representing the broadcast flags.
-
getZ21BroadcastFlagsString
get the current value of the broadcast flags as a string- Returns:
- string representing the broadcast flags.
-
getZ21BroadcastFlagsString
Get the value of the specified broadcast flags as a string- Parameters:
flags- the flags to be interpreted- Returns:
- string representing the broadcast flags.
-
getXPressNetMessagesFlag
Is flag bit 0x00000001 which tells the command station to send XpressNet related information (track power on/off, programming mode, short circuit, broadcast stop, locomotive information, turnout information) set?- Returns:
- true if flag is set.
-
setXPressNetMessagesFlag
Set flag bit 0x00000001 which tells the command station to send XpressNet related information (track power on/off, programming mode, short circuit, broadcast stop, locomotive information, turnout information).- Parameters:
flag- true if flag is to be set.
-
getRMBusMessagesFlag
Is flag bit 0x00000002 which tells the command station to send data changes on the RMBus to the client set?- Returns:
- true if flag is set.
-
setRMBusMessagesFlag
Set flag bit 0x00000002 which tells the command station to send data changes on the RMBus to the client set?- Parameters:
flag- true if flag is to be set.
-
getRailComMessagesFlag
Is flag bit 0x00000004, which tells the command station to send Railcom data to the client set (this flag may no longer be supported by Roco).- Returns:
- true if flag is set.
-
setRailComMessagesFlag
Set flag bit 0x00000004, which tells the command station to send Railcom data to the client set (this flag may no longer be supported by Roco).- Parameters:
flag- true if flag is to be set.
-
getRailComAutomaticFlag
Is flag bit 0x00040000, which tells the command station to automatically send Railcom data to the client set.- Returns:
- true if flag is set.
-
setRailComAutomaticFlag
Set flag bit 0x00040000, which tells the command station to automatically send Railcom data to the client set.- Parameters:
flag- true if flag is to be set.
-
getCanDetectorFlag
Is flag bit 0x00080000, which tells the command station to send CAN detector data to the client set.- Returns:
- true if flag is set.
-
setCanDetectorFlag
Set flag bit 0x00080000, which tells the command station to send CAN detector data to the client.- Parameters:
flag- true if flag is to be set.
-
getCanBoosterFlag
Is flag bit 0x00020000, which tells the command station to send CAN booster data to the client set.- Returns:
- true if flag is set.
-
setCanBoosterFlag
Set flag bit 0x00020000, which tells the command station to send CAN detector data to the client.- Parameters:
flag- true if flag is to be set.
-
getSystemStatusMessagesFlag
Is flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage) set?- Returns:
- true if flag is set.
-
setSystemStatusMessagesFlag
Set flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage).- Parameters:
flag- true if flag is to be set.
-
getXPressNetLocomotiveMessagesFlag
Is flag bit 0x00010000 which tells the command station to send XpressNet related locomoitve information to the client set?- Returns:
- true if flag is set
-
setXPressNetLocomotiveMessagesFlag
Set flag bit 0x00010000 which tells the command station to send XpressNet related locomoitve information to the client.- Parameters:
flag- true if flag is to be set.
-
getLocoNetMessagesFlag
Is flag bit 0x01000000 which tells the command station to send LocoNet data,except Locomotive and Turnout data, to the client set?- Returns:
- true if flag is set.
-
setLocoNetMessagesFlag
Set flag bit 0x01000000 which tells the command station to send LocoNet data,except Locomotive and Turnout data, to the client.- Parameters:
flag- true if flag is to be set.
-
getLocoNetLocomotiveMessagesFlag
Is flag bit 0x02000000 which tells the command station to send Locomotive specific LocoNet data to the client set?- Returns:
- true if flag is set.
-
setLocoNetLocomotiveMessagesFlag
Set flag bit 0x02000000 which tells the command station to send Locomotive specific LocoNet data to the client.- Parameters:
flag- true if flag is to be set.
-
getLocoNetTurnoutMessagesFlag
Is flag bit 0x04000000 which tells the command station to send Turnout specific LocoNet data to the client set?- Returns:
- true if flag is set.
-
setLocoNetTurnoutMessagesFlag
Set flag bit 0x04000000 which tells the command station to send Turnout specific LocoNet data to the client set?- Parameters:
flag- true if flag is to be set.
-
getLocoNetOccupancyMessagesFlag
Is flag bit 0x08000000 which tells the command station to send Occupancy information from LocoNet to the client set?- Returns:
- true if flag is set.
-
setLocoNetOccupancyMessagesFlag
Set flag bit 0x08000000 which tells the command station to send Occupancy information from LocoNet to the client
If this flag is set to true, the Z21 will format Transponding messages as described in section 9.5 of the Z21 Lan Protocol. This message format is currentlyunsupported by JMRI.
- Parameters:
flag- true if flag is to be set.
-
getFastClockFlag
Is flag bit 0x00000100 which tells the command station to send changes in system state (such as track voltage) set?- Returns:
- true if flag is set.
-
setFastClockFlag
Set flag bit 0x00000010 which tells the command station to send changes in the fast clock to.- Parameters:
flag- true if flag is to be set.
-