public void OnModulationMode(AtscTransmissionMedium transmissionMedium, byte index, TransmissionSystem transmissionSystem, BinaryConvolutionCodeRate innerCodingMode, bool isSplitBitstreamMode, ModulationType modulationFormat, int symbolRate) { if (transmissionMedium != AtscTransmissionMedium.Cable) { return; } _modulationModes[index] = modulationFormat; }
public void OnModulationMode(AtscTransmissionMedium transmissionMedium, byte index, TransmissionSystem transmissionSystem, BinaryConvolutionCodeRate innerCodingMode, bool isSplitBitstreamMode, ModulationType modulationFormat, int symbolRate) { if (transmissionMedium != AtscTransmissionMedium.Cable) { return; } _modulationModes[index] = modulationFormat; }
private void DecodeModulationMode(byte[] section, int endOfSection, ref int pointer, ref byte firstIndex, AtscTransmissionMedium transmissionMedium) { if (pointer + 6 > endOfSection) { throw new Exception(string.Format("NIT: corruption detected at modulation mode, pointer = {0}, end of section = {1}", pointer, endOfSection)); } TransmissionSystem transmissionSystem = (TransmissionSystem)(section[pointer] >> 4); BinaryConvolutionCodeRate innerCodingMode = BinaryConvolutionCodeRate.RateNotDefined; switch (section[pointer] & 0x0f) { case 0: innerCodingMode = BinaryConvolutionCodeRate.Rate5_11; break; case 1: innerCodingMode = BinaryConvolutionCodeRate.Rate1_2; break; case 3: innerCodingMode = BinaryConvolutionCodeRate.Rate3_5; break; case 5: innerCodingMode = BinaryConvolutionCodeRate.Rate2_3; break; case 7: innerCodingMode = BinaryConvolutionCodeRate.Rate3_4; break; case 8: innerCodingMode = BinaryConvolutionCodeRate.Rate4_5; break; case 9: innerCodingMode = BinaryConvolutionCodeRate.Rate5_6; break; case 11: innerCodingMode = BinaryConvolutionCodeRate.Rate7_8; break; case 15: // concatenated coding not used innerCodingMode = BinaryConvolutionCodeRate.RateNotSet; break; } pointer++; bool isSplitBitstreamMode = ((section[pointer] & 0x80) != 0); ModulationType modulationFormat = ModulationType.ModNotSet; switch (section[pointer] & 0x1f) { case 1: modulationFormat = ModulationType.ModQpsk; break; case 2: modulationFormat = ModulationType.ModBpsk; break; case 3: modulationFormat = ModulationType.ModOqpsk; break; case 4: modulationFormat = ModulationType.Mod8Vsb; break; case 5: modulationFormat = ModulationType.Mod16Vsb; break; case 6: modulationFormat = ModulationType.Mod16Qam; break; case 7: modulationFormat = ModulationType.Mod32Qam; break; case 8: modulationFormat = ModulationType.Mod64Qam; break; case 9: modulationFormat = ModulationType.Mod80Qam; break; case 10: modulationFormat = ModulationType.Mod96Qam; break; case 11: modulationFormat = ModulationType.Mod112Qam; break; case 12: modulationFormat = ModulationType.Mod128Qam; break; case 13: modulationFormat = ModulationType.Mod160Qam; break; case 14: modulationFormat = ModulationType.Mod192Qam; break; case 15: modulationFormat = ModulationType.Mod224Qam; break; case 16: modulationFormat = ModulationType.Mod256Qam; break; case 17: modulationFormat = ModulationType.Mod320Qam; break; case 18: modulationFormat = ModulationType.Mod384Qam; break; case 19: modulationFormat = ModulationType.Mod448Qam; break; case 20: modulationFormat = ModulationType.Mod512Qam; break; case 21: modulationFormat = ModulationType.Mod640Qam; break; case 22: modulationFormat = ModulationType.Mod768Qam; break; case 23: modulationFormat = ModulationType.Mod896Qam; break; case 24: modulationFormat = ModulationType.Mod1024Qam; break; } pointer++; // s/s int symbolRate = ((section[pointer] & 0x0f) << 24) + (section[pointer + 1] << 16) + (section[pointer + 2] << 8) + section[pointer + 3]; pointer += 4; Log.Log.Debug("NIT: modulation mode, transmission system = {0}, inner coding mode = {1}, is split bitstream mode = {2}, modulation format = {3}, symbol rate = {4} s/s", transmissionSystem, innerCodingMode, isSplitBitstreamMode, modulationFormat, symbolRate); if (OnModulationMode != null) { OnModulationMode(transmissionMedium, firstIndex++, transmissionSystem, innerCodingMode, isSplitBitstreamMode, modulationFormat, symbolRate); } }
public override double FindBreakdownFuel(double averageSpeed) { return(base.FindBreakdownFuel(averageSpeed) * TransmissionSystem.GetCoefficient(transmission_brand)); }