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
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
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