Class Sensor
Definition
- Assembly:
- Tizen.Sensor.dll
The Sensor class is used for storing the hardware information about a particular sensor.
C#Copypublic abstract class Sensor : IDisposable
- Inheritance
-
objectSensor
- Derived
- Implements
-
System.IDisposable
Properties
Declaration
C#Copypublic 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
C#Copypublic 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. |
Declaration
C#Copypublic bool IsSensing { get; }
Property Value
Type | Description |
---|---|
bool |
|
Declaration
C#Copypublic 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
C#Copypublic 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. |
Declaration
C#Copypublic float MaxValue { get; }
Property Value
Type | Description |
---|---|
float | The upper bound of the range of the sensor reading. |
Declaration
C#Copypublic int MinInterval { get; }
Property Value
Type | Description |
---|---|
int | The minimum update interval. |
Declaration
C#Copypublic float MinValue { get; }
Property Value
Type | Description |
---|---|
float | The lower bound of the range of the sensor reading. |
Declaration
C#Copypublic string Name { get; }
Property Value
Type | Description |
---|---|
string | The name of the sensor. |
PausePolicy
Get the pause policy or set the pause policy of the sensor as the set value.
Declaration
C#Copypublic 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. |
Declaration
C#Copypublic float Resolution { get; }
Property Value
Type | Description |
---|---|
float | The resolution. |
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
C#Copypublic TimeSpan TimeSpan { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The time span. |
Declaration
C#Copypublic ulong Timestamp { get; set; }
Property Value
Type | Description |
---|---|
ulong | Timestamp. |
Declaration
C#Copypublic string Vendor { get; }
Property Value
Type | Description |
---|---|
string | The vendor name of the sensor. |
Methods
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true if managed resources should be disposed otherwise, false. |
Declaration
C#Copyprotected ~Sensor()
Declaration
C#Copypublic void Start()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the operation is invalid for the current state. |
Declaration
C#Copypublic void Stop()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the operation is invalid for the current state. |