C# Class CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceBase

Base class for fireplace device abstractions.
Inheritance: DeviceBase, IFireplace
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
CancelTimeout ( ) : void

Cancels a timeout.

Dispose ( ) : void

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

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

Off ( ) : void

Turns the fireplace off.

On ( ) : void

Turns the fireplace on.

On ( double timeoutDelay, TimeUnit timeoutUnit ) : void

Turns the fireplace on with the specified timeout. If the operation is not successful within the allotted time, the operation is cancelled for safety reasons.

SetTimeout ( double delay, TimeUnit unit ) : void

Sets the timeout delay.

Shutdown ( ) : void

Shutdown the fireplace.

Protected Methods

Method Description
CancelTimeoutTask ( ) : void

Cancels the timeout task (if running).

FireplaceBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceBase class. This is the default constructor.

OnOperationTimedOut ( FireplaceTimeoutEventArgs e ) : void

Raises the operation timed out event.

OnPilotLightStateChanged ( FireplacePilotLightEventArgs e ) : void

Raises the pilot light state changed event.

OnStateChanged ( FireplaceStateChangedEventArgs e ) : void

Raises the state changed event.

StartCancelTask ( ) : void

Starts the cancel task. This will start a task that turns off

Private Methods

Method Description
InternalStateChangeHandler ( Object sender, FireplaceStateChangedEventArgs e ) : void

An internal handler for the state change event.

Method Details

CancelTimeout() public method

Cancels a timeout.
public CancelTimeout ( ) : void
return void

CancelTimeoutTask() protected method

Cancels the timeout task (if running).
protected CancelTimeoutTask ( ) : void
return void

Dispose() public method

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

FireplaceBase() protected method

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.Fireplace.FireplaceBase class. This is the default constructor.
protected FireplaceBase ( ) : System
return System

Off() public method

Turns the fireplace off.
public Off ( ) : void
return void

On() public method

Turns the fireplace on.
public On ( ) : void
return void

On() public method

Turns the fireplace on with the specified timeout. If the operation is not successful within the allotted time, the operation is cancelled for safety reasons.
public On ( double timeoutDelay, TimeUnit timeoutUnit ) : void
timeoutDelay double /// The timeout delay. ///
timeoutUnit TimeUnit /// The time unit of measure for the timeout. ///
return void

OnOperationTimedOut() protected method

Raises the operation timed out event.
protected OnOperationTimedOut ( FireplaceTimeoutEventArgs e ) : void
e FireplaceTimeoutEventArgs /// The event arguments. ///
return void

OnPilotLightStateChanged() protected method

Raises the pilot light state changed event.
protected OnPilotLightStateChanged ( FireplacePilotLightEventArgs e ) : void
e FireplacePilotLightEventArgs /// The event arguments. ///
return void

OnStateChanged() protected method

Raises the state changed event.
protected OnStateChanged ( FireplaceStateChangedEventArgs e ) : void
e FireplaceStateChangedEventArgs /// The event arguments. ///
return void

SetTimeout() public method

Sets the timeout delay.
public SetTimeout ( double delay, TimeUnit unit ) : void
delay double /// The timeout delay. ///
unit TimeUnit /// The time unit of measure for the timeout. ///
return void

Shutdown() public method

Shutdown the fireplace.
public Shutdown ( ) : void
return void

StartCancelTask() protected method

Starts the cancel task. This will start a task that turns off
protected StartCancelTask ( ) : void
return void