Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CsvInputAdapter"/> class.
        /// </summary>
        public CsvInputAdapter()
        {
            m_fileName                = "measurements.csv";
            m_columns                 = new Dictionary <string, int>(StringComparer.CurrentCultureIgnoreCase);
            m_columnMappings          = new Dictionary <int, IMeasurement>();
            m_inputInterval           = 33.333333;
            m_measurementsPerInterval = 5;

            // Set minimum timer resolution to one millisecond to improve timer accuracy
            PrecisionTimer.SetMinimumTimerResolution(1);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileImporter"/> class.
        /// </summary>
        public FileImporter()
        {
            m_fileProcessQueue = new AsyncQueue <string>();
            m_fileProcessQueue.ProcessItemFunction = ProcessFile;
            m_fileProcessQueue.ProcessException   += m_fileProcessQueue_ProcessException;

            m_columns        = new Dictionary <string, int>(StringComparer.CurrentCultureIgnoreCase);
            m_columnMappings = new Dictionary <int, IMeasurement>();

            m_inputInterval           = 5.0D;
            m_measurementsPerInterval = 13;
            m_skipRows        = 2;
            m_timestampFormat = "dd-MMM-yyyy HH:mm:ss.fff";

            // Set minimum timer resolution to one millisecond to improve timer accuracy
            PrecisionTimer.SetMinimumTimerResolution(1);
        }