{
internal PedometerDataUpdatedEventArgs(float[] values)
{
- StepCount = (int) values[0];
- WalkStepCount = (int) values[1];
- RunStepCount = (int) values[2];
+ StepCount = (uint) values[0];
+ WalkStepCount = (uint) values[1];
+ RunStepCount = (uint) values[2];
MovingDistance = values[3];
CalorieBurned = values[4];
LastSpeed = values[5];
/// <summary>
/// Gets the step count
/// </summary>
- public int StepCount { get; private set; }
+ public uint StepCount { get; private set; }
/// <summary>
/// Gets the walking step count
/// </summary>
- public int WalkStepCount { get; private set; }
+ public uint WalkStepCount { get; private set; }
/// <summary>
/// Gets the running step count
/// </summary>
- public int RunStepCount { get; private set; }
+ public uint RunStepCount { get; private set; }
/// <summary>
/// Gets the moving distance
/// </summary>
public PedometerState LastStepStatus { get; private set; }
}
-}
\ No newline at end of file
+}
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the acceleration.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the acceleration.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether accelerometer sensor is supported by device.
/// <summary>
/// Gets the state of the face down gesture.
/// </summary>
- public DetectorState FaceDown { get; private set; }
+ public DetectorState FaceDown { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether face down gesture detector is supported by device.
/// <summary>
/// Gets the X component of the gravity.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the gravity.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the gravity.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether gravity sensor is supported by device.
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the acceleration.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the acceleration.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether gyroscope sensor is supported by device.
/// <summary>
/// Gets the X component of the gyroscope rotation vector.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the gyroscope rotation vector.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the gyroscope rotation vector.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Gets the W component of the gyroscope rotation vector.
/// </summary>
- public float W { get; private set; }
+ public float W { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Accuracy of the gyroscope rotation vector data.
/// <summary>
/// Gets the value of the heart rate monitor.
/// </summary>
- public int HeartRate { get; private set; }
+ public int HeartRate { get; private set; } = int.MinValue;
/// <summary>
/// Returns true or false based on whether heart rate monitor is supported by device.
/// <summary>
/// Gets the value of the humidity sensor.
/// </summary>
- public float Humidity { get; private set; }
+ public float Humidity { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether humidity sensor is supported by device.
/// <summary>
/// Gets the state of in-vehicle activity detector
/// </summary>
- public DetectorState InVehicle { get; private set; }
+ public DetectorState InVehicle { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether in-vehicle activity detector is supported by device.
/// <summary>
/// Gets the Level of the light.
/// </summary>
- public float Level { get; private set; }
+ public float Level { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether light sensor is supported by device.
/// <summary>
/// Gets the X component of the linear acceleration.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the linear acceleration.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the linear acceleration.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether linear acceleration sensor is supported by device.
/// <summary>
/// Gets the X component of the magnetometer.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the magnetometer.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the magnetometer.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether magnetometer is supported by device.
/// <summary>
/// Gets the X component of the magnetometer rotation vector.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the magnetometer rotation vector.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the magnetometer rotation vector.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Gets the W component of the magnetometer rotation vector.
/// </summary>
- public float W { get; private set; }
+ public float W { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Accuracy of the magnetometer rotation vector data.
/// <summary>
/// Gets the Azimuth component of the orientation.
/// </summary>
- public float Azimuth { get; private set; }
+ public float Azimuth { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Pitch component of the orientation.
/// </summary>
- public float Pitch { get; private set; }
+ public float Pitch { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Roll component of the orientation.
/// </summary>
- public float Roll { get; private set; }
+ public float Roll { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether orientation sensor is supported by device.
/// <summary>
/// Gets the step count
/// </summary>
- public int StepCount { get; private set; }
+ public uint StepCount { get; private set; } = 0;
/// <summary>
/// Gets the walking step count
/// </summary>
- public int WalkStepCount { get; private set; }
+ public uint WalkStepCount { get; private set; } = 0;
/// <summary>
/// Gets the running step count
/// </summary>
- public int RunStepCount { get; private set; }
+ public uint RunStepCount { get; private set; } = 0;
/// <summary>
/// Gets the moving distance
/// </summary>
- public float MovingDistance { get; private set; }
+ public float MovingDistance { get; private set; } = 0;
/// <summary>
/// Gets the calorie burned
/// </summary>
- public float CalorieBurned { get; private set; }
+ public float CalorieBurned { get; private set; } = 0;
/// <summary>
/// Gets the last speed
/// </summary>
- public float LastSpeed { get; private set; }
+ public float LastSpeed { get; private set; } = 0;
/// <summary>
/// Gets the last stepping frequency
/// </summary>
- public float LastSteppingFrequency { get; private set; }
+ public float LastSteppingFrequency { get; private set; } = 0;
/// <summary>
/// Gets the last step status
/// </summary>
- public PedometerState LastStepStatus { get; private set; }
+ public PedometerState LastStepStatus { get; private set; } = PedometerState.Unknown;
/// <summary>
/// Returns true or false based on whether pedometer sensor is supported by device.
{
Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
- StepCount = (int)sensorData.values[0];
- WalkStepCount = (int)sensorData.values[1];
- RunStepCount = (int)sensorData.values[2];
+ StepCount = (uint)sensorData.values[0];
+ WalkStepCount = (uint)sensorData.values[1];
+ RunStepCount = (uint)sensorData.values[2];
MovingDistance = sensorData.values[3];
CalorieBurned = sensorData.values[4];
LastSpeed = sensorData.values[5];
/// <summary>
/// Gets the state of the pick up gesture.
/// </summary>
- public DetectorState PickUp { get; private set; }
+ public DetectorState PickUp { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether pick up gesture detector is supported by device.
/// <summary>
/// Gets the value of the pressure sensor.
/// </summary>
- public float Pressure { get; private set; }
+ public float Pressure { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether pressure sensor is supported by device.
/// <summary>
/// Gets the proximity state.
/// </summary>
- public ProximitySensorState Proximity { get; private set; }
+ public ProximitySensorState Proximity { get; private set; } = ProximitySensorState.Unknown;
/// <summary>
/// Returns true or false based on whether proximity sensor is supported by device.
/// <summary>
/// Gets the X component of the rotation vector.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the rotation vector.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the rotation vector.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Gets the W component of the rotation vector.
/// </summary>
- public float W { get; private set; }
+ public float W { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Accuracy of the rotation vector data.
/// </summary>
- public SensorDataAccuracy Accuracy { get; private set; }
+ public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined;
/// <summary>
/// Returns true or false based on whether rotation vector sensor is supported by device.
/// <summary>
/// Gets the state of running activity detector
/// </summary>
- public DetectorState Running { get; private set; }
+ public DetectorState Running { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether running activity detector is supported by device.
/// <summary>
/// Gets the value of the sleep state.
/// </summary>
- public SleepMonitorState SleepState { get; private set; }
+ public SleepMonitorState SleepState { get; private set; } = SleepMonitorState.Unknown;
/// <summary>
/// Returns true or false based on whether sleep monitor is supported by device.
/// <summary>
/// Gets the state of stationary activity detector
/// </summary>
- public DetectorState Stationary { get; private set; }
+ public DetectorState Stationary { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether stationary activity detector is supported by device.
/// <summary>
/// Gets the value of the temperature sensor.
/// </summary>
- public float Temperature { get; private set; }
+ public float Temperature { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether temperature sensor is supported by device.
/// <summary>
/// Gets the value of the ultraviolet sensor.
/// </summary>
- public float UltravioletIndex { get; private set; }
+ public float UltravioletIndex { get; private set; } = float.MinValue;
/// <summary>
/// Returns true or false based on whether ultraviolet sensor is supported by device.
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the acceleration.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the acceleration.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Gets the BiasX component of the uncalibrated gyroscope data.
/// </summary>
- public float BiasX { get; private set; }
+ public float BiasX { get; private set; } = 0;
/// <summary>
/// Gets the BiasY component of the uncalibrated gyroscope data.
/// </summary>
- public float BiasY { get; private set; }
+ public float BiasY { get; private set; } = 0;
/// <summary>
/// Gets the BiasZ component of the uncalibrated gyroscope data.
/// </summary>
- public float BiasZ { get; private set; }
+ public float BiasZ { get; private set; } = 0;
/// <summary>
/// Returns true or false based on whether uncalibrated gyroscope sensor is supported by device.
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
- public float X { get; private set; }
+ public float X { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Y component of the acceleration.
/// </summary>
- public float Y { get; private set; }
+ public float Y { get; private set; } = float.MinValue;
/// <summary>
/// Gets the Z component of the acceleration.
/// </summary>
- public float Z { get; private set; }
+ public float Z { get; private set; } = float.MinValue;
/// <summary>
/// Gets the BiasX component of the uncalibrated magnetometer data.
/// </summary>
- public float BiasX { get; private set; }
+ public float BiasX { get; private set; } = 0;
/// <summary>
/// Gets the BiasY component of the uncalibrated magnetometer data.
/// </summary>
- public float BiasY { get; private set; }
+ public float BiasY { get; private set; } = 0;
/// <summary>
/// Gets the BiasZ component of the uncalibrated magnetometer data.
/// </summary>
- public float BiasZ { get; private set; }
+ public float BiasZ { get; private set; } = 0;
/// <summary>
/// Returns true or false based on whether uncalibrated magnetometer sensor is supported by device.
/// <summary>
/// Gets the state of walking activity detector
/// </summary>
- public DetectorState Walking { get; private set; }
+ public DetectorState Walking { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether walking activity detector is supported by device.
/// <summary>
/// Gets the state of the wrist up gesture.
/// </summary>
- public DetectorState WristUp { get; private set; }
+ public DetectorState WristUp { get; private set; } = DetectorState.Unknown;
/// <summary>
/// Returns true or false based on whether wrist up gesture detector is supported by device.
/// <summary>
/// Unknown.
/// </summary>
- Unknown,
+ Unknown = -1,
/// <summary>
/// Stop state.
/// <summary>
/// Unknown.
/// </summary>
- Unknown,
+ Unknown = -1,
/// <summary>
/// The wake state.
public enum ProximitySensorState
{
/// <summary>
+ /// Unknown.
+ /// </summary>
+ Unknown = -1,
+
+ /// <summary>
/// Near sate.
/// </summary>
Near = 0,
public enum DetectorState
{
/// <summary>
+ /// Unknown.
+ /// </summary>
+ Unknown = -1,
+
+ /// <summary>
/// None sate.
/// </summary>
NotDetected = 0,