Package jmri.implementation
Class DefaultSignalGroup
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.DefaultSignalGroup
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>,PropertyChangeProvider,NamedBean,SignalGroup
public class DefaultSignalGroup extends AbstractNamedBean implements SignalGroup
A Conditional type to provide Signal Groups (n Signal Heads w/Conditionals for a main Mast).- See Also:
SignalGroup
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<jmri.implementation.DefaultSignalGroup.SignalHeadItem>_signalHeadItem(package private) java.util.ArrayList<java.lang.String>_signalMastAspectsprotected java.beans.PropertyChangeListenermSignalMastListener-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
-
Fields inherited from interface jmri.SignalGroup
ONACTIVE, ONCLOSED, ONINACTIVE, ONTHROWN
-
-
Constructor Summary
Constructors Constructor Description DefaultSignalGroup(java.lang.String systemName)Constructor for SignalGroup instance.DefaultSignalGroup(java.lang.String systemName, java.lang.String userName)Constructor for SignalGroup instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSignalHead(java.lang.String pName)Add a new Signal Head to the group by name.voidaddSignalHead(NamedBeanHandle<SignalHead> headBean)Add a Signal Head item for this Signal Head to the list in the Group.voidaddSignalHead(SignalHead signalHead)Add a Signal Head item for this Signal Head to the list in the Group.voidaddSignalMastAspect(java.lang.String aspect)Add an Aspect that can trigger the group activation.voidclearHeadSensor(SignalHead signalHead)Delete all Sensors for a given Signal Head in the group.voidclearHeadTurnout(SignalHead signalHead)Delete all Turnouts for a given Signal Head in the group.voidclearSignalMastAspect()Clear the list of SignalMast Aspects that may trigger the group.voiddeleteSignalHead(NamedBeanHandle<SignalHead> headBean)Remove the Signal Head item for this Signal Head from the group by NamedBeanvoiddeleteSignalHead(SignalHead sh)Remove the Signal Head item for this Signal Head from the group by Name.voiddeleteSignalMastAspect(java.lang.String aspect)Remove a SignalMast Aspect from the set of triggers.java.lang.StringgetBeanType()For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.booleangetEnabled()Get enabled status of the signal group.SignalHeadgetHeadItemBeanByIndex(int x)Get a Signal Head by Index.java.lang.StringgetHeadItemNameByIndex(int x)Get the name of a Signal Head by Index.intgetHeadOffState(SignalHead headBean)Get the Off (conditions NOT met) State of a Signal Head item in the group.intgetHeadOffStateByIndex(int x)Get the Off State for the Signal Head item at Index x in the group.intgetHeadOnState(SignalHead headBean)Get the On (conditions met) State of a Signal Head item in the group.intgetHeadOnStateByIndex(int x)Get the On State for the Signal Head item at Index x in the group.intgetNumHeadItems()Get the number of Signal Heads configured as items in this group.intgetNumHeadSensorsByIndex(int x)Get the number of Sensors configured for the Signal Head at index x.intgetNumHeadTurnoutsByIndex(int x)Get the number of turnouts configured for the Signal Head at index x.intgetNumSignalMastAspects()Get the total number of Signal Mast Aspects available in this group.SensorgetSensorByIndex(int x, int pSensor)Get the Sensor at index pSensor, for the Signal Head at index x.java.lang.StringgetSensorNameByIndex(int x, int pSensor)Get the name of the Sensor at index pSensor for the Signal Head at index x.intgetSensorState(SignalHead signalHead, Sensor sensor)Get the On state of the Sensor for the Signal Head in the group.intgetSensorStateByIndex(int x, int pSensor)Get the On state of the Sensor at index pSensor for the Signal Head at index x.booleangetSensorTurnoutOper(SignalHead signalHead)Get the AND/OR conditional operand set for a Signal Head in the group.booleangetSensorTurnoutOperByIndex(int x)Get the state of the AND/OR conditional operand for Signal Head at Index.SignalMastgetSignalMast()Get the main Signal Mast in a group.java.lang.StringgetSignalMastAspectByIndex(int x)Get a SignalMast Aspect for the Main Signal Mast by its Index.java.lang.StringgetSignalMastName()Get the name of the main Signal Mast in a group.intgetState()Provide generic access to internal state.TurnoutgetTurnoutByIndex(int x, int pTurnout)Get the Turnout at index x, for the Signal Head at index x in the group.java.lang.StringgetTurnoutNameByIndex(int x, int pTurnout)Get the Name of the Turnout at index pTurnout, for the Signal Head at index x in the group.intgetTurnoutState(SignalHead signalHead, Turnout turnout)Get the On state of the Turnout for the given Signal Head in the group.intgetTurnoutStateByIndex(int x, int pTurnout)Get the On state of the Turnout at index pTurnout, for the Signal Head at index x in the group.intgetTurnoutStateByIndex(int x, Turnout turnout)Get the On state of a given Turnout for the Signal Head at index x.java.util.List<NamedBeanUsageReport>getUsageReport(NamedBean bean)Get a list of references for the specified bean.booleanisHeadIncluded(SignalHead signalHead)Inquire if a Signal Head item for this head is included in this Group.booleanisSensorIncluded(SignalHead signalHead, Sensor sensor)Inquire if a Sensor is included in the Signal Head Calculation.booleanisSignalMastAspectIncluded(java.lang.String aspect)Inquire if a Signal Mast Aspect is included in the group.booleanisTurnoutIncluded(SignalHead signalHead, Turnout turnout)Inquire if a Turnout is included in the Signal Head Calculation.voidsetEnabled(boolean boo)Set enabled status of the signal group.voidsetHeadAlignSensor(SignalHead signalHead, Sensor sensor, int state)Add a Sensor and its On state to a Signal Head.voidsetHeadAlignTurnout(SignalHead signalHead, Turnout turnout, int state)Add a Turnout and its On state to a Signal Head.voidsetHeadOffState(SignalHead head, int state)Set the Off (conditions NOT met) State of a Signal Head item in the Group.voidsetHeadOnState(SignalHead head, int state)Set the On (conditions met) State of a Signal Head item in the Group.voidsetSensorTurnoutOper(SignalHead signalHead, boolean boo)Set whether the sensors and turnouts should be treated as separate calculations (OR) or as one (AND) when determining if the Signal Head should be On or Off.voidsetSignalMast(java.lang.String pName)Set the main Signal Mast for the Group by name.voidsetSignalMast(SignalMast signalMast, java.lang.String mastName)Set the main Signal Mast for the Group.voidsetState(int state)Provide generic access to internal state.-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, 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.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
_signalMastAspects
java.util.ArrayList<java.lang.String> _signalMastAspects
-
mSignalMastListener
protected java.beans.PropertyChangeListener mSignalMastListener
-
_signalHeadItem
java.util.ArrayList<jmri.implementation.DefaultSignalGroup.SignalHeadItem> _signalHeadItem
-
-
Constructor Detail
-
DefaultSignalGroup
public DefaultSignalGroup(java.lang.String systemName, java.lang.String userName)
Constructor for SignalGroup instance.- Parameters:
systemName- suggested system nameuserName- provided user name
-
DefaultSignalGroup
public DefaultSignalGroup(java.lang.String systemName)
Constructor for SignalGroup instance.- Parameters:
systemName- suggested system name
-
-
Method Detail
-
getBeanType
public java.lang.String getBeanType()
Description copied from interface:NamedBeanFor instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Specified by:
getBeanTypein interfaceNamedBean- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
setEnabled
public void setEnabled(boolean boo)
Description copied from interface:SignalGroupSet enabled status of the signal group.- Specified by:
setEnabledin interfaceSignalGroup- Parameters:
boo- true if signal group should be enabled; false otherwise
-
getEnabled
public boolean getEnabled()
Description copied from interface:SignalGroupGet enabled status of the signal group.- Specified by:
getEnabledin interfaceSignalGroup- Returns:
- true if signal group is enabled; false otherwise
-
setSignalMast
public void setSignalMast(java.lang.String pName)
Description copied from interface:SignalGroupSet the main Signal Mast for the Group by name.- Specified by:
setSignalMastin interfaceSignalGroup- Parameters:
pName- Name of the (existing) Signal Mast to set as main mast for the group
-
setSignalMast
public void setSignalMast(SignalMast signalMast, java.lang.String mastName)
Description copied from interface:SignalGroupSet the main Signal Mast for the Group.- Specified by:
setSignalMastin interfaceSignalGroup- Parameters:
signalMast- Mast object to attachmastName- Name of the (existing) Signal Mast to set as main mast for the group
-
getSignalMast
public SignalMast getSignalMast()
Description copied from interface:SignalGroupGet the main Signal Mast in a group.- Specified by:
getSignalMastin interfaceSignalGroup- Returns:
- The main Signal Mast as bean
-
getSignalMastName
public java.lang.String getSignalMastName()
Description copied from interface:SignalGroupGet the name of the main Signal Mast in a group.- Specified by:
getSignalMastNamein interfaceSignalGroup- Returns:
- Name of the mast as string
-
addSignalMastAspect
public void addSignalMastAspect(java.lang.String aspect)
Description copied from interface:SignalGroupAdd an Aspect that can trigger the group activation.- Specified by:
addSignalMastAspectin interfaceSignalGroup- Parameters:
aspect- Name of an aspect for the Main Signal Mast in the Group, must be valid for the Mast type
-
isSignalMastAspectIncluded
public boolean isSignalMastAspectIncluded(java.lang.String aspect)
Description copied from interface:SignalGroupInquire if a Signal Mast Aspect is included in the group.- Specified by:
isSignalMastAspectIncludedin interfaceSignalGroup- Parameters:
aspect- name of the Aspect, i.e. "Clear"- Returns:
- true if aspect is included in group
-
deleteSignalMastAspect
public void deleteSignalMastAspect(java.lang.String aspect)
Description copied from interface:SignalGroupRemove a SignalMast Aspect from the set of triggers.- Specified by:
deleteSignalMastAspectin interfaceSignalGroup- Parameters:
aspect- Name of the Aspect, i.e. "Clear"
-
getNumSignalMastAspects
public int getNumSignalMastAspects()
Description copied from interface:SignalGroupGet the total number of Signal Mast Aspects available in this group.- Specified by:
getNumSignalMastAspectsin interfaceSignalGroup- Returns:
- the number of Aspects on the main Signal Mast, null if no Main Mast is assigned
-
getSignalMastAspectByIndex
public java.lang.String getSignalMastAspectByIndex(int x)
Description copied from interface:SignalGroupGet a SignalMast Aspect for the Main Signal Mast by its Index.- Specified by:
getSignalMastAspectByIndexin interfaceSignalGroup- Parameters:
x- index of the Signal Mast Aspect in the list- Returns:
- the aspect or null if there are no aspects with that index
-
clearSignalMastAspect
public void clearSignalMastAspect()
Description copied from interface:SignalGroupClear the list of SignalMast Aspects that may trigger the group. Causes the Aspect list to be rebuilt next time it is called- Specified by:
clearSignalMastAspectin interfaceSignalGroup
-
addSignalHead
public void addSignalHead(NamedBeanHandle<SignalHead> headBean)
Description copied from interface:SignalGroupAdd a Signal Head item for this Signal Head to the list in the Group.- Specified by:
addSignalHeadin interfaceSignalGroup- Parameters:
headBean- The Signal Head as a Named Bean
-
addSignalHead
public void addSignalHead(java.lang.String pName)
Add a new Signal Head to the group by name.- Parameters:
pName- system or username of existing signal head to add to group
-
addSignalHead
public void addSignalHead(SignalHead signalHead)
Description copied from interface:SignalGroupAdd a Signal Head item for this Signal Head to the list in the Group.- Specified by:
addSignalHeadin interfaceSignalGroup- Parameters:
signalHead- The Signal Head object
-
setHeadAlignTurnout
public void setHeadAlignTurnout(SignalHead signalHead, Turnout turnout, int state)
Description copied from interface:SignalGroupAdd a Turnout and its On state to a Signal Head.- Specified by:
setHeadAlignTurnoutin interfaceSignalGroup- Parameters:
signalHead- SignalHead we are adding the turnout toturnout- Turnout Beanstate- Value for the turnout On state (Turnout.THROWN or Turnout.CLOSED).
-
setHeadAlignSensor
public void setHeadAlignSensor(SignalHead signalHead, Sensor sensor, int state)
Description copied from interface:SignalGroupAdd a Sensor and its On state to a Signal Head.- Specified by:
setHeadAlignSensorin interfaceSignalGroup- Parameters:
signalHead- Signal Head we are adding the sensor tosensor- Sensor Beanstate- Value for the Sensor On state (Sensor.ACTIVE or Sensor.INACTIVE).
-
getHeadItemNameByIndex
public java.lang.String getHeadItemNameByIndex(int x)
Description copied from interface:SignalGroupGet the name of a Signal Head by Index.- Specified by:
getHeadItemNameByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in the Group- Returns:
- null if there are no Signal Heads with that index in the group
-
getHeadItemBeanByIndex
public SignalHead getHeadItemBeanByIndex(int x)
Description copied from interface:SignalGroupGet a Signal Head by Index.- Specified by:
getHeadItemBeanByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in the Group- Returns:
- null if there are no Signal Heads with that index in the group
-
getNumHeadItems
public int getNumHeadItems()
Description copied from interface:SignalGroupGet the number of Signal Heads configured as items in this group.- Specified by:
getNumHeadItemsin interfaceSignalGroup- Returns:
- the number of Signal Heads
-
getHeadOffState
public int getHeadOffState(SignalHead headBean)
Description copied from interface:SignalGroupGet the Off (conditions NOT met) State of a Signal Head item in the group.- Specified by:
getHeadOffStatein interfaceSignalGroup- Parameters:
headBean- The Signal Head Bean object we are querying- Returns:
- state value for the Off state (appearance)
-
getHeadOnState
public int getHeadOnState(SignalHead headBean)
Description copied from interface:SignalGroupGet the On (conditions met) State of a Signal Head item in the group.- Specified by:
getHeadOnStatein interfaceSignalGroup- Parameters:
headBean- The Signal Head object we are querying- Returns:
- state value for the On state (appearance)
-
getHeadOnStateByIndex
public int getHeadOnStateByIndex(int x)
Description copied from interface:SignalGroupGet the On State for the Signal Head item at Index x in the group.- Specified by:
getHeadOnStateByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in Group- Returns:
- -1 if there are less than 'x' Signal Heads defined
-
getHeadOffStateByIndex
public int getHeadOffStateByIndex(int x)
Description copied from interface:SignalGroupGet the Off State for the Signal Head item at Index x in the group.- Specified by:
getHeadOffStateByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in Group- Returns:
- -1 if there are less than 'x' Signal Heads defined
-
deleteSignalHead
public void deleteSignalHead(SignalHead sh)
Description copied from interface:SignalGroupRemove the Signal Head item for this Signal Head from the group by Name.- Specified by:
deleteSignalHeadin interfaceSignalGroup- Parameters:
sh- The Signal Head to be deleted from the group.
-
deleteSignalHead
public void deleteSignalHead(NamedBeanHandle<SignalHead> headBean)
Description copied from interface:SignalGroupRemove the Signal Head item for this Signal Head from the group by NamedBean- Specified by:
deleteSignalHeadin interfaceSignalGroup- Parameters:
headBean- The Named Bean to be removed from the group.
-
setHeadOnState
public void setHeadOnState(SignalHead head, int state)
Description copied from interface:SignalGroupSet the On (conditions met) State of a Signal Head item in the Group.- Specified by:
setHeadOnStatein interfaceSignalGroup- Parameters:
head- The SignalHead Beanstate- The Appearance that the SignalHead will change to when the conditions are met.
-
setHeadOffState
public void setHeadOffState(SignalHead head, int state)
Description copied from interface:SignalGroupSet the Off (conditions NOT met) State of a Signal Head item in the Group.- Specified by:
setHeadOffStatein interfaceSignalGroup- Parameters:
head- The SignalHead Beanstate- The Apperance that the SignalHead will change to when the conditions are NOT met.
-
isHeadIncluded
public boolean isHeadIncluded(SignalHead signalHead)
Description copied from interface:SignalGroupInquire if a Signal Head item for this head is included in this Group.- Specified by:
isHeadIncludedin interfaceSignalGroup- Parameters:
signalHead- The Signal Head object we are querying- Returns:
- true if the signal head is included in the group; false otherwise
-
isTurnoutIncluded
public boolean isTurnoutIncluded(SignalHead signalHead, Turnout turnout)
Description copied from interface:SignalGroupInquire if a Turnout is included in the Signal Head Calculation.- Specified by:
isTurnoutIncludedin interfaceSignalGroup- Parameters:
signalHead- signalHead that may consider turnoutturnout- turnout to consider- Returns:
- true if turnout state is considered; false otherwise
-
getTurnoutState
public int getTurnoutState(SignalHead signalHead, Turnout turnout)
Description copied from interface:SignalGroupGet the On state of the Turnout for the given Signal Head in the group.- Specified by:
getTurnoutStatein interfaceSignalGroup- Parameters:
signalHead- Signal Head Beanturnout- The Turnout within the Group- Returns:
- -1 if the Turnout or Signal Head is invalid
-
getTurnoutStateByIndex
public int getTurnoutStateByIndex(int x, Turnout turnout)
Description copied from interface:SignalGroupGet the On state of a given Turnout for the Signal Head at index x.- Specified by:
getTurnoutStateByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the groupturnout- Name of the Turnout configured for the head- Returns:
- -1 if the Turnout or Signal Head is invalid
-
getTurnoutStateByIndex
public int getTurnoutStateByIndex(int x, int pTurnout)
Description copied from interface:SignalGroupGet the On state of the Turnout at index pTurnout, for the Signal Head at index x in the group.- Specified by:
getTurnoutStateByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppTurnout- Index of the Turnout configured for the head- Returns:
- -1 if the Turnout or Signal Head is invalid
-
getTurnoutNameByIndex
public java.lang.String getTurnoutNameByIndex(int x, int pTurnout)
Description copied from interface:SignalGroupGet the Name of the Turnout at index pTurnout, for the Signal Head at index x in the group.- Specified by:
getTurnoutNameByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppTurnout- Index for the turnout in the signal head item- Returns:
- null if the Turnout or Signal Head is invalid
-
getTurnoutByIndex
public Turnout getTurnoutByIndex(int x, int pTurnout)
Description copied from interface:SignalGroupGet the Turnout at index x, for the Signal Head at index x in the group.- Specified by:
getTurnoutByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppTurnout- Index for the turnout in the signal head item- Returns:
- null if the Turnout or Signal Head is invalid
-
getSensorStateByIndex
public int getSensorStateByIndex(int x, int pSensor)
Description copied from interface:SignalGroupGet the On state of the Sensor at index pSensor for the Signal Head at index x.- Specified by:
getSensorStateByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppSensor- Index of the Sensor in the head item- Returns:
- -1 if the Sensor or Signal Head is invalid
-
getSensorNameByIndex
public java.lang.String getSensorNameByIndex(int x, int pSensor)
Description copied from interface:SignalGroupGet the name of the Sensor at index pSensor for the Signal Head at index x.- Specified by:
getSensorNameByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppSensor- Index of the Sensor in the head item- Returns:
- null if the Sensor or Signal Head is invalid
-
getSensorByIndex
public Sensor getSensorByIndex(int x, int pSensor)
Description copied from interface:SignalGroupGet the Sensor at index pSensor, for the Signal Head at index x.- Specified by:
getSensorByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the grouppSensor- Index of the Sensor in the head item- Returns:
- null if the Sensor or Signal Head is invalid
-
isSensorIncluded
public boolean isSensorIncluded(SignalHead signalHead, Sensor sensor)
Description copied from interface:SignalGroupInquire if a Sensor is included in the Signal Head Calculation.- Specified by:
isSensorIncludedin interfaceSignalGroup- Parameters:
signalHead- Signal Head Beansensor- Sensor Bean- Returns:
- true if sensor is considered for signalHead state; false otherwise
-
getSensorState
public int getSensorState(SignalHead signalHead, Sensor sensor)
Description copied from interface:SignalGroupGet the On state of the Sensor for the Signal Head in the group.- Specified by:
getSensorStatein interfaceSignalGroup- Parameters:
signalHead- The Signal Head Beansensor- Name of the Sensor in the head item- Returns:
- -1 if the Sensor or Signal Head is invalid
-
getSensorTurnoutOper
public boolean getSensorTurnoutOper(SignalHead signalHead)
Description copied from interface:SignalGroupGet the AND/OR conditional operand set for a Signal Head in the group.- Specified by:
getSensorTurnoutOperin interfaceSignalGroup- Parameters:
signalHead- The Signal Head Bean- Returns:
- true when set to AND, false for OR
-
getSensorTurnoutOperByIndex
public boolean getSensorTurnoutOperByIndex(int x)
Description copied from interface:SignalGroupGet the state of the AND/OR conditional operand for Signal Head at Index.- Specified by:
getSensorTurnoutOperByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in Group- Returns:
- true when set to AND, false for OR
-
setSensorTurnoutOper
public void setSensorTurnoutOper(SignalHead signalHead, boolean boo)
Description copied from interface:SignalGroupSet whether the sensors and turnouts should be treated as separate calculations (OR) or as one (AND) when determining if the Signal Head should be On or Off.- Specified by:
setSensorTurnoutOperin interfaceSignalGroup- Parameters:
signalHead- The SignalHead Beanboo- Provide true for AND, false for OR
-
clearHeadTurnout
public void clearHeadTurnout(SignalHead signalHead)
Description copied from interface:SignalGroupDelete all Turnouts for a given Signal Head in the group.- Specified by:
clearHeadTurnoutin interfaceSignalGroup- Parameters:
signalHead- The Signal Head Bean from which the Turnouts will be removed
-
clearHeadSensor
public void clearHeadSensor(SignalHead signalHead)
Description copied from interface:SignalGroupDelete all Sensors for a given Signal Head in the group.- Specified by:
clearHeadSensorin interfaceSignalGroup- Parameters:
signalHead- The Signal Head Bean from which the Turnouts will be removed
-
getNumHeadSensorsByIndex
public int getNumHeadSensorsByIndex(int x)
Description copied from interface:SignalGroupGet the number of Sensors configured for the Signal Head at index x.- Specified by:
getNumHeadSensorsByIndexin interfaceSignalGroup- Parameters:
x- Index for the Signal Head in the group- Returns:
- -1 if there are less than 'x' Signal Heads defined
-
getNumHeadTurnoutsByIndex
public int getNumHeadTurnoutsByIndex(int x)
Description copied from interface:SignalGroupGet the number of turnouts configured for the Signal Head at index x.- Specified by:
getNumHeadTurnoutsByIndexin interfaceSignalGroup- Parameters:
x- Index of the SignalHead in Group- Returns:
- -1 if there are less than 'x' Signal Heads defined
-
getState
public int getState()
Description copied from interface:NamedBeanProvide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. getCommandedState in Turnout). This is provided to make scripts easier to read.
- Specified by:
getStatein interfaceNamedBean- Specified by:
getStatein interfaceSignalGroup- Returns:
- the state
-
setState
public void setState(int state)
Description copied from interface:NamedBeanProvide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.
- Specified by:
setStatein interfaceNamedBean- Specified by:
setStatein interfaceSignalGroup- Parameters:
state- the state
-
getUsageReport
public java.util.List<NamedBeanUsageReport> getUsageReport(NamedBean bean)
Description copied from interface:NamedBeanGet a list of references for the specified bean.- Specified by:
getUsageReportin interfaceNamedBean- Parameters:
bean- The bean to be checked.- Returns:
- a list of NamedBeanUsageReports or an empty ArrayList.
-
-