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 | |
---|---|---|
CurrentPowerLevel | Gets the current power level of the system. | |
MaximumTimeToActive | Gets or sets the maximum timeout value for all system sleep calls, including internal system sleep calls. | |
Uptime | Gets the time span for which the system has been up and running, without a reboot. | |
WakeupEvents | Gets or sets the default wakeup events for all thread sleep calls and internal system sleep calls. |
Top
Methods
Name | Description | |
---|---|---|
ChangePowerLevel | Enables the caller to adjust the current power level of the device. | |
RebootDevice(Boolean) | Enables the caller to force a soft or hard reboot of the device, with no execution timeout constraint. | |
RebootDevice(Boolean, Int32) | Enables the caller to force a soft or hard reboot of the device, with the specified execution timeout constraint. | |
Sleep | Puts the device into a sleep state that is only awoken by the specified events. | |
WaitForIdleCPU | Waits for the system to enter an idle state (no active threads). |
Top
Events
Name | Description | |
---|---|---|
OnPowerLevelChange | Notifies listeners when a power level event occurs. | |
OnRebootEvent | Notifies listeners prior to a device reboot (soft or hard). | |
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.