C# 클래스 CyrusBuilt.MonoPi.Components.Relays.RelayBase

Base class for relay abstraction components.
상속: IRelay
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
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