CustomSensor.GetCurrentReading Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current sensor reading.
public:
virtual CustomSensorReading ^ GetCurrentReading() = GetCurrentReading;
CustomSensorReading GetCurrentReading();
public CustomSensorReading GetCurrentReading();
function getCurrentReading()
Public Function GetCurrentReading () As CustomSensorReading
Returns
The current sensor reading.
Remarks
An app may use this method to poll the sensor for the current reading as an alternative to registering a ReadingChanged event handler. This would be the preferred alternative for an app that updates its user interface at a specific frame rate. Whether polling once or many times, the app must establish a desired ReportInterval. This informs the sensor driver to allocate resources to satisfy subsequent polling requests.
Before using the return value from this method, the app must first check that the value is not null. (If the value is null and you attempt to retrieve it, Windows will generate an exception.)