Exemple #1
0
        static void MainTest()
        {
            log4net.Config.XmlConfigurator.Configure();
            var journal = new Journal(LogManager.GetLogger("logger"));
            var factory = new SignalsFactory(journal, 502);


            var rv = new Signal("my.signal.one");

            rv.AddCalibrationPoint(2, 100.0f);
            rv.AddCalibrationPoint(50000, 65000.0f);

            //factory.AddUshort(new Signal("my.double.one"), 1);

            //factory.AddDiscreet(new Signal("my.signal.5"), 2, 5, false);
            //factory.AddDiscreet(new Signal("my.signal.6"), 2, 6, false);

            factory.Start();
            factory.PrintInfo();

            var i    = 0;
            var time = new Stopwatch();

            time.Start();
            while (i < 50000)
            {
                rv.Update(i++);
            }
            time.Stop();

            Console.WriteLine(time.ElapsedMilliseconds);
            Console.WriteLine("Enter Press");
            Console.ReadLine();
        }