Opc.Ua.Server.StateMachine.ForceState C# (CSharp) Method

ForceState() public method

Sets the state for the machine without generating any events.
public ForceState ( QualifiedName stateName ) : void
stateName QualifiedName
return void
        public virtual void ForceState(QualifiedName stateName)
        {
            lock (DataLock)
            {
                State state = null;

                if (!m_states.TryGetValue(stateName, out state))
                {
                    throw ServiceResultException.Create(StatusCodes.BadBrowseNameInvalid, "Must specify a valid state.");
                }
                
                UpdateState(state, null);
            }
        }