|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SignalGroup
SignalGroup.java The Signal Group is used to represent European subsidary signals that would be sited with a signal mast. Such subsidary signals would be used to indicated routes, junctions and allowable speeds. Each such route/junction/speed would be represented by a single output signal, that is either off or on. Within the group on one such signal would be allowed on at any one time. The group is attached to a signal mast, and can be configured to be activated depending upon that masts appearance. The Each signal head within the group is defined with a On and Off appearance, and a set of criteria in the form of matching turnouts and sensor states, that must be met for the head to be set On.
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.
| Field Summary | |
|---|---|
static Logger |
log
|
static int |
ONACTIVE
|
static int |
ONCLOSED
|
static int |
ONINACTIVE
|
static int |
ONTHROWN
|
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
void |
addSignalHead(NamedBeanHandle<SignalHead> sh)
Add a Signal Head to the Group |
void |
addSignalHead(String pName)
Add a Signal Head to the Group |
void |
addSignalMastAppearance(String sppearance)
Add an appearance that can trigger the group activation |
void |
clearSignalMastAppearance()
Clear the list of SignalMast Appearances that trigger the group |
void |
clearSignalSensor(String pSignal)
Delete all Sensors for a given SignalHead in the group |
void |
clearSignalTurnout(String pSignal)
Delete all Turnouts for a given SignalHead in the group |
void |
deleteSignalHead(NamedBeanHandle<SignalHead> sh)
Delete Signal Head by NamedBean |
void |
deleteSignalHead(String pName)
Delete Signal Head by Name |
void |
deleteSignalMastAppearance(String appearance)
Remove a SignalMast Appearance from the set of triggers. |
boolean |
getEnabled()
Get enabled status |
int |
getNumSignalHeadItems()
|
int |
getNumSignalHeadSensorsByIndex(int x)
Method to get the number of Sensors used to determine the On state for the signalhead at index x |
int |
getNumSignalHeadTurnoutsByIndex(int x)
Method to get the number of turnouts used to determine the On state for the signalhead at index x |
int |
getNumSignalMastAppearances()
|
String |
getSensorNameByIndex(int x,
int pSensor)
Gets the state of the Sensor at index x, for the given Signal Head at index x |
int |
getSensorState(String pSignal,
String pSensor)
Gets the state of the Sensor for the given Signal Head in the group |
int |
getSensorStateByIndex(int x,
int pSensor)
Gets the state of the Sensor for the given Signal Head at index x |
boolean |
getSensorTurnoutOper(String pSignal)
|
boolean |
getSensorTurnoutOperByIndex(int x)
|
String |
getSignalHeadItemNameByIndex(int n)
Method to get a SignalHead by Index Returns null if there are no Signal Heads with that index |
int |
getSignalHeadOffState(String name)
Method to get the Off State of Signal Head |
int |
getSignalHeadOffStateByIndex(int n)
Method to get the Off State of a SignalState at Index n |
int |
getSignalHeadOnState(String name)
Method to get the On State of Signal Head |
int |
getSignalHeadOnStateByIndex(int n)
Method to get the On State of a SignalState at Index n |
SignalMast |
getSignalMast()
Get the SignalMast |
String |
getSignalMastAppearanceByIndex(int x)
Method to get a SignalMast Appearance by Index Returns null if there are no Appearances with that index |
String |
getSignalMastName()
Get the name of the main Signal Mast |
int |
getState()
Provide generic access to internal state. |
String |
getTurnoutNameByIndex(int x,
int pTurnout)
Gets the Name of the Turnout at index x, for the given Signal Head at index x |
int |
getTurnoutState(String pSignal,
String pTurnout)
Gets the state of the Turnout for the given Signal Head in the group |
int |
getTurnoutStateByIndex(int x,
int pTurnout)
Gets the state of the Turnout at index x, for the given Signal Head at index x |
int |
getTurnoutStateByIndex(int x,
String pTurnout)
Gets the state of the Turnout for the given Signal Head at index x |
boolean |
isSensorIncluded(String pSignal,
String pSensor)
Inquire if a Sensor is included in the Signal Head Calculation. |
boolean |
isSignalIncluded(String systemName)
Method to inquire if a Signal Head is included in this Group |
boolean |
isSignalMastAppearanceIncluded(String appearance)
Inquire if a SignalMast Appearance is included. |
boolean |
isTurnoutIncluded(String pSignal,
String pTurnout)
Inquire if a Turnout is included in the Signal Head Calculation. |
void |
setEnabled(boolean boo)
Set enabled status. |
void |
setSensorTurnoutOper(String pSignal,
boolean boo)
Sets whether the sensors and turnouts should be treated as seperate calculations or as one, when determining if the signal head should be on or off. |
void |
setSignalHeadAlignSensor(String mHead,
String mSensor,
int state)
Method to add a Sensor and its state to a signal head. |
void |
setSignalHeadAlignTurnout(String mHead,
String mTurn,
int state)
Method to add a Turnout and its state to a signal head. |
void |
setSignalHeadOffState(String name,
int state)
Sets the Off State of the Signal in the Group |
void |
setSignalHeadOnState(String name,
int state)
Sets the On State of the Signal in the Group |
void |
setSignalMast(String pName)
Sets the main Signal Mast to which the Group belongs |
void |
setState(int state)
Provide generic access to internal state. |
| Field Detail |
|---|
static final int ONACTIVE
static final int ONINACTIVE
static final int ONCLOSED
static final int ONTHROWN
static final Logger log
| Method Detail |
|---|
void setEnabled(boolean boo)
boolean getEnabled()
void setSignalMast(String pName)
String getSignalMastName()
SignalMast getSignalMast()
void clearSignalMastAppearance()
void addSignalMastAppearance(String sppearance)
int getNumSignalMastAppearances()
String getSignalMastAppearanceByIndex(int x)
boolean isSignalMastAppearanceIncluded(String appearance)
void deleteSignalMastAppearance(String appearance)
void addSignalHead(NamedBeanHandle<SignalHead> sh)
sh - The SignalHead as a Named Beanvoid addSignalHead(String pName)
pName - The SignalHead as a NameString getSignalHeadItemNameByIndex(int n)
int getSignalHeadOnStateByIndex(int n)
int getSignalHeadOffStateByIndex(int n)
void deleteSignalHead(String pName)
void deleteSignalHead(NamedBeanHandle<SignalHead> sh)
int getNumSignalHeadItems()
boolean isSignalIncluded(String systemName)
int getSignalHeadOnState(String name)
name - The name of the SignalHead we are queryingint getSignalHeadOffState(String name)
name - The name of the SignalHead we are querying
void setSignalHeadOnState(String name,
int state)
name - The SignalHead Namestate - The Apperance that the SignalHead will change to
when the conditions are met.
void setSignalHeadOffState(String name,
int state)
name - The SignalHead Namestate - The Apperance that the SignalHead will change to
when the conditions are NOT met.
void setSensorTurnoutOper(String pSignal,
boolean boo)
boolean getSensorTurnoutOperByIndex(int x)
int getNumSignalHeadTurnoutsByIndex(int x)
void setSignalHeadAlignTurnout(String mHead,
String mTurn,
int state)
mHead - SignalHead we are adding the turnout tomTurn - Turnout as a String either User or System Namestate - The State that the turnout must be set to.
boolean isTurnoutIncluded(String pSignal,
String pTurnout)
pSignal - Name of the Signal HeadpTurnout - Name of the Turnout
int getTurnoutState(String pSignal,
String pTurnout)
pSignal - Name of the Signal HeadpTurnout - Name of the Turnout within the Group
int getTurnoutStateByIndex(int x,
String pTurnout)
x - Signal Head at index xpTurnout - Name of the Turnout within the Group
int getTurnoutStateByIndex(int x,
int pTurnout)
x - Signal Head at index xpTurnout - Turnout at index pTurnout
String getTurnoutNameByIndex(int x,
int pTurnout)
x - Signal Head at index xpTurnout - Turnout at index pTurnout
void setSignalHeadAlignSensor(String mHead,
String mSensor,
int state)
mHead - SignalHead we are adding the sensor tomSensor - Sensor as a String either User or System Namestate - The State that the sensor must be set to.
boolean isSensorIncluded(String pSignal,
String pSensor)
pSignal - Name of the Signal HeadpSensor - Name of the Sensor
int getSensorState(String pSignal,
String pSensor)
pSignal - Name of the Signal HeadpSensor - Name of the Sensor within the Group
int getSensorStateByIndex(int x,
int pSensor)
x - Signal Head at index xpSensor - Name of the Sensor within the Group
String getSensorNameByIndex(int x,
int pSensor)
x - Signal Head at index xpSensor - Sensor at index pTurnout
boolean getSensorTurnoutOper(String pSignal)
int getNumSignalHeadSensorsByIndex(int x)
void clearSignalTurnout(String pSignal)
pSignal - SignalHead Namevoid clearSignalSensor(String pSignal)
pSignal - SignalHead Nameint getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeanvoid setState(int state)
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||