Package jmri.implementation
Class SensorGroupConditional
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.DefaultConditional
-
- jmri.implementation.SensorGroupConditional
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,Conditional
,NamedBean
public class SensorGroupConditional extends DefaultConditional
Conditional.java A Conditional type to provide runtime support for Densor Groups.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.implementation.DefaultConditional
DefaultConditional.DataPair, DefaultConditional.ErrorDialog, DefaultConditional.TimeSensor, DefaultConditional.TimeTurnout
-
Nested classes/interfaces inherited from interface jmri.Conditional
Conditional.Action, Conditional.AntecedentOperator, Conditional.ItemType, Conditional.Operator, Conditional.State, Conditional.Type
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from class jmri.implementation.DefaultConditional
_actionList, rbx
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.Conditional
ACTION_ALLOCATE_WARRANT_ROUTE, ACTION_AUTO_RUN_WARRANT, ACTION_CANCEL_SENSOR_TIMERS, ACTION_CANCEL_TURNOUT_TIMERS, ACTION_CLEAR_BLOCK_ERROR, ACTION_CLEAR_SIGNAL_HELD, ACTION_CLEAR_SIGNALMAST_HELD, ACTION_CONTROL_AUDIO, ACTION_CONTROL_TRAIN, ACTION_COPY_MEMORY, ACTION_DEALLOCATE_BLOCK, ACTION_DEALLOCATE_WARRANT_ROUTE, ACTION_DELAYED_SENSOR, ACTION_DELAYED_TURNOUT, ACTION_DISABLE_LOGIX, ACTION_ENABLE_LOGIX, ACTION_GET_BLOCK_TRAIN_NAME, ACTION_GET_BLOCK_WARRANT, ACTION_GET_TRAIN_LOCATION, ACTION_JYTHON_COMMAND, ACTION_LOCK_TURNOUT, ACTION_MANUAL_RUN_WARRANT, ACTION_NONE, ACTION_OPTION_ON_CHANGE, ACTION_OPTION_ON_CHANGE_TO_FALSE, ACTION_OPTION_ON_CHANGE_TO_TRUE, ACTION_PLAY_SOUND, ACTION_RESET_DELAYED_SENSOR, ACTION_RESET_DELAYED_TURNOUT, ACTION_RUN_SCRIPT, ACTION_SET_BLOCK_ERROR, ACTION_SET_BLOCK_IN_SERVICE, ACTION_SET_BLOCK_OUT_OF_SERVICE, ACTION_SET_BLOCK_VALUE, ACTION_SET_FAST_CLOCK_TIME, ACTION_SET_LIGHT, ACTION_SET_LIGHT_INTENSITY, ACTION_SET_LIGHT_TRANSITION_TIME, ACTION_SET_MEMORY, ACTION_SET_NXPAIR_DISABLED, ACTION_SET_NXPAIR_ENABLED, ACTION_SET_NXPAIR_SEGMENT, ACTION_SET_ROUTE_TURNOUTS, ACTION_SET_SENSOR, ACTION_SET_SIGNAL_APPEARANCE, ACTION_SET_SIGNAL_DARK, ACTION_SET_SIGNAL_HELD, ACTION_SET_SIGNAL_LIT, ACTION_SET_SIGNALMAST_ASPECT, ACTION_SET_SIGNALMAST_DARK, ACTION_SET_SIGNALMAST_HELD, ACTION_SET_SIGNALMAST_LIT, ACTION_SET_TRAIN_ID, ACTION_SET_TRAIN_NAME, ACTION_SET_TURNOUT, ACTION_START_FAST_CLOCK, ACTION_STOP_FAST_CLOCK, ACTION_TRIGGER_ROUTE, ALL_AND, ALL_OR, FALSE, ITEM_TYPE_AUDIO, ITEM_TYPE_CLOCK, ITEM_TYPE_CONDITIONAL, ITEM_TYPE_ENTRYEXIT, ITEM_TYPE_LIGHT, ITEM_TYPE_LOGIX, ITEM_TYPE_MEMORY, ITEM_TYPE_OBLOCK, ITEM_TYPE_OTHER, ITEM_TYPE_SCRIPT, ITEM_TYPE_SENSOR, ITEM_TYPE_SIGNALHEAD, ITEM_TYPE_SIGNALMAST, ITEM_TYPE_TURNOUT, ITEM_TYPE_WARRANT, MIXED, NUM_ACTION_OPTIONS, OPERATOR_AND, OPERATOR_NONE, OPERATOR_OR, rbxWarrant, TRUE, TYPE_BLOCK_STATUS_EQUALS, TYPE_CONDITIONAL_FALSE, TYPE_CONDITIONAL_TRUE, TYPE_ENTRYEXIT_ACTIVE, TYPE_ENTRYEXIT_INACTIVE, TYPE_ERROR, TYPE_FAST_CLOCK_RANGE, TYPE_LIGHT_OFF, TYPE_LIGHT_ON, TYPE_MEMORY_COMPARE, TYPE_MEMORY_COMPARE_INSENSITIVE, TYPE_MEMORY_EQUALS, TYPE_MEMORY_EQUALS_INSENSITIVE, TYPE_NONE, TYPE_OBLOCK_ALLOCATED, TYPE_OBLOCK_DARK, TYPE_OBLOCK_OCCUPIED, TYPE_OBLOCK_OUT_OF_SERVICE, TYPE_OBLOCK_POWER_ERROR, TYPE_OBLOCK_RUNNING, TYPE_OBLOCK_UNOCCUPIED, TYPE_ROUTE_ALLOCATED, TYPE_ROUTE_FREE, TYPE_ROUTE_OCCUPIED, TYPE_ROUTE_SET, TYPE_SENSOR_ACTIVE, TYPE_SENSOR_INACTIVE, TYPE_SIGNAL_HEAD_APPEARANCE_EQUALS, TYPE_SIGNAL_HEAD_DARK, TYPE_SIGNAL_HEAD_FLASHGREEN, TYPE_SIGNAL_HEAD_FLASHLUNAR, TYPE_SIGNAL_HEAD_FLASHRED, TYPE_SIGNAL_HEAD_FLASHYELLOW, TYPE_SIGNAL_HEAD_GREEN, TYPE_SIGNAL_HEAD_HELD, TYPE_SIGNAL_HEAD_LIT, TYPE_SIGNAL_HEAD_LUNAR, TYPE_SIGNAL_HEAD_RED, TYPE_SIGNAL_HEAD_YELLOW, TYPE_SIGNAL_MAST_ASPECT_EQUALS, TYPE_SIGNAL_MAST_HELD, TYPE_SIGNAL_MAST_LIT, TYPE_TRAIN_RUNNING, TYPE_TURNOUT_CLOSED, TYPE_TURNOUT_THROWN, TYPE_XXXXXXX
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description SensorGroupConditional(java.lang.String systemName, java.lang.String userName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculate(boolean enabled, java.beans.PropertyChangeEvent evt)
Calculate this Conditional.-
Methods inherited from class jmri.implementation.DefaultConditional
cancelSensorTimer, cancelTurnoutTimer, dispose, getActionList, getAntecedentExpression, getBeanType, getCopyOfActions, getCopyOfStateVariables, getIndexInTable, getIntegerValue, getLogicType, getMillisecondValue, getState, getStateVariableList, getTriggerOnChange, parseCalculate, setAction, setLogicType, setState, setStateVariables, setTriggerOnChange, validateAntecedent, wantsToTrigger
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.Conditional
addPropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
SensorGroupConditional
public SensorGroupConditional(java.lang.String systemName, java.lang.String userName)
-
-
Method Detail
-
calculate
public int calculate(boolean enabled, java.beans.PropertyChangeEvent evt)
Description copied from class:DefaultConditional
Calculate this Conditional. When _enabled is false, Conditional.calculate will compute the state of the conditional, but will not trigger its actions. When _enabled is true, the state is computed and if the state has changed, will trigger all its actions.- Specified by:
calculate
in interfaceConditional
- Overrides:
calculate
in classDefaultConditional
- Parameters:
enabled
- true if Logix should be enabled; false otherwiseevt
- event to trigger if true- Returns:
- the new state
-
-