From 3ce48f6dbeb537e252edb0d62c88a28796e36674 Mon Sep 17 00:00:00 2001
From: SWK <sungwk82@diteam.co.kr>
Date: 월, 26 12월 2022 15:04:42 +0900
Subject: [PATCH] ongoing60 #4403 CF AOI Review TACT 지연 개선 1. 신호 출력 방식 재개선  - 유지 시간이 없는 신호는 바로 출력 진행하도록 변경 2. 불필요 Delay 제거 및 시퀀스 변경  - 얼라인 측정 종료 처리 간 제어 신호 먼저 출력 후 카메라 Stop으로 변경  - 물류 정보 읽기 처리 후 1000ms Delay 삭제  - 얼라인 측정 시작(카메라 Live Start) 후 Delay 300ms -> 100ms(이미지 들어오는 시간 확보 필요)  - ReadRawFile 처리 시작 전 500ms Delay 삭제  - Path Scheduling 완료 후 Review Ready 신호 출력 전 1000ms Delay 삭제 3. 버그 수정  - 이미지 저장 경로 생성 간 예외 처리 부분 버그 수정 4. 로그 시간 출력 불합리 개선  - 로그 시간이 파일 출력 시점으로 작성되어 로그 스래드 지연 시 시간이 맞지 않는 불합리 있음  - 로그 시간은 로그 발생 시점에 시간 저장, 해당 시간 이용하여 파일에 기록하도록 변경

---
 ReviewSystem/ReviewSystem/MainFrm.cpp |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/ReviewSystem/ReviewSystem/MainFrm.cpp b/ReviewSystem/ReviewSystem/MainFrm.cpp
index ca29028..5021d3a 100644
--- a/ReviewSystem/ReviewSystem/MainFrm.cpp
+++ b/ReviewSystem/ReviewSystem/MainFrm.cpp
@@ -78,7 +78,10 @@
 
 	//SetTimer(ID_TIMER_RESET_COMM, 2000, NULL);
 
-	SetTimer(ID_TIMER_ALIVE, 1813, NULL); //->> 湲곗〈 SetTimer(ID_TIMER_ALIVE, 1000, NULL); 
+	/*< SWK 20221221 - #4403 MOD Start >*/
+//	SetTimer(ID_TIMER_ALIVE, 1813, NULL); //->> 湲곗〈 SetTimer(ID_TIMER_ALIVE, 1000, NULL); 
+	SetTimer(ID_TIMER_ALIVE, 2000, NULL);
+	/*< SWK 20221221 - #4403 MOD End >*/
 
 	//SetTimer(ID_TIMER_AFM_ALIVE, 5000, NULL);
 
@@ -88,11 +91,14 @@
 
 	SetTimer(ID_TIMER_SEND_SIGNAL_ALIVE, 100, NULL);
 
-	system("net use Y: \\\\126.100.100.1\\d\\DIT_ResultData pw:dit/user:Server/persistent:yes");
-
 	//LYW Align Reconnect
 	//�뾽�뜲�씠�듃�떆
-	system("netsh interface set interface name = \"Align #1\" admin = disable&& netsh interface set interface name = \"Align #1\" admin = enable&& netsh interface set interface name = \"Align #2\" admin = disable&& netsh interface set interface name = \"Align #2\" admin = enable");
+	system("netsh interface set interface name = \"Align #1\" admin = disable"
+		"&& netsh interface set interface name = \"Align #1\" admin = enable"
+		"&& netsh interface set interface name = \"Align #2\" admin = disable"
+		"&& netsh interface set interface name = \"Align #2\" admin = enable"
+		"&& net use Y : \\\\126.100.100.1\\d\\DIT_ResultData pw : dit / user : Server / persistent : yes");
+
 	Sleep(2000);
 
 //	SetTimer(ID_TIMER_WSI_LONGRUN_TEST_TIME, 10000, NULL);
@@ -618,12 +624,10 @@
 void CMainFrame::OnClose()
 {
 	// TODO: �뿬湲곗뿉 硫붿떆吏� 泥섎━湲� 肄붾뱶瑜� 異붽� 諛�/�삉�뒗 湲곕낯媛믪쓣 �샇異쒗빀�땲�떎.
-	if (IDNO == AfxMessageBox(_T("Exit Review System?"), MB_YESNO | MB_ICONQUESTION))
+	if (IDNO == AfxMessageBox(_T("�봽濡쒓렇�옩 醫낅즺�떆 \nCIM OFFLINE \n�꽕鍮� 留ㅻ돱�뼹 紐⑤뱶\n�긽�깭瑜� 癒쇱� �솗�씤�빐 二쇱떗�떆�삤.\n�젙留� 醫낅즺 �븯�떆寃좎뒿�땲源�?"), MB_YESNO | MB_ICONQUESTION))
 	{
 		return;
 	}
-
-	g_pLog->DisplayMessage(_T("Program exit by User!"));
 
 	DeinitReviewInterface();
 
@@ -858,6 +862,24 @@
 
 	switch(pCopyDataStruct->dwData)
 	{
+	case COPYDATA_RAW_DOWNLOAD_ACK:
+	case COPYDATA_RAW_UPLOAD_ACK:
+	case COPYDATA_LOT_UPLOAD_ACK:
+	case COPYDATA_IMAGE_UPLOAD_ACK:
+	{
+		CFTPCopyDataParam ftpCopyDataParam;
+
+		ftpCopyDataParam = *(static_cast<CFTPCopyDataParam*>(pCopyDataStruct->lpData));
+		if (ftpCopyDataParam.m_nSendResultCode == FALSE)
+		{
+			CMainFrame* pMain = static_cast<CMainFrame*>(AfxGetMainWnd());
+			CSequenceProcessor* pSequenceProcessor = pMain->IRP2P_GetSequenceProcessor();
+			if (pSequenceProcessor == NULL)	return FALSE;
+			pSequenceProcessor->sendUploadResult2SequenceProcessor(ftpCopyDataParam.m_nSendResultCode);
+		}
+		
+	}
+	break;
 	case COPYDATA_SYSTEMSETTING2REVIEWSYSTEM:
 		{
 			COPYDATA_SYSTEM2REV* pCopyData = (COPYDATA_SYSTEM2REV*)pCopyDataStruct->lpData;

--
Gitblit v1.9.3