Share via


CashChanger.CurrentService Property

2/27/2008

Gets or sets the current service.

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

Syntax

'Declaration
Public Overridable Property CurrentService As Integer
public virtual int CurrentService { get; set; }
public:
virtual property int CurrentService {
    int get ();
    void set (int value);
}
/** @property */
public int get_CurrentService ()

/** @property */
public void set_CurrentService (int value)
public function get CurrentService () : int

public function set CurrentService (value : int)

Remarks

Holds the current service. The value 0 represents the primary service, while values greater than 0 and less than or equal to ServiceCount are used to request information from the integrated services. Legal values range from 0 to ServiceCount. The ReadCashCounts method and all the properties, common and specific, can be accessed when the CurrentService is greater than 0. CurrentService, ServiceCount and ServiceIndex always reflects the primary service.

Later in this topic are examples of a cash changer service that use services for a separate Coin Acceptor, Dispenser, and a bills-only cash changer. A StatusUpdateEvent that indicates a jam has been received by the application. Only the bill changer and the coin dispenser can detect a jam.

  • Checking the values of the primary service:

    CurrentService = 0

    ServiceCount = 3

    ServiceIndex = 50528769 (X'03030201')

    DeviceStatus = Jam

    DeviceDescription = "Integrated Cash Changer Service 1.11.05"

  • Changing the service for information about the coin dispenser:

    CurrentService = 2

    ServiceCount = 3

    ServiceIndex = 50528769 (X'03030201')

    DeviceStatus = OK

    DeviceDescription = "Pennybrite Coin Dispenser Service"

  • The coin dispenser looks OK. Check the bill changer:

    CurrentService = 3

    ServiceCount = 3

    ServiceIndex = 50528769 (X'03030201')

    DeviceStatus = Jam

    DeviceDescription = "Benjamin Bill Changer Service"

This property is initialized to 0 by the Open method.

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.

See Also

Reference

CashChanger Class
CashChanger Members
Microsoft.PointOfService Namespace
ServiceCount
ServiceIndex
CashChanger.ReadCashCounts Method