Program.cs 867 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using Uestc.Auto6.Dso.ComModel;
  3. using Uestc.Auto6.Dso.Core;
  4. namespace Uestc.Auto6.Dso.Servlet
  5. {
  6. class Program
  7. {
  8. public static DsoPrsnt Oscilloscope;
  9. static void Main(String[] args)
  10. {
  11. Console.WriteLine("Start Servlet...");
  12. Oscilloscope = new DsoPrsnt();
  13. foreach (var c in Oscilloscope.GetChnlsInRange(ChannelId.C1, ChannelId.C4))
  14. {
  15. Console.WriteLine(c.Name);
  16. }
  17. if (Oscilloscope.TryGetChannel(ChannelId.C1, out var cp))
  18. {
  19. var ap = (AnalogPrsnt)cp;
  20. Console.WriteLine("ScaleIndex =" + ap.ScaleIndex);
  21. ap.ScaleIndex--;
  22. Console.WriteLine("ScaleIndex =" + ap.ScaleIndex);
  23. }
  24. Console.WriteLine("Close Servlet...");
  25. }
  26. }
  27. }