예제 #1
0
        public void Start(Radio.SamplesAvailableDelegate callback)
        {
            if (this._LimeDev == null)
            {
                throw new ApplicationException("No device selected");
            }


            _callback = callback;

            try
            {
                _LimeDev.Start();
            }
            catch
            {
                this.Open();
                _LimeDev.Start();
            }
        }
예제 #2
0
        public void Start(Radio.SamplesAvailableDelegate callback)
        {
            try
            {
                _gui.grpChannel.Enabled         = false;
                _gui.samplerateComboBox.Enabled = false;

                if (this._LimeDev == null)
                {
                    _LimeDev = new LimeSDRDevice(this);
                    _LimeDev.SamplesAvailable  += LimeDevice_SamplesAvailable;
                    _LimeDev.SampleRateChanged += LimeSDRDevice_SampleRateChanged;
                    _LimeDev.SampleRate         = _sampleRate;
                }

                _callback = callback;

                if (!_LimeDev.Open(RadioName))
                {
                    _LimeDev.Close();
                    _LimeDev.Open(RadioName);
                }

                _LimeDev.GFIR_BPF_Width = _gui._GFIR_BPF_Width;
                _LimeDev.LPBW           = _gui.LPBW;
                _LimeDev.SampleRate     = _sampleRate;
                _LimeDev.Start(_channel, _lpbw, _gain, _ant, _sampleRate, _specOffset);
                _LimeDev.LPBW = _gui.LPBW;

                _isStreaming = true;
                _gui.btnRadioInfo.Enabled    = true;
                _gui.btnRadioRefresh.Enabled = false;
            }
            catch (Exception ex)
            {
                _gui.grpChannel.Enabled         = true;
                _gui.samplerateComboBox.Enabled = true;
                Debug.Write(ex.ToString());
            }
        }