Exemple #1
0
        public override Task <Empty> NRConfigureStandard(RFmxNRStandardConfiguration request, ServerCallContext context)
        {
            var instr          = sessionMap[(IntPtr)request.Session.Handle];
            var nr             = GetNRSignalConfiguration(instr, request.SignalName);
            var standardConfig = new RFmxNR.StandardConfiguration()
            {
                AutoResourceBlockDetectionEnabled = (RFmxNRMXAutoResourceBlockDetectionEnabled)(request.AutoResourceBlockDetectionEnabled ? 1 : 0),
                Band = request.Band,
                ComponentCarrierConfigurations = new RFmxNR.ComponentCarrierConfiguration[request.ComponentCarrierConfigurations.Count],
                DownlinkTestModel             = (RFmxNRMXDownlinkTestModel)request.DownlinkTestModel,
                DownlinkTestModelDuplexScheme = (RFmxNRMXDownlinkTestModelDuplexScheme)request.DownlinkTestModelDuplexScheme,
                FrequencyRange = (RFmxNRMXFrequencyRange)request.FrequencyRange,
                LinkDirection  = (RFmxNRMXLinkDirection)request.LinkDirection
            };

            for (int i = 0; i < request.ComponentCarrierConfigurations.Count; i++)
            {
                var requestComponentCarrierConfiguration = request.ComponentCarrierConfigurations[i];
                standardConfig.ComponentCarrierConfigurations[i] = new RFmxNR.ComponentCarrierConfiguration()
                {
                    Bandwidth_Hz = requestComponentCarrierConfiguration.BandwidthHz,
                    CellId       = requestComponentCarrierConfiguration.CellId,
                    PuschDmrsAdditionalPositions   = requestComponentCarrierConfiguration.PuschDmrsAdditionalPositions,
                    PuschDmrsConfigurationType     = (RFmxNRMXPuschDmrsConfigurationType)requestComponentCarrierConfiguration.PuschDmrsConfigurationType,
                    PuschDmrsDuration              = (RFmxNRMXPuschDmrsDuration)requestComponentCarrierConfiguration.PuschDmrsDuration,
                    PuschDmrsTypeAPosition         = requestComponentCarrierConfiguration.PuschDmrsTypeAPosition,
                    PuschMappingType               = (RFmxNRMXPuschMappingType)requestComponentCarrierConfiguration.PuschMappingType,
                    PuschModulationType            = (RFmxNRMXPuschModulationType)requestComponentCarrierConfiguration.PuschModulationType,
                    PuschNumberOfResourceBlocks    = requestComponentCarrierConfiguration.PuschNumberOfResourceBlocks,
                    PuschResourceBlockOffset       = requestComponentCarrierConfiguration.PuschResourceBlockOffset,
                    PuschSlotAllocation            = requestComponentCarrierConfiguration.PuschSlotAllocation,
                    PuschSymbolAllocation          = requestComponentCarrierConfiguration.PuschSymbolAllocation,
                    PuschTransformPrecodingEnabled = (RFmxNRMXPuschTransformPrecodingEnabled)(requestComponentCarrierConfiguration.PuschTransformPrecodingEnabled ? 1 : 0),
                    SubcarrierSpacing_Hz           = requestComponentCarrierConfiguration.SubcarrierSpacingHz
                };
            }
            RFmxNR.ConfigureStandard(nr, standardConfig, request.SelectorString);
            return(Task.FromResult(new Empty()));
        }
Exemple #2
0
        public override Task <RFmxNRStandardConfiguration> NRGetDefaultStandardConfiguration(RFmxSession request, ServerCallContext context)
        {
            var standardConfig = RFmxNR.StandardConfiguration.GetDefault();
            var response       = new RFmxNRStandardConfiguration()
            {
                Session = request,
                AutoResourceBlockDetectionEnabled = Convert.ToBoolean(standardConfig.AutoResourceBlockDetectionEnabled),
                Band = standardConfig.Band,
                DownlinkTestModel             = (RFmxNRStandardConfiguration.Types.RFmxNRMXDownlinkTestModel)standardConfig.DownlinkTestModel,
                DownlinkTestModelDuplexScheme = (RFmxNRStandardConfiguration.Types.RFmxNRMXDownlinkTestModelDuplexScheme)standardConfig.DownlinkTestModelDuplexScheme,
                FrequencyRange = (RFmxNRStandardConfiguration.Types.RFmxNRMXFrequencyRange)standardConfig.FrequencyRange,
                LinkDirection  = (RFmxNRStandardConfiguration.Types.RFmxNRMXLinkDirection)standardConfig.LinkDirection,
                SelectorString = "",
                SignalName     = ""
            };

            foreach (var componentCarrierConfig in standardConfig.ComponentCarrierConfigurations)
            {
                response.ComponentCarrierConfigurations.Add(new RFmxNRComponentCarrierConfiguration()
                {
                    BandwidthHz = componentCarrierConfig.Bandwidth_Hz,
                    CellId      = componentCarrierConfig.CellId,
                    PuschDmrsAdditionalPositions   = componentCarrierConfig.PuschDmrsAdditionalPositions,
                    PuschDmrsConfigurationType     = (RFmxNRComponentCarrierConfiguration.Types.RFmxNRMXPuschDmrsConfigurationType)componentCarrierConfig.PuschDmrsConfigurationType,
                    PuschDmrsDuration              = (RFmxNRComponentCarrierConfiguration.Types.RFmxNRMXPuschDmrsDuration)componentCarrierConfig.PuschDmrsDuration,
                    PuschDmrsTypeAPosition         = componentCarrierConfig.PuschDmrsTypeAPosition,
                    PuschMappingType               = (RFmxNRComponentCarrierConfiguration.Types.RFmxNRMXPuschMappingType)componentCarrierConfig.PuschMappingType,
                    PuschModulationType            = (RFmxNRComponentCarrierConfiguration.Types.RFmxNRMXPuschModulationType)componentCarrierConfig.PuschModulationType,
                    PuschNumberOfResourceBlocks    = componentCarrierConfig.PuschNumberOfResourceBlocks,
                    PuschResourceBlockOffset       = componentCarrierConfig.PuschResourceBlockOffset,
                    PuschSlotAllocation            = componentCarrierConfig.PuschSlotAllocation,
                    PuschSymbolAllocation          = componentCarrierConfig.PuschSymbolAllocation,
                    PuschTransformPrecodingEnabled = Convert.ToBoolean(componentCarrierConfig.PuschTransformPrecodingEnabled),
                    SubcarrierSpacingHz            = componentCarrierConfig.SubcarrierSpacing_Hz
                });
            }
            return(Task.FromResult(response));
        }