コード例 #1
0
        private void FrameAvailableHandler(ref RdsFrame frame)
        {
            RdsFrameAvailableDelegate frameAvailable = this.FrameAvailable;

            if (frameAvailable != null)
            {
                frameAvailable(ref frame);
            }
        }
コード例 #2
0
 public void Clock(bool b)
 {
     this._raw <<= 1;
     this._raw  |= (uint)(b ? 1 : 0);
     this._count++;
     if (this._sequence == BlockSequence.WaitBitSync)
     {
         this._syndrome  = SyndromeDetector.BuildSyndrome(this._raw);
         this._syndrome ^= 984;
         this._sequence  = ((this._syndrome != 0) ? BlockSequence.WaitBitSync : BlockSequence.GotA);
         this._blocks[0] = (ushort)(this._raw >> 10 & 0xFFFF);
         this._count     = 0;
     }
     if (this._count == 26)
     {
         this.ProcessSyndrome();
         if (this._sequence == BlockSequence.GotD)
         {
             this._frame.GroupA = this._blocks[0];
             this._frame.GroupB = this._blocks[1];
             this._frame.GroupC = this._blocks[2];
             this._frame.GroupD = this._blocks[3];
             this._frame.Filter = false;
             RdsFrameAvailableDelegate frameAvailable = this.FrameAvailable;
             if (frameAvailable != null)
             {
                 frameAvailable(ref this._frame);
             }
             if (!this._frame.Filter)
             {
                 this._dumpGroups.AnalyseFrames(ref this._frame);
             }
             this._sequence = BlockSequence.GotBitSync;
         }
         this._count = 0;
     }
 }