Share via


PosCommon.PowerState Property

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

Usage

'Usage
Dim posCommon1 As PosCommon

Dim returnValue As PowerState
returnValue = posCommon1.PowerState

Syntax

'Declaration
Public MustOverride ReadOnly Property PowerState() As PowerState
public abstract PowerState PowerState {get;}
public: property virtual PowerState^ PowerState{
    PowerState^ get();
}
public abstract PowerState get_PowerState();
public abstract function get PowerState() : PowerState;

Remarks

Contains the current power condition. Possible values are defined by the PowerState enumeration.

The valid power reporting values are:

Value

Meaning

Unknown

Cannot determine the device's power state, for one of the following reasons:

  • CapPowerReporting = PowerReporting.None; the device does not support power reporting.

  • PowerNotify = PowerNotification.Disabled; power notifications are disabled.

  • DeviceEnabled = FALSE; power state monitoring does not occur until the device is enabled. Under these conditions, POS for .NET returns a value of PowerState.Unknown for PowerState.

Online

The device is powered on and ready for use.Can be returned if CapPowerReporting = PowerReporting.Standard or PowerReporting.Advanced.

Off

The device is off or detached from the terminal.Can be returned only if CapPowerReporting = PowerReporting.Advanced.

Offline

The device is powered on but is either not ready or not able to respond to requests.Can be returned only if CapPowerReporting = PowerReporting.Advanced.

OffOffline

The device is either off or offline.Can be returned only if CapPowerReporting = PowerReporting.Standard.

PowerState is initialized to PowerState.Unknown. When PowerNotify is set to Enabled and DeviceEnabled is TRUE, the service object must update PowerState as the service object detects power-condition changes. When PowerState is changed and PowerNotify is PowerNotification.Enabled, POS for .NET queues a StatusUpdateEvent event, notifying the application.

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

PosCommon Class
PosCommon Members
Microsoft.PointOfService Namespace
CapPowerReporting
PowerNotify