Enum LnCommandStationType
- All Implemented Interfaces:
Serializable,Comparable<LnCommandStationType>,java.lang.constant.Constable
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 ClassesModifier and TypeClassDescriptionstatic enumprotected static enumprotected static enumprotected static enumprotected static enumprotected static enumstatic enumNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final LnCommandStationType.ReadsFromServiceModeTrack(package private) final LnCommandStationType.CommandStationClockFracType(package private) final String(package private) final LnCommandStationType.ProgDepowersTrack(package private) final String(package private) final List<SlotMapEntry>(package private) final LnCommandStationType.IdleSupport(package private) final LnCommandStationType.LocoResetSupport(package private) final LnCommandStationType.MultiMeterSupport(package private) final LnCommandStationType.SupportsSlot250(package private) final String -
Method Summary
Modifier and TypeMethodDescriptionstatic LnCommandStationTypebooleanCan this command station read back from decoders?Returns CS Clock fraction TypebooleanReturns command station's support for OPC_IDLEgetName()booleanDoes a programming operation turn track power off?Get a new SlotManager of the right type for this command station.Returns CS Slot Map.booleanReturns whether CS supports a Loco Reset feature.booleanReturns whether CS supports a multimeterbooleanDoes CS report slot availability in slot 250 ?Get a new ThrottleManager of the right type for this command station.toString()static LnCommandStationTypeReturns 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 Details
-
COMMAND_STATION_DCS100
-
COMMAND_STATION_DCS240
-
COMMAND_STATION_DCS240PLUS
-
COMMAND_STATION_DCS210PLUS
-
COMMAND_STATION_DCS210
-
COMMAND_STATION_DCS200
-
COMMAND_STATION_DCS050
-
COMMAND_STATION_DCS051
-
COMMAND_STATION_DCS052
-
COMMAND_STATION_DB150
-
COMMAND_STATION_LBPS
-
COMMAND_STATION_MM
-
COMMAND_STATION_IBX_TYPE_1
-
COMMAND_STATION_IBX_TYPE_2
-
COMMAND_STATION_PR3_ALONE
-
COMMAND_STATION_PR2_ALONE
-
COMMAND_STATION_STANDALONE
-
COMMAND_STATION_STANDALONE_EXT_TERM
-
COMMAND_STATION_PR4_ALONE
-
COMMAND_STATION_USB_DCS240_ALONE
-
COMMAND_STATION_USB_DCS240PLUS_ALONE
-
COMMAND_STATION_USB_DCS210Plus_ALONE
-
COMMAND_STATION_USB_DCS52_ALONE
-
-
Field Details
-
name
-
canRead
-
progEndOp
-
throttleClassName
-
slotManagerClassName
-
supportsIdle
-
supportsMultiMeter
-
supportsLocoReset
-
csClockFracType
-
slotMap
-
supportsSlot250
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
-
getCanRead
Can this command station read back from decoders?- Returns:
- whether the command station can perform CV reads
-
toString
- Overrides:
toStringin classEnum<LnCommandStationType>
-
getProgPowersOff
Does a programming operation turn track power off?- Returns:
- whether the programming operation turns track power off
-
getSupportsSlot250
Does CS report slot availability in slot 250 ?- Returns:
- true if it does
-
getByName
-
getThrottleManager
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
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
Returns command station's support for OPC_IDLE- Returns:
- true if OPC_IDLE forces broadcast of "stop", else false
-
getSupportsMultimeter
Returns whether CS supports a multimeter- Returns:
- true is Multimeter support
-
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
Returns CS Slot Map.- Returns:
- true if command station supports OPC_RE_LOCO_RESET message
-
getCsClockFracType
Returns CS Clock fraction Type- Returns:
- the FracType
-
commandStationSupportSlot250
-