ScpiFuncs_SystemCommon.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Uestc.Auto6.Dso.Core;
  7. using Uestc.Auto6.Dso.ComModel;
  8. using UESTC.Auto.SCPIManager;
  9. namespace Uestc.Auto6.Dso.Scpi
  10. {
  11. partial class StubFunc
  12. {
  13. public static bool scpiSet_SystemCommon(SCPICommandProcessFuncParam analyResult)
  14. {
  15. List<string> param = ParamListToStrList(analyResult.Params);
  16. if (analyResult.Tag == null || analyResult.Tag is not ScpiTagObj scpiTagObj || scpiTagObj.Tag == null)
  17. return false;
  18. switch (scpiTagObj.Tag.ToString())
  19. {
  20. case "SysAuto":
  21. //todo
  22. break;
  23. case "SysRun":
  24. if (Presenter.Status == SysStatus.Stop)
  25. Presenter.Resume();
  26. else
  27. return false;
  28. return true;
  29. case "SysStop":
  30. if (Presenter.Status != SysStatus.Stop)
  31. Presenter.Stop();
  32. else
  33. return false;
  34. return true;
  35. case "SysSingle":
  36. TriggerPrsnt.Mode = TriggerMode.OneShot;
  37. Presenter.Resume();
  38. return true;
  39. case "SysClear":
  40. //todo
  41. break;
  42. default:
  43. return false;
  44. }
  45. return true;
  46. }
  47. }
  48. }