Package jmri.jmrix.dccpp
Class DCCppPowerManager
- All Implemented Interfaces:
EventListener,PropertyChangeFirer,PropertyChangeProvider,AbstractMRListener,DCCppListener,PowerManager
public class DCCppPowerManager
extends AbstractPowerManager<DCCppSystemConnectionMemo>
implements DCCppListener
DCCppPowerManager.java
PowerManager implementation for controlling layout power
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.managers.AbstractPowerManager
AbstractPowerManager.TimeKeeper -
Field Summary
Fields inherited from class jmri.managers.AbstractPowerManager
memo, powerFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new DCCppPowerManager. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Free resources when no longer used.voidMember function that will be invoked by a DCCppInterface implementation to forward a DCC-EX message sent to the layout.voidMember function that will be invoked by a DCCppInterface implementation to forward a DCC-EX message from the layout.voidMember function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.voidRequest the current command station status and request the trackmanager configuration.voidsetPower(int v) Set the Power status.Methods inherited from class jmri.managers.AbstractPowerManager
firePowerPropertyChange, getPower, getUserName, timeSinceLastPowerOnMethods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.PowerManager
implementsIdleMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
DCCppPowerManager
Create a new DCCppPowerManager. Adds listener to connection. Requests power update from layout.- Parameters:
memo- the Connection.
-
-
Method Details
-
setPower
Set the Power status. After sending to the layout, requests power status update. Set the Power.- Specified by:
setPowerin interfacePowerManager- Overrides:
setPowerin classAbstractPowerManager<DCCppSystemConnectionMemo>- Parameters:
v- the new power status.- Throws:
JmriException- if unable to send request.
-
dispose
Description copied from interface:PowerManagerFree resources when no longer used.- Specified by:
disposein interfacePowerManager- Throws:
JmriException- if unable to dispose.
-
message
Description copied from interface:DCCppListenerMember function that will be invoked by a DCCppInterface implementation to forward a DCC-EX message from the layout.- Specified by:
messagein interfaceDCCppListener- Parameters:
m- The received DCC-EX message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Description copied from interface:DCCppListenerMember function that will be invoked by a DCCppInterface implementation to forward a DCC-EX message sent to the layout. Normally, this function will do nothing.- Specified by:
messagein interfaceDCCppListener- Parameters:
l- The received DCC-EX message. Note that this same object may be presented to multiple users. It should not be modified here.
-
notifyTimeout
Description copied from interface:DCCppListenerMember function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.- Specified by:
notifyTimeoutin interfaceDCCppListener- Parameters:
msg- the message that timed out.
-
requestUpdateFromLayout
Request the current command station status and request the trackmanager configuration. Request Track Power Status Update. Default implementation does nothing.- Specified by:
requestUpdateFromLayoutin interfacePowerManager
-