WaitState¶
-
virtual void IStateMachine::WaitState(const std::vector<T> &states, double timeout) = 0¶
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
CInvalidArgumentException
– One or more unknown states specified, empty vector of states specified, or invalid timeout (NaN).COutOfResourcesException
– No resources available to wait for states.CAbortedException
– Wait was aborted due to external influences, see logging for details.CTimeoutException
– Timeout interval exceeded while waiting for states.CCommunicationErrorException
– Protocol error.CConnectionLostException
– Connection to controller lost.CRebootedException
– Controller has been rebooted since this object reference was retrieved, invalidating this reference.CIncompatibleException
– Incompatible firmware version loaded (only applicable if entity is a controller).CObjectDestroyedException
– Object is destroyed.
- Remarks
If the state already matches one of the specified states, this method returns immediately. Execution requires one subscription resource per specified state.