Readonly ingredientThe name of the ingredient assigned to the holder
Readonly previousThe name of the previous ingredient assigned to the holder
The PumpModel models assigned to the holder.
The PumpModel models assigned to the holder sorted by the pump order.
Readonly nozzleThe paths of the nozzles that are attached to the holder. It is possible for a holder to be connected to multiple nozzles depending on the number of pumps it has. For example, some dispensers might be configured to share ingredients across nozzles in cases where less frequently used ingredients are used in smaller quantities.
Readonly canA boolean value that indicates if the ingredient in the holder can be poured. This is derived from the pour status of all of the underlying pumps.
Readonly isA boolean value that indicates if the ingredient in the holder is currently pouring.
This is derived from the pour status of the underlying pumps indicating if any of the pumps are currently pouring.
Indicates that one or more of the pumps associated with the holder have constraints that must be satisfied before pouring can occur. For example, an ingredient may require agitation before pouring can occur. This is used to defer the pour until the constraints are satisfied.
Readonly troublesArray of troubles directly related to this model. Troubles are typically sorted by rank (highest priority first).
Readonly troubleSummary status string representing the highest priority trouble. Returns a human-readable status or 'OK' if no troubles exist.
Readonly troublesTroubles organized by their type property. Useful for filtering and categorized display of issues.
const errorTroubles = model.troublesByType['ERROR'] || [];
const warningTroubles = model.troublesByType['WARNING'] || [];
Optional Readonly ingredientThe IngredientModel assigned to the holder
Optional Readonly previousThe previous IngredientModel assigned to the holder
Perform an RFID override on the holder
AssignmentError(errIdLen) if the id length is invalid
AssignmentError(errCodeLen) if the code length is invalid
AssignmentError(errIdFormat) if the id format is invalid
AssignmentError(errCodeFormat) if the code format is invalid
AssignmentError(errVerify) if the verification fails
AssignmentError(errBadJson) if the json is invalid
Assign an ingredient to the holder.
This method will call into the assignHolderIngredient service to assign the ingredient to the holder.
If unassigning the ingredient, the unassignHolderIngredient service will be called.
Optional ingredientId: stringThe id of the ingredient to assign to the holder. If not specified, the ingredient will be unassigned.
Update the ingredient id of the holder.
This method will update the ingredient id of the holder without calling into the assignHolderIngredient or unassignHolderIngredient services.
It is intended to be used when ingredient assignment events are received from the dispenser, such as when an ingredient is inserted into a holder and the rfid tag is read. In this case, the assignment will be received via the topic handler and the ingredient id will be updated on the holder.
This method should be used to update state as opposed to the assignIngredient method which should be used to perform the actual assignment.
Optional ingredientId: stringThe id of the ingredient to assign to the holder. If not specified, the ingredient will be unassigned.
Abstraction of how an ingredient cartridge attaches to a pump. In many cases this is simply a hose that connects a BiB container to a pump, but in more complex devices this represents a cartridge slot which may have associated hardware, such as RFID antenna, indicator lights, and so on. This also holds state about the availability of a pump to pump the connected ingredient.