Class Sensor

    Definition

    Namespace:
    Tizen.Sensor
    Assembly:
    Tizen.Sensor.dll

    The Sensor class is used for storing the hardware information about a particular sensor.

    public abstract class Sensor : IDisposable
    Inheritance
    object
    Sensor
    Derived
    Accelerometer
    Accelerometer
    ActivityDetector
    ActivityDetector
    AutoRotationSensor
    AutoRotationSensor
    BatchSensor<TData>
    BatchSensor<TData>
    FaceDownGestureDetector
    FaceDownGestureDetector
    GravitySensor
    GravitySensor
    Gyroscope
    Gyroscope
    GyroscopeRotationVectorSensor
    GyroscopeRotationVectorSensor
    HeartRateMonitor
    HeartRateMonitor
    HumiditySensor
    HumiditySensor
    LightSensor
    LightSensor
    LinearAccelerationSensor
    LinearAccelerationSensor
    Magnetometer
    Magnetometer
    MagnetometerRotationVectorSensor
    MagnetometerRotationVectorSensor
    OrientationSensor
    OrientationSensor
    Pedometer
    Pedometer
    PickUpGestureDetector
    PickUpGestureDetector
    PressureSensor
    PressureSensor
    ProximitySensor
    ProximitySensor
    RotationVectorSensor
    RotationVectorSensor
    SleepMonitor
    SleepMonitor
    TemperatureSensor
    TemperatureSensor
    UltravioletSensor
    UltravioletSensor
    UncalibratedGyroscope
    UncalibratedGyroscope
    UncalibratedMagnetometer
    UncalibratedMagnetometer
    WristUpGestureDetector
    WristUpGestureDetector
    Implements
    System.IDisposable

    Properties

    View Source

    FifoCount

    Property: Gets the FIFO count of the sensor as int type.

    Declaration
    public int FifoCount { get; }
    Property Value
    Type Description
    int

    The size of the hardware FIFO.

    View Source

    Interval

    Sets the interval of the sensor for the sensor data event. Callbacks will be called at the frequency of this interval.

    Declaration
    public uint Interval { get; set; }
    Property Value
    Type Description
    uint

    The interval of the sensor.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the operation is invalid for the current state.

    View Source

    IsSensing

    Indicate whether the sensor is sensing or not sensing.

    Declaration
    public bool IsSensing { get; }
    Property Value
    Type Description
    bool

    true if the sensor is sensing; otherwise false.

    View Source

    MaxBatchCount

    Property: Gets the maximum batch count of the sensor.

    Declaration
    public int MaxBatchCount { get; }
    Property Value
    Type Description
    int

    The maximum batch count.

    View Source

    MaxBatchLatency

    Sets the maximum batch latency for the sensor corresponding to the sensor data event.

    Declaration
    public uint MaxBatchLatency { get; set; }
    Property Value
    Type Description
    uint

    The maximum batch latency.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the operation is invalid for the current state.

    View Source

    MaxValue

    Property: Gets the maximum value of the range of the sensor data.

    Declaration
    public float MaxValue { get; }
    Property Value
    Type Description
    float

    The upper bound of the range of the sensor reading.

    View Source

    MinInterval

    Property: Gets the minimum interval of the sensor.

    Declaration
    public int MinInterval { get; }
    Property Value
    Type Description
    int

    The minimum update interval.

    View Source

    MinValue

    Property: Gets the minimum value of the range of the sensor data.

    Declaration
    public float MinValue { get; }
    Property Value
    Type Description
    float

    The lower bound of the range of the sensor reading.

    View Source

    Name

    Property: Gets the name of the sensor as a string.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    The name of the sensor.

    View Source

    PausePolicy

    Get the pause policy or set the pause policy of the sensor as the set value.

    Declaration
    public SensorPausePolicy PausePolicy { get; set; }
    Property Value
    Type Description
    SensorPausePolicy

    The pause policy.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the operation is invalid for the current state.

    View Source

    Resolution

    Property: Gets the resolution of the sensor as a float type.

    Declaration
    public float Resolution { get; }
    Property Value
    Type Description
    float

    The resolution.

    View Source

    TimeSpan

    Gets or sets the time span. Set value will be used as its 'Ticks' attribute. Get will return the newly allocated TimeSpan object with the same ticks as the sensor's timestamp.

    Declaration
    public TimeSpan TimeSpan { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The time span.

    View Source

    Timestamp

    Gets or sets the timestamp of a sensor which inherits the sensor class.

    Declaration
    public ulong Timestamp { get; set; }
    Property Value
    Type Description
    ulong

    Timestamp.

    View Source

    Vendor

    Property: Gets the vendor of the sensor as a string.

    Declaration
    public string Vendor { get; }
    Property Value
    Type Description
    string

    The vendor name of the sensor.

    Methods

    View Source

    Dispose()

    Destroy the current object and release all the resources.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Releases all resources currently used by this instance.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true if managed resources should be disposed otherwise, false.

    View Source

    ~Sensor()

    Destroy the Sensor object and release all resources.

    Declaration
    protected ~Sensor()
    View Source

    Start()

    Starts the sensor. After this, event handlers will start receiving events.

    Declaration
    public void Start()
    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the operation is invalid for the current state.

    View Source

    Stop()

    Stops the sensor. After this, event handlers will stop receiving events.

    Declaration
    public void Stop()
    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the operation is invalid for the current state.

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX