C# Класс CyrusBuilt.MonoPi.Components.Power.GpioPowerComponent

A power control component implemented using a single native GPIO configured as an output.
Наследование: PowerBase
Показать файл Открыть проект

Открытые методы

Метод Описание
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