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


C# BitArrayInputStream.ReadBits方法代码示例

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


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

示例1: Decode

 public E_RAB_Level_QoS_Parameters Decode(BitArrayInputStream input)
 {
     E_RAB_Level_QoS_Parameters parameters = new E_RAB_Level_QoS_Parameters();
     parameters.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
     input.skipUnreadedBits();
     parameters.qCI = input.ReadBits(8);
     parameters.allocationAndRetentionPriority = AllocationAndRetentionPriority.PerDecoder.Instance.Decode(input);
     if (stream.Read())
     {
         parameters.gbrQosInformation = GBR_QosInformation.PerDecoder.Instance.Decode(input);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         parameters.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);
             parameters.iE_Extensions.Add(item);
         }
     }
     return parameters;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:26,代码来源:E_RAB.cs

示例2: 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

示例3: Decode

 public RRM_Config Decode(BitArrayInputStream input)
 {
     int num2;
     RRM_Config config = new RRM_Config();
     config.InitDefaults();
     bool flag = input.ReadBit() != 0;
     BitMaskStream stream = new BitMaskStream(input, 1);
     if (stream.Read())
     {
         num2 = 6;
         config.ue_InactiveTime = (ue_InactiveTime_Enum)input.ReadBits(num2);
     }
     if (flag)
     {
         BitMaskStream stream2 = new BitMaskStream(input, 1);
         if (!stream2.Read())
         {
             return config;
         }
         config.candidateCellInfoList_r10 = new List<CandidateCellInfo_r10>();
         num2 = 3;
         int num3 = input.ReadBits(num2) + 1;
         for (int i = 0; i < num3; i++)
         {
             CandidateCellInfo_r10 item = CandidateCellInfo_r10.PerDecoder.Instance.Decode(input);
             config.candidateCellInfoList_r10.Add(item);
         }
     }
     return config;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:30,代码来源:RRM_Config.cs

示例4: Decode

 public SystemInformationBlockType7 Decode(BitArrayInputStream input)
 {
     var type = new SystemInformationBlockType7();
     type.InitDefaults();
     var flag = false;
     flag = input.ReadBit() != 0;
     var stream = flag ? new BitMaskStream(input, 3) : new BitMaskStream(input, 2);
     type.t_ReselectionGERAN = input.ReadBits(3);
     if (stream.Read())
     {
         type.t_ReselectionGERAN_SF = SpeedStateScaleFactors.PerDecoder.Instance.Decode(input);
     }
     if (stream.Read())
     {
         type.carrierFreqsInfoList = new List<CarrierFreqsInfoGERAN>();
         var num2 = 4;
         var num3 = input.ReadBits(num2) + 1;
         for (var i = 0; i < num3; i++)
         {
             var item = CarrierFreqsInfoGERAN.PerDecoder.Instance.Decode(input);
             type.carrierFreqsInfoList.Add(item);
         }
     }
     if (flag && stream.Read())
     {
         var nBits = input.ReadBits(8);
         type.lateNonCriticalExtension = input.readOctetString(nBits);
     }
     return type;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:30,代码来源:SystemInformationBlockType7.cs

示例5: 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

示例6: Decode

 public long Decode(BitArrayInputStream input)
 {
     input.ReadBit();
     int num2 = input.ReadBits(2) + 1;
     input.skipUnreadedBits();
     return input.ReadBits(num2 * 8) + 0x10000;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:7,代码来源:CGI.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 EmergencyAreaID_Broadcast_Item Decode(BitArrayInputStream input)
 {
     EmergencyAreaID_Broadcast_Item item = new EmergencyAreaID_Broadcast_Item();
     item.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.skipUnreadedBits();
     item.emergencyAreaID = input.readOctetString(3);
     input.skipUnreadedBits();
     item.completedCellinEAI = new List<CompletedCellinEAI_Item>();
     int nBits = 0x10;
     int num5 = input.ReadBits(nBits) + 1;
     for (int i = 0; i < num5; i++)
     {
         CompletedCellinEAI_Item item2 = CompletedCellinEAI_Item.PerDecoder.Instance.Decode(input);
         item.completedCellinEAI.Add(item2);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.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);
             item.iE_Extensions.Add(field);
         }
     }
     return item;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:30,代码来源:EmergencyAreaID.cs

示例9: Decode

 public CompleteFailureCauseInformation_Item Decode(BitArrayInputStream input)
 {
     CompleteFailureCauseInformation_Item item = new CompleteFailureCauseInformation_Item();
     item.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     item.cell_ID = ECGI.PerDecoder.Instance.Decode(input);
     item.measurementFailureCause_List = new List<ProtocolIE_Field>();
     int nBits = 5;
     int num5 = input.ReadBits(nBits) + 1;
     for (int i = 0; i < num5; i++)
     {
         ProtocolIE_Field field = ProtocolIE_Field.PerDecoder.Instance.Decode(input);
         item.measurementFailureCause_List.Add(field);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.iE_Extensions = new List<ProtocolExtensionField>();
         nBits = 0x10;
         int num7 = input.ReadBits(nBits) + 1;
         for (int j = 0; j < num7; j++)
         {
             ProtocolExtensionField field2 = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             item.iE_Extensions.Add(field2);
         }
     }
     return item;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:28,代码来源:Composite.cs

示例10: Decode

 public cellAccessRelatedInfo_Type Decode(BitArrayInputStream input)
 {
     var type = new cellAccessRelatedInfo_Type();
     type.InitDefaults();
     var stream = new BitMaskStream(input, 1);
     type.plmn_IdentityList = new List<PLMN_IdentityInfo>();
     var nBits = 3;
     var num3 = input.ReadBits(nBits) + 1;
     for (var i = 0; i < num3; i++)
     {
         var item = PLMN_IdentityInfo.PerDecoder.Instance.Decode(input);
         type.plmn_IdentityList.Add(item);
     }
     type.trackingAreaCode = input.ReadBitString(0x10);
     type.cellIdentity = input.ReadBitString(0x1c);
     nBits = 1;
     type.cellBarred = (cellBarred_Enum)input.ReadBits(nBits);
     nBits = 1;
     type.intraFreqReselection = (intraFreqReselection_Enum)input.ReadBits(nBits);
     type.csg_Indication = input.ReadBit() == 1;
     if (stream.Read())
     {
         type.csg_Identity = input.ReadBitString(0x1b);
     }
     return type;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:26,代码来源:SystemInformationBlockType1.cs

示例11: 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

示例12: Decode

 public Paging Decode(BitArrayInputStream input)
 {
     int num2;
     Paging paging = new Paging();
     paging.InitDefaults();
     BitMaskStream stream = new BitMaskStream(input, 4);
     if (stream.Read())
     {
         paging.pagingRecordList = new List<PagingRecord>();
         num2 = 4;
         int num3 = input.ReadBits(num2) + 1;
         for (int i = 0; i < num3; i++)
         {
             PagingRecord item = PagingRecord.PerDecoder.Instance.Decode(input);
             paging.pagingRecordList.Add(item);
         }
     }
     if (stream.Read())
     {
         num2 = 1;
         paging.systemInfoModification = (systemInfoModification_Enum)input.ReadBits(num2);
     }
     if (stream.Read())
     {
         num2 = 1;
         paging.etws_Indication = (etws_Indication_Enum)input.ReadBits(num2);
     }
     if (stream.Read())
     {
         paging.nonCriticalExtension = Paging_v890_IEs.PerDecoder.Instance.Decode(input);
     }
     return paging;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:33,代码来源:Paging.cs

示例13: Decode

 public CellBasedMDT Decode(BitArrayInputStream input)
 {
     CellBasedMDT dmdt = new CellBasedMDT();
     dmdt.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     dmdt.cellIdListforMDT = new List<ECGI>();
     int nBits = 5;
     int num5 = input.ReadBits(nBits) + 1;
     for (int i = 0; i < num5; i++)
     {
         ECGI item = ECGI.PerDecoder.Instance.Decode(input);
         dmdt.cellIdListforMDT.Add(item);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         dmdt.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);
             dmdt.iE_Extensions.Add(field);
         }
     }
     return dmdt;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:27,代码来源:CellInformation.cs

示例14: Decode

                public eab_Param_r11_Type Decode(BitArrayInputStream input)
                {
                    var type = new eab_Param_r11_Type();
                    type.InitDefaults();
                    switch (input.ReadBits(1))
                    {
                        case 0:
                            type.eab_Common_r11 = EAB_Config_r11.PerDecoder.Instance.Decode(input);
                            return type;

                        case 1:
                        {
                            type.eab_PerPLMN_List_r11 = new List<EAB_ConfigPLMN_r11>();
                            var nBits = 3;
                            var num4 = input.ReadBits(nBits) + 1;
                            for (var i = 0; i < num4; i++)
                            {
                                var item = EAB_ConfigPLMN_r11.PerDecoder.Instance.Decode(input);
                                type.eab_PerPLMN_List_r11.Add(item);
                            }
                            return type;
                        }
                    }
                    throw new Exception(GetType().Name + ":NoChoice had been choose");
                }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:25,代码来源:SystemInformationBlockType14_r11.cs

示例15: Decode

 public SystemInformationBlockType1_v9e0_IEs Decode(BitArrayInputStream input)
 {
     var es = new SystemInformationBlockType1_v9e0_IEs();
     es.InitDefaults();
     var stream = new BitMaskStream(input, 3);
     if (stream.Read())
     {
         es.freqBandIndicator_v9e0 = input.ReadBits(8) + 0x41;
     }
     if (stream.Read())
     {
         es.multiBandInfoList_v9e0 = new List<MultiBandInfo_v9e0>();
         const int nBits = 3;
         var num3 = input.ReadBits(nBits) + 1;
         for (var i = 0; i < num3; i++)
         {
             var item = MultiBandInfo_v9e0.PerDecoder.Instance.Decode(input);
             es.multiBandInfoList_v9e0.Add(item);
         }
     }
     if (stream.Read())
     {
         es.nonCriticalExtension = nonCriticalExtension_Type.PerDecoder.Instance.Decode(input);
     }
     return es;
 }
开发者ID:ouyh18,项目名称:LtePlatform,代码行数:26,代码来源:SystemInformationBlockType1_v9e0_IEs.cs


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