Package jmri.jmrix.loconet
Class LocoNetSystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.loconet.LocoNetSystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,ConfiguringSystemConnectionMemo
,SystemConnectionMemo
- Direct Known Subclasses:
HexFileSystemConnectionMemo
,PR2SystemConnectionMemo
,PR3SystemConnectionMemo
,UhlenbrockSystemConnectionMemo
public class LocoNetSystemConnectionMemo 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
Fields Modifier and Type Field Description (package private) ComponentFactory
cf
protected boolean
mInterrogateAtStart
protected boolean
mTurnoutExtraSpace
protected boolean
mTurnoutNoRetry
protected LnPredefinedMeters
predefinedMeters
(package private) static TranspondingTagManager
tagManager
(package private) LnThrottleStringIO
throttleStringIO
protected LocoNetThrottledTransmitter
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 LocoNetSystemConnectionMemo()
Must manually register() after construction is complete.LocoNetSystemConnectionMemo(java.lang.String prefix, java.lang.String name)
LocoNetSystemConnectionMemo(LnTrafficController lt, SlotManager sm)
Must manually register() after construction is complete.
-
Method Summary
-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, 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
get, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Field Detail
-
tm
protected LocoNetThrottledTransmitter tm
-
mTurnoutNoRetry
protected boolean mTurnoutNoRetry
-
mTurnoutExtraSpace
protected boolean mTurnoutExtraSpace
-
mInterrogateAtStart
protected boolean mInterrogateAtStart
-
predefinedMeters
protected LnPredefinedMeters predefinedMeters
-
throttleStringIO
LnThrottleStringIO throttleStringIO
-
tagManager
static TranspondingTagManager tagManager
-
-
Constructor Detail
-
LocoNetSystemConnectionMemo
public LocoNetSystemConnectionMemo(LnTrafficController lt, SlotManager sm)
Must manually register() after construction is complete.- Parameters:
lt
- Traffic controller to be usedsm
- Slot Manager to be used
-
LocoNetSystemConnectionMemo
public LocoNetSystemConnectionMemo()
Must manually register() after construction is complete.
-
LocoNetSystemConnectionMemo
public LocoNetSystemConnectionMemo(@Nonnull java.lang.String prefix, @Nonnull java.lang.String name)
-
-
Method Detail
-
register
public void register()
Do both the default parentSystemConnectionMemo
registration, and register this specific type.- Specified by:
register
in interfaceSystemConnectionMemo
- Overrides:
register
in classDefaultSystemConnectionMemo
-
getSlotManager
public SlotManager getSlotManager()
Provide access to the SlotManager for this particular connection.- Returns:
- the slot manager or null if no valid slot manager is available
-
getLnTrafficController
public LnTrafficController getLnTrafficController()
Provide access to the TrafficController for this particular connection.- Returns:
- the LocoNet-specific TrafficController
-
setLnTrafficController
public void setLnTrafficController(LnTrafficController lt)
-
getLnMessageManager
public LnMessageManager getLnMessageManager()
-
getProgrammerManager
public DefaultProgrammerManager getProgrammerManager()
-
setProgrammerManager
public void setProgrammerManager(DefaultProgrammerManager p)
-
setLncvDevicesManager
public void setLncvDevicesManager(LncvDevicesManager lncvdm)
-
configureCommandStation
public void configureCommandStation(LnCommandStationType type, boolean mTurnoutNoRetry, boolean mTurnoutExtraSpace, boolean mTranspondingAvailable, boolean mInterrogate, boolean mLoconetProtocolAutoDetect)
Configure the programming manager and "command station" objects.- Parameters:
type
- Command station type, used to configure various operationsmTurnoutNoRetry
- Is the user configuration set for no turnout operation retries?mTurnoutExtraSpace
- Is the user configuration set for extra time between turnout operations?mTranspondingAvailable
- Is the layout configured to provide transopnding reportsmInterrogate
- Send interrogate messages at start upmLoconetProtocolAutoDetect
- Do we automatically detect the protocol to use or force LocoNet 1.1
-
configureManagers
public void configureManagers()
Configure the common managers for LocoNet connections. This puts the common manager config in one place.- Specified by:
configureManagers
in interfaceConfiguringSystemConnectionMemo
-
getPowerManager
public LnPowerManager getPowerManager()
-
getThrottleManager
public ThrottleManager getThrottleManager()
-
setThrottleManager
public void setThrottleManager(ThrottleManager t)
-
getTurnoutManager
public LnTurnoutManager getTurnoutManager()
-
getClockControl
public LnClockControl getClockControl()
-
getReporterManager
public LnReporterManager getReporterManager()
-
getSensorManager
public LnSensorManager getSensorManager()
-
getLightManager
public LnLightManager getLightManager()
-
getLncvDevicesManager
public LncvDevicesManager getLncvDevicesManager()
-
getStringIOManager
public LnStringIOManager getStringIOManager()
-
setLn7gAccyRoutesManager
public Ln7gAccyRoutesManager setLn7gAccyRoutesManager(Ln7gAccyRoutesManager ln7gaccyrm)
-
getLn7gAccyRoutesManager
public Ln7gAccyRoutesManager getLn7gAccyRoutesManager()
-
getPredefinedMeters
public LnPredefinedMeters getPredefinedMeters()
-
getThrottleStringIO
public void getThrottleStringIO()
-
getActionModelResourceBundle
protected java.util.ResourceBundle getActionModelResourceBundle()
- Specified by:
getActionModelResourceBundle
in classDefaultSystemConnectionMemo
-
getNamedBeanComparator
public <B extends NamedBean> java.util.Comparator<B> getNamedBeanComparator(java.lang.Class<B> type)
Description copied from class:DefaultSystemConnectionMemo
Get 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:
getNamedBeanComparator
in interfaceSystemConnectionMemo
- Specified by:
getNamedBeanComparator
in classDefaultSystemConnectionMemo
- Type Parameters:
B
- the type of NamedBean- Parameters:
type
- the class of NamedBean- Returns:
- the Comparator
-
getIdTagManager
public static TranspondingTagManager getIdTagManager()
-
getCabSignalManager
public LnCabSignalManager getCabSignalManager()
-
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 classDefaultSystemConnectionMemo
-
-