Interface LogixNG

All Superinterfaces:
Base, Comparable<NamedBean>, NamedBean, PropertyChangeProvider
All Known Implementing Classes:
DefaultLogixNG

public interface LogixNG
extends Base, NamedBean
LogixNG.
  • Method Details

    • 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
    • getConditionalNG_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
      Returns:
      the system name
    • setConditionalNG_SystemName

      void setConditionalNG_SystemName​(int index, 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

      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

      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

      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

      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
    • 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