Share via


PowerState Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Encapsulates the power management functionality of the .NET Micro Framework.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Hardware..::..PowerState

Namespace:  Microsoft.SPOT.Hardware
Assembly:  Microsoft.SPOT.Hardware (in Microsoft.SPOT.Hardware.dll)

Syntax

'Declaration
Public NotInheritable Class PowerState
public static class PowerState
public ref class PowerState abstract sealed
[<AbstractClass>]
[<Sealed>]
type PowerState =  class end
public final class PowerState

The PowerState type exposes the following members.

Properties

  Name Description
Public propertyStatic member CurrentPowerLevel Gets the current power level of the system.
Public propertyStatic member MaximumTimeToActive Gets or sets the maximum timeout value for all system sleep calls, including internal system sleep calls.
Public propertyStatic member Uptime Gets the time span for which the system has been up and running, without a reboot.
Public propertyStatic member WakeupEvents Gets or sets the default wakeup events for all thread sleep calls and internal system sleep calls.

Top

Methods

  Name Description
Public methodStatic member ChangePowerLevel Enables the caller to adjust the current power level of the device.
Public methodStatic member RebootDevice(Boolean) Enables the caller to force a soft or hard reboot of the device, with no execution timeout constraint.
Public methodStatic member RebootDevice(Boolean, Int32) Enables the caller to force a soft or hard reboot of the device, with the specified execution timeout constraint.
Public methodStatic member Sleep Puts the device into a sleep state that is only awoken by the specified events.
Public methodStatic member WaitForIdleCPU Waits for the system to enter an idle state (no active threads).

Top

Events

  Name Description
Public eventStatic member OnPowerLevelChange Notifies listeners when a power level event occurs.
Public eventStatic member OnRebootEvent Notifies listeners prior to a device reboot (soft or hard).
Public eventStatic member OnSleepChange Notifies listeners when a sleep event occurs.

Top

Remarks

This class enables the managed application to adjust power settings for the device.

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

Microsoft.SPOT.Hardware Namespace