Esempio n. 1
0
        /// <summary>
        /// Handle the received global data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void GlobalBufferRead(object sender, BufferReceivedEventArgs args)
        {
            this.BufferReceived -= GlobalBufferRead;
            byte[] globalBuffer = args.Data.Buffer;
            Count        = ToUShort(globalBuffer, DATA_COUNT) - 1; // The active buffer is also in Count
            SnapshotDate = toDateTime(globalBuffer, DATE_TIME);
            ushort pos = ToUShort(globalBuffer, CURRENT_POS);

            CurrentPos    = new BufferPos(pos);
            CurrentBuffer = null;

            this.BufferReceived += ActiveSnapshotRead;
            GetBlock(CurrentPos);
        }
Esempio n. 2
0
 private void GetBlock(BufferPos currentPos)
 {
     GetBlock(currentPos.Offset);
 }