Example #1
0
        public bool ChangeState(string newState)
        {
            State nextState = _currentState.ChangeState(newState, _systemId, _instanceId);

            if (nextState is null)
            {
                return(false);
            }

            // Reset timer
            _timer.Stop();
            _timer.Start();
            _currentState = nextState;
            return(true);
        }