Share via


CashChanger Class

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Usage

'Usage
Dim cashChanger1 As New CashChanger()

Syntax

'Declaration
MustInherit Public Class CashChanger
    Inherits PosCommon
public abstract class CashChanger : PosCommon
public abstract ref class CashChanger : public PosCommon
public abstract class CashChanger extends PosCommon
public abstract class CashChanger extends PosCommon

Remarks

Capabilities

The cash changer has the following capabilities:

  • Reports the cash units and corresponding unit counts available in the cash changer.

  • Dispenses a specified amount of cash from the device in bills, coins, or both into a user-specified exit.

  • Dispenses a specified number of cash units from the device in bills, coins, or both into a user-specified exit.

  • Reports jam conditions within the device.

  • Supports more than one currency.

The cash changer may also have the following capabilities:

  • Reports the fullness of the cash changer’s cash units. Conditions that may be indicated include empty, near-empty, full, and near-full states.

  • Reports a possible (or probable) cash count discrepancy in the data reported by the ReadCashCounts method.

  • Cash (bills and coins) that is put into the device between the start and end of cash acceptance is reported to the application. The contents of the report are cash units and cash counts.

Cash Changer Model

The general model of a cash changer is:

  • Supports several cash types such as coins, bills, and combinations of coins and bills. The supported cash type for a particular currency is noted by the list of cash units in the CurrencyCashList property.

  • Consists of any combination of features to aid in the cash-processing functions such as a cash entry holding bin, a number of slots or bins that can hold the cash, and cash exits.

  • Provides programmatic control onlyfor the dispensing of cash. The accepting of cash by the device (for example, to replenish cash) cannot be controlled by the APIs provided in this model. The application can call the ReadCashCounts method to retrieve the current unit count for each cash unit.

  • May have multiple exits. The number of exits is specified in the DeviceExits property. The application chooses a dispensing exit by setting the CurrentExit property. The cash units that may be dispensed to the current exit are indicated by the ExitCashList property. When the CurrentExit value is 1, the exit is considered the "primary exit" that is typically used during normal processing for dispensing cash to a customer following a retail transaction. When CurrentExit is a value greater than 1, the exit is considered an "auxiliary exit." An auxiliary exit typically is used for special purposes such as dispensing quantities or types of cash not targeted for the primary exit.

  • Dispensing cash into the exit specified by the CurrentExit property is performed by calling either the DispenseChange or DispenseCash method. With the DispenseChange method, the application specifies a total amount to dispense, and it is the responsibility of the cash changer device or the service object to dispense the proper amount of cash from the various slots or bins. With the DispenseCash method, the application specifies a count of each cash unit to dispense.

  • Dispenses cash either synchronously or asynchronously, depending on the value of the AsyncMode property.

  • May support more than one currency. The CurrencyCode property can be set to the currency, selecting from a currency in CurrencyCodeList. The properties and methods CurrencyCashList, ExitCashList, DispenseCash, DispenseChange, and ReadCashCounts all act upon the current currency only.

  • Sets the cash slot (or cash bin) conditions in the DeviceStatus property to show empty and near empty status, and in the FullStatus property to show full and near-full status. If there are one or more empty cash slots, then DeviceStatus property is Empty, and if there are one or more full cash slots, then FullStatus property is Full.

Cash Acceptance Model

The cash acceptance model is as follows:

  • The DispenseChange and DispenseCash methods are independent of the cash acceptance function. The AsyncMode property value has no effect on cash acceptance methods.

  • If the CapDeposit property is TRUE, cash acceptance is supported and the BeginDeposit, FixDeposit, and EndDeposit methods will be in use. Cash dispensing is disabled while cash acceptance is in progress. Also, cash acceptance is disabled while cash dispensing is in progress.

  • When the application calls the BeginDeposit method, the DepositCounts and DepositAmount properties are initialized to zero.

  • When the cash changer accepts cash, the value of the DepositCounts and DepositAmount properties increase, and a DataEvent event is raised if the CapDepositDataEvent property is TRUE.

  • If the CapPauseDeposit property is TRUE, the application can pause cash acceptance by calling the PauseDeposit method with a parameter of Pause. Then, the value of the DepositCounts and DepositAmount properties is fixed. If the application wants to resume cash acceptance, it calls the PauseDeposit method again with a parameter value of Restart. By reading either the DepositCounts or DepositAmount property, the application can get the exact amount of accepted cash, and compare the accepted cash total with the sale amount. If the amount of accepted cash is equal to or greater than the amount of the sale, the application calls the FixDeposit method. If the amount of accepted cash is less than amount of the sale, the application calls the PauseDeposit method with Restart. To get the total amount of accepted cash, the application should repeat the PauseDeposit method.

  • When the FixDeposit method is called, the cash changer stops accepting cash and the value of the DepositCounts and DepositAmount is fixed.

  • If necessary, the application can calculate the change by means of the DepositCounts and DepositAmount properties after the FixDeposit method. After the FixDeposit method is called, the application cannot resume cash acceptance and must call the EndDeposit method to complete the cash acceptance process.

  • To terminate the cash acceptance process, the application must call the EndDeposit method.

  • The values of the success parameter of the EndDeposit method have the following meanings:

    • Change: The application dispenses cash. This is typically used to dispense change due from a sale.

    • NoChange: The application does not dispense cash. This typically indicates that the total amount of accepted cash is equal to the total amount of the sale.

    • Repay: The application repays the total amount of cash. This typically is a cancellation of the sale. Repay can only be used when CapRepayDeposit is TRUE. If CapRepayDeposit is FALSE, the application must dispense the total amount of accepted cash by calling either the DispenseChange or DispenseCash method. Some cash changers may not repay accepted cash, depending on the cash changer mechanism.

  • When the ClearInput method is run, all queued DataEvent events associated with cash acceptance are cleared, but the value of the DepositCounts and DepositAmount properties are not cleared.

Device Sharing

The cash changer is an exclusive-use device. Its device sharing rules are:

  • The application must claim the device before enabling it.

  • The application must claim and enable the device before accessing some of the properties, dispensing or collecting, or receiving status update events.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.CashChanger
         Microsoft.PointOfService.BasicServiceObjects.CashChangerBasic

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

CashChanger Members
Microsoft.PointOfService Namespace