C# 클래스 CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent

A power control component implemented using a single native GPIO configured as an output.
상속: PowerBase
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

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

GpioPowerComponent ( IRaspiGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent class with the GPIO pin that will be used to control the component.

GpioPowerComponent ( IRaspiGpio pin, PinState onState, PinState offState ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent class with the GPIO pin that will be used to control the component and the pin states that will be used to consider the device on or off.

비공개 메소드들

메소드 설명
Output_StateChanged ( Object sender, PinStateChangeEventArgs e ) : void

Handles the pin state change event by firing the corresponding power state change event.

메소드 상세

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent was occupying.
public Dispose ( ) : void
리턴 void

GpioPowerComponent() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent class with the GPIO pin that will be used to control the component.
public GpioPowerComponent ( IRaspiGpio pin ) : System
pin IRaspiGpio /// The GPIO pin that will be used to control the component. ///
리턴 System

GpioPowerComponent() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent class with the GPIO pin that will be used to control the component and the pin states that will be used to consider the device on or off.
public GpioPowerComponent ( IRaspiGpio pin, PinState onState, PinState offState ) : System
pin IRaspiGpio /// The GPIO pin that will be used to control the component. ///
onState PinState /// The pin state to consider the device "on". ///
offState PinState /// The pin state to consider the device "off". ///
리턴 System