Package jmri.jmrix.srcp
Class SRCPBusConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.srcp.SRCPBusConnectionMemo
-
- All Implemented Interfaces:
java.util.EventListener
,BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,AbstractMRListener
,ConfiguringSystemConnectionMemo
,SRCPListener
,SystemConnectionMemo
public class SRCPBusConnectionMemo extends DefaultSystemConnectionMemo implements SRCPListener, 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 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 SRCPBusConnectionMemo(SRCPTrafficController et, java.lang.String Prefix, int bus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureManagers()
Configure the common managers for Internal connections.void
dispose()
Dispose of System Connection.protected java.util.ResourceBundle
getActionModelResourceBundle()
(package private) int
getBus()
package protected function to get the bus associated with this memo.ClockControl
getClockControl()
<B extends NamedBean>
java.util.Comparator<B>getNamedBeanComparator(java.lang.Class<B> type)
Get the Comparator to be used for two NamedBeans.PowerManager
getPowerManager()
SRCPProgrammerManager
getProgrammerManager()
Provides access to the Programmer for this particular connection.SensorManager
getSensorManager()
ThrottleManager
getThrottleManager()
SRCPTrafficController
getTrafficController()
Provides access to the TrafficController for this particular connection.TurnoutManager
getTurnoutManager()
void
message(SRCPMessage m)
void
reply(SimpleNode n)
void
reply(SRCPReply m)
void
setClockControl(ClockControl t)
void
setPowerManager(PowerManager p)
void
setProgrammerManager(SRCPProgrammerManager p)
void
setSensorManager(SensorManager s)
void
setThrottleManager(ThrottleManager t)
void
setTrafficController(SRCPTrafficController et)
void
setTurnoutManager(TurnoutManager t)
-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, register, 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, register, setDisabled, setOutputInterval, setSystemPrefix, setUserName
-
-
-
-
Constructor Detail
-
SRCPBusConnectionMemo
public SRCPBusConnectionMemo(SRCPTrafficController et, java.lang.String Prefix, int bus)
-
-
Method Detail
-
getTrafficController
public SRCPTrafficController getTrafficController()
Provides access to the TrafficController for this particular connection.- Returns:
- SRCP Traffic Controller.
-
setTrafficController
public void setTrafficController(SRCPTrafficController et)
-
configureManagers
public void configureManagers()
Configure the common managers for Internal connections. This puts the common manager config in one place.- Specified by:
configureManagers
in interfaceConfiguringSystemConnectionMemo
-
getBus
int getBus()
package protected function to get the bus associated with this memo.- Returns:
- integer bus number
-
getProgrammerManager
public SRCPProgrammerManager getProgrammerManager()
Provides access to the Programmer for this particular connection.NOTE: Programmer defaults to null
- Returns:
- programmer manager.
-
setProgrammerManager
public void setProgrammerManager(SRCPProgrammerManager p)
-
getThrottleManager
public ThrottleManager getThrottleManager()
-
setThrottleManager
public void setThrottleManager(ThrottleManager t)
-
getClockControl
public ClockControl getClockControl()
-
setClockControl
public void setClockControl(ClockControl t)
-
getPowerManager
public PowerManager getPowerManager()
-
setPowerManager
public void setPowerManager(PowerManager p)
-
getSensorManager
public SensorManager getSensorManager()
-
setSensorManager
public void setSensorManager(SensorManager s)
-
getTurnoutManager
public TurnoutManager getTurnoutManager()
-
setTurnoutManager
public void setTurnoutManager(TurnoutManager t)
-
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
-
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
-
message
public void message(SRCPMessage m)
- Specified by:
message
in interfaceSRCPListener
-
reply
public void reply(SRCPReply m)
- Specified by:
reply
in interfaceSRCPListener
-
reply
public void reply(SimpleNode n)
- Specified by:
reply
in interfaceSRCPListener
-
-