Class Sensor
Definition
- Assembly:
- Tizen.Sensor.dll
The Sensor class is used for storing the hardware information about a particular sensor.
public abstract class Sensor : IDisposable
- Inheritance
-
objectSensor
- Derived
-
Tizen.Sensor.AutoRotationSensorTizen.Sensor.AutoRotationSensorTizen.Sensor.AutoRotationSensorTizen.Sensor.AutoRotationSensorTizen.Sensor.AutoRotationSensorTizen.Sensor.AutoRotationSensorTizen.Sensor.BatchSensor`1Tizen.Sensor.BatchSensor`1Tizen.Sensor.BatchSensor`1Tizen.Sensor.BatchSensor`1Tizen.Sensor.BatchSensor`1
- Implements
-
System.IDisposable
Properties
View SourceFifoCount
Property: Gets the FIFO count.
Declaration
public int FifoCount { get; }
Property Value
Type | Description |
---|---|
int | The size of the hardware FIFO. |
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. |
IsSensing
Indicates whether this sensor is sensing.
Declaration
public bool IsSensing { get; }
Property Value
Type | Description |
---|---|
bool |
|
MaxBatchCount
Property: Gets the maximum batch count.
Declaration
public int MaxBatchCount { get; }
Property Value
Type | Description |
---|---|
int | The maximum batch count. |
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. |
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. |
MinInterval
Property: Gets the minimum interval.
Declaration
public int MinInterval { get; }
Property Value
Type | Description |
---|---|
int | The minimum update interval. |
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. |
Name
Property: Gets the name of the sensor.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string | The name of the sensor. |
PausePolicy
Sets the pause policy of the sensor.
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. |
Resolution
Property: Gets the resolution.
Declaration
public float Resolution { get; }
Property Value
Type | Description |
---|---|
float | The resolution. |
TimeSpan
Gets or sets the time span.
Declaration
public TimeSpan TimeSpan { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The time span. |
Vendor
Property: Gets the vendor.
Declaration
public string Vendor { get; }
Property Value
Type | Description |
---|---|
string | The vendor name of the sensor. |
Methods
View SourceDispose()
Destroy the current object.
Declaration
public void Dispose()
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. |
~Sensor()
Destroy the Sensor object.
Declaration
protected ~Sensor()
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. |
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. |