C# 클래스 CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice

A device that is an abstraction of a gas fireplace. This in an implementation of CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceBase.
상속: FireplaceBase
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice object.

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

FireplaceDevice ( IRelay controlRelay ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace.

FireplaceDevice ( IRelay controlRelay, ISensor pilotLightSensor ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace and the sensor used to detect whether or not the pilot light is lit.

FireplaceDevice ( IRelay controlRelay, RelayState onRelayState ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace and the relay state used to consider the fireplace to be "on".

FireplaceDevice ( IRelay controlRelay, RelayState onRelayState, ISensor pilotLightSensor, SensorState pilotOnState ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace, the relay state used to consider the fireplace to be "on", the sensor used to detect the pilot light, and the sensor state in which to consider the pilot light to be "on".

비공개 메소드들

메소드 설명
InternalHandleRelayStateChange ( Object sender, RelayStateChangedEventArgs e ) : void

Internal event handler for the relay state changed event. This fires the fireplace state changed event when the relay's state changes.

InternalHandleSensorStateChange ( Object sender, SensorStateChangedEventArgs e ) : void

Internal handler for the pilot light sensor state changed event. This fires pilot light state changed event when the pilot light's state changes.

메소드 상세

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice. The Dispose method leaves the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice was occupying.
public Dispose ( ) : void
리턴 void

FireplaceDevice() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace.
/// cannot be null. ///
public FireplaceDevice ( IRelay controlRelay ) : System
controlRelay IRelay /// The control relay. ///
리턴 System

FireplaceDevice() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace and the sensor used to detect whether or not the pilot light is lit.
/// cannot be null. ///
public FireplaceDevice ( IRelay controlRelay, ISensor pilotLightSensor ) : System
controlRelay IRelay /// The control relay. ///
pilotLightSensor ISensor /// The pilot light sensor. ///
리턴 System

FireplaceDevice() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace and the relay state used to consider the fireplace to be "on".
/// cannot be null. ///
public FireplaceDevice ( IRelay controlRelay, RelayState onRelayState ) : System
controlRelay IRelay /// The control relay. ///
onRelayState RelayState /// The relay state used to consider the fireplace to be "on". ///
리턴 System

FireplaceDevice() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceDevice class with the relay used to control the fireplace, the relay state used to consider the fireplace to be "on", the sensor used to detect the pilot light, and the sensor state in which to consider the pilot light to be "on".
/// cannot be null. ///
public FireplaceDevice ( IRelay controlRelay, RelayState onRelayState, ISensor pilotLightSensor, SensorState pilotOnState ) : System
controlRelay IRelay /// The control relay. ///
onRelayState RelayState /// The relay state used to consider the fireplace to be "on". ///
pilotLightSensor ISensor /// The pilot light sensor. ///
pilotOnState SensorState /// The pilot light state used to consider the pilot light to be "on". ///
리턴 System