当前位置: 首页>>代码示例>>C#>>正文


C# BitArrayInputStream.ReadBit方法代码示例

本文整理汇总了C#中Lte.Domain.Common.BitArrayInputStream.ReadBit方法的典型用法代码示例。如果您正苦于以下问题:C# BitArrayInputStream.ReadBit方法的具体用法?C# BitArrayInputStream.ReadBit怎么用?C# BitArrayInputStream.ReadBit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lte.Domain.Common.BitArrayInputStream的用法示例。


在下文中一共展示了BitArrayInputStream.ReadBit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Decode

 public TraceActivation Decode(BitArrayInputStream input)
 {
     TraceActivation activation = new TraceActivation();
     activation.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.skipUnreadedBits();
     activation.e_UTRAN_Trace_ID = input.readOctetString(8);
     activation.interfacesToTrace = input.ReadBitString(8);
     int nBits = (input.ReadBit() == 0) ? 3 : 3;
     activation.traceDepth = (TraceDepth)input.ReadBits(nBits);
     input.ReadBit();
     int num = input.ReadBits(8);
     input.skipUnreadedBits();
     activation.traceCollectionEntityIPAddress = input.ReadBitString(num + 1);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         activation.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);
             activation.iE_Extensions.Add(item);
         }
     }
     return activation;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:28,代码来源:Trace.cs

示例2: Decode

 public RelativeNarrowbandTxPower Decode(BitArrayInputStream input)
 {
     RelativeNarrowbandTxPower power = new RelativeNarrowbandTxPower();
     power.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.ReadBit();
     int num = input.ReadBits(7);
     input.skipUnreadedBits();
     power.rNTP_PerPRB = input.ReadBitString(num + 6);
     int nBits = (input.ReadBit() == 0) ? 4 : 4;
     power.rNTP_Threshold = (RNTP_Threshold)input.ReadBits(nBits);
     nBits = (input.ReadBit() == 0) ? 2 : 2;
     power.numberOfCellSpecificAntennaPorts = (numberOfCellSpecificAntennaPorts_Enum)input.ReadBits(nBits);
     power.p_B = input.ReadBits(2);
     power.pDCCH_InterferenceImpact = input.ReadBits(3);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         power.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);
             power.iE_Extensions.Add(item);
         }
     }
     return power;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:29,代码来源:Relative.cs

示例3: Decode

            public string Decode(BitArrayInputStream input)
            {
                input.skipUnreadedBits();
                int nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_0096;

                        case 1:
                            switch (input.ReadBit())
                            {
                                case 0:
                                    nBits += input.ReadBits(14);
                                    goto Label_0096;

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_0096:
                return input.readOctetString(nBits);
            }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:30,代码来源:Cdma2000.cs

示例4: Decode

 public E_RABSetupItemCtxtSURes Decode(BitArrayInputStream input)
 {
     E_RABSetupItemCtxtSURes res = new E_RABSetupItemCtxtSURes();
     res.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.ReadBit();
     res.e_RAB_ID = input.ReadBits(4);
     input.ReadBit();
     int num = input.ReadBits(8);
     input.skipUnreadedBits();
     res.transportLayerAddress = input.ReadBitString(num + 1);
     input.skipUnreadedBits();
     res.gTP_TEID = input.readOctetString(4);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         res.iE_Extensions = new List<ProtocolExtensionField>();
         int nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             res.iE_Extensions.Add(item);
         }
     }
     return res;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:27,代码来源:E_RABSetup.cs

示例5: Decode

 public Bearers_SubjectToStatusTransfer_Item Decode(BitArrayInputStream input)
 {
     Bearers_SubjectToStatusTransfer_Item item = new Bearers_SubjectToStatusTransfer_Item();
     item.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
     input.ReadBit();
     item.e_RAB_ID = input.ReadBits(4);
     item.uL_COUNTvalue = COUNTvalue.PerDecoder.Instance.Decode(input);
     item.dL_COUNTvalue = COUNTvalue.PerDecoder.Instance.Decode(input);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.receiveStatusofULPDCPSDUs = input.ReadBitString(0x1000);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.iE_Extensions = new List<ProtocolExtensionField>();
         int nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             item.iE_Extensions.Add(field);
         }
     }
     return item;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:28,代码来源:Bearers_SubjectToStatusTransfer.cs

示例6: Decode

            public Cause Decode(BitArrayInputStream input)
            {
                int num4;
                Cause cause = new Cause();
                cause.InitDefaults();
                input.ReadBit();
                switch (input.ReadBits(3))
                {
                    case 0:
                        num4 = (input.ReadBit() == 0) ? 6 : 6;
                        cause.radioNetwork = (CauseRadioNetwork)input.ReadBits(num4);
                        return cause;

                    case 1:
                        num4 = 1;
                        cause.transport = (CauseTransport)input.ReadBits(num4);
                        return cause;

                    case 2:
                        num4 = (input.ReadBit() == 0) ? 3 : 3;
                        cause.nas = (CauseNas)input.ReadBits(num4);
                        return cause;

                    case 3:
                        num4 = (input.ReadBit() == 0) ? 3 : 3;
                        cause.protocol = (CauseProtocol)input.ReadBits(num4);
                        return cause;

                    case 4:
                        num4 = (input.ReadBit() == 0) ? 3 : 3;
                        cause.misc = (CauseMisc)input.ReadBits(num4);
                        return cause;
                }
                throw new Exception(GetType().Name + ":NoChoice had been choose");
            }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:35,代码来源:Cause.cs

示例7: Decode

 public PRACH_Configuration Decode(BitArrayInputStream input)
 {
     PRACH_Configuration configuration = new PRACH_Configuration();
     configuration.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
     input.skipUnreadedBits();
     configuration.rootSequenceIndex = input.ReadBits(0x10);
     configuration.zeroCorrelationIndex = input.ReadBits(4);
     configuration.highSpeedFlag = input.ReadBit() == 1;
     configuration.prach_FreqOffset = input.ReadBits(7);
     if (stream.Read())
     {
         configuration.prach_ConfigIndex = input.ReadBits(6);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         configuration.iE_Extensions = new List<ProtocolExtensionField>();
         const int nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             configuration.iE_Extensions.Add(item);
         }
     }
     return configuration;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:28,代码来源:PRACH.cs

示例8: Decode

 public ServedCell_Information Decode(BitArrayInputStream input)
 {
     ServedCell_Information information = new ServedCell_Information();
     information.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.ReadBit();
     input.skipUnreadedBits();
     information.pCI = input.ReadBits(0x10);
     information.cellId = ECGI.PerDecoder.Instance.Decode(input);
     input.skipUnreadedBits();
     information.tAC = input.readOctetString(2);
     information.broadcastPLMNs = new List<string>();
     int nBits = 3;
     int num5 = input.ReadBits(nBits) + 1;
     for (int i = 0; i < num5; i++)
     {
         input.skipUnreadedBits();
         string item = input.readOctetString(3);
         information.broadcastPLMNs.Add(item);
     }
     information.eUTRA_Mode_Info = EUTRA_Mode_Info.PerDecoder.Instance.Decode(input);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         information.iE_Extensions = new List<ProtocolExtensionField>();
         nBits = 0x10;
         int num7 = input.ReadBits(nBits) + 1;
         for (int j = 0; j < num7; j++)
         {
             ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             information.iE_Extensions.Add(field);
         }
     }
     return information;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:35,代码来源:ServedCell.cs

示例9: Decode

 public PhyLayerParameters Decode(BitArrayInputStream input)
 {
     PhyLayerParameters parameters = new PhyLayerParameters();
     parameters.InitDefaults();
     parameters.ue_TxAntennaSelectionSupported = input.ReadBit() == 1;
     parameters.ue_SpecificRefSigsSupported = input.ReadBit() == 1;
     return parameters;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:8,代码来源:PhyLayerParameters.cs

示例10: Decode

 public SecurityAlgorithmConfig Decode(BitArrayInputStream input)
 {
     SecurityAlgorithmConfig config = new SecurityAlgorithmConfig();
     config.InitDefaults();
     int nBits = (input.ReadBit() == 0) ? 3 : 3;
     config.cipheringAlgorithm = (cipheringAlgorithm_Enum)input.ReadBits(nBits);
     nBits = (input.ReadBit() == 0) ? 3 : 3;
     config.integrityProtAlgorithm = (integrityProtAlgorithm_Enum)input.ReadBits(nBits);
     return config;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:10,代码来源:Security.cs

示例11: Decode

 public UL_ReferenceSignalsPUSCH Decode(BitArrayInputStream input)
 {
     UL_ReferenceSignalsPUSCH spusch = new UL_ReferenceSignalsPUSCH();
     spusch.InitDefaults();
     spusch.groupHoppingEnabled = input.ReadBit() == 1;
     spusch.groupAssignmentPUSCH = input.ReadBits(5);
     spusch.sequenceHoppingEnabled = input.ReadBit() == 1;
     spusch.cyclicShift = input.ReadBits(3);
     return spusch;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:10,代码来源:UL_ReferenceSignalsPUSCH.cs

示例12: Decode

            public ProtocolExtensionField Decode(BitArrayInputStream input)
            {
                int nBits = 0;
                long num3 = 0L;
                ProtocolExtensionField field = new ProtocolExtensionField();
                field.InitDefaults();
                int num4 = input.ReadBits(1) + 1;
                input.skipUnreadedBits();
                field.id = input.ReadBits(num4 * 8);
                num4 = 2;
                field.criticality = (Criticality)input.ReadBits(num4);
                input.skipUnreadedBits();
                nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_00DD;

                        case 1:
                            switch (input.ReadBit())
                            {
                                case 0:
                                    nBits += input.ReadBits(14);
                                    goto Label_00DD;

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_00DD:
                num3 = input.Position;
                try
                {
                    field.extensionValue = S1AP_PROTOCOL_EXTENSION.Switcher(field.id, "Extension", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    field.extensionValue = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return field;
            }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:55,代码来源:ProtocolExtension.cs

示例13: Decode

            public SuccessfulOutcome Decode(BitArrayInputStream input)
            {
                SuccessfulOutcome outcome = new SuccessfulOutcome();
                outcome.InitDefaults();
                input.skipUnreadedBits();
                outcome.procedureCode = input.ReadBits(8);
                const int num4 = 2;
                outcome.criticality = (Criticality)input.ReadBits(num4);
                input.skipUnreadedBits();
                int nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_00CF;

                        case 1:
                            switch (input.ReadBit())
                            {
                                case 0:
                                    nBits += input.ReadBits(14);
                                    goto Label_00CF;

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_00CF:
                long num3 = input.Position;
                try
                {
                    outcome.value = S1AP_ELEMENTARY_PROCEDURE.Switcher(outcome.procedureCode, "SuccessfulOutcome", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    outcome.value = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return outcome;
            }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:52,代码来源:Outcome.cs

示例14: Decode

 public OverloadResponse Decode(BitArrayInputStream input)
 {
     OverloadResponse response = new OverloadResponse();
     response.InitDefaults();
     input.ReadBit();
     if (input.ReadBits(1) != 0)
     {
         throw new Exception(GetType().Name + ":NoChoice had been choose");
     }
     int nBits = (input.ReadBit() == 0) ? 2 : 2;
     response.overloadAction = (OverloadAction)input.ReadBits(nBits);
     return response;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:13,代码来源:Overload.cs

示例15: Decode

            public LastVisitedCell_Item Decode(BitArrayInputStream input)
            {
                int nBits;
                LastVisitedCell_Item item = new LastVisitedCell_Item();
                item.InitDefaults();
                input.ReadBit();
                switch (input.ReadBits(2))
                {
                    case 0:
                        item.e_UTRAN_Cell = LastVisitedEUTRANCellInformation.PerDecoder.Instance.Decode(input);
                        return item;

                    case 1:
                        input.skipUnreadedBits();
                        nBits = 0;
                        break;

                    case 2:
                        item.gERAN_Cell = LastVisitedGERANCellInformation.PerDecoder.Instance.Decode(input);
                        return item;

                    default:
                        throw new Exception(GetType().Name + ":NoChoice had been choose");
                }
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_00F2;

                        case 1:
                            switch (input.ReadBit())
                            {
                                case 0:
                                    nBits += input.ReadBits(14);
                                    goto Label_00F2;

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_00F2:
                item.uTRAN_Cell = input.readOctetString(nBits);
                return item;
            }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:51,代码来源:LastVisited.cs


注:本文中的Lte.Domain.Common.BitArrayInputStream.ReadBit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。