Magnetometer Magnetometer Magnetometer Magnetometer Magnetometer Class

Definition

Represents a magnetic sensor.

public : sealed class Magnetometer : IMagnetometer, IMagnetometer2, IMagnetometerDeviceId
struct winrt::Windows::Devices::Sensors::Magnetometer : IMagnetometer, IMagnetometer2, IMagnetometerDeviceId
public sealed class Magnetometer : IMagnetometer, IMagnetometer2, IMagnetometerDeviceId
Public NotInheritable Class Magnetometer Implements IMagnetometer, IMagnetometer2, IMagnetometerDeviceId
// 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)

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.