protected override void storeData(InstrumentDataset data)
 {
     currentDataset = (PicoTC08InstrumentDataset)data;
     base.storeData(data);
 }
        protected override InstrumentDataset getInstrumentData()
        {
            PicoTC08InstrumentDataset dataset = new PicoTC08InstrumentDataset();

            if (handle > 0)
            {
                int       buffer_size     = 1024;
                float[][] tempBuffer      = new float[PicoTC08Settings.nChannels][];
                int[][]   times_ms_buffer = new int[PicoTC08Settings.nChannels][];
                short[]   overflow        = new short[PicoTC08Settings.nChannels];

                int numberOfSamples = 0;


                for (int i = 0; i < PicoTC08Settings.nChannels; i++)
                {
                    tempBuffer[i]      = new float[buffer_size];
                    times_ms_buffer[i] = new int[buffer_size];
                }


                for (short i = 0; i < PicoTC08Settings.nChannels; i++)
                {
                    if (settings.getChannelType(i) != PicoTC08Settings.ChannelType.NotEnabled)
                    {
                        int nS = 0;
                        nS = Imports.TC08GetTemp(handle, tempBuffer[i], times_ms_buffer[i], buffer_size,
                                                 out overflow[i], i, TempUnit.USBTC08_UNITS_KELVIN, 0);


                        if (nS > numberOfSamples)
                        {
                            numberOfSamples = nS;
                        }
                        else if (nS < 0)
                        {
                            short err = Imports.TC08GetLastError(handle);
                        }
                    }
                }

                System.Text.StringBuilder line = new System.Text.StringBuilder(256);

                Imports.TC08GetFormattedInfo(handle, line, 256);
                Console.WriteLine("{0}", line);


                double[,] data = new double[PicoTC08Settings.nChannels, 2];
                for (int i = 0; i < numberOfSamples; i++)
                {
                    for (int j = 0; j < PicoTC08Settings.nChannels; j++)
                    {
                        data[j, 0] = times_ms_buffer[j][i];
                        data[j, 1] = tempBuffer[j][i];
                    }
                    dataset.AddData(data);
                }
            }
            Thread.Sleep(actual_interval_ms);
            return(dataset);
        }