Enum LnCommandStationType
- java.lang.Object
-
- java.lang.Enum<LnCommandStationType>
-
- jmri.jmrix.loconet.LnCommandStationType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LnCommandStationType>
@Immutable public enum LnCommandStationType extends java.lang.Enum<LnCommandStationType>
Enum to carry command-station specific information for LocoNet implementations.Because you can't inherit and extend enums, this will accumulate information from subtypes. We use reflection to deal with that.
This is (slowly) centralizing all of the command-station-specific dependencies for startup. It does _not_ handle the connection-specific dependencies for e.g. the connections via networks and Uhlenbrock serial/USB; those are still done via port adapters, special packetizers et al.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLnCommandStationType.CommandStationClockFracTypeprotected static classLnCommandStationType.IdleSupportprotected static classLnCommandStationType.LocoResetSupportprotected static classLnCommandStationType.MultiMeterSupportprotected static classLnCommandStationType.ProgDepowersTrackprotected static classLnCommandStationType.ReadsFromServiceModeTrackstatic classLnCommandStationType.SupportsSlot250
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description (package private) LnCommandStationType.ReadsFromServiceModeTrackcanRead(package private) LnCommandStationType.CommandStationClockFracTypecsClockFracType(package private) java.lang.Stringname(package private) LnCommandStationType.ProgDepowersTrackprogEndOp(package private) java.lang.StringslotManagerClassName(package private) java.util.List<SlotMapEntry>slotMap(package private) LnCommandStationType.IdleSupportsupportsIdle(package private) LnCommandStationType.LocoResetSupportsupportsLocoReset(package private) LnCommandStationType.MultiMeterSupportsupportsMultiMeter(package private) LnCommandStationType.SupportsSlot250supportsSlot250(package private) java.lang.StringthrottleClassName
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LnCommandStationType.SupportsSlot250commandStationSupportSlot250()static LnCommandStationTypegetByName(java.lang.String name)booleangetCanRead()Can this command station read back from decoders?LnCommandStationType.CommandStationClockFracTypegetCsClockFracType()Returns CS Clock fraction TypebooleangetImplementsIdle()Returns command station's support for OPC_IDLEjava.lang.StringgetName()booleangetProgPowersOff()Does a programming operation turn track power off?SlotManagergetSlotManager(LnTrafficController tc)Get a new SlotManager of the right type for this command station.java.util.List<SlotMapEntry>getSlotMap()Returns CS Slot Map.booleangetSupportsLocoReset()Returns whether CS supports a Loco Reset feature.booleangetSupportsMultimeter()Returns whether CS supports a multimeterbooleangetSupportsSlot250()Does CS report slot availability in slot 250 ?ThrottleManagergetThrottleManager(LocoNetSystemConnectionMemo memo)Get a new ThrottleManager of the right type for this command station.java.lang.StringtoString()static LnCommandStationTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static LnCommandStationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COMMAND_STATION_DCS100
public static final LnCommandStationType COMMAND_STATION_DCS100
-
COMMAND_STATION_DCS240
public static final LnCommandStationType COMMAND_STATION_DCS240
-
COMMAND_STATION_DCS240PLUS
public static final LnCommandStationType COMMAND_STATION_DCS240PLUS
-
COMMAND_STATION_DCS210PLUS
public static final LnCommandStationType COMMAND_STATION_DCS210PLUS
-
COMMAND_STATION_DCS210
public static final LnCommandStationType COMMAND_STATION_DCS210
-
COMMAND_STATION_DCS200
public static final LnCommandStationType COMMAND_STATION_DCS200
-
COMMAND_STATION_DCS050
public static final LnCommandStationType COMMAND_STATION_DCS050
-
COMMAND_STATION_DCS051
public static final LnCommandStationType COMMAND_STATION_DCS051
-
COMMAND_STATION_DCS052
public static final LnCommandStationType COMMAND_STATION_DCS052
-
COMMAND_STATION_DB150
public static final LnCommandStationType COMMAND_STATION_DB150
-
COMMAND_STATION_LBPS
public static final LnCommandStationType COMMAND_STATION_LBPS
-
COMMAND_STATION_MM
public static final LnCommandStationType COMMAND_STATION_MM
-
COMMAND_STATION_IBX_TYPE_1
public static final LnCommandStationType COMMAND_STATION_IBX_TYPE_1
-
COMMAND_STATION_IBX_TYPE_2
public static final LnCommandStationType COMMAND_STATION_IBX_TYPE_2
-
COMMAND_STATION_PR3_ALONE
public static final LnCommandStationType COMMAND_STATION_PR3_ALONE
-
COMMAND_STATION_PR2_ALONE
public static final LnCommandStationType COMMAND_STATION_PR2_ALONE
-
COMMAND_STATION_STANDALONE
public static final LnCommandStationType COMMAND_STATION_STANDALONE
-
COMMAND_STATION_PR4_ALONE
public static final LnCommandStationType COMMAND_STATION_PR4_ALONE
-
COMMAND_STATION_USB_DCS240_ALONE
public static final LnCommandStationType COMMAND_STATION_USB_DCS240_ALONE
-
COMMAND_STATION_USB_DCS240PLUS_ALONE
public static final LnCommandStationType COMMAND_STATION_USB_DCS240PLUS_ALONE
-
COMMAND_STATION_USB_DCS210Plus_ALONE
public static final LnCommandStationType COMMAND_STATION_USB_DCS210Plus_ALONE
-
COMMAND_STATION_USB_DCS52_ALONE
public static final LnCommandStationType COMMAND_STATION_USB_DCS52_ALONE
-
-
Field Detail
-
name
final java.lang.String name
-
canRead
final LnCommandStationType.ReadsFromServiceModeTrack canRead
-
progEndOp
final LnCommandStationType.ProgDepowersTrack progEndOp
-
throttleClassName
final java.lang.String throttleClassName
-
slotManagerClassName
final java.lang.String slotManagerClassName
-
supportsIdle
final LnCommandStationType.IdleSupport supportsIdle
-
supportsMultiMeter
final LnCommandStationType.MultiMeterSupport supportsMultiMeter
-
supportsLocoReset
final LnCommandStationType.LocoResetSupport supportsLocoReset
-
csClockFracType
final LnCommandStationType.CommandStationClockFracType csClockFracType
-
slotMap
final java.util.List<SlotMapEntry> slotMap
-
supportsSlot250
final LnCommandStationType.SupportsSlot250 supportsSlot250
-
-
Method Detail
-
values
public static LnCommandStationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LnCommandStationType c : LnCommandStationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LnCommandStationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getName
public java.lang.String getName()
-
getCanRead
public boolean getCanRead()
Can this command station read back from decoders?- Returns:
- whether the command station can perform CV reads
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<LnCommandStationType>
-
getProgPowersOff
public boolean getProgPowersOff()
Does a programming operation turn track power off?- Returns:
- whether the programming operation turns track power off
-
getSupportsSlot250
public boolean getSupportsSlot250()
Does CS report slot availability in slot 250 ?- Returns:
- true if it does
-
getByName
public static LnCommandStationType getByName(java.lang.String name)
-
getThrottleManager
public ThrottleManager getThrottleManager(LocoNetSystemConnectionMemo memo)
Get a new ThrottleManager of the right type for this command station.- Parameters:
memo- the LocoNetSystemConnectionMemo object which hosts throttles- Returns:
- the ThrottleManager object for the connection and the command station
-
getSlotManager
public SlotManager getSlotManager(LnTrafficController tc)
Get a new SlotManager of the right type for this command station.- Parameters:
tc- the LnTrafficController object which hosts the slot manager- Returns:
- the SlogManager object for the connection and the command station
-
getImplementsIdle
public boolean getImplementsIdle()
Returns command station's support for OPC_IDLE- Returns:
- true if OPC_IDLE forces broadcast of "stop", else false
-
getSupportsMultimeter
public boolean getSupportsMultimeter()
Returns whether CS supports a multimeter- Returns:
- true is Multimeter support
-
getSupportsLocoReset
public boolean getSupportsLocoReset()
Returns whether CS supports a Loco Reset feature. For this purpose "supports" means that the command station will send OPC_RE_LOCO_RESET when it clears all slots.- Returns:
- true if command station supports OPC_RE_LOCO_RESET message
-
getSlotMap
public java.util.List<SlotMapEntry> getSlotMap()
Returns CS Slot Map.- Returns:
- true if command station supports OPC_RE_LOCO_RESET message
-
getCsClockFracType
public LnCommandStationType.CommandStationClockFracType getCsClockFracType()
Returns CS Clock fraction Type- Returns:
- the FracType
-
commandStationSupportSlot250
public LnCommandStationType.SupportsSlot250 commandStationSupportSlot250()
-
-