C# Класс CyrusBuilt.MonoPi.Components.Relays.RelayBase

Base class for relay abstraction components.
Наследование: IRelay
Показать файл Открыть проект

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

Метод Описание
Close ( ) : void

Closes the dry contacts on the relay.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Relays.RelayBase object.

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

HasProperty ( String key ) : System.Boolean

Determines whether this instance has property the specified key.

IsState ( RelayState state ) : System.Boolean

Determines whether this relay's state matches the specified state.

Open ( ) : void

Opens the dry contacts on the relay.

Pulse ( ) : void

Pulses the relay on and off.

Pulse ( Int32 millis ) : void

Pulses the relay on for the specified number of milliseconds, then back off again.

ToString ( ) : string

Returns a String that represents the current CyrusBuilt.MonoPi.Components.Relays.RelayBase.

Toggle ( ) : void

Toggles the state of the relay (closed, then open).

Защищенные методы

Метод Описание
Dispose ( System.Boolean disposing ) : void

Releaseses all resources used this object.

OnPulseStart ( EventArgs e ) : void

Raises the pulse start event.

OnPulseStop ( EventArgs e ) : void

Raises the pulse stop event.

OnStateChanged ( RelayStateChangedEventArgs e ) : void

Raises the state changed event.

RelayBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Relays.RelayBase class. This is the default constructor.

RelayBase ( IGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Relays.RelayBase class with the pin being used to control the relay.

Описание методов

Close() публичный Метод

Closes the dry contacts on the relay.
public Close ( ) : void
Результат void

Dispose() публичный Метод

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

HasProperty() публичный Метод

Determines whether this instance has property the specified key.
public HasProperty ( String key ) : System.Boolean
key String /// The key name of the property to check for. ///
Результат System.Boolean

IsState() публичный Метод

Determines whether this relay's state matches the specified state.
public IsState ( RelayState state ) : System.Boolean
state RelayState /// The state to check for. ///
Результат System.Boolean

OnPulseStart() защищенный Метод

Raises the pulse start event.
protected OnPulseStart ( EventArgs e ) : void
e System.EventArgs /// The event arguments. ///
Результат void

OnPulseStop() защищенный Метод

Raises the pulse stop event.
protected OnPulseStop ( EventArgs e ) : void
e System.EventArgs /// The event arguments. ///
Результат void

OnStateChanged() защищенный Метод

Raises the state changed event.
protected OnStateChanged ( RelayStateChangedEventArgs e ) : void
e RelayStateChangedEventArgs /// The event arguments. ///
Результат void

Open() публичный Метод

Opens the dry contacts on the relay.
public Open ( ) : void
Результат void

Pulse() публичный Метод

Pulses the relay on and off.
public Pulse ( ) : void
Результат void

Pulse() публичный Метод

Pulses the relay on for the specified number of milliseconds, then back off again.
/// Cannot pulse using a pin that is not configured as an output. ///
public Pulse ( Int32 millis ) : void
millis System.Int32 /// The number of milliseconds to wait before switching back off. ///
Результат void

RelayBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Relays.RelayBase class. This is the default constructor.
protected RelayBase ( ) : System
Результат System

RelayBase() защищенный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Relays.RelayBase class with the pin being used to control the relay.
/// cannot null. ///
protected RelayBase ( IGpio pin ) : System
pin IGpio /// The output pin being used to control the relay. ///
Результат System

ToString() публичный Метод

Returns a String that represents the current CyrusBuilt.MonoPi.Components.Relays.RelayBase.
public ToString ( ) : string
Результат string

Toggle() публичный Метод

Toggles the state of the relay (closed, then open).
public Toggle ( ) : void
Результат void