浏览代码

restore the original using way of bruker dll.

gsp 1 年之前
父节点
当前提交
2c35f882a9

+ 3 - 3
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.h

@@ -46,7 +46,8 @@ namespace OTSController {
 		
 		// initialization
 		BOOL Init(CONTROL_TYPE a_nControlType, BOOL a_b32Bite = TRUE);
-	
+		// check connection
+		BOOL CheckConnection(BOOL& a_bConnected);
 		BOOL DisConnect();
 		
 		void SetExpectCount(int expectCount);
@@ -153,8 +154,7 @@ namespace OTSController {
 	protected:
 		// close client
 		BOOL CloseClient(void);//there's no need to call from out ,the single instance destruction method will call it automatically.
-		// check connection
-		BOOL CheckConnection(BOOL& a_bConnected);
+		
 		RTSpectrumHeaderRec* GetSectrumHeader();
 		BOOL GetSpectrum(long a_nBufferIndex, BrukerDll::PRTSpectrumHeaderRec a_poSpcHR, long a_nBufferSize);
 

+ 4 - 4
OTSCPP/OTSControl/Bruker/OTSSEMBruker.cpp

@@ -37,16 +37,16 @@ namespace OTSController {
 		{
 			// initialize the bruker controller as a SEM controller
 			LogTrace(__FILE__, __LINE__, _T("Init BrukerImpl..."));
-			if (!m_pBrukerImplPtr->Init(CONTROL_TYPE::BRUKER_SEM))
+			if (m_pBrukerImplPtr->Init(CONTROL_TYPE::BRUKER_SEM))
 			{
 				// check connection
-				/*if (!m_pBrukerImplPtr->CheckConnection(m_bConnected))
-				{*/
+				if (!m_pBrukerImplPtr->CheckConnection(m_bConnected))
+				{
 					LogErrorTrace(__FILE__, __LINE__, _T("COTSSEMBruker::Connect: failed to call init."));
 					m_pBrukerImplPtr.reset();
 					m_bConnected = FALSE;
 					return FALSE;
-				//}
+				}
 			}
 
 			// connection is ok?

+ 3 - 12
OTSIncAMeasureApp/0-OTSModel/OTSDataType/CMsrSampleStatus.cs

@@ -165,7 +165,7 @@ namespace OTSDataType
         public void ClearCompletedFieldsInfo()
         {
             m_listCpltedCenter.Clear();
-        
+            m_timeStart = new DateTime();
         }
         // completed fieldCenter
 
@@ -181,7 +181,7 @@ namespace OTSDataType
         public void SetCompletedFieldsCenter(List<System.Drawing.PointF> a_listCpltedCenter)
         {
 
-            //  m_listCpltedCenter = a_listCpltedCenter;
+        
 
             m_listCpltedCenter.Clear();
 
@@ -191,16 +191,7 @@ namespace OTSDataType
             }
         }
 
-        // current start time
-        //public DateTime GetStartTimeCur()
-        //{
-        //    return m_timeStartCur;
-        //}
-
-        //public void SetStartTimeCur(DateTime a_timeStartCur)
-        //{
-        //    a_timeStartCur = m_timeStartCur;
-        //}
+  
 
         // compute time
         public bool ComputeTime(OTS_MSR_TIME_TYPE a_nType)

+ 2 - 2
OTSIncAMeasureApp/1-OTSMeasure/CMeasureThreadWrapper.cs

@@ -10,7 +10,7 @@ namespace OTSMeasureApp
 {
     public class CMeasureThreadWrapper 
     {
-        #region 变量生成汇总
+       
         //后台线程
         public static System.ComponentModel.BackgroundWorker m_bgWorker;
   
@@ -25,7 +25,7 @@ namespace OTSMeasureApp
      
   
         NLog.Logger log ;
-        #endregion
+     
         COTSMsrPrjResultData m_ProjData;
 
         public  MSR_RUN_TYPE GetDoRunType()

+ 4 - 0
OTSIncAMeasureApp/1-OTSMeasure/Measure/2-OTSCleanliness/SmplMeasureCleanliness.cs

@@ -58,6 +58,7 @@ namespace OTSModelSharp
             int nSize = (int)a_listAnalysisParticles.Count();
 
             // go through all analysis particles
+            int quantifyNum = 0;
             for (int i = 0; i < nSize; ++i)
             {
                 COTSParticleClr pParticle = a_listAnalysisParticles[i];
@@ -72,6 +73,7 @@ namespace OTSModelSharp
                     {
                         if (pParticle.GetType() == (int)OTS_PARTICLE_TYPE.NOT_IDENTIFIED)
                         {
+                            quantifyNum += 1;
                             m_EDSController.QuantifyXrayByPart(pParticle);
                             engine.ClassifyByExpression(pParticle);
                         }
@@ -84,6 +86,8 @@ namespace OTSModelSharp
 
 
             }
+            int specComp = nSize -quantifyNum;
+            log.Info("spectrum compare:" + specComp.ToString() + "element quantify:" + quantifyNum);
 
             return true;
         }