Class ItemDispenserProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.itemdispenser.ItemDispenserProperties
- All Implemented Interfaces:
ItemDispenserInterface
,JposBaseInterface
Class containing the item dispenser specific properties, their default values and default implementations of
ItemDispenserInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Item Dispenser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
UPOS property CapEmptySensor.boolean
UPOS property CapIndividualSlotStatus.boolean
UPOS property CapJamSensor.boolean
UPOS property CapNearEmptySensor.int
UPOS property DispenserStatus.int
UPOS property MaxSlots.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustItemCount(int itemCount, int slotNumber)
Final part of AdjustItemCount method.void
dispenseItem(int[] numItem, int slotNumber)
Final part of DispenseItem method.void
readItemCount(int[] itemCount, int slotNumber)
Final part of ReadItemCount method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, initOnOpen, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
DispenserStatus
public int DispenserStatusUPOS property DispenserStatus. Must be overwritten by derived objects within the initOnEnable method. -
CapEmptySensor
public boolean CapEmptySensorUPOS property CapEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapIndividualSlotStatus
public boolean CapIndividualSlotStatusUPOS property CapIndividualSlotStatus. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapJamSensor
public boolean CapJamSensorUPOS property CapJamSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapNearEmptySensor
public boolean CapNearEmptySensorUPOS property CapNearEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
MaxSlots
public int MaxSlotsUPOS property MaxSlots. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
-
-
Constructor Details
-
ItemDispenserProperties
protected ItemDispenserProperties(int dev)Constructor.- Parameters:
dev
- Device index
-
-
Method Details
-
adjustItemCount
public void adjustItemCount(int itemCount, int slotNumber) throws jpos.JposExceptionDescription copied from interface:ItemDispenserInterface
Final part of AdjustItemCount method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- itemCount is a positive value,
- slotNumber is between 1 and MaxSlots.
- Specified by:
adjustItemCount
in interfaceItemDispenserInterface
- Parameters:
itemCount
- Number of items currently in the specified slot.slotNumber
- Slot number.- Throws:
jpos.JposException
- If an error occurs.
-
dispenseItem
public void dispenseItem(int[] numItem, int slotNumber) throws jpos.JposExceptionDescription copied from interface:ItemDispenserInterface
Final part of DispenseItem method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- numItem is not null and has length 1,
- slotNumber is between 1 and MaxSlots.
- Specified by:
dispenseItem
in interfaceItemDispenserInterface
- Parameters:
numItem
- Number of items to be dispensed from given slot.slotNumber
- Slot number to be used to dispense item(s).- Throws:
jpos.JposException
- If an error occurs.
-
readItemCount
public void readItemCount(int[] itemCount, int slotNumber) throws jpos.JposExceptionDescription copied from interface:ItemDispenserInterface
Final part of ReadItemCount method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- itemCount is not null and has length 1,
- itemCount[0] > 0,
- slotNumber is between 1 and MaxSlots.
- Specified by:
readItemCount
in interfaceItemDispenserInterface
- Parameters:
itemCount
- Target for item count of the specified slot.slotNumber
- Slot number to be used to read slot specific item count.- Throws:
jpos.JposException
- If an error occurs.
-