C# Класс CyrusBuilt.MonoPi.Components.Sensors.SensorBase

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

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

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