WaitState¶
-
void IStateMachine.WaitState(System.Collections.IEnumerable<T> states, double timeout)¶
Waits until the state of the state machine changes to one of the specified states, or the timeout interval is exceeded.
- Parameters
states – States to wait for.
timeout – Interval in seconds to wait for the specified states. Negative value means infinite.
- Throws
NullArgumentException– Null reference was passed.InvalidArgumentException– One or more unknown states specified, empty collection of states specified, or invalid timeout (NaN).OutOfResourcesException– No resources available to wait for states.AbortedException– Wait was aborted due to external influences, see logging for details.TimeoutException– Timeout interval exceeded while waiting for states.CommunicationErrorException– Protocol error.ConnectionLostException– Connection to controller lost.RebootedException– Controller has been rebooted since this object reference was retrieved, invalidating this reference.IncompatibleException– Incompatible firmware version loaded (only applicable if entity is a controller).System.ObjectDisposedException– Object is disposed.
- Remarks
If the state already matches one of the specified states, this method returns immediately. Execution requires one subscription resource per specified state.