Interface LogixNG

    • Method Detail

      • isStartup

        boolean isStartup()
        Determines whether this LogixNG is currently during startup.
        Returns:
        true if the LogixNG is currently during startup, false otherwise
      • setInline

        void setInline​(boolean inline)
        Sets whether this LogixNG is inline or not.
        Parameters:
        inline - true if the LogixNG is inline, false otherwise
      • isInline

        boolean isInline()
        Determines whether this LogixNG is inline or not.
        Returns:
        true if the LogixNG is inline, false otherwise
      • setInlineLogixNG

        void setInlineLogixNG​(InlineLogixNG inlineLogixNG)
        Set the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.
        Parameters:
        inlineLogixNG - the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.
      • getInlineLogixNG

        InlineLogixNG getInlineLogixNG()
        Get the InlineLogixNG that owns this LogixNG, if the LogixNG is inline.
        Returns:
        the InlineLogixNG
      • setEnabled

        void setEnabled​(boolean enable)
        Set whenether this LogixNG is enabled or disabled.

        This method must call registerListeners() / unregisterListeners() and also call execute() if enable is true.

        Parameters:
        enable - true if this LogixNG should be enabled, false otherwise
      • isEnabled

        boolean isEnabled()
        Determines whether this LogixNG is enabled.
        Specified by:
        isEnabled in interface Base
        Returns:
        true if the LogixNG is enabled, false otherwise
      • activate

        void activate()
        Activates this LogixNG.

        This method is called by the LogixNG manager during initialization of the LogixNGs.

      • setActive

        void setActive​(boolean active)
        Activates/deactivates this LogixNG.

        This method is used by the LogixNG action EnableLogixNG to temporary activate or deactivate a LogixNG.

        Parameters:
        active - true if activate, false if deactivate
      • getConditionalNG_SystemName

        java.lang.String getConditionalNG_SystemName​(int index)
        Set the system name for the conditionalNG at the specified position in this list
        Parameters:
        index - index of the element to set the system name
        Returns:
        the system name
      • setConditionalNG_SystemName

        void setConditionalNG_SystemName​(int index,
                                         java.lang.String systemName)
        Set the system name for the conditionalNG at the specified position in this list
        Parameters:
        index - index of the element to set the system name
        systemName - the new system name
      • getNumConditionalNGs

        int getNumConditionalNGs()
        Get number of ConditionalNGs for this LogixNG.
        Returns:
        the number of conditionals
      • swapConditionalNG

        void swapConditionalNG​(int nextInOrder,
                               int row)
        Move 'row' to 'nextInOrder' and shift all between 'nextInOrder' and 'row' up one position. Requires row > nextInOrder.
        Parameters:
        nextInOrder - target order for ConditionalNG at row
        row - position of ConditionalNG to move
      • getConditionalNG

        ConditionalNG getConditionalNG​(int order)
        Returns the conditionalNG that will calculate in the specified order. This is also the order the ConditionalNG is listed in the Add/Edit LogixNG dialog. If 'order' is greater than the number of ConditionalNGs for this LogixNG, null is returned.
        Parameters:
        order - order in which the ConditionalNG calculates
        Returns:
        the conditionalNG or null
      • addConditionalNG

        boolean addConditionalNG​(ConditionalNG conditionalNG)
        Add a child ConditionalNG to the parent LogixNG.

        The first part handles adding conditionalNGs to the LogixNG list during file loading.

        The second part handles normal additions using the GUI, Logix imports or tests.

        Parameters:
        conditionalNG - The ConditionalNG object.
        Returns:
        true if the ConditionalNG was added, false otherwise.
      • getConditionalNG

        ConditionalNG getConditionalNG​(java.lang.String systemName)
        Get a ConditionalNG belonging to this LogixNG.
        Parameters:
        systemName - The name of the ConditionalNG object.
        Returns:
        the ConditionalNG object or null if not found.
      • getConditionalNGByUserName

        ConditionalNG getConditionalNGByUserName​(java.lang.String userName)
        Get a ConditionalNG belonging to this LogixNG.
        Parameters:
        userName - The name of the ConditionalNG object.
        Returns:
        the ConditionalNG object or null if not found.
      • deleteConditionalNG

        void deleteConditionalNG​(ConditionalNG conditionalNG)
        Delete a ConditionalNG from this LogixNG.

        Note: Since each LogixNG must have at least one ConditionalNG, the last ConditionalNG will not be deleted.

        Returns An array of names used in an error message explaining why ConditionalNG should not be deleted.

        Parameters:
        conditionalNG - The ConditionalNG to delete
      • isActivated

        boolean isActivated()
        Is this item active? This method returns true if the the LogixNG is active but not enabled, while the method Base.isActive() only returns true if the LogixNG is both active and enabled.
        Returns:
        true if active, false otherwise.
      • execute

        void execute()
        Execute all ConditionalNGs if the LogixNG is enabled and activated.
      • execute

        void execute​(boolean allowRunDelayed)
        Execute all ConditionalNGs if the LogixNG is enabled and activated.
        Parameters:
        allowRunDelayed - true if it's ok to run delayed, false otherwise
      • execute

        void execute​(boolean allowRunDelayed,
                     boolean isStartup)
        Execute all ConditionalNGs if the LogixNG is enabled and activated.
        Parameters:
        allowRunDelayed - true if it's ok to run delayed, false otherwise
        isStartup - true if startup, false otherwise