Example #1
0
        public void ReStart()
        {
            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;
                }

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

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

                _isStreaming = true;
            }
            catch (Exception ex)
            {
                _gui.grpChannel.Enabled         = true;
                _gui.samplerateComboBox.Enabled = true;
                Debug.Write(ex.ToString());
            }
        }
Example #2
0
        public void Close()
        {
            if (_LimeDev == null)
            {
                return;
            }

            _LimeDev.SamplesAvailable  -= LimeDevice_SamplesAvailable;
            _LimeDev.SampleRateChanged -= LimeSDRDevice_SampleRateChanged;
            _LimeDev.Dispose();
            _LimeDev = null;
        }
Example #3
0
 public void Open()
 {
     try
     {
         _LimeDev = new LimeSDRDevice(this);
         _LimeDev.SamplesAvailable  += LimeDevice_SamplesAvailable;
         _LimeDev.SampleRateChanged += new EventHandler(this.LimeSDRDevice_SampleRateChanged);
         _LimeDev.SampleRate         = _sampleRate;
     }
     catch (Exception ex)
     {
         Debug.Write(ex.ToString());
     }
 }
Example #4
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());
            }
        }
Example #5
0
 public void Open()
 {
     _LimeDev = new LimeSDRDevice();
     _LimeDev.SamplesAvailable  += LimeDevice_SamplesAvailable;
     _LimeDev.SampleRateChanged += LimeSDRDevice_SampleRateChanged;
 }