Esempio n. 1
0
        public virtual IEnumerator <ITask> SetOutputCHandler(SetOutputC update)
        {
            // If we are connected, send the speed to the robot
            if (ensureHardwareController())
            {
                _brickConnection.SetOutputC(update.Body);
                _state.TimeStamp = DateTime.Now;
                _state.OutputC   = update.Body ? 1 : 0;
            }

            // Send Notifications to subscribers
            _subMgrPort.Post(new submgr.Submit(update, DsspActions.UpdateRequest));

            update.ResponsePort.Post(DefaultUpdateResponseType.Instance);
            yield break;
        }
        public virtual IEnumerator<ITask> SetOutputCHandler(SetOutputC update)
        {
            // If we are connected, send the speed to the robot
            if (ensureHardwareController())
            {
                _brickConnection.SetOutputC(update.Body);
                _state.TimeStamp = DateTime.Now;
                _state.OutputC = update.Body ? 1 : 0;
            }

            // Send Notifications to subscribers
            _subMgrPort.Post(new submgr.Submit(update, DsspActions.UpdateRequest));

            update.ResponsePort.Post(DefaultUpdateResponseType.Instance);
            yield break;
        }