C# Class HA4IoT.Actuators.StateMachines.StateMachine

Inheritance: ActuatorBase, IStateMachine
Show file Open project: chkr1011/CK.HomeAutomation Class Usage Examples

Public Methods

Method Description
AddState ( IStateMachineState state ) : void
GetNextState ( ComponentState stateId ) : ComponentState
GetState ( ) : ComponentState
GetSupportedStates ( ) : IList
HandleApiCall ( IApiContext apiContext ) : void
ResetState ( ) : void
SetInitialState ( ComponentState id ) : void
SetState ( ComponentState id ) : void
SetStateIdAlias ( ComponentState stateId, ComponentState alias ) : void
StateMachine ( ComponentId id ) : System
SupportsState ( ComponentState stateId ) : bool
WithTurnOffIfStateIsAppliedTwice ( ) : StateMachine

Protected Methods

Method Description
OnActiveStateChanged ( IStateMachineState oldState, IStateMachineState newState ) : void

Private Methods

Method Description
GetState ( ComponentState id ) : IStateMachineState
ThrowIfNoStatesAvailable ( ) : void
ThrowIfStateNotSupported ( ComponentState stateId ) : void

Method Details

AddState() public method

public AddState ( IStateMachineState state ) : void
state IStateMachineState
return void

GetNextState() public method

public GetNextState ( ComponentState stateId ) : ComponentState
stateId ComponentState
return ComponentState

GetState() public method

public GetState ( ) : ComponentState
return ComponentState

GetSupportedStates() public method

public GetSupportedStates ( ) : IList
return IList

HandleApiCall() public method

public HandleApiCall ( IApiContext apiContext ) : void
apiContext IApiContext
return void

OnActiveStateChanged() protected method

protected OnActiveStateChanged ( IStateMachineState oldState, IStateMachineState newState ) : void
oldState IStateMachineState
newState IStateMachineState
return void

ResetState() public method

public ResetState ( ) : void
return void

SetInitialState() public method

public SetInitialState ( ComponentState id ) : void
id ComponentState
return void

SetState() public method

public SetState ( ComponentState id ) : void
id ComponentState
return void

SetStateIdAlias() public method

public SetStateIdAlias ( ComponentState stateId, ComponentState alias ) : void
stateId ComponentState
alias ComponentState
return void

StateMachine() public method

public StateMachine ( ComponentId id ) : System
id ComponentId
return System

SupportsState() public method

public SupportsState ( ComponentState stateId ) : bool
stateId ComponentState
return bool

WithTurnOffIfStateIsAppliedTwice() public method

public WithTurnOffIfStateIsAppliedTwice ( ) : StateMachine
return StateMachine