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

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

공개 메소드들

메소드 설명
Dispose ( ) : void

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

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

InterruptPoll ( ) : void

Interrupts the poll cycle.

MotionSensorComponent ( ) : System

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

MotionSensorComponent ( IGpio pin ) : System

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

Poll ( ) : void

Polls the input pin status.

보호된 메소드들

메소드 설명
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.Sensors.MotionSensorComponent.InterruptPoll is called.

메소드 상세

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent object.
Call CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent.Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent. The CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent.Dispose method leaves the CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent in an unusable state. After calling CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent.Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Sensors.MotionSensorComponent 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

MotionSensorComponent() 공개 메소드

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

MotionSensorComponent() 공개 메소드

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

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