C# Class 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.
Inheritance: MotionSensorBase
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
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.

Protected Methods

Method Description
Dispose ( System.Boolean disposing ) : void

Releaseses all resources used this object.

Private Methods

Method Description
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.

Method Details

Dispose() public method

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
return void

Dispose() protected method

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. ///
return void

InterruptPoll() public method

Interrupts the poll cycle.
public InterruptPoll ( ) : void
return void

MotionSensorComponent() public method

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

MotionSensorComponent() public method

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. ///
return System

Poll() public method

Polls the input pin status.
/// This instance has been disposed. /// /// The specified pin is configured for output instead of input. ///
public Poll ( ) : void
return void