Example #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,HasDeleted,DeletedTime")] BandType bandType)
        {
            if (id != bandType.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bandType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BandTypeExists(bandType.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bandType));
        }
 public void InitNote(BandType type, Transform start, Transform target)
 {
     this.target        = target;
     transform.position = start.position;
     noteType           = type;
     isInit             = true;
 }
Example #3
0
        public ButterWorth(BandType _type)
        {
            //by default
            dcof = new List <double>();
            ccof = new List <double>();

            if (_type == BandType.high)
            {
                //1 order,  0.1hz cutoff ?
                dcof.Add(1.0);
                dcof.Add(-0.980555318909954);

                ccof.Add(0.990277659454977);
                ccof.Add(-0.990277659454977);

                bandType = BandType.high;
            }
            else if (_type == BandType.low)
            {
                dcof.Add(1.0);
                dcof.Add(-0.303346683607342);

                ccof.Add(0.348326658196329);
                ccof.Add(0.348326658196329);
                bandType = BandType.low;
            }
        }
Example #4
0
        /// <summary>
        /// Process the document, converting it into JRXML
        /// </summary>
        public void ProcessDocument()
        {
            // Complete the layout attributes
            pageSetup   = WordDoc.PageSetup;
            columnWidth = pageSetup.PageWidth - pageSetup.RightMargin - pageSetup.LeftMargin;

            jJasper.SetAttribute("pageWidth", ((int)pageSetup.PageWidth).ToString());
            jJasper.SetAttribute("pageHeight", ((int)pageSetup.PageHeight).ToString());
            jJasper.SetAttribute("leftMargin", ((int)pageSetup.LeftMargin).ToString());
            jJasper.SetAttribute("rightMargin", ((int)pageSetup.RightMargin).ToString());
            jJasper.SetAttribute("topMargin", ((int)pageSetup.TopMargin).ToString());
            jJasper.SetAttribute("bottomMargin", ((int)pageSetup.BottomMargin).ToString());
            jJasper.SetAttribute("columnWidth", ((int)columnWidth).ToString());

            // Other miscellaneous attributes
            jJasper.SetAttribute("name", WordDoc.Name);
            jJasper.SetAttribute("whenNoDataType", "NoDataSection");

            // Set the current band type to detail by default
            currentBandType = BandType.Detail;

            // Iterate through the paragraphs
            foreach (Word.Paragraph paragraph in WordDoc.Paragraphs)
            {
                ProcessParagraph(paragraph);
            }
        }
Example #5
0
        public ActionResult DeleteConfirmed(int id)
        {
            BandType bandType = db.BandType.Find(id);

            db.BandType.Remove(bandType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public void InitNote(BandType type, Transform start, Transform target, float speed, bool useLerp = true)
 {
     this.speed         = speed;
     this.target        = target;
     this.useLerp       = useLerp;
     transform.position = start.position;
     noteType           = type;
     isInit             = true;
 }
Example #7
0
        public void RemoveBand(BandType bandtype)
        {
            BandBase band = this.GetBand(bandtype);

            if (band != null)
            {
                band.Controls.Clear();
                this.bandcollection.Remove(band);
            }
        }
Example #8
0
 public ActionResult Edit([Bind(Include = "btBandTypeID,btNameType")] BandType bandType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bandType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bandType));
 }
Example #9
0
 public BandBase GetBand(BandType bandtype)
 {
     foreach (BandBase base2 in this.Bands)
     {
         if (base2.BandType == bandtype)
         {
             return(base2);
         }
     }
     return(null);
 }
Example #10
0
        public ActionResult Create([Bind(Include = "btBandTypeID,btNameType")] BandType bandType)
        {
            if (ModelState.IsValid)
            {
                db.BandType.Add(bandType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bandType));
        }
Example #11
0
        public async Task <IActionResult> Create([Bind("Id,Name,HasDeleted,DeletedTime")] BandType bandType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bandType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bandType));
        }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DVBSChannel"/> class.
 /// </summary>
 public DVBSChannel()
 {
     SwitchingFrequency = 0;
     DisEqc             = DisEqcType.SimpleA;
     _bandType          = BandType.Universal;
     _satelliteIndex    = -1;
     _modulation        = ModulationType.ModQpsk;
     _innerFecRate      = BinaryConvolutionCodeRate.RateNotSet;
     _pilot             = Pilot.NotSet;
     _rollOff           = RollOff.NotSet;
 }
Example #13
0
    public void Set(int index, Band band, int bandsCount, BandType type)
    {
        CurrentIndex = index;
        Band         = band;
        Type         = type;

        if (descriptionText)
        {
            string description = "{0} - {1} - {2}";
            description          = string.Format(description, (index + 1).ToString("00"), band.Name, band.Year);
            descriptionText.text = description;
        }
    }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DVBSChannel"/> class.
 /// </summary>
 /// <param name="chan">The chan.</param>
 public DVBSChannel(DVBSChannel chan)
     : base(chan)
 {
     _polarisation       = chan.Polarisation;
     _symbolRate         = chan.SymbolRate;
     _switchingFrequency = chan.SwitchingFrequency;
     DisEqc          = chan.DisEqc;
     _bandType       = chan.BandType;
     _modulation     = chan.ModulationType;
     _innerFecRate   = chan.InnerFecRate;
     _pilot          = chan.Pilot;
     _rollOff        = chan.Rolloff;
     _satelliteIndex = chan.SatelliteIndex;
 }
Example #15
0
        // GET: BandTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BandType bandType = db.BandType.Find(id);

            if (bandType == null)
            {
                return(HttpNotFound());
            }
            return(View(bandType));
        }
Example #16
0
        public static (string real, string imag) NnAmplFileEntry(BandType band, int id, Spin spin)
        {
            switch (spin)
            {
            case Spin.Down:
                return(
                    $"wf_amplitude_real_quantum_region_{band.ToString()}_2_0000_{id.ToString("0000")}",
                    $"wf_amplitude_imag_quantum_region_{band.ToString()}_2_0000_{id.ToString("0000")}");

            default:
                return(
                    $"wf_amplitude_real_quantum_region_{band.ToString()}_1_0000_{id.ToString("0000")}",
                    $"wf_amplitude_imag_quantum_region_{band.ToString()}_1_0000_{id.ToString("0000")}");
            }
        }
Example #17
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     if (e.X >= 30 && e.X <= this._buffer.Width - 30)
     {
         if (e.Button == MouseButtons.Left)
         {
             float num = Math.Max((float)this._filterBandwidth * this._xIncrement, 2f);
             if (this._enableFilter)
             {
                 if (this._enableFilterMove && (float)e.X > this._lower && (float)e.X < this._upper && num < (float)this._buffer.Width)
                 {
                     this._oldX              = e.X;
                     this._oldFrequency      = this._frequency;
                     this._changingFrequency = true;
                 }
                 else if (this._upper - this._lower > 12f)
                 {
                     if (Math.Abs((float)e.X - this._upper - 6f) <= 6f && (this._bandType == BandType.Center || this._bandType == BandType.Upper))
                     {
                         this._side = BandType.Upper;
                         this._oldX = e.X;
                         this._oldFilterBandwidth = this._filterBandwidth;
                         this._changingBandwidth  = true;
                     }
                     else if (Math.Abs((float)e.X - this._lower + 6f) <= 6f && (this._bandType == BandType.Center || this._bandType == BandType.Lower))
                     {
                         this._side = BandType.Lower;
                         this._oldX = e.X;
                         this._oldFilterBandwidth = this._filterBandwidth;
                         this._changingBandwidth  = true;
                     }
                 }
             }
             if (!this._changingBandwidth && !this._changingFrequency)
             {
                 this._oldX = e.X;
                 this._oldCenterFrequency      = this._centerFrequency;
                 this._changingCenterFrequency = true;
             }
         }
         else if (e.Button == MouseButtons.Right)
         {
             this.UpdateFrequency(this._frequency / 500 * 500, FrequencyChangeSource.Click);
         }
     }
 }
Example #18
0
        /// <summary>
        /// Returns the appropriate band element for the specified band type.
        /// </summary>
        /// <param name="bandType">One of the BandType values</param>
        /// <returns>XmlElement for the specified band type</returns>
        protected XmlElement GetBandElement(BandType bandType)
        {
            switch (bandType)
            {
            case BandType.Background:
                return(jBackground);

            case BandType.Title:
                return(jTitle);

            case BandType.PageHeader:
                return(jPageHeader);

            case BandType.ColumnHeader:
                return(jColumnHeader);

            case BandType.Detail:
                return(jDetail);

            case BandType.ColumnFooter:
                return(jColumnFooter);

            case BandType.PageFooter:
                return(jPageFooter);

            case BandType.LastPageFooter:
                return(jLastPageFooter);

            case BandType.Summary:
                return(jSummary);

            case BandType.NoData:
                return(jNoData);

            default:
                return(null);
            }
        }
        public static Band create(BandType type, RWT_HA.OHLC bars, int len, double arg)
        {
            Band ans = null;

            switch (type)
            {
            case BandType.STDDEV:
                ans = new StdDevBand(len, arg);
                break;

            case BandType.STDASYMM:
                ans = new StdDevAsymmBand(len, arg);
                break;

            case BandType.RUNERR:
                ans = new RunnErrorBand(len, arg);
                break;

            case BandType.KELTNER:
                ans = new KeltnerBand(bars, len, arg);
                break;
            }
            return(ans);
        }
Example #20
0
 public static BandBase CreateInstance(BandType bandtype)
 {
     if (bandtype == BandType.BandDetail)
     {
         bandfactory = new BandDetalhe();
     }
     else if (bandtype == BandType.BandFooder)
     {
         bandfactory = new BandFooder();
     }
     else if (bandtype == BandType.BandHeader)
     {
         bandfactory = new BandHeader();
     }
     else if (bandtype == BandType.BandGroupHeader)
     {
         bandfactory = new BandGroupHeader();
     }
     else if (bandtype == BandType.BandGroupFooder)
     {
         bandfactory = new BandGroupFooder();
     }
     else if (bandtype == BandType.BandTitle)
     {
         bandfactory = new BandTitle();
     }
     else
     {
         if (bandtype != BandType.BandSummary)
         {
             throw new Exception("Tipo de Band n\x00e3o definido");
         }
         bandfactory = new BandSummary();
     }
     return(bandfactory);
 }
Example #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DVBSChannel"/> class.
 /// </summary>
 /// <param name="chan">The chan.</param>
 public DVBSChannel(DVBSChannel chan)
   : base(chan)
 {
   _polarisation = chan.Polarisation;
   _symbolRate = chan.SymbolRate;
   _switchingFrequency = chan.SwitchingFrequency;
   DisEqc = chan.DisEqc;
   _bandType = chan.BandType;
   _modulation = chan.ModulationType;
   _innerFecRate = chan.InnerFecRate;
   _pilot = chan.Pilot;
   _rollOff = chan.Rolloff;
   _satelliteIndex = chan.SatelliteIndex;
 }
Example #22
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="cornerFreqs">The corner frequencies in radians/sample.  Only the first element is used in a low/high pass filter.</param>
        /// <param name="order"></param>
        /// <param name="bandType"></param>
        /// <returns></returns>
        public static FilterOrderSpec CreateButterworthSpec(Pair<double,double> cornerFreqs, int order, BandType bandType)
        {
            FilterOrderSpec spec = new FilterOrderSpec();
            spec.CornerFreqs = cornerFreqs;
            spec.Order = order;
            spec.Ripple = 0.0;
            spec.BandType = bandType;
            spec.FilterType = IirFilterType.Butterworth;

            return spec;
        }
Example #23
0
        static IirFilter AnalogPrototypeToDigitalFilter(ZeroPoleGain analogPrototype, Pair<double,double> cornerFreqs, BandType bandType, IirFilterType filterType)
        {
            // Check that we have valid frequencies
            bool isError = false;
            isError |= (cornerFreqs.First < 0 || cornerFreqs.First > Math.PI);

            if(bandType == BandType.BandPass || bandType == BandType.BandStop)
            {
                isError |= (cornerFreqs.Second < 0 || cornerFreqs.Second > Math.PI);
            }

            if (isError)
                throw new Exception("Frequencies must be between 0 and PI inclusive");

            //Prewarp the corner frequencies
            //Assuming sampling frequency of 1/2 so that we don't need to account for sampling frequency when converting from analog to digital.
            const double samplingFreq = 0.5;
            Func<double, double> freqWarp = x => 2 * samplingFreq * Math.Tan(x/2);
            Pair<double, double> warpedCornerFreqs = new Pair<double, double>();
            warpedCornerFreqs.First = freqWarp(cornerFreqs.First);
            warpedCornerFreqs.Second = freqWarp(cornerFreqs.Second);

            // Set prototype to desired band
            ZeroPoleGain analogFilter;
            switch (bandType)
            {
                case BandType.LowPass:
                    analogFilter = FilterModifiers.AnalogPrototypeToLowPass(warpedCornerFreqs.First, analogPrototype);
                    break;

                case BandType.HighPass:
                    analogFilter = FilterModifiers.AnalogPrototypeToHighPass(warpedCornerFreqs.First, analogPrototype);
                    break;

                case BandType.BandPass:
                    analogFilter = FilterModifiers.AnalogPrototypeToBandPass(warpedCornerFreqs.First, warpedCornerFreqs.Second, analogPrototype);
                    break;

                case BandType.BandStop:
                    analogFilter = FilterModifiers.AnalogPrototypeToBandStop(warpedCornerFreqs.First, warpedCornerFreqs.Second, analogPrototype);
                    break;

                default: Debug.Assert(false); throw new Exception();
            }

            //Convert analog (continuous) filter to digital (discrete) filter
            ZeroPoleGain digitalFilter;
            digitalFilter = FilterModifiers.ConvertAnalogToDigital(analogFilter);

            //Convert digital filter into second-order sections
            SosGain sosGain = FilterModifiers.ConvertZeroPoleToSosFilter(digitalFilter);

            //Create filter and return it
            return new IirFilter(sosGain);
        }
Example #24
0
 public PoP(string bandname, DateTime year, List <string> members, BandType band) : base(bandname, year, members, band)
 {
 }
Example #25
0
 public List<News> GetPagedNewsByTagAndNewsType(PagingContext pager, PublishStatus publishStatus, int tagId,
     BandType newsType)
 {
     return GetPagedNewsByTagAndNewsType(pager, publishStatus, tagId, newsType, NewsRemarkType.Normal);
 }
Example #26
0
 public static string NnProbFileEntry(BandType band, int id) =>
 $"wf_probability_quantum_region_{band.ToString()}_0000_{id.ToString("0000")}";
Example #27
0
 public List<News> GetTopImageNewsByNewsType(BandType newsType, int maxCount, NewsRemarkType newsRemarkType)
 {
     return NewsDao.GetTopImageNewsByNewsType((int)newsType, maxCount, (int)newsRemarkType);
 }
Example #28
0
 public List<News> GetPagedNewsByTypeANDPublishDate(PagingContext pager, BandType newsType, DateTime sTime,
     DateTime eTime, PublishStatus publishStatus, NewsRemarkType newsRemarkType)
 {
     return NewsDao.GetPagedNewsByTypeANDPublishDate(pager, (int)newsType, sTime,eTime,(int)publishStatus
         , (int)newsRemarkType);
 }
Example #29
0
 public List<News> GetTopImageNewsByTagANDNewsType(
     int tagId, BandType newsType, int maxCount, NewsRemarkType newsRemarkType)
 {
     return NewsDao.GetTopImageNewsByTagANDNewsType(tagId, (int)newsType,
         maxCount, (int)newsRemarkType);
 }
Example #30
0
 public List<News> GetTopImageNewsByNewsTypeANDPublishDate(BandType newsType,
     DateTime sTime, DateTime eTime, int maxCount, NewsRemarkType newsRemarkType)
 {
     return NewsDao.GetTopImageNewsByNewsTypeANDPublishDate((int)newsType,sTime,
         eTime,maxCount, (int)newsRemarkType);
 }
Example #31
0
 public List<News> GetPagedNewsByNewsType(PagingContext pager, BandType newsType,
     PublishStatus publishStatus)
 {
     return GetPagedNewsByNewsType(pager, newsType, publishStatus, NewsRemarkType.Normal);
 }
Example #32
0
 public List<News> GetPagedNewsByNewsType(PagingContext pager, BandType newsType,
     PublishStatus publishStatus, NewsRemarkType newsRemarkType)
 {
     return NewsDao.GetPagedNewsByNewsType(pager, (int)newsType, (int)publishStatus, (int)newsRemarkType);
 }
Example #33
0
 public List <News> GetPagedNewsByTypeANDPublishDate(PagingContext pager, BandType newsType, DateTime sTime,
                                                     DateTime eTime, PublishStatus publishStatus, NewsRemarkType newsRemarkType)
 {
     return(NewsDao.GetPagedNewsByTypeANDPublishDate(pager, (int)newsType, sTime, eTime, (int)publishStatus
                                                     , (int)newsRemarkType));
 }
Example #34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DVBSChannel"/> class.
 /// </summary>
 public DVBSChannel()
 {
   SwitchingFrequency = 0;
   DisEqc = DisEqcType.SimpleA;
   _bandType = BandType.Universal;
   _satelliteIndex = -1;
   _modulation = ModulationType.ModQpsk;
   _innerFecRate = BinaryConvolutionCodeRate.RateNotSet;
   _pilot = Pilot.NotSet;
   _rollOff = RollOff.NotSet;
 }
Example #35
0
 public List<News> GetPagedNewsByTypeANDPublishDate(PagingContext pager, BandType newsType, DateTime sTime,
     DateTime eTime, PublishStatus publishStatus)
 {
     return GetPagedNewsByTypeANDPublishDate(pager, newsType, sTime, eTime, publishStatus,
         NewsRemarkType.Normal);
 }
Example #36
0
        /// <summary>
        /// Gets the default LNB Setup depending on the type chosen.
        /// </summary>
        /// <param name="parameters">Satelliet scan parameters</param>
        /// <param name="band">LNB type i.e. Uiniversal</param>
        /// <param name="lof1">LNB low frequency</param>
        /// <param name="lof2">LNB high frequency</param>
        /// <param name="sw">LNB switch frequency</param>
        public static void GetDefaultLnbSetup(ScanParameters parameters, BandType band, out int lof1, out int lof2,
                                              out int sw)
        {
            lof1 = lof2 = sw = 0;
            if (parameters.UseDefaultLnbFrequencies == false)
            {
                lof1 = parameters.LnbLowFrequency;
                lof2 = parameters.LnbHighFrequency;
                sw   = parameters.LnbSwitchFrequency;
                return;
            }
            switch (band)
            {
            case BandType.Universal:
                lof1 = 9750;
                lof2 = 10600;
                sw   = 11700;
                break;

            case BandType.Circular:
                lof1 = 10750;
                lof2 = 0;
                sw   = 0;
                break;

            case BandType.CBand:
                lof1 = 5150;
                lof2 = 0;
                sw   = 0;
                break;

            case BandType.NaBandStackedDpKuHi:
                lof1 = 11250;
                lof2 = 14350;
                sw   = 0;
                break;

            case BandType.NaBandStackedDpKuLo:
                lof1 = 10750;
                lof2 = 13850;
                sw   = 0;
                break;

            case BandType.NaBandStackedKuHi:
                lof1 = 11250;
                lof2 = 10675;
                sw   = 0;
                break;

            case BandType.NaBandStackedKuLo:
                lof1 = 10750;
                lof2 = 10175;
                sw   = 0;
                break;

            case BandType.NaBandStackedC:
                lof1 = 5150;
                lof2 = 5750;
                sw   = 0;
                break;

            case BandType.NaLegacy:
                lof1 = 11250;
                lof2 = 0;
                sw   = 0;
                break;

            case BandType.NaCustom1:
                lof1 = 11250;
                lof2 = 11250;
                sw   = 12700;
                break;

            case BandType.NaCustom2:
                lof1 = 11250;
                lof2 = 11250;
                sw   = 12200;
                break;
            }
        }
Example #37
0
 public List <News> GetPagedNewsByTypeANDPublishDate(PagingContext pager, BandType newsType, DateTime sTime,
                                                     DateTime eTime, PublishStatus publishStatus)
 {
     return(GetPagedNewsByTypeANDPublishDate(pager, newsType, sTime, eTime, publishStatus,
                                             NewsRemarkType.Normal));
 }
 protected BandTypeConstants(BandType bandType)
 {
     this.BandType = bandType;
 }
Example #39
0
 public BandwidthEventArgs(int bandwidth, int offset, BandType side)
 {
     this.Bandwidth = bandwidth;
       this.Offset = offset;
       this.Side = side;
 }
Example #40
0
 public Band(string bandname, DateTime year, List <string> members, BandType band)
 {
     BandName   = bandname;
     YearFormed = year;
     Members    = members;
 }
Example #41
0
 public List <News> GetPagedNewsByNewsType(PagingContext pager, BandType newsType,
                                           PublishStatus publishStatus, NewsRemarkType newsRemarkType)
 {
     return(NewsDao.GetPagedNewsByNewsType(pager, (int)newsType, (int)publishStatus, (int)newsRemarkType));
 }
Example #42
0
 public BBands(int avgPeriod, BandType type)
     : base(avgPeriod, type.ToString())
 {
     _type = type;
 }
Example #43
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
       if (e.Button == MouseButtons.Left)
       {
     float num = Math.Max((float) this._filterBandwidth * this._xIncrement, 2f);
     if (this._enableFilter)
     {
       if (this._enableFilterMove && (double) e.X > (double) this._lower && ((double) e.X < (double) this._upper && (double) num < (double) this._buffer.Width))
       {
     this._oldX = e.X;
     this._oldFrequency = this._frequency;
     this._changingFrequency = true;
       }
       else if ((double) Math.Abs((float) ((double) e.X - (double) this._upper - 4.0)) <= 4.0 && (this._bandType == BandType.Center || this._bandType == BandType.Upper))
       {
     this._side = BandType.Upper;
     this._oldX = e.X;
     this._oldFilterBandwidth = this._filterBandwidth;
     this._changingBandwidth = true;
       }
       else if ((double) Math.Abs((float) ((double) e.X - (double) this._lower + 4.0)) <= 4.0 && (this._bandType == BandType.Center || this._bandType == BandType.Lower))
       {
     this._side = BandType.Lower;
     this._oldX = e.X;
     this._oldFilterBandwidth = this._filterBandwidth;
     this._changingBandwidth = true;
       }
     }
     if (this._changingBandwidth || this._changingFrequency)
       return;
     this._oldX = e.X;
     this._oldCenterFrequency = this._centerFrequency;
     this._changingCenterFrequency = true;
       }
       else
       {
     if (e.Button != MouseButtons.Right)
       return;
     this.UpdateFrequency(this._frequency / 500L * 500L, FrequencyChangeSource.Click);
       }
 }
Example #44
0
 protected BandTypeConstants(BandType bandType)
 {
     this.BandType = bandType;
 }
Example #45
0
 /// <summary>
 /// Gets the default LNB Setup depending on the type chosen.
 /// </summary>
 /// <param name="parameters">Satelliet scan parameters</param>
 /// <param name="band">LNB type i.e. Uiniversal</param>
 /// <param name="lof1">LNB low frequency</param>
 /// <param name="lof2">LNB high frequency</param>
 /// <param name="sw">LNB switch frequency</param>
 public static void GetDefaultLnbSetup(ScanParameters parameters, BandType band, out int lof1, out int lof2,
                                       out int sw)
 {
   lof1 = lof2 = sw = 0;
   if (parameters.UseDefaultLnbFrequencies == false)
   {
     lof1 = parameters.LnbLowFrequency;
     lof2 = parameters.LnbHighFrequency;
     sw = parameters.LnbSwitchFrequency;
     return;
   }
   switch (band)
   {
     case BandType.Universal:
       lof1 = 9750;
       lof2 = 10600;
       sw = 11700;
       break;
     case BandType.Circular:
       lof1 = 10750;
       lof2 = 0;
       sw = 0;
       break;
     case BandType.CBand:
       lof1 = 5150;
       lof2 = 0;
       sw = 0;
       break;
     case BandType.NaBandStackedDpKuHi:
       lof1 = 11250;
       lof2 = 14350;
       sw = 0;
       break;
     case BandType.NaBandStackedDpKuLo:
       lof1 = 10750;
       lof2 = 13850;
       sw = 0;
       break;
     case BandType.NaBandStackedKuHi:
       lof1 = 11250;
       lof2 = 10675;
       sw = 0;
       break;
     case BandType.NaBandStackedKuLo:
       lof1 = 10750;
       lof2 = 10175;
       sw = 0;
       break;
     case BandType.NaBandStackedC:
       lof1 = 5150;
       lof2 = 5750;
       sw = 0;
       break;
     case BandType.NaLegacy:
       lof1 = 11250;
       lof2 = 0;
       sw = 0;
       break;
     case BandType.NaCustom1:
       lof1 = 11250;
       lof2 = 11250;
       sw = 12700;
       break;
     case BandType.NaCustom2:
       lof1 = 11250;
       lof2 = 11250;
       sw = 12200;
       break;
   }
 }
Example #46
0
 public BandwidthEventArgs(int bandwidth, int offset, BandType side)
 {
     this.Bandwidth = bandwidth;
     this.Offset    = offset;
     this.Side      = side;
 }
Example #47
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="cornerFreqs">The corner frequencies in radians/sample.  Only the first element is used in a low/high pass filter.</param>
        /// <param name="order"></param>
        /// <param name="ripple"></param>
        /// <param name="bandType"></param>
        /// <returns></returns>
        public static FilterOrderSpec CreateChebyshevType2Spec(Pair<double, double> cornerFreqs, int order, double ripple, BandType bandType)
        {
            FilterOrderSpec spec = new FilterOrderSpec();
            spec.CornerFreqs = cornerFreqs;
            spec.Order = order;
            spec.Ripple = ripple;
            spec.BandType = bandType;
            spec.FilterType = IirFilterType.ChebyshevType2;

            return spec;
        }