ソースを参照

Doesn't disconnect the sem when we finish the DoHolePreview operation.

gsp 3 年 前
コミット
32470330a5

+ 23 - 4
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CMeasure.cs

@@ -167,6 +167,25 @@ namespace OTSModelSharp
             //disconnect the semcontroller when we exit this task.
             m_SemController.DisConnect();
         }
+        void ThreadOverWithoutDisConnect()
+        {
+
+
+
+            DateTime timeEnd = m_ThreadStatus.GetEndTime();
+
+            ST_MSTMsg MsrMsg = new ST_MSTMsg();
+            MsrMsg.iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS;
+
+            MsrMsg.STMThreadStu.iMsrStatu = m_ThreadStatus.GetStatus();
+
+
+            MsrMsg.STMThreadStu.csMsrEndTime = timeEnd.ToShortDateString();
+
+            ProgressEvent(MsrMsg);
+            //disconnect the semcontroller when we exit this task.
+            //m_SemController.DisConnect();
+        }
         void SetWorkingFolderStr()
         {
             // get project file pathname
@@ -380,7 +399,7 @@ namespace OTSModelSharp
                 
                 SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS.FAILED);
                 m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
-                ThreadOver();
+                ThreadOverWithoutDisConnect();
             }
 
            
@@ -420,7 +439,7 @@ namespace OTSModelSharp
           
                 SendMessageToMeasureApp(MsgSmpStop);
 
-                ThreadOver();
+                ThreadOverWithoutDisConnect();
                 return;
             }
             else if (pSampleHole.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.FAILED)
@@ -437,7 +456,7 @@ namespace OTSModelSharp
                 MsgSmpFailed.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.FAILED;
            
                 SendMessageToMeasureApp(MsgSmpFailed);
-                ThreadOver();
+                ThreadOverWithoutDisConnect();
                 return;
             }
 
@@ -459,7 +478,7 @@ namespace OTSModelSharp
             // record end time
             m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
 
-            ThreadOver();
+            ThreadOverWithoutDisConnect();
         }
 
       public  COTSSample CreateHoleSample(CDomain a_pMsrArea)

+ 0 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -499,7 +499,6 @@ namespace OTSModelSharp
             public void Dispose()
             {
                 sm.SetSEMExteralOff();
-                //sm.ResetScan();
             }
         }
          public void DoMeasureForOneSample()