Exemple #1
0
        public static void PrintSystemProps(ISatSystem system)
        {
            Console.Clear();
            const string underline = "-----------------------------------";

            Console.WriteLine(underline);
            Console.WriteLine(system.GetType().Name);
            Console.WriteLine(underline);
            //Console.WriteLine(string.Format("Lat: {0}", system.Lat));
            foreach (PropertyInfo prop in system.GetType().GetProperties())
            {
                Console.WriteLine(prop.Name + ": " + prop.GetValue(system, null));
            }
        }
Exemple #2
0
 public static void BeginAcq(ISatSystem system, int interval)
 {
     for (; ;)
     {
         if (system.QuerySystemStatus())
         {
             //SatMonRepository.AddToDb(system);
             PrintSystemProps(system);
         }
         else
         {
             //wait a few seconds and try one more time
             Thread.Sleep(1000 * 2);
             if (system.QuerySystemStatus())
             {
                 //SatMonRepository.AddToDb(system);
                 PrintSystemProps(system);
             }
         }
         Thread.Sleep(1000 * 4 * 60); //four minute delay
     }
 }