C# Class GSF.Threading.StateMachine

Helps facilitate a multithreaded state machine.
State machine variables must be integers since Interlocked methods require premitive types.
ファイルを表示 Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
SetState ( int state ) : void

Sets the value of the state.

StateMachine ( int initialState ) : System.Threading

Creates a new StateMachine

TryChangeState ( int prevState, int nextState ) : bool

Attempts to change the state of this machine from to .

Method Details

SetState() public method

Sets the value of the state.
public SetState ( int state ) : void
state int
return void

StateMachine() public method

Creates a new StateMachine
public StateMachine ( int initialState ) : System.Threading
initialState int the state to initially set to
return System.Threading

TryChangeState() public method

Attempts to change the state of this machine from to .
public TryChangeState ( int prevState, int nextState ) : bool
prevState int The state to change from
nextState int The state to change to
return bool