Class PumpInfo
java.lang.Object
com.tccc.kos.ext.freestyle.pumpinfo.PumpInfo
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 Summary
Modifier and TypeMethodDescriptionReturn the category of the pump.int
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.getName()
Return the name of the pump.Return the parent pump name if the pump is a child of a super pump.int
Return the position of the pump.getType()
Return the type of the pump.boolean
isChild()
Return true if the pump is a child of a super pump.void
setCategory
(String category) setMaxPosition
(int maxPosition) void
setPosition
(int position)
-
Method Details
-
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
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
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
-
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
-
isChild
public boolean isChild()Return true if the pump is a child of a super pump. Thename
will contain the proposed child name butparentName
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
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
-
setCategory
-