示例#1
0
 public static void outputFunTimer(List <outputForm> objListOut, AdamCNT AdamComponent)
 {
     objListOut.Add(new outputForm(AdamComponent.getCnt(), AdamComponent.getSwitchState()));
     using (var writer = new StreamWriter("TimerOutput.csv"))
         using (var csv = new CsvWriter(writer))
         {
             csv.WriteRecords(objListOut);
         }
 }
示例#2
0
        private static void OnSignal(Object source, ElapsedEventArgs e)
        {
            Console.WriteLine("Entered timer... ");
            Console.WriteLine("######################");
            Console.WriteLine("Count: " + AdamComponent.getCnt());
            Console.WriteLine("State: " + AdamComponent.getSwitchState());
            Console.WriteLine("######################");

            FileIO.outputFunTimer(objListOut, AdamComponent);
        }
示例#3
0
 private static void OnSignal(Object source, ElapsedEventArgs e)
 {
     AdamComponent.buttonRead();
     AdamComponent.counterRead();
     Console.WriteLine("Entered timer... ");
     objListOut.Add(new outputForm(AdamComponent.getCnt(), "OFF")); //napravi geter za cnt
     using (var writer = new StreamWriter("output2.csv"))
         using (var csv = new CsvWriter(writer))
         {
             csv.WriteRecords(objListOut);
         }
 }