Package jmri

Interface SignalMastLogicManager

    • Method Detail

      • replaceSignalMast

        void replaceSignalMast​(SignalMast oldMast,
                               SignalMast newMast)
        Replace all instances of an old SignalMast (either source or destination) with the new signal mast instance. This is for use with such tools as the Layout Editor where a signal mast at a certain location can be replaced with another, while the remainder of the configuration stays the same.
        Parameters:
        oldMast - Current Signal Mast
        newMast - Replacement (new) Signal Mast
      • getLogicsByDestination

        @Nonnull
        java.util.List<SignalMastLogicgetLogicsByDestination​(@Nonnull
                                                               SignalMast destination)
        Gather a list of all the Signal Mast Logics, by destination Signal Mast.
        Parameters:
        destination - The destination Signal Mast
        Returns:
        a list of logics for destination or an empty list if none
      • initialise

        void initialise()
        Initialise all the Signal Mast Logics. Primarily used after loading a configuration.
      • newSignalMastLogic

        @Nonnull
        SignalMastLogic newSignalMastLogic​(SignalMast source)
                                    throws java.lang.IllegalArgumentException
        Create a new Signal Mast Logic for a source Signal Mast.
        Parameters:
        source - The source Signal Mast
        Returns:
        source The new SML instance
        Throws:
        java.lang.IllegalArgumentException
      • removeSignalMast

        void removeSignalMast​(@Nonnull
                              SignalMast mast)
        Completely remove a Signal Mast from all the SMLs that use it.
        Parameters:
        mast - The Signal Mast to be removed
      • disableLayoutEditorUse

        void disableLayoutEditorUse​(@Nonnull
                                    SignalMast mast)
        Disable the use of info from the Layout Editor Panels to configure a Signal Mast Logic for a specific Signal Mast.
        Parameters:
        mast - The Signal Mast for which LE info is to be disabled
      • isSignalMastUsed

        boolean isSignalMastUsed​(@Nonnull
                                 SignalMast mast)
        Check if a Signal Mast is in use as either a Source or Destination mast in any Signal Mast Logic
        Parameters:
        mast - the signal mast to check
        Returns:
        true if mast is used by at least one Signal Mast Logic
      • getSignalLogicDelay

        int getSignalLogicDelay()
        Returns:
        characteristic delay time in msec, used to control roughly when signal system computations are done. (Some are half this, some twice)
      • setSignalLogicDelay

        void setSignalLogicDelay​(int l)
        Parameters:
        l - characteristic delay time in msec, used to control roughly when signal system computations are done. (Some are half this, some twice)
      • setupSignalMastsDirectionSensors

        int setupSignalMastsDirectionSensors()
        Iterate over the signal masts setting up direction Section sensors.
        Returns:
        error count