C# 클래스 Porrey.Uwp.IoT.SensorStability.StabilityMonitor

Measures the stability of multiple sensor readings over a period of time to determine if the reading is stable. This is useful, for example, for a sensor such as a scale where the weight will vary until while an object is placed on the scale but will eventually stabilize. This class aids in determining when such a sensor has a stable value.
파일 보기 프로젝트 열기: porrey/iot

공개 메소드들

메소드 설명
AddReading ( double sensorReading ) : System.Threading.Tasks.Task

Adds a new reading to the meter and updates the stability measurement.

StabilityMonitor ( int sampleSize = 10 ) : System

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.

메소드 상세

AddReading() 공개 메소드

Adds a new reading to the meter and updates the stability measurement.
public AddReading ( double sensorReading ) : System.Threading.Tasks.Task
sensorReading double The sensor reading of type T.
리턴 System.Threading.Tasks.Task

StabilityMonitor() 공개 메소드

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.
public StabilityMonitor ( int sampleSize = 10 ) : System
sampleSize int Specifies the number of samples to collect.
리턴 System