DeviceStatistics Class (POS for .NET v1.12 SDK Documentation)

2/27/2008

Helps a service object implement device statistics reporting.

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

Syntax

'Declaration
Public Class DeviceStatistics
    Implements IDisposable
public class DeviceStatistics : IDisposable
public ref class DeviceStatistics : IDisposable
public class DeviceStatistics implements IDisposable
public class DeviceStatistics implements IDisposable

Remarks

The DeviceStatistics helper class is provided by POS for .NET to help the service objects implement device statistics reporting. DeviceStatistics class supports methods to reset, retrieve, and update statistics, as well as helper methods for creating statistics, incrementing statistics, and loading or saving statistics to or from XML file storage.

DeviceStatistics supports statistics stored in either hardware or software. POS for .NET stores software-based statistics in an XML statistics file and updates those statistics at a globally-defined flush interval determined at the time of system installation and setup. When the application claims a device, POS for .NET loads the appropriate statistics from the XML file.

In general, service objects that derive from one of the Base or Basic classes defined in the Microsoft.PointOfService.BaseServiceObjects or Microsoft.PointOfService.BasicServiceObjects namespace need to write very little code to implement software-based device statistics. Typically, the service object will only write code to call the IncrementStatistic method, which increments the value of a given statistic. All other software-based statistics management is handled by the base/basic class.

To support hardware-based statistics stored in the device, the service object must specify a callback function that can reset or return the value of the statistic, which POS for .NET can then use in response to a client application's request.

Inheritance Hierarchy

System.Object
  Microsoft.PointOfService.BaseServiceObjects.DeviceStatistics

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

DeviceStatistics Members
Microsoft.PointOfService.BaseServiceObjects Namespace