| ControlStateMachine Class | 
The Control State Machine implements a finite-state machine (FSM). It can only be in one of the States defined, being the CurrentState. Each State has its own transition table, TransitionTable, defining conditions for changing to a new state, and an Action is associated to every state.
Actions can be reused by several states, but actions cannot (should not) be reused between by several ControlStateMachine's.
 Inheritance Hierarchy
Inheritance HierarchyNamespace: DHI.Mike1D.ControlModule
 Syntax
SyntaxThe ControlStateMachine type exposes the following members.
 Constructors
Constructors| Name | Description | |
|---|---|---|
|  | ControlStateMachine | 
            Default constructor
             | 
|  | ControlStateMachine(Boolean) | 
            Constructor
             | 
|  | ControlStateMachine(String) | 
            Constructor
             | 
 Properties
Properties| Name | Description | |
|---|---|---|
|  | Actions | 
            Actions in the state machine. 
             Actions may be reused, so number of actions may be less than number of states. Do not modify this list. | 
|  | CurrentState | 
            The current state of the machine.
             | 
|  | Id | 
            The Id of the machine.
             | 
|  | IsActive | 
            Shows if the control state machine is active.
             | 
|  | States | 
            States in the state machine. 
             Do not modify this list. Use CreateState(IAction) to add to list. | 
 Methods
Methods| Name | Description | |
|---|---|---|
|  | Activate |  Activate the control state machine  | 
|   | CreateSimpleControl | 
            Create a simple control that at every time step applies the specified action.
             | 
|  | CreateState | 
            Create a new state, add it to the state machine and
            return it.
             | 
|  | Deactivate |  Deactivate the control state machine  | 
|  | Equals | Determines whether the specified object is equal to the current object.(Inherited from Object.) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) | 
|  | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
|  | GetOrCreateAction | 
            Get action with id, or create it if it does not exist
             | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | Initialize | 
            Initialize state machine
             | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(Inherited from Object.) | 
|  | ReplaceAction | 
            Replace one action with a new action, updating the Actions list
            and also the action in all states.
             | 
|  | Reset | 
            Reset the state machine and all the states.
             | 
|  | SetGlobalStateTransitionTable | 
            Set the same transition table to all states
             | 
|  | SetStateTransitionTable | 
            Set the same transition table to all states
             | 
|  | ToString | Returns a string that represents the current object.(Inherited from Object.) | 
|  | Update | 
            Update control state machine for the given time interval
             | 
|  | UpdateStateAction | |
|  | Validate | 
            Validate state machine and all states.
             | 
 See Also
See Also