Package jmri.jmrix.dcc4pc
Class Dcc4PcProgrammerManager
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.managers.DefaultProgrammerManager
jmri.jmrix.dcc4pc.Dcc4PcProgrammerManager
- All Implemented Interfaces:
AddressedProgrammerManager,PropertyChangeFirer,PropertyChangeProvider,GlobalProgrammerManager
DCC4PC Programmer acts as a proxy for ops mode programming. Another
connection (the one chosen with the connection's "Programmer" option) sends
the Programming on Main packets, and the decoder's RailCom reply comes back
through the RailCom reader; see
Dcc4PcOpsModeProgrammer.
Only ops mode is provided. Service mode stays with the other connection.
- See Also:
-
Field Summary
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionDcc4PcProgrammerManager(Supplier<AddressedProgrammerManager> manager, Supplier<CommandStation> commandStation, Dcc4PcSystemConnectionMemo memo) Dcc4PcProgrammerManager(T manager) -
Method Summary
Modifier and TypeMethodDescriptionprotected AddressedProgrammergetConcreteAddressedProgrammer(boolean pLongAddress, int pAddress) Gain access to a Addressed Mode Programmer without reservation.booleanConvenience method to check whether you'll be able to get an Addressed Mode programmer.booleanConvenience method to check whether you'll be able to get a Global Mode programmer.protected AddressedProgrammerreserveConcreteAddressedProgrammer(boolean pLongAddress, int pAddress) Gain access to a (the) Addressed Mode Programmer, in the process reserving it for yourself.Methods inherited from class jmri.managers.DefaultProgrammerManager
dispose, getAddressedProgrammer, getConcreteGlobalProgrammer, getDefaultModes, getGlobalProgrammer, getUserName, isAddressedModePossible, releaseAddressedProgrammer, releaseGlobalProgrammer, reserveAddressedProgrammer, reserveConcreteGlobalProgrammer, reserveGlobalProgrammer, toStringMethods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.AddressedProgrammerManager
getAddressedProgrammer, reserveAddressedProgrammerMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
Dcc4PcProgrammerManager
public Dcc4PcProgrammerManager(@Nonnull Supplier<AddressedProgrammerManager> manager, @Nonnull Supplier<CommandStation> commandStation, @Nonnull Dcc4PcSystemConnectionMemo memo) - Parameters:
manager- finds the other connection's programmer managercommandStation- finds the other connection's command stationmemo- the DCC4PC connection, which gives this manager its name
-
Dcc4PcProgrammerManager
public Dcc4PcProgrammerManager(@Nonnull AddressedProgrammerManager manager, @Nonnull Dcc4PcSystemConnectionMemo memo) - Parameters:
manager- the other connection's programmer managermemo- the DCC4PC connection, which gives this manager its name
-
Dcc4PcProgrammerManager
- Type Parameters:
T- a manager for both modes- Parameters:
manager- the other connection's programmer manager
-
-
Method Details
-
isAddressedModePossible
Convenience method to check whether you'll be able to get an Addressed Mode programmer.True until the other connection says otherwise: it may simply not have started yet.
- Specified by:
isAddressedModePossiblein interfaceAddressedProgrammerManager- Overrides:
isAddressedModePossiblein classDefaultProgrammerManager- Returns:
- always false in this implementation
-
isGlobalProgrammerAvailable
Description copied from class:DefaultProgrammerManagerConvenience method to check whether you'll be able to get a Global Mode programmer.- Specified by:
isGlobalProgrammerAvailablein interfaceGlobalProgrammerManager- Overrides:
isGlobalProgrammerAvailablein classDefaultProgrammerManager- Returns:
- always false in this implementation
-
getConcreteAddressedProgrammer
Description copied from class:DefaultProgrammerManagerGain access to a Addressed Mode Programmer without reservation.- Overrides:
getConcreteAddressedProgrammerin classDefaultProgrammerManager- Parameters:
pLongAddress- true if this is a long (14 bit) address, else falsepAddress- specific decoder address to use- Returns:
- null only if there isn't an Ops Mode Programmer in the system
-
reserveConcreteAddressedProgrammer
protected AddressedProgrammer reserveConcreteAddressedProgrammer(boolean pLongAddress, int pAddress) Description copied from class:DefaultProgrammerManagerGain access to a (the) Addressed Mode Programmer, in the process reserving it for yourself.- Overrides:
reserveConcreteAddressedProgrammerin classDefaultProgrammerManager- Parameters:
pLongAddress- true if this is a long (14 bit) address, else falsepAddress- Specific decoder address to use- Returns:
- null if the address is in use by a reserved programmer
-