Share via


Battery Class

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

Provides methods for querying the state of the device's battery.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Hardware..::..Battery

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

Syntax

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

The Battery type exposes the following members.

Methods

  Name Description
Public methodStatic member GetChargerModel Retrieves an object that describes the battery charger model.
Public methodStatic member IsFullyCharged Retrieves a value that indicates whether the battery is fully charged.
Public methodStatic member OnCharger Returns a value that indicates whether the hardware is connected to a battery charger.
Public methodStatic member ReadTemperature Gets a current temperature reading for the battery.
Public methodStatic member ReadVoltage Gets a voltage reading for the battery.
Public methodStatic member StateOfCharge Gets the battery's current recharging status.
Public methodStatic member WaitForEvent Pauses execution for a specified amount of time and waits for a battery event.

Top

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