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


C# BitArrayInputStream.readBit方法代码示例

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


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

示例1: 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,项目名称:LteTools,代码行数:35,代码来源:Cause.cs

示例2: Decode

 public E_RABs_Admitted_Item Decode(BitArrayInputStream input)
 {
     E_RABs_Admitted_Item item = new E_RABs_Admitted_Item();
     item.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 3) : new BitMaskStream(input, 3);
     input.readBit();
     item.e_RAB_ID = input.readBits(4);
     if (stream.Read())
     {
         item.uL_GTP_TunnelEndpoint = GTPtunnelEndpoint.PerDecoder.Instance.Decode(input);
     }
     if (stream.Read())
     {
         item.dL_GTP_TunnelEndpoint = GTPtunnelEndpoint.PerDecoder.Instance.Decode(input);
     }
     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,项目名称:LteTools,代码行数:29,代码来源:E_RAB.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,项目名称:LteTools,代码行数:30,代码来源:UE_Information.cs

示例4: Decode

 public E_RABSetupItemBearerSURes Decode(BitArrayInputStream input)
 {
     E_RABSetupItemBearerSURes res = new E_RABSetupItemBearerSURes();
     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>();
         const 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,项目名称:LteTools,代码行数:27,代码来源:E_RABSetup.cs

示例5: 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,项目名称:LteTools,代码行数:8,代码来源:PhyLayerParameters.cs

示例6: 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,项目名称:LteTools,代码行数:10,代码来源:UL_ReferenceSignalsPUSCH.cs

示例7: 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,项目名称:LteTools,代码行数:10,代码来源:Security.cs

示例8: Decode

 public CQI_ReportAperiodicProc_r11 Decode(BitArrayInputStream input)
 {
     CQI_ReportAperiodicProc_r11 _r = new CQI_ReportAperiodicProc_r11();
     _r.InitDefaults();
     int nBits = 3;
     _r.cqi_ReportModeAperiodic_r11 = (CQI_ReportModeAperiodic)input.readBits(nBits);
     _r.trigger01_r11 = input.readBit() == 1;
     _r.trigger10_r11 = input.readBit() == 1;
     _r.trigger11_r11 = input.readBit() == 1;
     return _r;
 }
开发者ID:ouyh18,项目名称:LteTools,代码行数:11,代码来源:CQI_Report.cs

示例9: Decode

            public InitiatingMessage Decode(BitArrayInputStream input)
            {
                InitiatingMessage message = new InitiatingMessage();
                message.InitDefaults();
                input.skipUnreadedBits();
                message.procedureCode = input.readBits(8);
                const int num4 = 2;
                message.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
                {
                    message.value = X2AP_ELEMENTARY_PROCEDURE.Switcher(message.procedureCode, "InitiatingMessage", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    message.value = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return message;
            }
开发者ID:ouyh18,项目名称:LteTools,代码行数:52,代码来源:InitiatingMessage.cs

示例10: 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,项目名称:LteTools,代码行数:13,代码来源:Overload.cs

示例11: Decode

 public E_RABAdmittedItem Decode(BitArrayInputStream input)
 {
     E_RABAdmittedItem item = new E_RABAdmittedItem();
     item.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 5) : new BitMaskStream(input, 5);
     input.readBit();
     item.e_RAB_ID = input.readBits(4);
     input.readBit();
     int num = input.readBits(8);
     input.skipUnreadedBits();
     item.transportLayerAddress = input.readBitString(num + 1);
     input.skipUnreadedBits();
     item.gTP_TEID = input.readOctetString(4);
     if (stream.Read())
     {
         input.readBit();
         num = input.readBits(8);
         input.skipUnreadedBits();
         item.dL_transportLayerAddress = input.readBitString(num + 1);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.dL_gTP_TEID = input.readOctetString(4);
     }
     if (stream.Read())
     {
         input.readBit();
         num = input.readBits(8);
         input.skipUnreadedBits();
         item.uL_TransportLayerAddress = input.readBitString(num + 1);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.uL_GTP_TEID = input.readOctetString(4);
     }
     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,项目名称:LteTools,代码行数:51,代码来源:E_RAB_ID.cs

示例12: 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,项目名称:LteTools,代码行数:51,代码来源:LastVisited.cs

示例13: Decode

 public BandClassInfoCDMA2000 Decode(BitArrayInputStream input)
 {
     BandClassInfoCDMA2000 ocdma = new BandClassInfoCDMA2000();
     ocdma.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     int nBits = (input.readBit() == 0) ? 5 : 5;
     ocdma.bandClass = (BandclassCDMA2000)input.readBits(nBits);
     if (stream.Read())
     {
         ocdma.cellReselectionPriority = input.readBits(3);
     }
     ocdma.threshX_High = input.readBits(6);
     ocdma.threshX_Low = input.readBits(6);
     return ocdma;
 }
开发者ID:ouyh18,项目名称:LteTools,代码行数:15,代码来源:BandClass.cs

示例14: Decode

 public UE_associatedLogicalS1_ConnectionItem Decode(BitArrayInputStream input)
 {
     int num4;
     UE_associatedLogicalS1_ConnectionItem item = new UE_associatedLogicalS1_ConnectionItem();
     item.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 3) : new BitMaskStream(input, 3);
     if (stream.Read())
     {
         num4 = input.readBits(2) + 1;
         input.skipUnreadedBits();
         item.mME_UE_S1AP_ID = input.readBits(num4 * 8);
     }
     if (stream.Read())
     {
         num4 = input.readBits(2) + 1;
         input.skipUnreadedBits();
         item.eNB_UE_S1AP_ID = input.readBits(num4 * 8);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.iE_Extensions = new List<ProtocolExtensionField>();
         num4 = 0x10;
         int num5 = input.readBits(num4) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             item.iE_Extensions.Add(field);
         }
     }
     return item;
 }
开发者ID:ouyh18,项目名称:LteTools,代码行数:32,代码来源:UE_associatedLogicalS1.cs

示例15: Decode

 public CandidateCellInfo_r10 Decode(BitArrayInputStream input)
 {
     CandidateCellInfo_r10 _r = new CandidateCellInfo_r10();
     _r.InitDefaults();
     bool flag = input.readBit() != 0;
     BitMaskStream stream = new BitMaskStream(input, 2);
     _r.physCellId_r10 = input.readBits(9);
     _r.dl_CarrierFreq_r10 = input.readBits(0x10);
     if (stream.Read())
     {
         _r.rsrpResult_r10 = input.readBits(7);
     }
     if (stream.Read())
     {
         _r.rsrqResult_r10 = input.readBits(6);
     }
     if (flag)
     {
         BitMaskStream stream2 = new BitMaskStream(input, 1);
         if (stream2.Read())
         {
             _r.dl_CarrierFreq_v1090 = input.readBits(0x12) + 0x10000;
         }
     }
     return _r;
 }
开发者ID:ouyh18,项目名称:LteTools,代码行数:26,代码来源:CellSelectionInfo.cs


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