Package jmri.implementation
Class DccSignalMast
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractSignalMast
jmri.implementation.DccSignalMast
- All Implemented Interfaces:
VetoableChangeListener,Comparable<NamedBean>,EventListener,PropertyChangeProvider,NamedBean,Signal,SignalMast
- Direct Known Subclasses:
LNCPSignalMast
This class implements a SignalMast that uses Extended Accessory Decoder
Control Packet Format
and outputs that packet to the DCC System via the generic CommandStation
interface.
This implementation writes out to the physical signal when it's commanded to change appearance, and updates its internal state when it hears commands from other places.
System name specifies the creation information:
IF$dsm:basic:one-searchlight(123)The name is a colon-separated series of terms:
- IF$dsm - defines signal masts of this type
- basic - name of the signaling system
- one-searchlight - name of the particular aspect map
- (123) - DCC address for the decoder
Based upon DccSignalHead by Alex Shepherd
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandStationprotected intprotected int(package private) intFields inherited from class jmri.implementation.AbstractSignalMast
aspect, disabledAspects, disablePermissiveSignalMastLogic, map, mastType, speed, systemDefnFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.Signal
PROPERTY_HELD, PROPERTY_LITFields inherited from interface jmri.SignalMast
PROPERTY_ASPECT, PROPERTY_ASPECT_DISABLED, PROPERTY_ASPECT_ENABLED, PROPERTY_PERMISSIVE_SML_DISABLED -
Constructor Summary
ConstructorsConstructorDescriptionDccSignalMast(String sys) DccSignalMast(String sys, String user) DccSignalMast(String sys, String user, String mastSubType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureFromName(String systemName) intintGet the number of times the packet should be sent to the track.intgetOutputForAppearance(String appearance) intstatic StringisDCCAddressUsed(int addr) voidSet aspect to a valid name in the current signal system definition.voidsetDccSignalMastPacketSendCount(int count) Set Number of times the packet should be sent.voidsetLit(boolean newLit) Set the lit property.voidsetOutputForAppearance(String appearance, int number) voidsetUnlitId(int i) booleanvoiduseAddressOffSet(boolean boo) Methods inherited from class jmri.implementation.AbstractSignalMast
allowUnLit, configureAspectTable, configureSignalSystemDefinition, getAllKnownAspects, getAppearanceMap, getAspect, getBeanType, getDisabledAspects, getHeld, getLit, getMastType, getSignalSystem, getSpeed, getState, getUsageReport, getValidAspects, isAspectDisabled, isAtStop, isCleared, isPermissiveSmlDisabled, isShowingRestricting, setAllowUnLit, setAspectDisabled, setAspectEnabled, setHeld, setMastType, setPermissiveSmlDisabled, setState, vetoableChangeMethods 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, updateListenerRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, updateListenerRefMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
appearanceToOutput
-
packetSendCount
-
unLitId
int unLitId -
c
-
dccSignalDecoderAddress
-
-
Constructor Details
-
DccSignalMast
-
DccSignalMast
-
DccSignalMast
-
-
Method Details
-
configureFromName
-
setOutputForAppearance
-
getOutputForAppearance
-
setAspect
Description copied from interface:SignalMastSet aspect to a valid name in the current signal system definition.- Specified by:
setAspectin interfaceSignalMast- Overrides:
setAspectin classAbstractSignalMast- Parameters:
aspect- the new aspect shown
-
useAddressOffSet
-
useAddressOffSet
-
setLit
Description copied from class:AbstractSignalMastSet the lit property.This acts on all the SignalHeads included in this SignalMast
- Specified by:
setLitin interfaceSignal- Specified by:
setLitin interfaceSignalMast- Overrides:
setLitin classAbstractSignalMast- Parameters:
newLit- the new value of lit
-
setUnlitId
-
getUnlitId
-
getDccSignalMastAddress
-
getCommandStation
-
isDCCAddressUsed
-
setDccSignalMastPacketSendCount
Set Number of times the packet should be sent.- Parameters:
count- - less than 1 is treated as 1.
-
getDccSignalMastPacketSendCount
Get the number of times the packet should be sent to the track.- Returns:
- the count.
-