|
@@ -16,6 +16,7 @@ using OTSMeasureApp._0_OTSModel.OTSDataType;
|
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms;
|
|
|
using System.Data;
|
|
using System.Data;
|
|
|
using System.IO;
|
|
using System.IO;
|
|
|
|
|
+using OTSMeasureApp._1_OTSMeasure.Measure._3_MeasureFlow;
|
|
|
|
|
|
|
|
namespace OTSModelSharp
|
|
namespace OTSModelSharp
|
|
|
{
|
|
{
|
|
@@ -568,12 +569,10 @@ namespace OTSModelSharp
|
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.START);
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.START);
|
|
|
|
|
|
|
|
// let main App know that the sample begin to measure
|
|
// let main App know that the sample begin to measure
|
|
|
- ST_MSTMsg MsgSmpStart = new ST_MSTMsg();
|
|
|
|
|
- MsgSmpStart.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
|
|
|
|
|
- MsgSmpStart.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.INPROCESS;
|
|
|
|
|
- MsgSmpStart.STMSampleStu.cSampleName = m_Sample.GetName();
|
|
|
|
|
|
|
+ ST_MSTMsg MsgSmpStart = new ST_MSTMsg(m_Sample);
|
|
|
|
|
+ MsgSmpStart.InitSampleStartMsg();
|
|
|
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgSmpStart);
|
|
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgSmpStart);
|
|
|
|
|
|
|
|
log.Info(m_Sample.GetName() + " Measurement started!");
|
|
log.Info(m_Sample.GetName() + " Measurement started!");
|
|
|
// get SEM controller to set magnification and working distance
|
|
// get SEM controller to set magnification and working distance
|
|
@@ -665,13 +664,11 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
SetSEMExteralOff();
|
|
SetSEMExteralOff();
|
|
|
// update thread measure status class, let the main thread know that this sample measurement stopped
|
|
// update thread measure status class, let the main thread know that this sample measurement stopped
|
|
|
- ST_MSTMsg MsgSmpStop = new ST_MSTMsg();
|
|
|
|
|
- MsgSmpStop.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
|
|
|
|
|
- MsgSmpStop.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.PAUSED;
|
|
|
|
|
- MsgSmpStop.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.PAUSED;
|
|
|
|
|
- MsgSmpStop.STMThreadStu.csMsrEndTime = DateTime.Now.ToShortDateString();
|
|
|
|
|
- MsgSmpStop.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.PAUSED;
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgSmpStop);
|
|
|
|
|
|
|
+ ST_MSTMsg MsgSmpStop = new ST_MSTMsg(m_Sample);
|
|
|
|
|
+
|
|
|
|
|
+ MsgSmpStop.InitSamplePausedMsg();
|
|
|
|
|
+
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgSmpStop);
|
|
|
while (IsPaused())
|
|
while (IsPaused())
|
|
|
{
|
|
{
|
|
|
Thread.Sleep(300);
|
|
Thread.Sleep(300);
|
|
@@ -708,11 +705,11 @@ namespace OTSModelSharp
|
|
|
// update thread measure status class, let the main thread know that starts a new field
|
|
// update thread measure status class, let the main thread know that starts a new field
|
|
|
|
|
|
|
|
|
|
|
|
|
- ST_MSTMsg MsgFieldStart = new ST_MSTMsg();
|
|
|
|
|
- MsgFieldStart.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldStart.STMSampleRetData.iRetDataType = MSAMPLE_RET.START_MSR_FIELD;
|
|
|
|
|
- MsgFieldStart.STMSampleRetData.SMsrField.FieldPos = new Point((int)poiFieldCentre.X,(int)poiFieldCentre.Y);
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldStart);
|
|
|
|
|
|
|
+ ST_MSTMsg MsgFieldStart = new ST_MSTMsg(m_Sample,curFld);
|
|
|
|
|
+
|
|
|
|
|
+ MsgFieldStart.InitFieldStartMsg();
|
|
|
|
|
+
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgFieldStart);
|
|
|
int fldNo = curFld.GetId();
|
|
int fldNo = curFld.GetId();
|
|
|
log.Warn("Current field:" + fldNo.ToString());
|
|
log.Warn("Current field:" + fldNo.ToString());
|
|
|
|
|
|
|
@@ -739,41 +736,43 @@ namespace OTSModelSharp
|
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ curFld.SetBSEImage(pBSEImg);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
//BSEData
|
|
//BSEData
|
|
|
- ST_MSTMsg MsgFieldBSE = new ST_MSTMsg();
|
|
|
|
|
-
|
|
|
|
|
- MsgFieldBSE.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.iRetDataType = MSAMPLE_RET.BSE_DATA;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.pos.X = (int)poiFieldCentre.X;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.pos.Y = (int)poiFieldCentre.Y;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.iBSEDataHeight = pBSEImg.GetHeight();
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.iBSEDataWidth = pBSEImg.GetWidth();
|
|
|
|
|
- byte[] pImgData = pBSEImg.GetImageDataPtr();
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.lpBSEData = pImgData;
|
|
|
|
|
-
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldBSE);
|
|
|
|
|
|
|
+ ST_MSTMsg MsgFieldBSE = new ST_MSTMsg(m_Sample,curFld);
|
|
|
|
|
+ MsgFieldBSE.InitFieldBSEImageMsg();
|
|
|
|
|
+
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgFieldBSE);
|
|
|
|
|
|
|
|
|
|
|
|
|
log.Info("Acquire BSE image success! Processing image...");
|
|
log.Info("Acquire BSE image success! Processing image...");
|
|
|
|
|
|
|
|
// image process
|
|
// image process
|
|
|
|
|
|
|
|
- var rst = FieldImageProcess(curFld, pBSEImg);
|
|
|
|
|
|
|
+ FieldImageProcess(curFld);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
|
|
|
|
|
|
|
|
- if (rst == true)
|
|
|
|
|
|
|
+ if (pXRayParam.GetUsingXray() == true)
|
|
|
{
|
|
{
|
|
|
- curFld.SetIsMeasureComplete(true);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ CollectParticlesXrayData(curFld);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ m_SemHardwareMgr.SetScanExternal(false);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ m_Sample.GetMsrStatus().SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ curFld.SetIsMeasureComplete(true);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
log.Info("Begin to classify particles! particle num:" + curFld.GetListAnalysisParticles().Count);
|
|
log.Info("Begin to classify particles! particle num:" + curFld.GetListAnalysisParticles().Count);
|
|
|
ClassifyFieldParticles(curFld);
|
|
ClassifyFieldParticles(curFld);
|
|
@@ -801,11 +800,12 @@ namespace OTSModelSharp
|
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
|
|
|
|
|
|
// let main thread to know that this sample measurement completes
|
|
// let main thread to know that this sample measurement completes
|
|
|
- ST_MSTMsg MsgSmplEnd = new ST_MSTMsg();
|
|
|
|
|
- MsgSmplEnd.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
|
|
|
|
|
- MsgSmplEnd.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.SUCCESSED;
|
|
|
|
|
- MsgSmplEnd.STMSampleStu.cSampleName = theSample.GetName();
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgSmplEnd);
|
|
|
|
|
|
|
+ ST_MSTMsg MsgSmplEnd = new ST_MSTMsg(m_Sample);
|
|
|
|
|
+ MsgSmplEnd.InitSampleCompleteMsg();
|
|
|
|
|
+ //MsgSmplEnd.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
|
|
|
|
|
+ //MsgSmplEnd.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.SUCCESSED;
|
|
|
|
|
+ //MsgSmplEnd.STMSampleStu.cSampleName = theSample.GetName();
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgSmplEnd);
|
|
|
|
|
|
|
|
string userdB = m_Sample.GetMsrParams().GetSTDName();
|
|
string userdB = m_Sample.GetMsrParams().GetSTDName();
|
|
|
if(userdB.ToLower() != "nostddb" && userdB.ToLower() != "nostddb.db")
|
|
if(userdB.ToLower() != "nostddb" && userdB.ToLower() != "nostddb.db")
|
|
@@ -828,12 +828,12 @@ namespace OTSModelSharp
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- public virtual bool FieldImageProcess(COTSFieldData curFldData, CBSEImgClr a_pBSEImg)
|
|
|
|
|
|
|
+ public virtual void FieldImageProcess(COTSFieldData curFldData)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
PointF fldCenter = curFldData.OTSPos;
|
|
PointF fldCenter = curFldData.OTSPos;
|
|
|
|
|
|
|
|
- curFldData.SetBSEImage(a_pBSEImg);
|
|
|
|
|
|
|
+
|
|
|
CSEMStageData a_pCSEMStageData = m_pMsrThread.GetProjResultData().GetSEMStageData();
|
|
CSEMStageData a_pCSEMStageData = m_pMsrThread.GetProjResultData().GetSEMStageData();
|
|
|
PointF semPos = new Point();
|
|
PointF semPos = new Point();
|
|
|
a_pCSEMStageData.ConvertOTSToSEMCoord(fldCenter, ref semPos);
|
|
a_pCSEMStageData.ConvertOTSToSEMCoord(fldCenter, ref semPos);
|
|
@@ -856,34 +856,8 @@ namespace OTSModelSharp
|
|
|
var analysisparts = curFldData.GetListAnalysisParticles();
|
|
var analysisparts = curFldData.GetListAnalysisParticles();
|
|
|
curFldData.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
|
|
curFldData.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
|
|
|
|
|
|
|
|
- COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
|
|
|
|
|
-
|
|
|
|
|
- if (pXRayParam.GetUsingXray() == true)
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- while (bSaveThreadWorking)
|
|
|
|
|
- {
|
|
|
|
|
- log.Info("last field has not finished yet! waiting!");
|
|
|
|
|
- Thread.Sleep(100);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- CollectParticlesXrayData(curFldData);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- m_SemHardwareMgr.SetScanExternal(false);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- m_Sample.GetMsrStatus().SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ return ;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -952,34 +926,53 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
public virtual void CollectParticlesXrayData(COTSFieldData curFldData)
|
|
public virtual void CollectParticlesXrayData(COTSFieldData curFldData)
|
|
|
{
|
|
{
|
|
|
- List<COTSParticleClr> parts = new List<COTSParticleClr>();
|
|
|
|
|
- foreach (var p in curFldData.GetListXrayParticles())
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var allParts = curFldData.GetListXrayParticles();
|
|
|
|
|
+
|
|
|
|
|
+ var smallparts = new List<COTSParticleClr>();
|
|
|
|
|
+ var bigparts = new List<COTSParticleClr>();
|
|
|
|
|
+
|
|
|
|
|
+ double quantifyThreshold = m_Sample.GetMsrParams().GetXRayParam().GetFeatureModeMinSize();
|
|
|
|
|
+ foreach (var part in allParts)
|
|
|
{
|
|
{
|
|
|
- if (p.IsXrayParticle())
|
|
|
|
|
|
|
+ double equalCircleDiameter = Math.Sqrt(part.GetActualArea() / 3.14159) * 2f;
|
|
|
|
|
+ if (equalCircleDiameter < quantifyThreshold)
|
|
|
|
|
+ {
|
|
|
|
|
+ smallparts.Add(part);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
{
|
|
{
|
|
|
- parts.Add(p);
|
|
|
|
|
|
|
+ bigparts.Add(part);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- curFldData.CreateXrayList(parts);
|
|
|
|
|
|
|
+ log.Info("SmallQuantifyParts (<" + quantifyThreshold.ToString("f2") + "): " + smallparts.Count);
|
|
|
|
|
+ log.Info("BigQuantifyParts (>=" + quantifyThreshold.ToString("f2") + "): " + bigparts.Count);
|
|
|
|
|
+
|
|
|
|
|
+ curFldData.CreateXrayList(smallparts);
|
|
|
|
|
+ curFldData.CreateXrayList(bigparts);
|
|
|
|
|
+
|
|
|
// get x-ray parameters
|
|
// get x-ray parameters
|
|
|
COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
|
|
COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
|
|
|
var workmode = pXRayParam.GetScanMode();
|
|
var workmode = pXRayParam.GetScanMode();
|
|
|
- log.Info("Begin to collect xraydata:"+parts.Count+" on "+workmode.ToString());
|
|
|
|
|
|
|
+
|
|
|
if (workmode == OTS_X_RAY_SCAN_MODE.PointMode)
|
|
if (workmode == OTS_X_RAY_SCAN_MODE.PointMode)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
- uint nXRayAQTime;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
+ uint nXRayAQTime;
|
|
|
|
|
|
|
|
- if (parts.Count > 0)
|
|
|
|
|
|
|
+ if (bigparts.Count > 0)
|
|
|
{
|
|
{
|
|
|
|
|
+ log.Info("Begin to collect xraydata:" + bigparts.Count + " on " + workmode.ToString());
|
|
|
|
|
+ nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
|
|
|
|
|
+ m_EDSController.GetXRayByParts(bigparts, nXRayAQTime, true);
|
|
|
|
|
|
|
|
- nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
|
|
|
|
|
- m_EDSController.GetXRayByParts(parts, nXRayAQTime, true);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (smallparts.Count > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ log.Info("Begin to collect xraydata:" + smallparts.Count + " on " + workmode.ToString());
|
|
|
|
|
+ nXRayAQTime = (uint)pXRayParam.GetFastXrayTime();
|
|
|
|
|
+ m_EDSController.GetXRayByParts(smallparts, nXRayAQTime, true);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -989,11 +982,18 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
uint nXRayAQTime;
|
|
uint nXRayAQTime;
|
|
|
|
|
|
|
|
- if (parts.Count > 0)
|
|
|
|
|
|
|
+ if (bigparts.Count > 0)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ log.Info("Begin to collect xraydata:" + bigparts.Count + " on " + OTS_X_RAY_SCAN_MODE.FeatureMode.ToString());
|
|
|
nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
|
|
nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
|
|
|
- m_EDSController.GetXRayByFeatures(parts, nXRayAQTime, true);
|
|
|
|
|
|
|
+ m_EDSController.GetXRayByFeatures(bigparts, nXRayAQTime, true);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if (smallparts.Count > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ log.Info("Begin to collect xraydata:" + smallparts.Count + " on " + OTS_X_RAY_SCAN_MODE.PointMode.ToString());
|
|
|
|
|
+ nXRayAQTime = (uint)pXRayParam.GetFastXrayTime();
|
|
|
|
|
+ m_EDSController.GetXRayByParts(smallparts, nXRayAQTime, true);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1051,11 +1051,6 @@ namespace OTSModelSharp
|
|
|
// set current time to current time
|
|
// set current time to current time
|
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.START);
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.START);
|
|
|
|
|
|
|
|
- // let main App know that the sample begin to measure
|
|
|
|
|
- ST_MSTMsg MsgSmpStart=new ST_MSTMsg();
|
|
|
|
|
- MsgSmpStart.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
|
|
|
|
|
- MsgSmpStart.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.INPROCESS;
|
|
|
|
|
- MsgSmpStart.STMSampleStu.cSampleName=m_Sample.GetName();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// get SEM controller to set magnification and working distance
|
|
// get SEM controller to set magnification and working distance
|
|
@@ -1098,7 +1093,7 @@ namespace OTSModelSharp
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// go through each field
|
|
// go through each field
|
|
|
- int nNewFieldId = 0;
|
|
|
|
|
|
|
+ //int nNewFieldId = 0;
|
|
|
for ( int i = 0; i < listFieldCenter.Count; ++i)
|
|
for ( int i = 0; i < listFieldCenter.Count; ++i)
|
|
|
{// check and break if stop button is clicked
|
|
{// check and break if stop button is clicked
|
|
|
if (IsAborted())
|
|
if (IsAborted())
|
|
@@ -1121,16 +1116,6 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- // update thread measure status class, let the main thread know that starts a new field
|
|
|
|
|
- pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
|
|
|
-
|
|
|
|
|
- ST_MSTMsg MsgFieldStart=new ST_MSTMsg();
|
|
|
|
|
- MsgFieldStart.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldStart.STMSampleRetData.iRetDataType = MSAMPLE_RET.START_MSR_FIELD;
|
|
|
|
|
- MsgFieldStart.STMSampleRetData.SMsrField.FieldPos = poiFieldCentre;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldStart);
|
|
|
|
|
|
|
|
|
|
// move SEM to the field center
|
|
// move SEM to the field center
|
|
|
if (!MoveSEMToPoint(poiFieldCentre))
|
|
if (!MoveSEMToPoint(poiFieldCentre))
|
|
@@ -1156,21 +1141,15 @@ namespace OTSModelSharp
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
//BSEData
|
|
//BSEData
|
|
|
- ST_MSTMsg MsgFieldBSE=new ST_MSTMsg();
|
|
|
|
|
-
|
|
|
|
|
- MsgFieldBSE.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.iRetDataType = MSAMPLE_RET.BSE_DATA;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.pos = poiFieldCentre;
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.fieldId = i;
|
|
|
|
|
|
|
+ ST_MSTMsg MsgFieldBSE=new ST_MSTMsg(m_HolePreviewSample);
|
|
|
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.iBSEDataHeight = pBSEIamge.GetHeight();
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.iBSEDataWidth = pBSEIamge.GetWidth();
|
|
|
|
|
- byte[] pImgData = pBSEIamge.GetImageDataPtr();
|
|
|
|
|
- MsgFieldBSE.STMSampleRetData.BSEData.lpBSEData = pImgData;
|
|
|
|
|
|
|
+ MsgFieldBSE.InitHolePreBSEDataMsg(pBSEIamge,poiFieldCentre);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldBSE);
|
|
|
|
|
|
|
+ m_pMsrThread.SendHolePreviewMessageToMeasureGUI(MsgFieldBSE);
|
|
|
|
|
|
|
|
if (pStatus.GetStatus() != OTS_MSR_SAMPLE_STATUS.INPROCESS)
|
|
if (pStatus.GetStatus() != OTS_MSR_SAMPLE_STATUS.INPROCESS)
|
|
|
{
|
|
{
|
|
@@ -1191,24 +1170,6 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
m_listHoleBSEImg.Add(pHoleBSEImg);
|
|
m_listHoleBSEImg.Add(pHoleBSEImg);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // prepare for the next
|
|
|
|
|
- ++nNewFieldId;
|
|
|
|
|
- pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
|
|
|
-
|
|
|
|
|
- ST_MSTMsg MsgFieldEnd=new ST_MSTMsg();
|
|
|
|
|
-
|
|
|
|
|
- MsgFieldEnd.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.iRetDataType = MSAMPLE_RET.FIELD_DATA;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iCompleteFieldCount = (i + 1);
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iMeasureFieldCount = listFieldCenter.Count;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iSParticleCount = 0;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.FieldPos = poiFieldCentre;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldEnd);
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
@@ -1216,11 +1177,12 @@ namespace OTSModelSharp
|
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
|
|
|
|
|
|
|
|
// let main thread to know that this sample measurement completes
|
|
// let main thread to know that this sample measurement completes
|
|
|
- ST_MSTMsg MsgSmplEnd=new ST_MSTMsg();
|
|
|
|
|
- MsgSmplEnd.iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS;
|
|
|
|
|
- MsgSmplEnd.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.COMPLETED;
|
|
|
|
|
|
|
+ ST_MSTMsg MsgSmplEnd=new ST_MSTMsg(m_HolePreviewSample);
|
|
|
|
|
+
|
|
|
|
|
+ MsgSmplEnd.InitHolePreSampleEndMsg();
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgSmplEnd);
|
|
|
|
|
|
|
+ m_pMsrThread.SendHolePreviewMessageToMeasureGUI(MsgSmplEnd);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1361,16 +1323,11 @@ namespace OTSModelSharp
|
|
|
//Field Data
|
|
//Field Data
|
|
|
// record end time
|
|
// record end time
|
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
|
|
|
- ST_MSTMsg MsgFieldEnd = new ST_MSTMsg();
|
|
|
|
|
- MsgFieldEnd.iMsgType = ENUM_MSG_TYPE.MSAMPLERESULT;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.iRetDataType = MSAMPLE_RET.FIELD_DATA;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iCompleteFieldCount = pStatus.GetCompletedFields();
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iMeasureFieldCount = m_Sample.GetFieldsData().Count;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.iSParticleCount = (int)curFld.GetListAnalysisParticles().Count;
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.FieldPos.X = Convert.ToInt32(curFld.OTSPos.X);
|
|
|
|
|
- MsgFieldEnd.STMSampleRetData.SFieldData.FieldPos.Y = Convert.ToInt32(curFld.OTSPos.Y);
|
|
|
|
|
-
|
|
|
|
|
- m_pMsrThread.SendMessageToMeasureApp(MsgFieldEnd);
|
|
|
|
|
|
|
+ ST_MSTMsg MsgFieldEnd = new ST_MSTMsg(m_Sample,curFld);
|
|
|
|
|
+ MsgFieldEnd.InitFieldDataMsg();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ m_pMsrThread.SendMessageToMeasureGUI(MsgFieldEnd);
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|