C# 클래스 CyrusBuilt.MonoPi.Components.Sensors.SensorComponent

A component that is an abstraction of a sensor device. This is an implementation of CyrusBuilt.MonoPi.Components.Sensors.SensorBase.
상속: SensorBase
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent object.

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

InterruptPoll ( ) : void

Interrupts the poll cycle.

Poll ( ) : void

Polls the input pin status.

SensorComponent ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent class. This is the default constructor.

SensorComponent ( IGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent class with the CyrusBuilt.MonoPi.IO.GpioMem I/O pin to use.

보호된 메소드들

메소드 설명
Dispose ( bool 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.Sensors.SensorComponent.InterruptPoll is called.

메소드 상세

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent object.
Call CyrusBuilt.MonoPi.Components.Sensors.SensorComponent.Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent. The CyrusBuilt.MonoPi.Components.Sensors.SensorComponent.Dispose method leaves the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent in an unusable state. After calling CyrusBuilt.MonoPi.Components.Sensors.SensorComponent.Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent was occupying.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releaseses all resources used this object.
protected Dispose ( bool disposing ) : void
disposing bool /// 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 status.
/// This instance has been disposed. /// /// The specified pin is configured for output instead of input. ///
public Poll ( ) : void
리턴 void

SensorComponent() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent class. This is the default constructor.
public SensorComponent ( ) : System
리턴 System

SensorComponent() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorComponent class with the CyrusBuilt.MonoPi.IO.GpioMem I/O pin to use.
/// cannot null. ///
public SensorComponent ( IGpio pin ) : System
pin IGpio /// The I/O pin to use. ///
리턴 System