Package jmri.jmrit.ctc
Class NBHTurnout
- java.lang.Object
-
- jmri.jmrit.ctc.NBHTurnout
-
public class NBHTurnout extends java.lang.Object
This object additionally supports "inverted feedback", so that when someone calls "getKnownState", (typically my own code in this CTC project) we return the "adjusted" value based upon "inverted feedback".
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_INT_RV
static int
DEFAULT_TURNOUT_STATE_RV
-
Constructor Summary
Constructors Constructor Description NBHTurnout(java.lang.String module, java.lang.String userIdentifier, java.lang.String parameter)
NBHTurnout(java.lang.String module, java.lang.String userIdentifier, java.lang.String parameter, java.lang.String turnout, boolean FeedbackDifferent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
Turnout
getBean()
NamedBeanHandle<?>
getBeanHandle()
int
getFeedbackMode()
java.lang.String
getHandleName()
int
getKnownState()
void
removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
void
setCommandedState(int s)
int
testingGetCountOfPropertyChangeListenersRegistered()
For Unit testing only.boolean
valid()
-
-
-
Field Detail
-
DEFAULT_TURNOUT_STATE_RV
public static final int DEFAULT_TURNOUT_STATE_RV
- See Also:
- Constant Field Values
-
DEFAULT_INT_RV
public static final int DEFAULT_INT_RV
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NBHTurnout
public NBHTurnout(java.lang.String module, java.lang.String userIdentifier, java.lang.String parameter, java.lang.String turnout, boolean FeedbackDifferent)
-
NBHTurnout
public NBHTurnout(java.lang.String module, java.lang.String userIdentifier, java.lang.String parameter)
-
-
Method Detail
-
valid
public boolean valid()
-
getBeanHandle
public NamedBeanHandle<?> getBeanHandle()
-
getKnownState
public int getKnownState()
-
setCommandedState
public void setCommandedState(int s)
-
getFeedbackMode
public int getFeedbackMode()
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
-
getHandleName
public java.lang.String getHandleName()
- Returns:
- The turnout's handle name.
-
testingGetCountOfPropertyChangeListenersRegistered
public int testingGetCountOfPropertyChangeListenersRegistered()
For Unit testing only.- Returns:
- Returns the present number of property change listeners registered with us so far.
-
-