public TDD_Info Decode(BitArrayInputStream input) { TDD_Info info = new TDD_Info(); info.InitDefaults(); BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1); int nBits = input.ReadBits(1) + 1; input.skipUnreadedBits(); info.eARFCN = input.ReadBits(nBits * 8); nBits = (input.ReadBit() == 0) ? 3 : 3; info.transmission_Bandwidth = (Transmission_Bandwidth)input.ReadBits(nBits); nBits = (input.ReadBit() == 0) ? 3 : 3; info.subframeAssignment = (SubframeAssignment)input.ReadBits(nBits); info.specialSubframe_Info = SpecialSubframe_Info.PerDecoder.Instance.Decode(input); if (stream.Read()) { input.skipUnreadedBits(); info.iE_Extensions = new List <ProtocolExtensionField>(); nBits = 0x10; int num5 = input.ReadBits(nBits) + 1; for (int i = 0; i < num5; i++) { ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input); info.iE_Extensions.Add(item); } } return(info); }
public TDD_Info Decode(BitArrayInputStream input) { TDD_Info info = new TDD_Info(); info.InitDefaults(); BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1); int nBits = input.ReadBits(1) + 1; input.skipUnreadedBits(); info.eARFCN = input.ReadBits(nBits * 8); nBits = (input.ReadBit() == 0) ? 3 : 3; info.transmission_Bandwidth = (Transmission_Bandwidth)input.ReadBits(nBits); nBits = (input.ReadBit() == 0) ? 3 : 3; info.subframeAssignment = (SubframeAssignment)input.ReadBits(nBits); info.specialSubframe_Info = SpecialSubframe_Info.PerDecoder.Instance.Decode(input); if (stream.Read()) { input.skipUnreadedBits(); info.iE_Extensions = new List<ProtocolExtensionField>(); nBits = 0x10; int num5 = input.ReadBits(nBits) + 1; for (int i = 0; i < num5; i++) { ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input); info.iE_Extensions.Add(item); } } return info; }