Class PumpInfo

java.lang.Object
com.tccc.kos.ext.freestyle.pumpinfo.PumpInfo

public class PumpInfo extends Object
Information about a pump that is about to be created. Use the PumpInfoResolver interface to intercept this information and change it before pumps are created.
Version:
2024-07-28
  • Method Details

    • getName

      public String getName()
      Return the name of the pump. Set this value to change the pump name. All pump names within a board must be unique.
    • getCategory

      public String getCategory()
      Return the category of the pump. The category can be used when writing intents so that pumps of the same type behave differently, such as when plain and carb water need to have different intents even though the pump types are the same. Pump category is not required and many pumps may not have a category set. Set this value to change the category.
    • getType

      public String getType()
      Return the type of the pump. This helps identify the logic that should be applied when picking the name / category for the pump.
    • getPosition

      public int getPosition()
      Return the position of the pump. This is typically used with arrays of micro pumps. Certain macros, such as water, carb, ns, etc... are not inherently ordered and will all have a position of 0. In some cases generic macros will be ordered. This really depends on the implementation of the board.

      When working with micro pumps, there are two types of positions. Normal micros have one position space while child pumps of super pumps have another. This allows child pumps to be named relative to the logical super pump as this is typically how the hardware is labeled in the device. When the child flag is true, the position is for a child pump, which is a zero-based index.

      All positions are zero-based. If the pump is not positional (part of a sequence) then the position will be -1 .

    • setPosition

      public PumpInfo setPosition(int position)
    • getMaxPosition

      public int getMaxPosition()
      For positional pumps, returns the max position in the range, which can be used to reverse the position if the pumps are not labeled in the natural order.

      All positions are zero-based. If the pump is not positional (part of a sequence) then the maxPosition will be -1 .

    • setMaxPosition

      public PumpInfo setMaxPosition(int maxPosition)
    • isChild

      public boolean isChild()
      Return true if the pump is a child of a super pump. The name will contain the proposed child name but parentName will contain the name of the logical super pump, allowing the resolver to apply a transform on the position and append to the super pump name to generate a new pump name.
    • getParentName

      public String getParentName()
      Return the parent pump name if the pump is a child of a super pump. This will only contain a value if the child flag is true. This can be used to generate a parent-relative name for the child pump.
    • setName

      public void setName(String name)
    • setCategory

      public void setCategory(String category)