{
/// <summary>
/// Accelerometer Sensor Class. Used for registering callbacks for accelerometer and getting accelerometer data
- /// /// </summary>
+ /// </summary>
public class Accelerometer : Sensor
{
private static string AccelerometerKey = "http://tizen.org/feature/sensor.accelerometer";
/// <summary>
/// Returns the number of accelerometer sensors available on the device.
/// </summary>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public static int Count
{
get
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.Accelerometer"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular accelerometer sensor in case of multiple sensors
/// </param>
/// <summary>
/// Event Handler for storing the callback functions for event corresponding to change in accelerometer sensor data.
/// </summary>
-
public event EventHandler<AccelerometerDataUpdatedEventArgs> DataUpdated;
private static int GetCount()
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.FaceDownGestureDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular face down gesture detector in case of multiple sensors.
/// </param>
{
/// <summary>
/// GravitySensor Class. Used for registering callbacks for gravity sensor and getting gravity data
- /// /// </summary>
+ /// </summary>
public class GravitySensor : Sensor
{
private const string GravitySensorKey = "http://tizen.org/feature/sensor.gravity";
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.GravitySensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular gravity sensor in case of multiple sensors
/// </param>
{
/// <summary>
/// Gyroscope Sensor Class. Used for registering callbacks for gyroscope and getting gyroscope data
- /// /// </summary>
+ /// </summary>
public class Gyroscope : Sensor
{
private const string GyroscopeKey = "http://tizen.org/feature/sensor.gyroscope";
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.Gyroscope"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular gyroscope sensor in case of multiple sensors
/// </param>
{
/// <summary>
/// GyroscopeRotationVectorSensor Class. Used for registering callbacks for gyroscope rotation vector sensor and getting gyroscope rotation vector data
- /// /// </summary>
+ /// </summary>
public class GyroscopeRotationVectorSensor : Sensor
{
private const string GyroscopeRVKey = "http://tizen.org/feature/sensor.gyroscope_rotation_vector";
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.GyroscopeRotationVectorSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular gyroscope rotation vector sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.HeartRateMonitor"/> class.
/// </summary>
+ /// <remarks>
+ /// For accessing heart rate monitor, app should have http://tizen.org/privilege/healthinfo privilege.
+ /// </remarks>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="UnauthroizedAccessException">Thrown when the app has no privilege to use the sensor</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular heart rate monitor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.HumiditySensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular humidity sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.InVehicleActivityDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular in-vehicle activity detector in case of multiple sensors.
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.LightSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular light sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.LinearAccelerationSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular linear acceleration sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.Magnetometer"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular magnetometer in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.MagnetometerRotationVectorSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular magnetometer rotation vector sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.OrientationSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular orientation sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.Pedometer"/> class.
/// </summary>
+ /// <remarks>
+ /// For accessing pedometer, app should have http://tizen.org/privilege/healthinfo privilege.
+ /// </remarks>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="UnauthroizedAccessException">Thrown when the app has no privilege to use the sensor</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular pedometer sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.PickUpGestureDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular pick up gesture detector in case of multiple sensors.
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.PressureSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular pressure sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.ProximitySensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular proximity sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.RotationVectorSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular rotation vector sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.RunningActivityDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular running activity detector in case of multiple sensors.
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.SleepMonitor"/> class.
/// </summary>
+ /// <remarks>
+ /// For accessing sleep monitor, app should have http://tizen.org/privilege/healthinfo privilege.
+ /// </remarks>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="UnauthroizedAccessException">Thrown when the app has no privilege to use the sensor</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular sleep monitor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.stationaryActivityDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular stationary activity detector in case of multiple sensors.
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.TemperatureSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular temperature sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.UltravioletSensor"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular ultraviolet sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.UncalibratedGyroscope"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular uncalibrated gyroscope sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.UncalibratedMagnetometer"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular uncalibrated magnetometer sensor in case of multiple sensors
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.walkingActivityDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular walking activity detector in case of multiple sensors.
/// </param>
/// <summary>
/// Initializes a new instance of the <see cref="Tizen.Sensor.WristUpGestureDetector"/> class.
/// </summary>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+ /// <exception cref="NotSupportedException">Thrown when the sensor is not supported</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
/// <param name='index'>
/// Index. Default value for this is 0. Index refers to a particular wrist up gesture detector in case of multiple sensors.
/// </param>
/// Sets the interval of the sensor for sensor data event
/// Callbacks will be called at frequency of this interval
/// </summary>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public uint Interval
{
set
/// <summary>
/// Sets the max batch latency for the sensor corresponding to the sensor data event.
/// </summary>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public uint MaxBatchLatency
{
set
/// <summary>
/// Sets the pause policy of the sensor.
/// </summary>
- /// <value>
+ /// <value>The pause policy</value>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public SensorPausePolicy PausePolicy
{
set
/// Starts the sensor.
/// After this the event handlers will start receiving events.
/// </summary>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public void Start()
{
Log.Info(Globals.LogTag, "Starting the sensor");
/// Stop the sensor.
/// After this the event handlers will stop receiving the events
/// </summary>
+ /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
public void Stop()
{
Log.Info(Globals.LogTag, "Stopping the sensor");
case SensorError.InvalidParameter:
return new ArgumentException("Invalid Parameter: " + msg);
case SensorError.NotSupported:
- return new InvalidOperationException("Not Supported: " + msg);
+ return new NotSupportedException("Not Supported: " + msg);
case SensorError.PermissionDenied:
- return new InvalidOperationException("Permission Denied: " + msg);
+ return new UnauthorizedAccessException("Permission Denied: " + msg);
case SensorError.OutOfMemory:
return new InvalidOperationException("Out of Memory: " + msg);
case SensorError.NotNeedCalibration:
}
}
}
-}
\ No newline at end of file
+}