using System; using System.Collections.Generic; namespace Virgo_DCommon { public class DeviceName { //Eefem public const string EfemRobot = "EfemRobot"; } public enum EfemOperation { Home, //HomeLP, Pick, Place, Extend, Retract, Align, Map, Light, TurnOffAllLights, GetWaferInfo, Orgsh, Lift, SigStatus, Ready, Abort, ClearError, PmPinUp, PmPinDown } public class EfemConstant { public static readonly Dictionary OperationString = new Dictionary() { { EfemOperation.Ready, "READY" }, { EfemOperation.Home, "INIT" }, { EfemOperation.Orgsh, "ORGSH" }, { EfemOperation.ClearError, "ERROR"}, //{ EfemOperation.HomeLP, "INIT" }, { EfemOperation.Map, "WAFSH" }, { EfemOperation.GetWaferInfo, "MAPDT" }, { EfemOperation.Pick, "LOAD" }, { EfemOperation.Place, "UNLOAD" }, { EfemOperation.Extend, "MPNT" }, { EfemOperation.Align, "ALIGN" }, { EfemOperation.SigStatus, "SIGSTAT" }, { EfemOperation.Lift, "LIFT" }, { EfemOperation.Light, "SIGOUT" }, { EfemOperation.Abort, "ABORT" } }; public static EfemOperation ToOperation(string str) { foreach (var item in OperationString) { if (item.Value == str) { return item.Key; } } throw new ApplicationException($"Cannot translate {str}"); } } }