DeviceName.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Virgo_DCommon
  4. {
  5. public class DeviceName
  6. {
  7. //Eefem
  8. public const string EfemRobot = "EfemRobot";
  9. }
  10. public enum EfemOperation
  11. {
  12. Home,
  13. //HomeLP,
  14. Pick,
  15. Place,
  16. Extend,
  17. Retract,
  18. Align,
  19. Map,
  20. Light,
  21. TurnOffAllLights,
  22. GetWaferInfo,
  23. Orgsh,
  24. Lift,
  25. SigStatus,
  26. Ready,
  27. Abort,
  28. ClearError,
  29. PmPinUp,
  30. PmPinDown
  31. }
  32. public class EfemConstant
  33. {
  34. public static readonly Dictionary<EfemOperation, string> OperationString = new Dictionary<EfemOperation, string>()
  35. {
  36. { EfemOperation.Ready, "READY" },
  37. { EfemOperation.Home, "INIT" },
  38. { EfemOperation.Orgsh, "ORGSH" },
  39. { EfemOperation.ClearError, "ERROR"},
  40. //{ EfemOperation.HomeLP, "INIT" },
  41. { EfemOperation.Map, "WAFSH" },
  42. { EfemOperation.GetWaferInfo, "MAPDT" },
  43. { EfemOperation.Pick, "LOAD" },
  44. { EfemOperation.Place, "UNLOAD" },
  45. { EfemOperation.Extend, "MPNT" },
  46. { EfemOperation.Align, "ALIGN" },
  47. { EfemOperation.SigStatus, "SIGSTAT" },
  48. { EfemOperation.Lift, "LIFT" },
  49. { EfemOperation.Light, "SIGOUT" },
  50. { EfemOperation.Abort, "ABORT" }
  51. };
  52. public static EfemOperation ToOperation(string str)
  53. {
  54. foreach (var item in OperationString)
  55. {
  56. if (item.Value == str)
  57. {
  58. return item.Key;
  59. }
  60. }
  61. throw new ApplicationException($"Cannot translate {str}");
  62. }
  63. }
  64. }