Exemplo n.º 1
0
 public void Change(BinDataMode prevMode, BinDataMode newMode)
 {
     for (int i = 0; i < bufferFramesObjects.Count; i++)
     {
         bufferFramesObjects[i].Change(prevMode, newMode);
     }
 }
Exemplo n.º 2
0
        public uint GetFramesCount(BinDataMode mode)
        {
            uint frames = 0;

            for (int i = 0; i < bufferFramesArray.Count; i++)
            {
                if (bufferFramesArray[i].mode == mode)
                {
                    frames++;
                }
            }

            return(frames);
        }
Exemplo n.º 3
0
 public void Change(BinDataMode prevMode, BinDataMode newMode)
 {
     for (int i = 0; i < bufferFramesArray.Count; i++)
     {
         try
         {
             if (bufferFramesArray[i].mode == prevMode)
             {
                 bufferFramesArray[i].mode = newMode;
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
Exemplo n.º 4
0
        public void LoadData(BinaryReader reader)
        {
            stackedFrames = reader.ReadUInt32();
            time          = reader.ReadUInt32();

            transitionTime = reader.ReadUInt32();

            mode = (BinDataMode)reader.ReadUInt32();

            uint length = reader.ReadUInt32();

            for (int j = 0; j < bufferArray.Length; j++)
            {
                bufferArray[j] = reader.ReadSingle();
            }
        }
        public BinData(uint size, string series, BinDataMode mode)
        {
            this.size = size;

            dataSeries = series;

            this.mode = mode;

            totalBinArray = new float[size];
            totalBinArrayNumberOfFrames = new float[size];

            avgBinArray = new float[size];
            binArray    = new float[size];

            device1BinArray = new float[size];
            device2BinArray = new float[size];
        }
Exemplo n.º 6
0
        public uint AddBufferRangeIntoArray(float[] array, BinDataMode mode)
        {
            uint frames = 0;

            for (int i = 0; i < bufferFramesArray.Count; i++)
            {
                if (bufferFramesArray[i].mode == mode)
                {
                    for (int j = 0; j < array.Length; j++)
                    {
                        array[j] += bufferFramesArray[i].bufferArray[j];
                    }

                    frames++;
                }
            }

            return(frames);
        }
Exemplo n.º 7
0
        public uint GetFramesCountForFrequencyRegion(long lowerFrequency, long upperFrequency, BinDataMode mode)
        {
            BufferFramesObject zoomedOutBufferObject = mainForm.bufferFramesArray.GetBufferFramesObject(0);

            long lowerIndex = (long)((lowerFrequency - zoomedOutBufferObject.lowerFrequency) / zoomedOutBufferObject.binSize);
            long upperIndex = (long)((upperFrequency - zoomedOutBufferObject.lowerFrequency) / zoomedOutBufferObject.binSize);

            uint frames = 0;

            for (long i = lowerIndex; i < upperIndex; i++)
            {
                if (bufferFramesArray[(int)i].mode == mode)
                {
                    frames++;
                }
            }

            return(frames);
        }
Exemplo n.º 8
0
        public BufferFrame(long size, BinDataMode mode)
        {
            bufferArray = new float[size];

            this.mode = mode;
        }
Exemplo n.º 9
0
 public void Change(BinDataMode prevMode, BinDataMode newMode)
 {
     bufferFrames.Change(prevMode, newMode);
 }