Class ProgrammingMode
User code gets a list of available modes from the Programmer or
AddressedProgrammer in use. It then selects a mode to use and
indicates it via a setMode() call.
A ProgrammingMode has a user-readable name to help humans select it.
We define a number of modes as constants because they are common across so many DCC-specific implementations, they've become defacto standards.
More specific definitions (and Bundle entries) should retreat to specific
Programmer implementations. The whole idea is to have code deal with the
modes that a specific Programmer provides, not make assumptions about
global values.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ProgrammingModeNMRA "Address-only" mode.static final ProgrammingModeNMRA "Direct" mode, using only the bit-wise operations.static final ProgrammingModeNMRA "Direct" mode, using only the byte-wise operations.static final ProgrammingModeNMRA "Direct" mode, using both the bit-wise and byte-wise operations.static final ProgrammingModeNMRA "Programming on the main" mode for stationary decoders, using only the bit-wise operations.static final ProgrammingModeNMRA "Programming on the main" mode for stationary decoders, using only the byte-wise operations.static final ProgrammingModeNMRA "Programming on the main" mode for stationary decoders, using only the bit-wise operations and "extended" addressing.static final ProgrammingModeNMRA "Programming on the main" mode for stationary decoders, using only the byte-wise operations and "extended" addressing.static final ProgrammingModeNMRA "Operations" or "Programming on the main" mode, using only the bit-wise operationsstatic final ProgrammingModeNMRA "Operations" or "Programming on the main" mode, using only the byte-wise operations.static final ProgrammingModeNMRA "Paged" modestatic final ProgrammingModeNMRA "Register" mode. -
Constructor Summary
ConstructorsConstructorDescriptionProgrammingMode(String standardName) Create a ProgrammingMode instance.ProgrammingMode(String standardName, String localName) Create an instance with a provided localized name. -
Method Summary
-
Field Details
-
PAGEMODE
NMRA "Paged" mode -
OPSBITMODE
NMRA "Operations" or "Programming on the main" mode, using only the bit-wise operations -
OPSACCEXTBYTEMODE
NMRA "Programming on the main" mode for stationary decoders, using only the byte-wise operations and "extended" addressing. -
OPSACCBITMODE
NMRA "Programming on the main" mode for stationary decoders, using only the bit-wise operations. Note that this is defined as using the "normal", not "extended" addressing. -
OPSACCEXTBITMODE
NMRA "Programming on the main" mode for stationary decoders, using only the bit-wise operations and "extended" addressing. -
OPSACCBYTEMODE
NMRA "Programming on the main" mode for stationary decoders, using only the byte-wise operations. Note that this is defined as using the "normal", not "extended" addressing. -
ADDRESSMODE
NMRA "Address-only" mode. Often implemented as a proper subset of "Register" mode, as the underlying operation is the same. -
OPSBYTEMODE
NMRA "Operations" or "Programming on the main" mode, using only the byte-wise operations. -
DIRECTBYTEMODE
NMRA "Direct" mode, using only the byte-wise operations. -
REGISTERMODE
NMRA "Register" mode. -
DIRECTBITMODE
NMRA "Direct" mode, using only the bit-wise operations. -
DIRECTMODE
NMRA "Direct" mode, using both the bit-wise and byte-wise operations.
-
-
Constructor Details
-
ProgrammingMode
Create a ProgrammingMode instance.- Parameters:
standardName- a name, not to be translated, for internal use
-
ProgrammingMode
Create an instance with a provided localized name.This is useful when creating a ProgrammingMode deep within some system-specific code, and translations cannot be added to the top-level jmri.Bundle.
- Parameters:
standardName- a name, not to be translated, for internal uselocalName- a localized, human-readable name for the mode
-
-
Method Details
-
toString
Display the localized (human readable) name. -
getStandardName
Return the standard (not localized, human readable) name.- Returns:
- the standard name
-
equals
-
hashCode
-