Example #1
0
        public override Task <Empty> NRConfigureAcp(RFmxNRAcpConfiguration request, ServerCallContext context)
        {
            var instr     = sessionMap[(IntPtr)request.Session.Handle];
            var nr        = GetNRSignalConfiguration(instr, request.SignalName);
            var acpConfig = new RFmxNR.AcpConfiguration()
            {
                AveragingCount           = request.AveragingCount,
                AveragingEnabled         = (RFmxNRMXAcpAveragingEnabled)(request.AveragingEnabled ? 1 : 0),
                AveragingType            = (RFmxNRMXAcpAveragingType)request.AveragingType,
                MeasurementMethod        = (RFmxNRMXAcpMeasurementMethod)request.MeasurementMethod,
                NoiseCompensationEnabled = (RFmxNRMXAcpNoiseCompensationEnabled)(request.NoiseCompensationEnabled ? 1 : 0),
                NumberOfEndcOffsets      = request.NumberOfEndcOffsets,
                NumberOfEutraOffsets     = request.NumberOfEutraOffsets,
                NumberOfNrOffsets        = request.NumberOfNrOffsets,
                NumberOfUtraOffsets      = request.NumberOfUtraOffsets,
                SweepTimeAuto            = (RFmxNRMXAcpSweepTimeAuto)(request.SweepTimeAuto ? 1 : 0),
                SweepTimeInterval_s      = request.SweepTimeIntervalS
            };

            RFmxNR.ConfigureAcp(nr, acpConfig, request.SelectorString);
            return(Task.FromResult(new Empty()));
        }