public void AddData(stContinuousModeData_SOLD data)
        {
            // data.sequence trae la secuencia del frame, que se convertirá en una secuencia continua
            lock (syncObj)
            {
                int frameSequence = 0;

                //save the frame sequence number (to calculate next usersequence)
                frameSequence = (int)data.sequence;

                // set sequence for data (with current user sequence)
                data.sequence = userSequence;
                //updating the next user sequence and lastFrameSequence
                if (frameSequence > lastFrameSequence)
                {
                    userSequence = userSequence + System.Convert.ToUInt64(frameSequence - lastFrameSequence);
                }
                if (frameSequence < lastFrameSequence)
                {
                    userSequence = userSequence + System.Convert.ToUInt64(frameSequence - lastFrameSequence + 256);
                }
                lastFrameSequence = frameSequence;
                //Dim curSequence As Integer = CInt(data.sequence)
                dataList.Add(data);
            }
        }
        public void AddData(stContinuousModeData_SOLD data) // Overloads
        {
            // data.sequence trae la secuencia del frame, que se convertirá en una secuencia continua
            lock (syncObj)
            {
                int frameSequence = 0;

                m_captureMSCount++;
                // cumulate
                for (var i = 0; i <= data.data.Length - 1; i++)
                {
                    m_acumData[(int)i].power          += data.data[(int)i].power;
                    m_acumData[(int)i].temperatureUTI += data.data[(int)i].temperature.UTI;
                }
                if (m_captureMSCount == m_captureWindow)
                {
                    // set sequence for data (with current user sequence)
                    userSequence  = userSequence + System.Convert.ToUInt64(1);
                    data.sequence = userSequence;

                    for (var i = 0; i <= data.data.Length - 1; i++)
                    {
                        data.data[(int)i].power           = System.Convert.ToInt32(m_acumData[(int)i].power / m_captureWindow);
                        data.data[(int)i].temperature     = new CTemperature(System.Convert.ToInt32(m_acumData[(int)i].temperatureUTI / m_captureWindow));
                        m_acumData[(int)i].power          = 0;
                        m_acumData[(int)i].temperatureUTI = 0;
                    }

                    dataList.Add(data);
                    m_captureMSCount = 0;
                }
            }
        }
 public void AddData(stContinuousModeData_SOLD data)
 {
     // data.sequence trae la secuencia del frame, que se convertirá en una secuencia continua
     //SyncLock syncObjList
     // add continuous mode data in each queue buffer
     foreach (CContinuousModeQueueStation_SOLD dataQueue in queueList)
     {
         dataQueue.AddData(data);
     }
     //End SyncLock
 }
        public void AddData(stContinuousModeData_SOLD data, uint queueID)
        {
            // data.sequence trae la secuencia del frame, que se convertirá en una secuencia continua
            //SyncLock syncObjList
            // add continuous mode data in buffer
            int idx = getIdx(queueID);

            if (idx >= 0)
            {
                queueList[idx].dataList.Add(data);
            }
            //End SyncLock
        }
        public stContinuousModeData_SOLD GetData(uint queueID)
        {
            stContinuousModeData_SOLD data = new stContinuousModeData_SOLD();

            try
            {
                int idx = getIdx(queueID);
                if (idx >= 0)
                {
                    // get out data from trace buffer
                    data = queueList[idx].GetData();
                }
            }
            catch (Exception)
            {
            }
            return(data);
        }
 public stContinuousModeData_SOLD GetData()
 {
     // check data.data.length = 0 on return for error???
     lock (syncObj)
     {
         stContinuousModeData_SOLD data = new stContinuousModeData_SOLD();
         try
         {
             // get out data from trace buffer
             if (dataList.Count > 0)
             {
                 data = dataList[0];
                 dataList.RemoveAt(0);
             }
         }
         catch (Exception)
         {
         }
         return(data);
     }
 }