private static extern DVBError _GetChannel(IntPtr classPointer, out Channel_C rChannel);
private static extern DVBError _SetChannel(IntPtr classPointer, Channel_C rChannel, bool bPowerOnly);
private static extern DVBError _GetChannel( IntPtr classPointer, out Channel_C rChannel );
/// <summary> /// Wählt eine Quellgruppe an. /// </summary> /// <param name="group">Die Daten zur Quellgruppe.</param> /// <returns>Gesetzt, wenn es sich um eine DVB-C Quellgruppe handelt.</returns> private Channel_C?Tune(CableGroup group) { // Not us if (group == null) { return(null); } // Validate if (FrontendType != FrontendType.Cable) { throw new DVBException("Expected " + FrontendType.ToString() + " Channel"); } // Helper var data = new Channel_C { Frequency = group.Frequency, SymbolRate = group.SymbolRate, }; // Spectrum inversion switch (group.SpectrumInversion) { case SpectrumInversions.On: data.Inversion = SpectrumInversion.On; break; case SpectrumInversions.Off: data.Inversion = SpectrumInversion.Off; break; case SpectrumInversions.Auto: data.Inversion = SpectrumInversion.Auto; break; default: data.Inversion = SpectrumInversion.Auto; break; } // Modulation switch (group.Modulation) { case CableModulations.QAM16: data.Qam = Qam.Qam16; break; case CableModulations.QAM32: data.Qam = Qam.Qam32; break; case CableModulations.QAM64: data.Qam = Qam.Qam64; break; case CableModulations.QAM128: data.Qam = Qam.Qam128; break; case CableModulations.QAM256: data.Qam = Qam.Qam256; break; default: data.Qam = Qam.Qam64; break; } // Check supported modes switch (group.Bandwidth) { case Bandwidths.Six: data.Bandwidth = BandwidthType.Six; break; case Bandwidths.Seven: data.Bandwidth = BandwidthType.Seven; break; case Bandwidths.Eight: data.Bandwidth = BandwidthType.Eight; break; case Bandwidths.NotDefined: data.Bandwidth = BandwidthType.None; break; default: data.Bandwidth = BandwidthType.Auto; break; } // Process return(data.SetChannel(this)); }
private static extern DVBError _SetChannel( IntPtr classPointer, Channel_C rChannel, bool bPowerOnly );