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

Base class for fireplace device abstractions.
Inheritance: DeviceBase, IFireplace
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

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

Méthodes protégées

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

Méthode Description
InternalStateChangeHandler ( Object sender, FireplaceStateChangedEventArgs e ) : void

An internal handler for the state change event.

Method Details

CancelTimeout() public méthode

Cancels a timeout.
public CancelTimeout ( ) : void
Résultat void

CancelTimeoutTask() protected méthode

Cancels the timeout task (if running).
protected CancelTimeoutTask ( ) : void
Résultat void

Dispose() public méthode

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

FireplaceBase() protected méthode

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

Off() public méthode

Turns the fireplace off.
public Off ( ) : void
Résultat void

On() public méthode

Turns the fireplace on.
public On ( ) : void
Résultat void

On() public méthode

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

OnOperationTimedOut() protected méthode

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

OnPilotLightStateChanged() protected méthode

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

OnStateChanged() protected méthode

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

SetTimeout() public méthode

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

Shutdown() public méthode

Shutdown the fireplace.
public Shutdown ( ) : void
Résultat void

StartCancelTask() protected méthode

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