C# Class CyrusBuilt.MonoPi.Components.Sensors.SensorBase

Base class for sensor abstraction components.
Inheritance: ISensor
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

Dispose() public méthode

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
Résultat void

Dispose() protected méthode

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. ///
Résultat void

HasProperty() public méthode

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. ///
Résultat System.Boolean

IsState() public méthode

Determines whether this sensor's state is the specified state.
public IsState ( SensorState state ) : System.Boolean
state SensorState /// The state to check. ///
Résultat System.Boolean

OnStateChanged() protected méthode

Raises the state changed event.
protected OnStateChanged ( SensorStateChangedEventArgs e ) : void
e SensorStateChangedEventArgs /// The event arguments. ///
Résultat void

SensorBase() protected méthode

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

SensorBase() protected méthode

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. ///
Résultat System

ToString() public méthode

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