Package jmri.jmrix.sprog
Class SprogPowerManager
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.managers.AbstractPowerManager<SprogSystemConnectionMemo>
-
- jmri.jmrix.sprog.SprogPowerManager
-
- All Implemented Interfaces:
java.util.EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,SprogListener
,PowerManager
public class SprogPowerManager extends AbstractPowerManager<SprogSystemConnectionMemo> implements SprogListener
PowerManager implementation for controlling SPROG layout power.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.managers.AbstractPowerManager
AbstractPowerManager.TimeKeeper
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
onReply
(package private) SprogTrafficController
trafficController
(package private) boolean
waiting
-
Fields inherited from class jmri.managers.AbstractPowerManager
memo, power
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description SprogPowerManager(SprogSystemConnectionMemo memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Free resources when no longer used.void
notePowerState(int v)
Update power state after service mode programming operation without sending a message to the SPROG.void
notify(AbstractMessage m)
void
notifyMessage(SprogMessage m)
void
notifyReply(SprogReply m)
Listen for status changes from Sprog system.void
setPower(int v)
-
Methods inherited from class jmri.managers.AbstractPowerManager
firePowerPropertyChange, getPower, getUserName, timeSinceLastPowerOn
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.PowerManager
implementsIdle
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
waiting
boolean waiting
-
onReply
int onReply
-
trafficController
SprogTrafficController trafficController
-
-
Constructor Detail
-
SprogPowerManager
public SprogPowerManager(SprogSystemConnectionMemo memo)
-
-
Method Detail
-
setPower
public void setPower(int v) throws JmriException
Description copied from class:AbstractPowerManager
- Specified by:
setPower
in interfacePowerManager
- Overrides:
setPower
in classAbstractPowerManager<SprogSystemConnectionMemo>
- Throws:
JmriException
-
notePowerState
public void notePowerState(int v)
Update power state after service mode programming operation without sending a message to the SPROG.- Parameters:
v
- new power state.
-
dispose
public void dispose() throws JmriException
Free resources when no longer used.- Specified by:
dispose
in interfacePowerManager
- Throws:
JmriException
-
notifyReply
public void notifyReply(SprogReply m)
Listen for status changes from Sprog system.- Specified by:
notifyReply
in interfaceSprogListener
-
notifyMessage
public void notifyMessage(SprogMessage m)
- Specified by:
notifyMessage
in interfaceSprogListener
-
notify
public void notify(AbstractMessage m)
-
-