Package jmri.jmrix.dcc4pc
Class Dcc4PcSystemConnectionMemo
java.lang.Object
jmri.beans.UnboundBean
jmri.beans.Bean
jmri.jmrix.DefaultSystemConnectionMemo
jmri.jmrix.dcc4pc.Dcc4PcSystemConnectionMemo
- All Implemented Interfaces:
BeanInterface,PropertyChangeFirer,PropertyChangeProvider,Disposable,ConfiguringSystemConnectionMemo,SystemConnectionMemo
public class Dcc4PcSystemConnectionMemo
extends DefaultSystemConnectionMemo
implements ConfiguringSystemConnectionMemo
Lightweight class to denote that a system is active, and provide general
information.
Objects of specific subtypes are registered in the instance manager to activate their particular system.
-
Field Summary
FieldsFields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMapFields inherited from class jmri.beans.Bean
propertyChangeSupportFields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the common managers for Dcc4Pc connections.voiddispose()Dispose of System Connection.protected ResourceBundleProvides access to the TrafficController for this particular connection.<B extends NamedBean>
Comparator<B>getNamedBeanComparator(Class<B> type) Get the Comparator to be used for two NamedBeans.booleanCheck if this connection provides a specific manager type.void<T extends AddressedProgrammerManager & GlobalProgrammerManager>
voidsetRealProgramManager(T dpm) Provide Programming on Main through another connection's ops-mode programmer: it sends the packets, and the readback arrives as RailCom through this connection.voiduseProgrammerFrom(String userName) Use another connection's ops-mode programmer for Programming on Main (the connection's "Programmer" option): that connection's command station sends the packets, and the RailCom reply comes back through this one.Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, storeMethods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.SystemConnectionMemo
get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
Field Details
-
cf
-
-
Constructor Details
-
Dcc4PcSystemConnectionMemo
-
Dcc4PcSystemConnectionMemo
public Dcc4PcSystemConnectionMemo()
-
-
Method Details
-
getDcc4PcTrafficController
Provides access to the TrafficController for this particular connection.- Returns:
- traffic controller.
-
setDcc4PcTrafficController
-
configureManagers
Configure the common managers for Dcc4Pc connections. This puts the common manager config in one place. This method is static so that it can be referenced from classes that don't inherit, including hexfile.HexFileFrame and locormi.LnMessageClient- Specified by:
configureManagersin interfaceConfiguringSystemConnectionMemo
-
getReporterManager
-
getSensorManager
-
getActionModelResourceBundle
- Specified by:
getActionModelResourceBundlein classDefaultSystemConnectionMemo
-
getNamedBeanComparator
Description copied from class:DefaultSystemConnectionMemoGet the Comparator to be used for two NamedBeans. This is typically anNamedBeanComparator, but may be any Comparator that works for this connection type.- Specified by:
getNamedBeanComparatorin interfaceSystemConnectionMemo- Specified by:
getNamedBeanComparatorin classDefaultSystemConnectionMemo- Type Parameters:
B- the type of NamedBean- Parameters:
type- the class of NamedBean- Returns:
- the Comparator
-
dispose
Description copied from class:DefaultSystemConnectionMemoDispose of System Connection.Removes objects from classObjectMap after calling dispose if Disposable. Removes these objects from InstanceManager.
- Specified by:
disposein interfaceDisposable- Specified by:
disposein interfaceSystemConnectionMemo- Overrides:
disposein classDefaultSystemConnectionMemo
-
setRealProgramManager
public <T extends AddressedProgrammerManager & GlobalProgrammerManager> void setRealProgramManager(T dpm) Provide Programming on Main through another connection's ops-mode programmer: it sends the packets, and the readback arrives as RailCom through this connection. Service mode stays with the other connection.- Type Parameters:
T- a manager for both modes- Parameters:
dpm- the other connection's programmer manager
-
provides
Check if this connection provides a specific manager type. This method must return false if a manager for the specific type is not provided, and must return true if a manager for the specific type is provided.No consist manager, although this connection provides an ops-mode programmer: that only forwards to another connection, which provides its own consists.
- Specified by:
providesin interfaceSystemConnectionMemo- Overrides:
providesin classDefaultSystemConnectionMemo- Parameters:
c- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
-
useProgrammerFrom
Use another connection's ops-mode programmer for Programming on Main (the connection's "Programmer" option): that connection's command station sends the packets, and the RailCom reply comes back through this one. With no connection named, the default Command Station's connection (Preferences, Defaults) is used.This connection offers its ops-mode programmer straight away, so it can be chosen as the default whichever connection starts first; the other connection is looked up each time a programmer is needed.
- Parameters:
userName- the other connection's name, or empty to use the default command station
-