PosPower Class

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

Usage

'Usage
Dim posPower1 As New PosPower()

Syntax

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

Remarks

Capabilities

The PosPower device class has the following capabilities:

  • Supports a command to “shut down” the system.

  • Supports accessing a power-handling mechanism of the underlying operating system and hardware.

  • Informs the application if a power failure has occurred.

  • Informs the application if the UPS charge state has changed.

  • Informs the application about a high CPU temperature.

  • Informs the application about a stopped CPU fan.

  • Informs the application if an operating-system-dependent enforced shutdown mechanism is processed.

  • Allows the application to shut down the POS terminal, after saving application data locally or transferring application data to a server.

  • Informs the application about an initiated shutdown.

Model

The general model of PosPower is based on the power model of each POS device. The same common properties are used but all states relate to the POS terminal itself and not to a peripheral device.

There are three states of the PosPower:

  • ONLINE. The POS terminal is powered on and ready for use. This is the “operational” state.

  • OFF. The POS terminal is powered off or detached from the power supply. The POS terminal runs on battery power support. This is the power failure situation.

  • OFFLINE. The POS terminal is powered on, but it is running in a "lower-power-consumption" mode. It may need to be placed online by pressing a button or a key or doing something else to wake up the system.

Power reporting occurs only while the device is open and enabled, with power notification switched on.

In a power failure situation - when the PosPower is in the OFF state - the POS terminal will be shut down automatically after the last application has closed the PosPower device or when the time specified by EnforcedShutdownDelayTime has elapsed.

A call to the ShutdownPOS method will always shut down the POS terminal independent of the system power state.

Device Sharing

The PosPower is a sharable device. Its device sharing rules are:

  • After opening and enabling the device, the application may access all properties and methods and will receive status update events.

  • If more than one application has opened and enabled the device, all applications may access its properties and methods. Status update events are fired to all of the applications.

  • If one application claims the PosPower, only that application may call the ShutdownPOS method. This feature provides a degree of security in that these methods may effectively be restricted to the main POS application if that application claims the device at startup.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.PosPower
         Microsoft.PointOfService.BasicServiceObjects.PosPowerBasic

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

PosPower Members
Microsoft.PointOfService Namespace