C# 클래스 CyrusBuilt.MonoPi.Components.Sensors.SensorBase

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

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Components.Sensors.SensorBase object.

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

HasProperty ( String key ) : System.Boolean

Determines whether this instance has property the specified key.

IsState ( SensorState state ) : System.Boolean

Determines whether this sensor's state is the specified state.

ToString ( ) : string

Returns a System.String that represents the current CyrusBuilt.MonoPi.Components.Sensors.SensorBase.

보호된 메소드들

메소드 설명
Dispose ( System.Boolean disposing ) : void

Releaseses all resources used this object.

OnStateChanged ( SensorStateChangedEventArgs e ) : void

Raises the state changed event.

SensorBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorBase class. This is the default constructor.

SensorBase ( IGpio pin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorBase class with the pin being used to read the sensor input.

메소드 상세

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.Components.Sensors.SensorBase object.
Call CyrusBuilt.MonoPi.Components.Sensors.SensorBase.Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Sensors.SensorBase. The CyrusBuilt.MonoPi.Components.Sensors.SensorBase.Dispose method leaves the CyrusBuilt.MonoPi.Components.Sensors.SensorBase in an unusable state. After calling CyrusBuilt.MonoPi.Components.Sensors.SensorBase.Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Sensors.SensorBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Sensors.SensorBase 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 sensor's state is the specified state.
public IsState ( SensorState state ) : System.Boolean
state SensorState /// The state to check. ///
리턴 System.Boolean

OnStateChanged() 보호된 메소드

Raises the state changed event.
protected OnStateChanged ( SensorStateChangedEventArgs e ) : void
e SensorStateChangedEventArgs /// The event arguments. ///
리턴 void

SensorBase() 보호된 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorBase class. This is the default constructor.
protected SensorBase ( ) : System
리턴 System

SensorBase() 보호된 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Sensors.SensorBase class with the pin being used to read the sensor input.
/// cannot be null. ///
protected SensorBase ( IGpio pin ) : System
pin IGpio /// The pin being used to read the sensor input. ///
리턴 System

ToString() 공개 메소드

Returns a System.String that represents the current CyrusBuilt.MonoPi.Components.Sensors.SensorBase.
public ToString ( ) : string
리턴 string