using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MECF.Framework.Common.FAServices
{
///
/// Gem200的事件
///
public static class UniversalEvents
{
public const string EquipmentOFFLINE = "EquipmentOFFLINE";
public const string ControlStateLOCAL = "ControlStateLOCAL";
public const string ControlStateREMOTE = "ControlStateREMOTE";
public const string ProcessingStarted = "ProcessingStarted";
public const string ProcessingCompleted = "ProcessingCompleted";
public const string ProcessingStopped = "ProcessingStopped";
public const string ProcessingStateChanged = "ProcessingStateChanged";
public const string EquipmentConstantChanged = "EquipmentConstantChanged";
public const string ProcessProgramChanged = "ProcessProgramChanged";
public const string ProcessProgramSelected = "ProcessProgramSelected";
public const string ProcessProgramCreated = "ProcessProgramCreated";
public const string SpoolingActivated = "SpoolingActivated";
public const string SpoolingDeactivated = "SpoolingDeactivated";
public const string SpoolingFailed = "SpoolingFailed";
public const string EquipmentChangeToAuto = "EquipmentChangeToAuto";
public const string EquipmentChangeToManual = "EquipmentChangeToManual";
public const string WAFER_LEFT_POSITION = "WAFER_LEFT_POSITION";
public const string WAFER_ARRIVE_POSITION = "WAFER_ARRIVE_POSITION";
public const string CARRIER_ARRIVED = "CARRIER_ARRIVED";
public const string CARRIER_REMOVED = "CARRIER_REMOVED";
public const string CARRIER_ID_READ = "CARRIER_ID_READ";
public const string CARRIER_ID_READ_FAILED = "CARRIER_ID_READ_FAILED";
public const string CARRIER_ID_WRITE = "CARRIER_ID_WRITE";
public const string CARRIER_ID_WRITE_FAILED = "CARRIER_ID_WRITE_FAILED";
public const string CARRIER_LOADED = "CARRIER_LOADED";
public const string CARRIER_UNLOADED = "CARRIER_UNLOADED";
public const string SLOT_MAP_AVAILABLE = "SLOT_MAP_AVAILABLE";
public const string PortClamped = "PortClamped";
public const string PortUnClamped = "PortUnClamped";
public const string PortReadyToLoad = "PortReadyToLoad";
public const string PortReadyToUnload = "PortReadyToUnload";
public const string CarrierProcessStart = "CarrierProcessStart";
public const string CarrierProcessComplete = "CarrierProcessComplete";
public const string PortJobStarted = "PortJobStarted";
public const string PortJobStopped = "PortJobStopped";
public const string PortJobPaused = "PortJobPaused";
public const string PortJobResumed = "PortJobResumed";
public const string PortJobAborted = "PortJobAborted";
public const string PortJobFinished = "PortJobFinished";
public const string PortJobFailed = "PortJobFailed";
public const string PortMapFailed = "PortMapFailed";
public const string PortPPSelected = "PortPPSelected";
public const string PortPPSelectFailed = "PortPPSelectFailed";
public const string PortJobWaferStart = "PortJobWaferStart";
public const string PortJobWaferEnd = "PortJobWaferEnd";
public const string RecipeStart = "RecipeStart";
public const string RecipeComplete = "RecipeComplete";
public const string RecipeStepStart = "RecipeStepStart";
public const string RecipeStepEnd = "RecipeStepEnd";
public const string RecipeFailed = "RecipeFailed";
///
/// 定义Gem200事件的ID
///
public enum EventName
{
EquipmentOFFLINE = 1,
ControlStateLOCAL = 2,
ControlStateREMOTE = 3,
ProcessingStarted = 4,
ProcessingCompleted = 5,
ProcessingStopped = 6,
ProcessingStateChanged = 7,
EquipmentConstantChanged = 8,
ProcessProgramChanged = 9,
ProcessProgramSelected = 10,
ProcessProgramCreated = 11,
SpoolingActivated = 160,
SpoolingDeactivated = 161,
SpoolingFailed = 162,
EquipmentChangeToAuto = 501,
EquipmentChangeToManual = 502,
WAFER_LEFT_POSITION = 503,
WAFER_ARRIVE_POSITION = 504,
CARRIER_ARRIVED = 1000,
CARRIER_REMOVED = 1001,
CARRIER_ID_READ = 1002,
CARRIER_ID_READ_FAILED = 1003,
CARRIER_ID_WRITE = 1004,
CARRIER_ID_WRITE_FAILED = 1005,
CARRIER_LOADED = 1006,
CARRIER_UNLOADED = 1007,
SLOT_MAP_AVAILABLE = 1008,
PortReadyToLoad = 1010,
PortReadyToUnload = 1011,
PortClamped = 1012,
PortUnClamped = 1013,
CarrierProcessStart = 1020,
CarrierProcessComplete = 1021,
PortJobStarted = 1022,
PortJobStopped = 1023,
PortJobPaused = 1024,
PortJobResumed = 1025,
PortJobAborted = 1026,
PortJobFinished = 1027,
PortJobFailed = 1028,
PortMapFailed = 1029,
PortPPSelected = 1030,
PortPPSelectFailed = 1031,
PortJobWaferStart = 1032,
PortJobWaferEnd = 1033,
RecipeStart = 2000,
RecipeComplete = 2001,
RecipeStepStart = 2002,
RecipeStepEnd = 2003,
RecipeFailed = 2004,
}
///
/// 定义Gem200的事件所Link的VIDs
///
public static Dictionary UniversalEventsDictionary = new Dictionary()
{
{EquipmentOFFLINE, new VIDItem() {Name = EquipmentOFFLINE, Index = (int)EventName.EquipmentOFFLINE, LinkableVid = new[] {3,4}}},
{ControlStateLOCAL, new VIDItem() {Name = ControlStateLOCAL, Index = (int)EventName.ControlStateLOCAL, LinkableVid = new[] {3,4}}},
{ControlStateREMOTE, new VIDItem() {Name = ControlStateREMOTE, Index = (int)EventName.ControlStateREMOTE, LinkableVid = new[] {3,4}}},
{ProcessingStarted, new VIDItem() {Name = ProcessingStarted, Index = (int)EventName.ProcessingStarted, LinkableVid = new[] {3,7}}},
{ProcessingCompleted, new VIDItem() {Name = ProcessingCompleted, Index = (int)EventName.ProcessingCompleted, LinkableVid = new[] {3,7}}},
{ProcessingStopped, new VIDItem() {Name = ProcessingStopped, Index = (int)EventName.ProcessingStopped, LinkableVid = new[] {3,7}}},
{ProcessingStateChanged, new VIDItem() {Name = ProcessingStateChanged, Index = (int)EventName.ProcessingStateChanged, LinkableVid = new[] {3,8,7}}},
{EquipmentConstantChanged, new VIDItem() {Name = EquipmentConstantChanged, Index = (int)EventName.EquipmentConstantChanged, LinkableVid = new[] {(int)DataVariables.DataName.ECChangedID}}},
{ProcessProgramChanged, new VIDItem() {Name = ProcessProgramChanged, Index = (int)EventName.ProcessProgramChanged, LinkableVid = new[] {(int)DataVariables.DataName.SequenceID}}},
{ProcessProgramSelected, new VIDItem() {Name = ProcessProgramSelected, Index = (int)EventName.ProcessProgramSelected, LinkableVid = new[] {(int)DataVariables.DataName.SequenceID}}},
{ProcessProgramCreated, new VIDItem() {Name = ProcessProgramCreated, Index = (int)EventName.ProcessProgramCreated, LinkableVid = new[] {(int)DataVariables.DataName.SequenceID}}},
{SpoolingActivated, new VIDItem() {Name = SpoolingActivated, Index = (int)EventName.SpoolingActivated}},
{SpoolingDeactivated, new VIDItem() {Name = SpoolingDeactivated, Index = (int)EventName.SpoolingDeactivated}},
{SpoolingFailed, new VIDItem() {Name = SpoolingFailed, Index = (int)EventName.SpoolingFailed}},
{EquipmentChangeToAuto, new VIDItem() {Name = EquipmentChangeToAuto, Index = (int)EventName.EquipmentChangeToAuto}},
{EquipmentChangeToManual, new VIDItem() {Name = EquipmentChangeToManual, Index = (int)EventName.EquipmentChangeToManual}},
{WAFER_LEFT_POSITION, new VIDItem() {Name = WAFER_LEFT_POSITION, Index = (int)EventName.WAFER_LEFT_POSITION, LinkableVid = new[] {(int)DataVariables.DataName.SubstID,(int)DataVariables.DataName.SubstLocID,(int)DataVariables.DataName.SubstLocState,3}}},
{WAFER_ARRIVE_POSITION, new VIDItem() {Name = WAFER_ARRIVE_POSITION, Index = (int)EventName.WAFER_ARRIVE_POSITION, LinkableVid = new[] {(int)DataVariables.DataName.SubstID,(int)DataVariables.DataName.SubstLocID,(int)DataVariables.DataName.SubstLocState,3}}},
{CARRIER_ARRIVED, new VIDItem() {Name = CARRIER_ARRIVED, Index = (int)EventName.CARRIER_ARRIVED, LinkableVid = new[] {(int)DataVariables.DataName.PortID,3}}},
{CARRIER_REMOVED, new VIDItem() {Name = CARRIER_REMOVED, Index = (int)EventName.CARRIER_REMOVED, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID, (int)DataVariables.DataName.PortID, 3 }}},
{ CARRIER_ID_READ, new VIDItem() {Name = CARRIER_ID_READ, Index = (int)EventName.CARRIER_ID_READ, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID, (int)DataVariables.DataName.PortID, (int)DataVariables.DataName.SmartTag, 3 }}},
{ CARRIER_ID_READ_FAILED, new VIDItem() {Name = CARRIER_ID_READ_FAILED, Index = (int)EventName.CARRIER_ID_READ_FAILED, LinkableVid = new[] { (int)DataVariables.DataName.PortID, 3 }}},
{ CARRIER_ID_WRITE, new VIDItem() {Name = CARRIER_ID_WRITE, Index = (int)EventName.CARRIER_ID_WRITE, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID, (int)DataVariables.DataName.PortID, 3 }}},
{ CARRIER_ID_WRITE_FAILED, new VIDItem() {Name = CARRIER_ID_WRITE_FAILED, Index = (int)EventName.CARRIER_ID_WRITE_FAILED, LinkableVid = new[] {(int)DataVariables.DataName.PortID, 3 }}},
{ CARRIER_LOADED, new VIDItem() {Name = CARRIER_LOADED, Index = (int)EventName.CARRIER_LOADED, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID, (int)DataVariables.DataName.PortID, 3 }}},
{ CARRIER_UNLOADED, new VIDItem() {Name = CARRIER_UNLOADED, Index = (int)EventName.CARRIER_UNLOADED, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID, (int)DataVariables.DataName.PortID, 3 }}},
{ SLOT_MAP_AVAILABLE, new VIDItem() {Name = SLOT_MAP_AVAILABLE, Index = (int)EventName.SLOT_MAP_AVAILABLE, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID,(int)DataVariables.DataName.SlotMap, (int)DataVariables.DataName.PortID, 3 }}},
{ PortReadyToLoad, new VIDItem() {Name = PortReadyToLoad, Index = (int)EventName.PortReadyToLoad, LinkableVid = new[] {(int)DataVariables.DataName.PortID, 3 }}},
{ PortReadyToUnload, new VIDItem() {Name = PortReadyToUnload, Index = (int)EventName.PortReadyToUnload, LinkableVid = new[] {(int)DataVariables.DataName.PortID, 3 }}},
{ PortClamped, new VIDItem() {Name = PortClamped, Index = (int)EventName.PortClamped, LinkableVid = new[] {(int)DataVariables.DataName.PortID, 3 }}},
{ PortUnClamped, new VIDItem() {Name = PortUnClamped, Index = (int)EventName.PortUnClamped, LinkableVid = new[] {(int)DataVariables.DataName.PortID, 3 }}},
{ CarrierProcessStart, new VIDItem() {Name = CarrierProcessStart, Index = (int)EventName.CarrierProcessStart, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID,(int)DataVariables.DataName.PortID,3}}},
{CarrierProcessComplete, new VIDItem() {Name = CarrierProcessComplete, Index = (int)EventName.CarrierProcessComplete, LinkableVid = new[] {(int)DataVariables.DataName.CarrierID,(int)DataVariables.DataName.PortID,3}}},
{PortJobStarted, new VIDItem() {Name = PortJobStarted, Index = (int)EventName.PortJobStarted, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobStopped, new VIDItem() {Name = PortJobStopped, Index = (int)EventName.PortJobStopped, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobPaused, new VIDItem() {Name = PortJobPaused, Index = (int)EventName.PortJobPaused, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobResumed, new VIDItem() {Name = PortJobResumed, Index = (int)EventName.PortJobResumed, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobAborted, new VIDItem() {Name = PortJobAborted, Index = (int)EventName.PortJobAborted, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobFinished, new VIDItem() {Name = PortJobFinished, Index = (int)EventName.PortJobFinished, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID, (int)DataVariables.DataName.ProcessedWaferCount }}},
{PortJobFailed, new VIDItem() {Name = PortJobFailed, Index = (int)EventName.PortJobFailed, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortMapFailed, new VIDItem() {Name = PortMapFailed, Index = (int)EventName.PortMapFailed, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortPPSelected, new VIDItem() {Name = PortPPSelected, Index = (int)EventName.PortPPSelected, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortPPSelectFailed, new VIDItem() {Name = PortPPSelectFailed, Index = (int)EventName.PortPPSelectFailed, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobWaferStart, new VIDItem() {Name = PortJobWaferStart, Index = (int)EventName.PortJobWaferStart, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID}}},
{PortJobWaferEnd, new VIDItem() {Name = PortJobWaferEnd, Index = (int)EventName.PortJobWaferEnd, LinkableVid = new[] {(int)DataVariables.DataName.LotID,(int)DataVariables.DataName.JobID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.SequenceID,(int)DataVariables.DataName.WaferProcessResult}}},
{RecipeStart, new VIDItem() {Name = RecipeStart, Index = (int)EventName.RecipeStart, LinkableVid = new[] {(int)DataVariables.DataName.RecipeID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.StationName,(int)DataVariables.DataName.SlotID}}},
{RecipeComplete, new VIDItem() {Name = RecipeComplete, Index = (int)EventName.RecipeComplete, LinkableVid = new[] {(int)DataVariables.DataName.RecipeID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.StationName,(int)DataVariables.DataName.SlotID}}},
{RecipeStepStart, new VIDItem() {Name = RecipeStepStart, Index = (int)EventName.RecipeStepStart, LinkableVid = new[] {(int)DataVariables.DataName.RecipeID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.StationName,(int)DataVariables.DataName.RecipeStepNumber,(int)DataVariables.DataName.SlotID}}},
{RecipeStepEnd, new VIDItem() {Name = RecipeStepEnd, Index = (int)EventName.RecipeStepEnd, LinkableVid = new[] {(int)DataVariables.DataName.RecipeID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.StationName, (int)DataVariables.DataName.RecipeStepNumber, (int)DataVariables.DataName.SlotID}}},
{RecipeFailed, new VIDItem() {Name = RecipeFailed, Index = (int)EventName.RecipeFailed, LinkableVid = new[] {(int)DataVariables.DataName.RecipeID,(int)DataVariables.DataName.PortID,(int)DataVariables.DataName.StationName,(int)DataVariables.DataName.SlotID}}},
};
}
}