public CableDelivery(IDescriptorContainer container, int offset, int length) : base(container, offset, length) { // Not possible if (11 != length) return; // Attach to section Section section = container.Section; // Load parts uint freq0 = (uint)Tools.FromBCD(section[offset + 0]); uint freq1 = (uint)Tools.FromBCD(section[offset + 1]); uint freq2 = (uint)Tools.FromBCD(section[offset + 2]); uint freq3 = (uint)Tools.FromBCD(section[offset + 3]); uint rate0 = (uint)Tools.FromBCD(section[offset + 7]); uint rate1 = (uint)Tools.FromBCD(section[offset + 8]); uint rate2 = (uint)Tools.FromBCD(section[offset + 9]); uint rate3 = (uint)Tools.FromBCD((byte)(section[offset + 10] & 0xf0)); // Load all SymbolRate = (rate3 + 100 * (rate2 + 100 * (rate1 + 100 * rate0))) / 10; Frequency = freq3 + 100 * (freq2 + 100 * (freq1 + 100 * freq0)); InnerFEC = (InnerFECs)(section[offset + 10] & 0x0f); Modulation = (CableModulations)section[offset + 6]; OuterFEC = (OuterFECs)(section[offset + 5] & 0x0f); // We are valid m_Valid = true; }
/// <summary> /// Erstellt eine neue Beschreibung. /// </summary> /// <param name="container">Die Sammlung aller Beschreibungen.</param> /// <param name="offset">Das erste Rohdatenbyte zu dieser Beschreibung.</param> /// <param name="length">Die Größe der Beschreibung im Rohformat.</param> public CableDelivery(IDescriptorContainer container, int offset, int length) : base(container, offset, length) { // Not possible if (11 != length) { return; } // Attach to section Section section = container.Section; // Load parts uint freq0 = (uint)Tools.FromBCD(section[offset + 0]); uint freq1 = (uint)Tools.FromBCD(section[offset + 1]); uint freq2 = (uint)Tools.FromBCD(section[offset + 2]); uint freq3 = (uint)Tools.FromBCD(section[offset + 3]); uint rate0 = (uint)Tools.FromBCD(section[offset + 7]); uint rate1 = (uint)Tools.FromBCD(section[offset + 8]); uint rate2 = (uint)Tools.FromBCD(section[offset + 9]); uint rate3 = (uint)Tools.FromBCD((byte)((section[offset + 10] >> 4) & 0xf)); // Load all SymbolRate = (rate3 + 10 * (rate2 + 100 * (rate1 + 100 * rate0))) / 10; Frequency = (freq3 + 100 * (freq2 + 100 * (freq1 + 100 * freq0))) / 10; InnerFEC = (InnerFECs)(section[offset + 10] & 0x0f); Modulation = (CableModulations)section[offset + 6]; OuterFEC = (OuterFECs)(section[offset + 5] & 0x0f); // We are valid m_Valid = true; }
/// <summary> /// Erstellt eine neue Beschreibung. /// </summary> /// <param name="container">Die Sammlung aller Beschreibungen.</param> /// <param name="offset">Das erste Byte in den Rohdaten zu dieser Beschreibung.</param> /// <param name="length">Die Größe der Beschreibung in den Rohdaten.</param> public SatelliteDelivery(IDescriptorContainer container, int offset, int length) : base(container, offset, length) { // Not possible if (11 != length) { return; } // Attach to section Section section = container.Section; // Load parts uint freq0 = (uint)Tools.FromBCD(section[offset + 0]); uint freq1 = (uint)Tools.FromBCD(section[offset + 1]); uint freq2 = (uint)Tools.FromBCD(section[offset + 2]); uint freq3 = (uint)Tools.FromBCD(section[offset + 3]); ushort orb0 = (ushort)Tools.FromBCD(section[offset + 4]); ushort orb1 = (ushort)Tools.FromBCD(section[offset + 5]); uint rate0 = (uint)Tools.FromBCD(section[offset + 7]); uint rate1 = (uint)Tools.FromBCD(section[offset + 8]); uint rate2 = (uint)Tools.FromBCD(section[offset + 9]); uint rate3 = (uint)Tools.FromBCD((byte)((section[offset + 10] >> 4) & 0xf)); // Flags byte flags = section[offset + 6]; // Load all Frequency = (freq3 + 100 * (freq2 + 100 * (freq1 + 100 * freq0))) * 10; SymbolRate = (rate3 + 10 * (rate2 + 100 * (rate1 + 100 * rate0))) / 10; Polarization = (Polarizations)((flags >> 5) & 0x03); InnerFEC = (InnerFECs)(section[offset + 10] & 0x0f); OrbitalPosition = (ushort)(orb1 + 100 * orb0); West = (0x00 == (0x80 & flags)); Modulation = (byte)(flags & 0x1f); // We are valid m_Valid = true; }
public SatelliteDelivery(IDescriptorContainer container, int offset, int length) : base(container, offset, length) { // Not possible if (11 != length) return; // Attach to section Section section = container.Section; // Load parts uint freq0 = (uint)Tools.FromBCD(section[offset + 0]); uint freq1 = (uint)Tools.FromBCD(section[offset + 1]); uint freq2 = (uint)Tools.FromBCD(section[offset + 2]); uint freq3 = (uint)Tools.FromBCD(section[offset + 3]); ushort orb0 = (ushort)Tools.FromBCD(section[offset + 4]); ushort orb1 = (ushort)Tools.FromBCD(section[offset + 5]); uint rate0 = (uint)Tools.FromBCD(section[offset + 7]); uint rate1 = (uint)Tools.FromBCD(section[offset + 8]); uint rate2 = (uint)Tools.FromBCD(section[offset + 9]); uint rate3 = (uint)Tools.FromBCD((byte)(section[offset + 10] & 0xf0)); // Flags byte flags = section[offset + 6]; // Load all Frequency = freq3 + 100 * (freq2 + 100 * (freq1 + 100 * freq0)); SymbolRate = (rate3 + 100 * (rate2 + 100 * (rate1 + 100 * rate0))) / 10; Polarization = (Polarizations)((flags >> 5) & 0x03); InnerFEC = (InnerFECs)(section[offset + 10] & 0x0f); OrbitalPosition = (ushort)(orb1 + 100 * orb0); West = (0x00 == (0x80 & flags)); Modulation = (byte)(flags & 0x1f); // We are valid m_Valid = true; }