|
@@ -42,7 +42,6 @@ namespace MECF.Framework.Common.SubstrateTrackings
|
|
if (_locationWafers != null)
|
|
if (_locationWafers != null)
|
|
{
|
|
{
|
|
BinarySerializer<Dictionary<ModuleName, Dictionary<int, WaferInfo>>>.ToStream(_locationWafers, "WaferManager");
|
|
BinarySerializer<Dictionary<ModuleName, Dictionary<int, WaferInfo>>>.ToStream(_locationWafers, "WaferManager");
|
|
- BinarySerializer<List<DulicatedWaferInfo>>.ToStream(_duplicatedWafers, "DuplicatedWafers");
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
@@ -52,6 +51,21 @@ namespace MECF.Framework.Common.SubstrateTrackings
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public async void SerializeDuplicatedWaferInfo()
|
|
|
|
+ {
|
|
|
|
+ await Task.Run(() =>
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ BinarySerializer<List<DulicatedWaferInfo>>.ToStream(_duplicatedWafers, "DuplicatedWafers");
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ LOG.WriteExeption(ex);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
public void Deserialize()
|
|
public void Deserialize()
|
|
{
|
|
{
|
|
try
|
|
try
|
|
@@ -71,27 +85,38 @@ namespace MECF.Framework.Common.SubstrateTrackings
|
|
}
|
|
}
|
|
_locationWafers = ccc;
|
|
_locationWafers = ccc;
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ LOG.WriteExeption(ex);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void DeserializeDuplicatedWaferInfo()
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
var duplicatedWafers = BinarySerializer<List<DulicatedWaferInfo>>.FromStream("DuplicatedWafers");
|
|
var duplicatedWafers = BinarySerializer<List<DulicatedWaferInfo>>.FromStream("DuplicatedWafers");
|
|
if (duplicatedWafers != null)
|
|
if (duplicatedWafers != null)
|
|
{
|
|
{
|
|
_duplicatedWafers = duplicatedWafers;
|
|
_duplicatedWafers = duplicatedWafers;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
LOG.WriteExeption(ex);
|
|
LOG.WriteExeption(ex);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void Initialize()
|
|
public void Initialize()
|
|
{
|
|
{
|
|
EV.Subscribe(new EventItem("Event", EventWaferLeft, "Wafer Left"));
|
|
EV.Subscribe(new EventItem("Event", EventWaferLeft, "Wafer Left"));
|
|
EV.Subscribe(new EventItem("Event", EventWaferArrive, "Wafer Arrived"));
|
|
EV.Subscribe(new EventItem("Event", EventWaferArrive, "Wafer Arrived"));
|
|
|
|
|
|
Deserialize();
|
|
Deserialize();
|
|
|
|
+ DeserializeDuplicatedWaferInfo();
|
|
}
|
|
}
|
|
|
|
|
|
public void SubscribeLocation(string module, int slotNumber)
|
|
public void SubscribeLocation(string module, int slotNumber)
|
|
@@ -491,6 +516,7 @@ namespace MECF.Framework.Common.SubstrateTrackings
|
|
LOG.Write(eEvent.EV_WAFER_DUPLICATED, ModuleName.System, waferOrigin, source.ToString(), (source + 1).ToString(), destination.ToString(), (destSlot + 1).ToString());
|
|
LOG.Write(eEvent.EV_WAFER_DUPLICATED, ModuleName.System, waferOrigin, source.ToString(), (source + 1).ToString(), destination.ToString(), (destSlot + 1).ToString());
|
|
|
|
|
|
Serialize();
|
|
Serialize();
|
|
|
|
+ SerializeDuplicatedWaferInfo();
|
|
}
|
|
}
|
|
|
|
|
|
private void deleteDuplicatedWafer(ModuleName module, int slot)
|
|
private void deleteDuplicatedWafer(ModuleName module, int slot)
|
|
@@ -515,6 +541,9 @@ namespace MECF.Framework.Common.SubstrateTrackings
|
|
_locationWafers[module][slot].SetEmpty();
|
|
_locationWafers[module][slot].SetEmpty();
|
|
_locationWafers[(ModuleName)peerModule][peerSlot].IsDuplicated = false;
|
|
_locationWafers[(ModuleName)peerModule][peerSlot].IsDuplicated = false;
|
|
_duplicatedWafers.RemoveAt(infoIndex);
|
|
_duplicatedWafers.RemoveAt(infoIndex);
|
|
|
|
+
|
|
|
|
+ Serialize();
|
|
|
|
+ SerializeDuplicatedWaferInfo();
|
|
}
|
|
}
|
|
|
|
|
|
public bool CheckDuplicatedWafersBeforeMove(Queue<MoveItem> moveItems)
|
|
public bool CheckDuplicatedWafersBeforeMove(Queue<MoveItem> moveItems)
|