Exemplo n.º 1
0
        /// <summary>
        /// The DSP must be initialized before any signal processing, including signal strength measurement, can commence. When initializing the demodulator the full path to a valid calibration data file may be provided if signal strength measuremen must be calibrated. If not so, the passed pointer should be NULL.
        /// </summary>
        /// <param name="calibrateDataPath">The file containing the calibration data for the receiver in use.</param>
        /// <returns>Returns <see cref="G313Demodulator"/> context of demodulator.</returns>
        public G313Demodulator Demodulator(string calibrateDataPath = null)
        {
            if (DemodulatorInitialized)
            {
                return(_demodulator);
            }

            DemodulatorInitialized = G313Api.InitializeDemodulator(GetHandle(), calibrateDataPath);
            if (!DemodulatorInitialized)
            {
                throw new InvalidOperationException("failed to initialize demodulator.");
            }
            _demodulator.SetupStreams();

            return(_demodulator);
        }