Package jmri.jmrix.mqtt
Class MqttSignalMast
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractSignalMast
-
- jmri.jmrix.mqtt.MqttSignalMast
-
- All Implemented Interfaces:
java.beans.VetoableChangeListener
,java.lang.Comparable<NamedBean>
,java.util.EventListener
,PropertyChangeProvider
,NamedBean
,Signal
,SignalMast
public class MqttSignalMast extends AbstractSignalMast
SignalMast implemented via MQTT messagesSystem name specifies the creation information:
IF$mqm:basic:one-searchlight($0001)
The name is a colon-separated series of terms:- IF$mqm - defines signal masts of this type
- basic - name of the signaling system
- one-searchlight - name of the particular aspect map
- ($0001) - small ordinal number for telling various signal masts apart apart
-
-
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 static java.lang.String
sendTopicPrefix
-
Fields inherited from class jmri.implementation.AbstractSignalMast
aspect, disabledAspects, map, speed
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description MqttSignalMast(java.lang.String systemName)
MqttSignalMast(java.lang.String systemName, java.lang.String userName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
getLastRef()
protected java.lang.String
makeSendTopic(java.lang.String systemName)
void
setAspect(java.lang.String aspect)
Set aspect to a valid name in the current signal system definition.void
setHeld(boolean held)
Set the held property of the signal mast.protected static void
setLastRef(int newVal)
void
setLit(boolean lit)
Set the lit property.static void
setSendTopicPrefix(java.lang.String prefix)
-
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, setMastType, setPermissiveSmlDisabled, setState, vetoableChange
-
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
-
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, getSystemName, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
sendTopicPrefix
@Nonnull public static java.lang.String sendTopicPrefix
-
-
Constructor Detail
-
MqttSignalMast
public MqttSignalMast(java.lang.String systemName, java.lang.String userName)
-
MqttSignalMast
public MqttSignalMast(java.lang.String systemName)
-
-
Method Detail
-
setSendTopicPrefix
public static void setSendTopicPrefix(@Nonnull java.lang.String prefix)
-
makeSendTopic
protected java.lang.String makeSendTopic(java.lang.String systemName)
-
setAspect
public void setAspect(@Nonnull java.lang.String aspect)
Description copied from interface:SignalMast
Set aspect to a valid name in the current signal system definition.- Specified by:
setAspect
in interfaceSignalMast
- Overrides:
setAspect
in classAbstractSignalMast
- Parameters:
aspect
- the new aspect shown
-
setHeld
public void setHeld(boolean held)
Description copied from class:AbstractSignalMast
Set the held property of the signal mast.Note that this does not directly effect the output on the layout; the held property is a local variable which effects the aspect only via higher-level logic.
- Specified by:
setHeld
in interfaceSignal
- Specified by:
setHeld
in interfaceSignalMast
- Overrides:
setHeld
in classAbstractSignalMast
- Parameters:
held
- the new value of the help property
-
setLit
public void setLit(boolean lit)
Description copied from class:AbstractSignalMast
Set the lit property.This acts on all the SignalHeads included in this SignalMast
- Specified by:
setLit
in interfaceSignal
- Specified by:
setLit
in interfaceSignalMast
- Overrides:
setLit
in classAbstractSignalMast
- Parameters:
lit
- the new value of lit
-
setLastRef
protected static void setLastRef(int newVal)
- Parameters:
newVal
- for ordinal of all MqttSignalMasts in use
-
getLastRef
public static int getLastRef()
- Returns:
- highest ordinal of all MqttSignalMasts in use
-
-