C# Класс CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent

A component that is an abstraction of a temperature sensor device. This is an implementation of CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.
Наследование: TemperatureSensorBase
Показать файл Открыть проект

Открытые методы

Метод Описание
ChangeScale ( TemperatureScale scale ) : void

Changes the temperature scale.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent object.

Call CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent. The CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose method leaves the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent in an unusable state. After calling CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent was occupying.

InterruptPoll ( ) : void

Interrupts the poll cycle.

Poll ( ) : void

Polls the input pin for temperature reading.

TemperatureSensorComponent ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class. This is the default constructor.

TemperatureSensorComponent ( IGpio clock, IGpio data, IGpio reset ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the clock, data, and reset pins needed for the sensor.

TemperatureSensorComponent ( TemperatureScale scale ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the scale to get the temperature in.

TemperatureSensorComponent ( TemperatureScale scale, IGpio clock, IGpio data, IGpio reset ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the clock, data, and reset pins needed for the sensor, as well as the scale to get the temperature readings in.

Защищенные методы

Метод Описание
Dispose ( System.Boolean disposing ) : void

Releaseses all resources used this object.

Приватные методы

Метод Описание
BackgroundExecutePoll ( ) : void

Executes the poll cycle on a background thread.

ExecutePoll ( ) : void

Executes the poll cycle. Does not return until CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.InterruptPoll is called.

Описание методов

ChangeScale() публичный Метод

Changes the temperature scale.
public ChangeScale ( TemperatureScale scale ) : void
scale TemperatureScale /// The scale to change to. ///
Результат void

Dispose() публичный Метод

Releases all resource used by the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent object.
Call CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent. The CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose method leaves the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent in an unusable state. After calling CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent.Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent was occupying.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releaseses all resources used this object.
protected Dispose ( System.Boolean disposing ) : void
disposing System.Boolean /// Set true if disposing managed resources in addition to unmanaged. ///
Результат void

InterruptPoll() публичный Метод

Interrupts the poll cycle.
public InterruptPoll ( ) : void
Результат void

Poll() публичный Метод

Polls the input pin for temperature reading.
/// This instance has been disposed. ///
public Poll ( ) : void
Результат void

TemperatureSensorComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class. This is the default constructor.
public TemperatureSensorComponent ( ) : System
Результат System

TemperatureSensorComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the clock, data, and reset pins needed for the sensor.
/// Pins cannot be null. ///
public TemperatureSensorComponent ( IGpio clock, IGpio data, IGpio reset ) : System
clock IGpio /// The GPIO pin used for the clock. ///
data IGpio /// The GPIO pin used for data. ///
reset IGpio /// The GPIO pin used to trigger reset. ///
Результат System

TemperatureSensorComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the scale to get the temperature in.
public TemperatureSensorComponent ( TemperatureScale scale ) : System
scale TemperatureScale /// The scale to get the temperature readings in. ///
Результат System

TemperatureSensorComponent() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Temperature.TemperatureSensorComponent class with the clock, data, and reset pins needed for the sensor, as well as the scale to get the temperature readings in.
/// Pins cannot be null. ///
public TemperatureSensorComponent ( TemperatureScale scale, IGpio clock, IGpio data, IGpio reset ) : System
scale TemperatureScale /// The scale to get the temperature readings in. ///
clock IGpio /// The GPIO pin used for the clock. ///
data IGpio /// The GPIO pin used for data. ///
reset IGpio /// The GPIO pin used to trigger reset. ///
Результат System