C# Class 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.
Inheritance: FireplaceBase
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
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".

Private Methods

Method Description
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.

Method Details

Dispose() public method

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
return void

FireplaceDevice() public method

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. ///
return System

FireplaceDevice() public method

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. ///
return System

FireplaceDevice() public method

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". ///
return System

FireplaceDevice() public method

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". ///
return System