Magnetometer Magnetometer Magnetometer Magnetometer Magnetometer Class

Definition

Represents a magnetic sensor.

public : sealed class Magnetometer
struct winrt::Windows::Devices::Sensors::Magnetometer
public sealed class Magnetometer
Public NotInheritable Class Magnetometer
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Version history

Windows version SDK version Value added
1709 16299 FromIdAsync
1709 16299 GetDeviceSelector
1709 16299 MaxBatchSize
1709 16299 ReportLatency

Properties

DeviceId DeviceId DeviceId DeviceId DeviceId

Gets the device identifier.

MaxBatchSize MaxBatchSize MaxBatchSize MaxBatchSize MaxBatchSize

Gets the maximum number of events that can be batched by the sensor.

MinimumReportInterval MinimumReportInterval MinimumReportInterval MinimumReportInterval MinimumReportInterval

Gets the minimum report interval supported by the magnetometer.

ReadingTransform ReadingTransform ReadingTransform ReadingTransform ReadingTransform

Gets or sets the transformation that needs to be applied to sensor data. Transformations to be applied are tied to the display orientation with which to align the sensor data.

ReportInterval ReportInterval ReportInterval ReportInterval ReportInterval

Gets or sets the current report interval for the magnetometer.

ReportLatency ReportLatency ReportLatency ReportLatency ReportLatency

Gets or sets the delay between batches of sensor information.

Methods

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Asynchronously obtains the sensor from its identifier.

GetCurrentReading() GetCurrentReading() GetCurrentReading() GetCurrentReading() GetCurrentReading()

Gets the current magnetometer reading.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Returns the default magnetometer.

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Gets the device selector.

Events

ReadingChanged ReadingChanged ReadingChanged ReadingChanged ReadingChanged

Occurs each time the compass reports a new sensor reading.

See also