Share via


PosCommon.PowerState Property (POS for .NET v1.12 SDK Documentation)

2/27/2008

Gets the current power condition.

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

Syntax

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

Remarks

Possible values are defined by the PowerState enumeration.

The following table shows the valid power reporting values.

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 unable 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.

Note

The .NET Framework version 2.0 has an enumeration (System.Windows.Forms.PowerState) that conflicts with PowerState. To avoid compile-time errors, use the fully qualified name (that is, Microsoft.PointOfService.PowerState).

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

PosCommon Class
PosCommon Members
Microsoft.PointOfService Namespace
PosCommon.CapPowerReporting Property
PosCommon.PowerNotify Property