Package jmri.jmrix.loconet.pr3
Class PR3SystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.loconet.LocoNetSystemConnectionMemo
-
- jmri.jmrix.loconet.pr3.PR3SystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,ConfiguringSystemConnectionMemo
,SystemConnectionMemo
- Direct Known Subclasses:
PR4SystemConnectionMemo
,UsbDcs210PlusSystemConnectionMemo
,UsbDcs240PlusSystemConnectionMemo
,UsbDcs240SystemConnectionMemo
,UsbDcs52SystemConnectionMemo
public class PR3SystemConnectionMemo extends LocoNetSystemConnectionMemo
Lightweight class to denote that a PR3 is active
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
mode
(package private) static int
MS100MODE
(package private) static int
PR3MODE
-
Fields inherited from class jmri.jmrix.loconet.LocoNetSystemConnectionMemo
mInterrogateAtStart, mTurnoutExtraSpace, mTurnoutNoRetry, predefinedMeters, tm
-
Fields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMap
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
Fields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME
-
-
Constructor Summary
Constructors Constructor Description PR3SystemConnectionMemo()
PR3SystemConnectionMemo(LnTrafficController lt, SlotManager sm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureManagersMS100()
Configure the LocoNet managers valid for the PR3 in MS100 mode, same as super, flag the interface type.void
configureManagersPR2()
Configure the subset of LocoNet managers valid for the PR3 in PR2 mode.void
dispose()
Dispose of System Connection.<T> T
get(java.lang.Class<T> T)
Get a manager for a specific type.LnPowerManager
getPowerManager()
Get the connection's LnPowerManager.ThrottleManager
getThrottleManager()
boolean
provides(java.lang.Class<?> type)
Check if this connection provides a specific manager type.-
Methods inherited from class jmri.jmrix.loconet.LocoNetSystemConnectionMemo
configureCommandStation, configureManagers, getActionModelResourceBundle, getCabSignalManager, getClockControl, getIdTagManager, getLightManager, getLn7gAccyRoutesManager, getLncvDevicesManager, getLnMessageManager, getLnTrafficController, getNamedBeanComparator, getPredefinedMeters, getProgrammerManager, getReporterManager, getSensorManager, getSlotManager, getStringIOManager, getThrottleStringIO, getTurnoutManager, register, setLn7gAccyRoutesManager, setLncvDevicesManager, setLnTrafficController, setProgrammerManager, setThrottleManager
-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, store
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.SystemConnectionMemo
getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Field Detail
-
PR3MODE
static final int PR3MODE
- See Also:
- Constant Field Values
-
MS100MODE
static final int MS100MODE
- See Also:
- Constant Field Values
-
mode
int mode
-
-
Constructor Detail
-
PR3SystemConnectionMemo
public PR3SystemConnectionMemo(LnTrafficController lt, SlotManager sm)
-
PR3SystemConnectionMemo
public PR3SystemConnectionMemo()
-
-
Method Detail
-
get
public <T> T get(java.lang.Class<T> T)
Description copied from class:DefaultSystemConnectionMemo
Get a manager for a specific type. This method must return a non-null value ifDefaultSystemConnectionMemo.provides(java.lang.Class)
is true for the type, and must return null if provides() is false for the type.- Specified by:
get
in interfaceSystemConnectionMemo
- Overrides:
get
in classDefaultSystemConnectionMemo
- Type Parameters:
T
- Type of manager to get- Parameters:
T
- Type of manager to get- Returns:
- The manager or null if provides() is false for T
- See Also:
DefaultSystemConnectionMemo.provides(java.lang.Class)
-
configureManagersPR2
public void configureManagersPR2()
Configure the subset of LocoNet managers valid for the PR3 in PR2 mode.
-
getThrottleManager
public ThrottleManager getThrottleManager()
- Overrides:
getThrottleManager
in classLocoNetSystemConnectionMemo
-
provides
public boolean provides(java.lang.Class<?> type)
Description copied from class:DefaultSystemConnectionMemo
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.- Specified by:
provides
in interfaceSystemConnectionMemo
- Overrides:
provides
in classDefaultSystemConnectionMemo
- Parameters:
type
- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
DefaultSystemConnectionMemo.get(java.lang.Class)
-
getPowerManager
public LnPowerManager getPowerManager()
Get the connection's LnPowerManager.- Overrides:
getPowerManager
in classLocoNetSystemConnectionMemo
- Returns:
- the LocoNet power manager; may be null in some circumstances
-
configureManagersMS100
public void configureManagersMS100()
Configure the LocoNet managers valid for the PR3 in MS100 mode, same as super, flag the interface type.
-
dispose
public void dispose()
Description copied from class:DefaultSystemConnectionMemo
Dispose of System Connection.Removes objects from classObjectMap after calling dispose if Disposable. Removes these objects from InstanceManager.
- Specified by:
dispose
in interfaceDisposable
- Specified by:
dispose
in interfaceSystemConnectionMemo
- Overrides:
dispose
in classLocoNetSystemConnectionMemo
-
-