Interface PowerManager
-
- All Superinterfaces:
PropertyChangeProvider
- All Known Implementing Classes:
AbstractPowerManager
,BiDiBPowerManager
,CbusPowerManager
,DCCppPowerManager
,DefaultPowerManager
,EasyDccPowerManager
,EcosPowerManager
,JMRIClientPowerManager
,LnPowerManager
,LnPr2PowerManager
,MarklinPowerManager
,MqttPowerManager
,MrcPowerManager
,Mx1PowerManager
,NcePowerManager
,SprogPowerManager
,SRCPPowerManager
,TamsPowerManager
,XNetPowerManager
,XpaPowerManager
public interface PowerManager extends PropertyChangeProvider
Provide controls for layout power.The PowerManager handles three states:
- On/Off which controls electrical power to the track
- an optional "Idle" state, where track power is alive but track-connected decoders may be un-controllable
Some connections, including some LocoNet-based connections, implement the "Idle" state. For these LocoNet-based connections, when the Power state is "Idle", the track power is alive and the command station is broadcasting "stop" to all mobile decoders. Other systems may implement different interpretation of the "Idle" state.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
dispose()
int
getPower()
java.lang.String
getUserName()
default boolean
implementsIdle()
void
setPower(int v)
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
UNKNOWN
static final int UNKNOWN
- See Also:
- Constant Field Values
-
ON
static final int ON
- See Also:
- Constant Field Values
-
OFF
static final int OFF
- See Also:
- Constant Field Values
-
IDLE
static final int IDLE
- See Also:
- Constant Field Values
-
POWER
static final java.lang.String POWER
PropertyChangeEvent
s are fired with this property name."power"
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPower
void setPower(int v) throws JmriException
- Throws:
JmriException
-
getPower
@CheckReturnValue int getPower()
-
dispose
void dispose() throws JmriException
- Throws:
JmriException
-
implementsIdle
default boolean implementsIdle()
-
getUserName
@CheckReturnValue @Nonnull java.lang.String getUserName()
-
-