4.2 WFS_CMD_CDM_DISPENSE

Description This command controls the dispensing of money. It requires specifications for the amount of the dispense (expressed in minimum dispense units; see WFS_INF_CDM_CURRENCY_EXP), the desired denomination (or, alternatively, a procedure for the denomination) and the currency desired for the payout. If both the amount and the denomination have been specified, their consistency is checked, while a specification of amount, mix type and currency will produce a response that indicates the denomination. If the amount is not specified (amount is zero), but the denomination is, there is only a check for an approved denomination (as in WFS_CMD_CDM_DENOMINATE), then the dispense occurs.

Instead of using the input parameter usPosition (which is set to WFS_CDM_POSNULL in this case), the teller number can be used so that the teller list can be employed to perform the dispensing to the assigned teller position.

The WFS_CMD_CDM_DISPENSE command is essentially the same as the WFS_CMD_CDM_DENOMINATE command, the main difference between them being that, in addition to the denomination, the dispensing is performed, too. A configuration parameter (WFS_INF_CDM_CAPABILITIES cashbox) determines whether even if only part of the total amount is capable of being denominated, its dispensing will be performed by the CDM.

Examples:

  1. If $30.00 is to be dispensed by the CDM but the smallest currency unit available is a $20 bill, it is possible to dispense $20.00 from the CDM, while the remaining $10.00 is requested from the teller's cash box.

  2. The CDM service returns a message saying that the amount of a payout cannot be denominated (WFS_ERR_CDM_NOTDISPENSABLE).
Input Param LPWFSCDMDISPENSE lpDispense;
typedef struct _wfs_cdm_dispense
{
USHORT usTellerID;
USHORT usMixNumber;
USHORT usPosition;
BOOL bPresent;
LPWFSCDMDENOMINATION lpDenomination;
} WFSCDMDISPENSE, *LPWFSCDMDISPENSE;

usTellerID
Identification of teller.

usMixNumber
Mix algorithm or house mix table to be used. If the value is WFS_CDM_INDIVIDUAL, the service does not calculate an alternative denomination.

usPosition
Determines to which side the amount is dispensed; values are:

Value Meaning

WFS_CDM_POSNULL This implies that the default configuration information is used. This can be either position dependent or teller dependent for determining which side the currency is presented.

WFS_CDM_POSLEFT Present money to left side of device.

WFS_CDM_POSRIGHT Present money to right side of device.

WFS_CDM_POSCENTER Present money to center output position.

bPresent
Controls whether the bills should be presented to the user (= TRUE) or only transported to the stacker (= FALSE). See WFS_CMD_CDM_PRESENT and WFS_CMD_CDM_REJECT.

lpDenomination
Pointer to a WFSCDMDENOMINATION structure, describing the denominations used for the dispense operation. For a description of the WFSCDMDENOMINATION structure see the definition of the command WFS_CMD_CDM_DENOMINATE.

Output Param LPWFSCDMDENOMINATION lpDenomination;
For a description of the WFSCDMDENOMINATION structure see the definition of the command WFS_CMD_CDM_DENOMINATE. Note that the values in this structure report the actual total amount and number of each denomination dispensed.

Error Codes The following additional error codes can be generated by this command:

Value Meaning

WFS_ERR_CDM_CASHUNITERROR A cash unit specified caused a problem, e.g., ran out of bills/coins (short dispense). A WFS_EXEE_CDM_CASHUNITERROR EXECUTE_EVENT is posted with the details.

WFS_ERR_CDM_EXCHANGEACTIVE The CDM service is in an exchange state (see WFS_CMD_CDM_START_EXCHANGE).

WFS_ERR_CDM_INVALIDCURRENCY Currency type is not configured

WFS_ERR_CDM_INVALIDDENOMINATION The sum of the values for cashbox, cash unit and coin were greater than the amount specified.

WFS_ERR_CDM_INVALIDMIXNUMBER Mix algorithm is not known

WFS_ERR_CDM_INVALIDPOSITION The specified output position is invalid.

WFS_ERR_CDM_INVALIDTELLERID Teller ID not present in service provider’s teller ID list

WFS_ERR_CDM_NOCURRENCYMIX Cash units containing two or more different currencies were selected. This error is not generated if one or more non-currency value cash units (e.g., containing coupons) are selected, together with currency cash units of a single currency type.

WFS_ERR_CDM_NOTDISPENSABLE The requested amount is not dispensable by the cash dispenser.

WFS_ERR_CDM_POSITIONLOCKED The output position is locked.

WFS_ERR_CDM_SAFEDOOROPEN The safe door is open.

WFS_ERR_CDM_TOOMANYBILLS The request would require too many bills to be dispensed.

WFS_ERR_CDM_TOOMANYCOINS The request would require too many coins to be dispensed.

Events The following additional events can be generated:

Value Meaning

WFS_EXEE_CDM_DELAYEDDISPENSE Time before dispensing starts, because of a security procedure (German national regulation).

WFS_EXEE_CDM_STARTDISPENSE Point of time where the dispense order starts. Necessary to know for a CDM application because of queueing orders from different clients.

WFS_EXEE_CDM_PARTIALDISPENSE The dispense order is divided into several suborders.

WFS_EXEE_CDM_SUBDISPENSEOK One of the dispense suborders was finished successfully.

WFS_EXEE_CDM_CASHUNITERROR An error occurred while attempting to dispense cash.

Comments All error codes and events listed under the WFS_CMD_CDM_PRESENT command description, with the exception of WFS_ERR_CDM_NOBILLS, can also occur on this command.