Example #1
0
        private void btnFindAllFeedback_Click(object sender, EventArgs e)
        {
            if (_seqGen.Nbits < 2)
            {
                return;
            }
            if (LongTimeMessageNo(_seqGen.Nbits))
            {
                return;
            }
            var sgv = new SeqGenValidator(_seqGen);

            _allFbList = new List <int>(sgv.MaxFeedbackCount);
            Stopwatch sw = new Stopwatch();

            sw.Start();
            for (int fb = 1 << (sgv.Nbits - 1); fb < (1 << sgv.Nbits); fb++)
            {
                sgv.Feedback = fb;
                if (sgv.Validate())
                {
                    _allFbList.Add(fb);
                }
            }
            sw.Stop();
            lblTime.Text = sw.ElapsedMilliseconds.ToString();
            UpdateFeedbacksList();

            btnSaveFile.Enabled       = true;
            btnFindAllCorPeak.Enabled = true;
            numSaveStart.Maximum      = _allFbList.Count;
            numSaveStart.Value        = 1;
            numSaveLen.Maximum        = _allFbList.Count;
            numSaveLen.Value          = _allFbList.Count;
        }
Example #2
0
 public virtual bool Validate()
 {
     if (!IsValid)
     {
         var temp = new SeqGenValidator(this);
         IsValid = temp.Validate();
     }
     return(IsValid);
 }
Example #3
0
        private void btnFindNextFeedback_Click(object sender, EventArgs e)
        {
            var sgv = new SeqGenValidator(_seqGen);

            for (int fb = sgv.Feedback + 1; fb < (1 << 24); fb++)
            {
                sgv.Feedback = fb;
                if (!sgv.Validate())
                {
                    continue;
                }
                ChangeFeedback(sgv);
                break;
            }
        }