Merge branch 'feature/#3486_CF_AOI_Review_Review_History_프로그램_테스트_및_적용' into feature/#3495_CF_AOI_Review(QD,_Blue)_GlassLoading_시_다운_현상_조치
# Conflicts:
# ReviewSystem/ReviewSystem/DitGlassRawStruct.h
# ReviewSystem/ReviewSystem/ReviewProcessor_CPJT.cpp
# ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
| | |
| | | DitGlassRawMessenger/lib/ |
| | | DitGlassRawMessenger/Backup/ |
| | | |
| | | ReviewHistory/.vs/ |
| | | ReviewHistory/bin/ |
| | | ReviewHistory/lib/ |
| | | |
| | | *.sdf |
| | | *.opensdf |
| | | *.suo |
| | |
| | | |
| | | // DitGlassRawMessengerDlg.cpp : 구í íì¼ |
| | | // DitGlassRawMessengerDlg.cpp : ���� ���� |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #define GRID_TEXT_COLOR RGB(255,255,255) |
| | | #define GRID_ALARM_TEXT_COLOR RGB(255,0,0) |
| | | #define GRID_LINE_COLOR GRID_FIX_COLOR |
| | | // ìì© íë¡ê·¸ë¨ ì ë³´ì ì¬ì©ëë CAboutDlg ëí ììì
ëë¤. |
| | | // ���� ���α׷� ������ ���Ǵ� CAboutDlg ï¿½ï¿½È ï¿½ï¿½ï¿½ï¿½ï¿½Ô´Ï´ï¿½. |
| | | |
| | | class CAboutDlg : public CDialog |
| | | { |
| | | public: |
| | | CAboutDlg(); |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | // ï¿½ï¿½È ï¿½ï¿½ï¿½ï¿½ �������Դϴ�. |
| | | enum { IDD = IDD_ABOUTBOX }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV �����Դϴ�. |
| | | |
| | | // 구íì
ëë¤. |
| | | // �����Դϴ�. |
| | | protected: |
| | | DECLARE_MESSAGE_MAP() |
| | | }; |
| | |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CDitGlassRawMessengerDlg ëí ìì |
| | | // CDitGlassRawMessengerDlg ï¿½ï¿½È ï¿½ï¿½ï¿½ï¿½ |
| | | |
| | | |
| | | |
| | |
| | | m_vecStrGridDefectHeader.push_back("CellY(mm)"); |
| | | m_vecStrGridDefectHeader.push_back("ScrtRatio"); |
| | | m_vecStrGridDefectHeader.push_back("Density"); |
| | | //201207 CJH - Merge ì¬ë¶ íì¸ |
| | | //201207 CJH - Merge ���� Ȯ�� |
| | | m_vecStrGridDefectHeader.push_back("MergeState"); |
| | | |
| | | } |
| | |
| | | if (timestruct.tm_mon>11 || timestruct.tm_mon<0 ) |
| | | ASSERT(FALSE); |
| | | } |
| | | // CDitGlassRawMessengerDlg ë©ìì§ ì²ë¦¬ê¸° |
| | | // CDitGlassRawMessengerDlg �޽��� ó���� |
| | | |
| | | BOOL CDitGlassRawMessengerDlg::OnInitDialog() |
| | | { |
| | | CDialog::OnInitDialog(); |
| | | |
| | | DragAcceptFiles(TRUE); |
| | | // ìì¤í
ë©ë´ì "ì ë³´..." ë©ë´ í목ì ì¶ê°í©ëë¤. |
| | | // �ý��� �޴��� "����..." �޴� �׸��� �߰��մϴ�. |
| | | |
| | | // IDM_ABOUTBOXë ìì¤í
ëª
ë ¹ ë²ìì ìì´ì¼ í©ëë¤. |
| | | // IDM_ABOUTBOX�� �ý��� ��� ������ �־�� �մϴ�. |
| | | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); |
| | | ASSERT(IDM_ABOUTBOX < 0xF000); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // ì´ ëí ììì ìì´ì½ì ì¤ì í©ëë¤. ìì© íë¡ê·¸ë¨ì 주 ì°½ì´ ëí ììê° ìë ê²½ì°ìë |
| | | // íë ììí¬ê° ì´ ìì
ì ìëì¼ë¡ ìíí©ëë¤. |
| | | SetIcon(m_hIcon, TRUE); // í° ìì´ì½ì ì¤ì í©ëë¤. |
| | | SetIcon(m_hIcon, FALSE); // ìì ìì´ì½ì ì¤ì í©ëë¤. |
| | | // �� ï¿½ï¿½È ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ �������� �����մϴ�. ���� ���α׷��� �� � ï¿½ï¿½È ï¿½ï¿½ï¿½Ú°ï¿½ �ƴ� ��쿡�� |
| | | // �����ӿ�ũ�� �� �۾��� �ڵ����� �����մϴ�. |
| | | SetIcon(m_hIcon, TRUE); // ū �������� �����մϴ�. |
| | | SetIcon(m_hIcon, FALSE); // ���� �������� �����մϴ�. |
| | | |
| | | //í¸ë ì´ìì´ì½ êµ¬ì± |
| | | //Ʈ���̾����� ���� |
| | | m_TrayIcon = FALSE; |
| | | ResTrayIcon(); |
| | | |
| | | //ë¹ë ì ë³´ |
| | | //��� ���� |
| | | { |
| | | CString strBuild; |
| | | tm tmBuild; |
| | |
| | | SetDlgItemText(IDC_BUILDDATE, strBuild); |
| | | } |
| | | |
| | | //ì¤ì íì¼ ì ë³´ ì½ì´ ì¤ê¸° [ê¹íí 2018/11/20] |
| | | //�������� ���� �о� ���� [������ 2018/11/20] |
| | | { |
| | | m_strConfigFile; |
| | | { |
| | |
| | | SetDlgItemText(IDC_EDIT_STACK_PARAM2, m_ConfigOption.m_strStackParam2); |
| | | } |
| | | |
| | | //ë¡ê·¸ ê´ë ¨ [ê¹íí 2018/11/20] |
| | | //�α� ���� [������ 2018/11/20] |
| | | { |
| | | CakFileUtil fileutil; |
| | | char strPath[256]; |
| | |
| | | |
| | | if(m_Server.CreateServer(m_ConfigOption.m_nMaxDataNumCell, m_ConfigOption.m_nMaxDataNumDefect) == FALSE) |
| | | { |
| | | AfxMessageBox("ìë² ìì± ì¤í¨ ì¢
ë£ í©ëë¤."); |
| | | AfxMessageBox("���� ���� ���� ���� �մϴ�."); |
| | | exit(0); |
| | | } |
| | | |
| | | //íì¬ê° ì ì© [ê¹íí 2019/1/12] |
| | | //���簪 ���� [������ 2019/1/12] |
| | | { |
| | | CDitGlassRawServer* pServer = (CDitGlassRawServer*) &m_Server; |
| | | CgrmGlassRawData* pRawDataBuffer = &m_GlassRawDataBuffer; |
| | | pRawDataBuffer->ImportGlassRaw(pServer->GetGlassRawInfo(), (char*)pServer->GetGlassData()); |
| | | } |
| | | |
| | | //ìì
ì°ë ë ìì± [ê¹íí 2018/11/13] |
| | | //�۾� ������ ���� [������ 2018/11/13] |
| | | { |
| | | _beginthread(threadMain, NULL, this); |
| | | } |
| | | |
| | | PostMessage(UM_GLASSRAW_CLIENTMESSAGE); |
| | | |
| | | return TRUE; // í¬ì»¤ì¤ë¥¼ 컨í¸ë¡¤ì ì¤ì íì§ ìì¼ë©´ TRUE를 ë°íí©ëë¤. |
| | | return TRUE; // ��Ŀ���� ��Ʈ�ѿ� �������� ������ TRUE�� ��ȯ�մϴ�. |
| | | } |
| | | |
| | | void CDitGlassRawMessengerDlg::OnBnClickedOk() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | // TODO: ���⿡ ��Ʈ�� �˸� ó���� �ڵ带 �߰��մϴ�. |
| | | OnOK(); |
| | | } |
| | | |
| | |
| | | { |
| | | NOTIFYICONDATA nid; |
| | | nid.cbSize = sizeof(nid); |
| | | nid.hWnd = m_hWnd; // ë©ì¸ ìëì° í¸ë¤ |
| | | nid.uID = IDR_MAINFRAME; // ìì´ì½ 리ìì¤ ID |
| | | nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; // íëê·¸ ì¤ì |
| | | nid.uCallbackMessage = UM_TRAYICON_MSG; // ì½ë°±ë©ìì§ ì¤ì |
| | | nid.hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); // ìì´ì½ ë¡ë |
| | | nid.hWnd = m_hWnd; // ���� ������ �ڵ� |
| | | nid.uID = IDR_MAINFRAME; // ������ ���ҽ� ID |
| | | nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; // �÷��� ���� |
| | | nid.uCallbackMessage = UM_TRAYICON_MSG; // �ݹ�޽��� ���� |
| | | nid.hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); // ������ �ε� |
| | | |
| | | char strTitle[256]; |
| | | GetWindowText(strTitle, sizeof(strTitle)); // 캡ì
ë°ì ì¶ë ¥ë 문ìì´ ì»ì |
| | | GetWindowText(strTitle, sizeof(strTitle)); // ĸ�ǹٿ� ��µ� ���ڿ� ���� |
| | | lstrcpy(nid.szTip, strTitle); |
| | | Shell_NotifyIcon(NIM_ADD, &nid); |
| | | SendMessage(WM_SETICON, (WPARAM)TRUE, (LPARAM)nid.hIcon); |
| | |
| | | GetCursorPos(&pos); |
| | | { |
| | | HMENU hMenu = CreatePopupMenu(); |
| | | AppendMenu(hMenu, MF_STRING, 0, "ì°êµ¬ì2íí¸ìí"); |
| | | AppendMenu(hMenu, MF_STRING, 0, "������2��Ʈ��ǰ"); |
| | | AppendMenu(hMenu, MF_STRING, WM_DESTROY, "Exit"); |
| | | TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, pos.x, pos.y, 0, GetSafeHwnd(), NULL); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // ëí ììì ìµìí ë¨ì¶ë¥¼ ì¶ê°í ê²½ì° ìì´ì½ì ê·¸ë¦¬ë ¤ë©´ |
| | | // ìë ì½ëê° íìí©ëë¤. 문ì/ë·° 모ë¸ì ì¬ì©íë MFC ìì© íë¡ê·¸ë¨ì ê²½ì°ìë |
| | | // íë ììí¬ìì ì´ ìì
ì ìëì¼ë¡ ìíí©ëë¤. |
| | | // ï¿½ï¿½È ï¿½ï¿½ï¿½Ú¿ï¿½ ï¿½Ö¼ï¿½È ï¿½ï¿½ï¿½ß¸ï¿½ �߰��� ��� �������� �׸����� |
| | | // �Ʒ� �ڵ尡 �ʿ��մϴ�. ����/�� ���� ����ϴ� MFC ���� ���α׷��� ��쿡�� |
| | | // �����ӿ�ũ���� �� �۾��� �ڵ����� �����մϴ�. |
| | | |
| | | void CDitGlassRawMessengerDlg::OnPaint() |
| | | { |
| | | if (IsIconic()) |
| | | { |
| | | CPaintDC dc(this); // 그리기를 ìí ëë°ì´ì¤ 컨í
ì¤í¸ |
| | | CPaintDC dc(this); // �׸��⸦ ���� ����̽� ���ؽ�Ʈ |
| | | |
| | | SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); |
| | | |
| | | // í´ë¼ì´ì¸í¸ ì¬ê°íìì ìì´ì½ì ê°ì´ë°ì ë§ì¶¥ëë¤. |
| | | // Ŭ���̾�Ʈ �簢������ �������� ����� ����ϴ�. |
| | | int cxIcon = GetSystemMetrics(SM_CXICON); |
| | | int cyIcon = GetSystemMetrics(SM_CYICON); |
| | | CRect rect; |
| | |
| | | int x = (rect.Width() - cxIcon + 1) / 2; |
| | | int y = (rect.Height() - cyIcon + 1) / 2; |
| | | |
| | | // ìì´ì½ì 그립ëë¤. |
| | | // �������� �׸��ϴ�. |
| | | dc.DrawIcon(x, y, m_hIcon); |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | |
| | | // ì¬ì©ìê° ìµìíë ì°½ì ëë ëìì 커ìê° íìëëë¡ ìì¤í
ìì |
| | | // ì´ í¨ì를 í¸ì¶í©ëë¤. |
| | | // ����ڰ� �ּ�È�� � ��� ���ȿ� Ŀ���� ǥ�õǵ��� �ý��ۿ��� |
| | | // �� �Լ��� ȣ���մϴ�. |
| | | HCURSOR CDitGlassRawMessengerDlg::OnQueryDragIcon() |
| | | { |
| | | return static_cast<HCURSOR>(m_hIcon); |
| | |
| | | void CDitGlassRawMessengerDlg::OnDropFiles(HDROP hDropInfo) |
| | | { |
| | | int nFiles; |
| | | char szPathName[MAX_PATH]; // íì¼ ê²½ë¡ë©´ì´ ë¤ì´ê°ë¤. |
| | | char szPathName[MAX_PATH]; // ���� ��θ��� ����. |
| | | CString strFileName; |
| | | |
| | | // ëë¡ë íì¼ì ê°¯ì |
| | | // ��ӵ� ������ ���� |
| | | nFiles = ::DragQueryFile( hDropInfo, 0xFFFFFFFF, szPathName, MAX_PATH ); |
| | | |
| | | for(int i = nFiles-1 ; i >= 0; i--) //ëë¡ë íì¼ ê°¯ìë§í¼ 루í를 ëë©´ì íì¼ ê²½ë¡ë¥¼ ë©ì¸ì§ ë°ì¤ë¡ ì¶ë ¥ |
| | | for(int i = nFiles-1 ; i >= 0; i--) //��ӵ� ���� ������������ ï¿½ï¿½ï¿½é¼ ï¿½ï¿½ï¿½ï¿½ ��θ� �޼��� �ڽ��� ��� |
| | | { |
| | | // íì¼ì ê²½ë¡ ì»ì´ì´ |
| | | // ������ ��� ���� |
| | | ::DragQueryFile(hDropInfo, i, szPathName, MAX_PATH); |
| | | |
| | | SetDlgItemText(IDC_EDIT_RAWFILENAME, szPathName); |
| | |
| | | |
| | | if(pRawInfo->m_nCommandIdxWrite != pRawInfo->m_nCommandIdxRead) |
| | | { |
| | | int nReadIdx = (pRawInfo->m_nCommandIdxRead+1)%COMMAND_MAXCOUNT; //íì¬ë ì½ì ë§ì§ë§ í¬ì¸í¸ìì¼ë¡ íë ì¦ê°ìì¼ì ì½ëë¤. [ê¹íí 2018/11/13] |
| | | int nReadIdx = (pRawInfo->m_nCommandIdxRead+1)%COMMAND_MAXCOUNT; //����� ���� ������ ����Ʈ������ �ϳ� �������Ѽ� �д´�. [������ 2018/11/13] |
| | | _grmDitCommand::_grmCommand* pCommand = &pRawInfo->m_nCommandBuffer[nReadIdx]; |
| | | AKLOG("Recv Command ID:%d(r%d/w%d)", pCommand->nCommand, nReadIdx, pRawInfo->m_nCommandIdxWrite); |
| | | pRawInfo->m_nCommandIdxRead = nReadIdx; |
| | | |
| | | if(pCommand->nResult == -1) //ëª
ë ¹ ìí ì [ê¹íí 2018/11/13] |
| | | if(pCommand->nResult == -1) //��� ���� �� [������ 2018/11/13] |
| | | { |
| | | pCommand->nResult = ProcessCommand( (emGlassRawCommand)pCommand->nCommand, pCommand->strParam ); |
| | | } |
| | | else |
| | | { |
| | | //ì´ë¯¸ ì²ë¦¬ ëê±° [ê¹íí 2018/11/13] |
| | | //�̹� ó�� �Ȱ� [������ 2018/11/13] |
| | | } |
| | | |
| | | AKLOG("Recv Command ID:%d(r%d/w%d) Process End(Result:%d)", pCommand->nCommand, nReadIdx, pRawInfo->m_nCommandIdxWrite, pCommand->nResult); |
| | |
| | | { |
| | | nResult = m_pGlassRawMaker->SequenceInspectEnd(pRawDataBuffer); |
| | | pServer->GetGlassRawInfo()->m_ServerProcStep = APS_InspectEnd; |
| | | //Stack ì 보를 ê³µì ë©ëª¨ë¦¬ì ë°ì í기 ìí Export |
| | | //Stack ������ �����޸𸮿� �ݿ� �ϱ� ���� Export |
| | | //pRawDataBuffer->ExportGlassRaw(pServer->GetGlassRawInfo(), (char*)pServer->GetGlassData()); |
| | | break; |
| | | } |
| | |
| | | case grcSequenceCustomReviewDataRead: |
| | | { |
| | | nResult = m_pGlassRawMaker->SequenceCustomizeReview(pRawDataBuffer); |
| | | ////Customize Review를 ìí ì
ë°ì´í¸ |
| | | ////Customize Review�� ���� ������Ʈ |
| | | //{ |
| | | // memcpy(pServer->GetDefectData(0), pRawDataBuffer->GetDefectData(0), sizeof(_grmDefectData)*pServer->GetGlassRawInfo()->m_nDefectMaxDataNum); |
| | | // memcpy(pServer->GetCellData(0), pRawDataBuffer->GetCellData(0), sizeof(_grmCellData)*pServer->GetGlassRawInfo()->m_nCellMaxDataNum); |
| | |
| | | nResult = m_pGlassRawMaker->ReadBinFile(pRawDataBuffer); |
| | | break; |
| | | } |
| | | case grcReviewWriteBIn: |
| | | { |
| | | nResult = m_pGlassRawMaker->ReviewWriteBin(pRawDataBuffer); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | PostMessage(UM_GLASSRAW_CLIENTMESSAGE, nCmd); |
| | |
| | | |
| | | if(m_pGlassRawMaker) delete m_pGlassRawMaker; |
| | | |
| | | if(m_TrayIcon) // íì¬ í¸ë ì´ ìì´ì½ì¼ë¡ ì¤ì ëìëì§ íì¸ |
| | | if(m_TrayIcon) // ���� Ʈ���� ���������� �����Ǿ����� Ȯ�� |
| | | { |
| | | NOTIFYICONDATA nid; |
| | | nid.cbSize = sizeof(nid); |
| | | nid.hWnd = m_hWnd; // ë©ì¸ ìëì° í¸ë¤ |
| | | nid.hWnd = m_hWnd; // ���� ������ �ڵ� |
| | | nid.uID = IDR_MAINFRAME; |
| | | |
| | | // ìì
íìì¤(TaskBar)ì ìí ììì ìì´ì½ì ìì íë¤. |
| | | // �۾� ǥ����(TaskBar)�� ���� ������ �������� �����Ѵ�. |
| | | Shell_NotifyIcon(NIM_DELETE, &nid); |
| | | } |
| | | |
| | |
| | | |
| | | BOOL CDitGlassRawMessengerDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) |
| | | { |
| | | // TODO: ì¬ê¸°ì í¹ìíë ì½ë를 ì¶ê° ë°/ëë 기본 í´ëì¤ë¥¼ í¸ì¶í©ëë¤. |
| | | // TODO: ���⿡ Ư��È�� �ڵ带 �߰� ��/�Ǵ� �⺻ Ŭ������ ȣ���մϴ�. |
| | | if (m_gridCellInfo.GetSafeHwnd() && wParam == (WPARAM)m_gridCellInfo.GetDlgCtrlID()) |
| | | { |
| | | *pResult = 1; |
| | |
| | | CString str; |
| | | strItem = _T(" "); |
| | | |
| | | // Panel xì¶, yì¶ì ê¸ë¼ì¤ì ë°ë [6/9/2017 bhs] |
| | | // Panel x��, y���� �۶󽺿� �ݴ� [6/9/2017 bhs] |
| | | if(1)//g_pBasic->GetScanCoordination() == SC_XCoord) |
| | | str.Format("% 5.3f", (double)pDefect->m_nUMCellX / 1000.0); |
| | | else |
| | |
| | | CString str; |
| | | strItem = _T(" "); |
| | | |
| | | // Panel xì¶, yì¶ì ê¸ë¼ì¤ì ë°ë [6/9/2017 bhs] |
| | | // Panel x��, y���� �۶󽺿� �ݴ� [6/9/2017 bhs] |
| | | if(1)//g_pBasic->GetScanCoordination() == SC_XCoord) |
| | | str.Format("% 5.3f", (double)pDefect->m_nUMCellY / 1000.0); |
| | | else |
| | |
| | | |
| | | void CDitGlassRawMessengerDlg::OnBnClickedBtnImportRaw() |
| | | { |
| | | AKLOG("ì´ê¸°ë¥ì ê°ê¸ì íìê° ìê² ë.. ì¶ì¼ë¤..."); |
| | | AKLOG("�̱���� ������ �ʿ䰡 �ְڳ�.. ������..."); |
| | | PostMessage(UM_GLASSRAW_CLIENTMESSAGE); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | CString str = _T("All(*.*)|*.*|"); // ì íí íì¼ ì¢
ë¥ |
| | | CString str = _T("All(*.*)|*.*|"); // ������ ���� ���� |
| | | CString File; |
| | | CString strFileList; |
| | | |
| | | CFileDialog dlg(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT, str, this); |
| | | |
| | | const int c_cMaxFiles = 400 /*ì íí íì¼ ì«ì*/ ; // ë©ëª¨ë¦¬ ë¶ì¡±íìì¼ë¡ íì¥ ìí´ì£¼ë©´ ëªê° 못ì |
| | | const int c_cMaxFiles = 400 /*������ ���� ����*/ ; // �޸� ������������ Ȯ�� �����ָ� � ���� |
| | | const int c_cbBuffSize = (c_cMaxFiles * (MAX_PATH + 1)) + 1; |
| | | dlg.GetOFN().lpstrFile = strFileList.GetBuffer(c_cbBuffSize); |
| | | dlg.GetOFN().nMaxFile = c_cbBuffSize; |
| | |
| | | { |
| | | for(POSITION pos=dlg.GetStartPosition(); pos != NULL;) |
| | | { |
| | | // ì ì²´ìì ë ResetContent |
| | | // ��ü������ ResetContent |
| | | File = dlg.GetNextPathName(pos); |
| | | |
| | | |
| | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawBase::ReviewWriteBin(CgrmGlassRawData* pData) |
| | | { |
| | | CString strFileName; |
| | | strFileName.Format("D:\\DIT_ResultData\\RawBin\\%s", pData->GetGlassData()->m_strFileName); |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "wb"); |
| | | if (pf) |
| | | { |
| | | fwrite(pData->GetMemInfo(), sizeof(_grmDitMemInfo), 1, pf); |
| | | |
| | | fwrite(pData->GetGlassData(), pData->GetMemInfo()->m_nSizeOfGlassData, sizeof(char), pf); |
| | | |
| | | for (int i = 0; i < pData->GetGlassData()->m_nCellNum; i++) |
| | | { |
| | | fwrite(pData->GetCellData(i), pData->GetMemInfo()->m_nSizeOfCellData, sizeof(char), pf); |
| | | } |
| | | |
| | | for (int i = 0; i < pData->GetGlassData()->m_nDefectNum; i++) |
| | | { |
| | | fwrite(pData->GetDefectData(i), pData->GetMemInfo()->m_nSizeOfDefectData, sizeof(char), pf); |
| | | } |
| | | |
| | | fclose(pf); |
| | | } |
| | | else |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | |
| | | #include "DitGlassRawStruct.h" |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Recipeìì Serverì Inspectorê° ê³µì íë ì¤ì ì ë³´. |
| | | // Recipe���� Server�� Inspector�� �����ϴ� ��������. |
| | | enum ThreadCount { Thread_1 = 0, Thread_2, Thread_4, Thread_6, Thread_8, Thread_11, Thread_12, Thread_22, Thread_24 }; |
| | | enum CameraType { CamType_Unknown = 0, CamType_Transfer, CamType_Reflex }; |
| | | enum ScanCoordinate { SC_XCoord = 0, SC_YCoord }; // ì¤ìºë°©í¥. ê²°í¨ ì¢í ì°ì°ì ì¤ì. |
| | | enum ScanDirectionEng { SD_Right2Left = 0, SD_Left2Right }; // ìì
ìê° ë³¸ ì¤ìº ë°©í¥. |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass ê¸°ì¤ Scan ë°©í¥. |
| | | enum ScanType { ST_SingleScan = 0, ST_DualScan }; // SingleScan - ë¨ë°©í¥, DualScan - ìë°©í¥ |
| | | enum ScanCoordinate { SC_XCoord = 0, SC_YCoord }; // ��ĵ����. ���� ��ǥ ����� �߿�. |
| | | enum ScanDirectionEng { SD_Right2Left = 0, SD_Left2Right }; // �۾��ڰ� �� ��ĵ ����. |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass ���� Scan ����. |
| | | enum ScanType { ST_SingleScan = 0, ST_DualScan }; // SingleScan - �ܹ���, DualScan - ����� |
| | | enum GlassDirection { GD_LeftTop = 0, GD_RightTop = 1, GD_LeftBottom = 10, GD_RightBottom = 11 }; |
| | | enum AcqMode { Acq_Unknown = 0, Acq_Grab, Acq_Snap, Acq_Matrox, Acq_Simul }; |
| | | enum FindBoundary { FB_NotFind = 0, FB_PitchMatching, FB_ManualMatching }; |
| | |
| | | enum DefectFiltering { Filtering_NO = 0, Filtering_CO, Filtering_Cutoff, Filtering_DXDY, Filtering_TD, Filtering_FALSE }; // Filtering_CO : Cosmic Ray FALSE |
| | | enum ALIGN_MARK_CLASSIFY { eAMC_First = 0, eAMC_Second }; |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Defectì ì¬ì©ëë íì
ë¤. |
| | | // Defect�� ���Ǵ� Ÿ�Ե�. |
| | | enum SERVER_DefectType { DefectType_TBlack = 0, DefectType_TWhite, DefectType_RBlack, DefectType_RWhite, DefectType_BBlack, DefectType_BWhite, DefectType_Unknown }; |
| | | enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | enum SERVER_DefectJudgementType { JudgementType_OK = 0, JudgementType_TR, JudgementType_PR, JudgementType_UNKNOWN }; |
| | |
| | | enum ReKind { Re_Other, Re_TFE_CIRCLE, Re_PI_CONVEX, Re_PI_CONCAVE, Re_PI_1, Re_PI_2, Re_PI_3 }; |
| | | |
| | | //choigudal jude fix 2012.03.07 |
| | | enum Judgement { Judge_OK = 0, Judge_RP, Judge_NG, Judge_TR, Judge_PR, Judge_PT, Judge_Review, Judge_RC, Judge_Size, Judge_VI, Judge_Rework, Judge_Unknown };//2016.07.13 LHS Judge_Size ì¶ê° |
| | | enum Judgement { Judge_OK = 0, Judge_RP, Judge_NG, Judge_TR, Judge_PR, Judge_PT, Judge_Review, Judge_RC, Judge_Size, Judge_VI, Judge_Rework, Judge_Unknown };//2016.07.13 LHS Judge_Size �߰� |
| | | enum MAP16_DefectClass { CLASS_C1 = 1, CLASS_C2, CLASS_C3, CLASS_C4, CLASS_C5, CLASS_C6, CLASS_C7, CLASS_C8, CLASS_C9, CLASS_C10, CLASS_C11, CLASS_C12, CLASS_C13, CLASS_C14, CLASS_C15, CLASS_C16 }; |
| | | enum MAP16_SizeType { SIZE_SS = 0, SIZE_SM, SIZE_SL, SIZE_SOH, SIZE_IDX_MAX }; |
| | | enum MAP16_PeakType { PEEK_PS = 0, PEEK_PL, PEEK_PH, PEEK_POH, PEAK_IDX_MAX }; |
| | |
| | | virtual BOOL WriteBinFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadBinFile(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL ReviewWriteBin(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | |
| | | |
| | | strValue = "ITEM PANEL MODULETYPE MODULEID PROCESSID PRODUCTID STEPID PROD_TYPE BATCHID H_PANELID E_PANELID P_PANELID OPERID COMP_COUNT PPID GRADE CODE R_GRADE MAP_IMAGE L_TIME U_TIME S_TIME E_TIME T_DEFECT TR PR TB TW RB RW T_STACK MAX_AVG_GRAY MAX_PORTION OK_CELL RJ_CELL RW_CELL NR_CELL CSTID SLOT_NO JOB_END TD_DEFECT SD_DEFECT PD_DEFECT SP_DEFECT PAD_GATE PAD_DATA M_DEFECT C_DEFECT BR_DEFECT IMG_COUNT RECIPE SHRINK RAW_CUT"; //53ea |
| | | strLine += strValue; strLine += "\n"; |
| | | strValue = "ITEM SUBPANEL SUBPANELID COORD_X COORD_Y SIZE_X SIZE_Y GATELINE DATALINE GRADE CODE R_GRADE T_DEFECT TD_DEFECT SD_DEFECT PD_DEFECT SP_DEFECT PAD_GATE PAD_DATA M_DEFECT C_DEFECT PRO_IMAGE AVG_GRAY_0 PORTION_0 AVG_GRAY_1 PORTION_1 AVG_GRAY_2 PORTION_2 AVG_GRAY_3 PORTION_3"; //30ea 21-05-12 Mura Data ì¶ê° |
| | | strValue = "ITEM SUBPANEL SUBPANELID COORD_X COORD_Y SIZE_X SIZE_Y GATELINE DATALINE GRADE CODE R_GRADE T_DEFECT TD_DEFECT SD_DEFECT PD_DEFECT SP_DEFECT PAD_GATE PAD_DATA M_DEFECT C_DEFECT PRO_IMAGE AVG_GRAY_0 PORTION_0 CORNER_GRAY_0 AVG_AMP_0 FFT_VAR_0 FFT_VAH_0 FFT_VAQ_0 FFT_PK_0 AVG_GRAY_1 PORTION_1 CORNER_GRAY_1 AVG_AMP_1 FFT_VAR_1 FFT_VAH_1 FFT_VAQ_1 FFT_PK_1 AVG_GRAY_2 PORTION_2 CORNER_GRAY_2 AVG_AMP_2 FFT_VAR_2 FFT_VAH_2 FFT_VAQ_2 FFT_PK_2 AVG_GRAY_3 PORTION_3 CORNER_GRAY_3 AVG_AMP_3 FFT_VAR_3 FFT_VAH_3 FFT_VAQ_3 FFT_PK_3"; //54ea 21-06-21 Mura Data ì¶ê° |
| | | strLine += strValue; strLine += "\n"; |
| | | //210405 |
| | | //ITEM DEFECT ID DEF_NO COORD_X COORD_Y GATELINE DATALINE SIZE_S SIZE_W SIZE_L SIZE_H GRADE CODE STACK_FLAG STACK_COUNT STACK_STEP IMAGE_FILE DSC_CODE VC_CODE DCR_CODE DEFECT_SIZE REPEAT_DEFECT WSI_HEIGHT CS_HEIGHT C_GRADE GRAY_MIN GRAY_MAX GRAY_AVG GRAY_DEF WSI_IMAGE USE_CCDIMAGE SCAN_NUM CAM_POSITION CCD_NO R_GRAY_MIN R_GRAY_MAX R_GRAY_AVG SCAN_AI REVIEW_AI INS_MODE INS_CHANNEL COMPACTNESS THICKNESS MAJOR MINOR WSI_TYPE DEFECT_TYPE SHRINK |
| | | strValue = "ITEM DEFECT ID DEF_NO COORD_X COORD_Y GATELINE DATALINE SIZE_S SIZE_W SIZE_L SIZE_H GRADE CODE STACK_FLAG STACK_COUNT STACK_STEP IMAGE_FILE DSC_CODE VC_CODE DCR_CODE DEFECT_SIZE REPEAT_DEFECT WSI_HEIGHT CS_HEIGHT C_GRADE GRAY_MIN GRAY_MAX GRAY_AVG GRAY_DEF WSI_IMAGE USE_CCDIMAGE SCAN_NUM CAM_POSITION CCD_NO R_GRAY_MIN R_GRAY_MAX R_GRAY_AVG R_HEIGHT G_HEIGHT B_HEIGHT INS_CHANNEL COMPACTNESS THICKNESS MAJOR MINOR WSI_TYPE DEFECT_TYPE SHRINK"; //49ea |
| | | strValue = "ITEM DEFECT ID DEF_NO COORD_X COORD_Y GATELINE DATALINE SIZE_S SIZE_W SIZE_L SIZE_H GRADE CODE STACK_FLAG STACK_COUNT STACK_STEP IMAGE_FILE DSC_CODE VC_CODE DCR_CODE DEFECT_SIZE REPEAT_DEFECT WSI_HEIGHT CS_HEIGHT C_GRADE GRAY_MIN GRAY_MAX GRAY_AVG GRAY_DEF WSI_IMAGE USE_CCDIMAGE SCAN_NUM CAM_POSITION CCD_NO R_GRAY_MIN R_GRAY_MAX R_GRAY_AVG R_HEIGHT G_HEIGHT B_HEIGHT INS_CHANNEL COMPACTNESS THICKNESS MAJOR MINOR WSI_TYPE DEFECT_TYPE SHRINK CLASS_CODE"; //50ea |
| | | strLine += strValue; |
| | | |
| | | } |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 25 12 CORNER_GRAY_0 |
| | | if (strlen(pCellData->m_strCorner_Gray_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 25 12 AVG_GRAY_1 |
| | | // 26 12 AVG_AMP_0 |
| | | if (strlen(pCellData->m_strAvgAmp_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 27 12 FFT_VAR_0 |
| | | if (strlen(pCellData->m_strFFTVar_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 28 12 FFT_VAH_0 |
| | | if (strlen(pCellData->m_strFFTVah_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 29 12 FFT_VAQ_0 |
| | | if (strlen(pCellData->m_strFFTVaq_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 30 12 FFT_PK_0 |
| | | if (strlen(pCellData->m_strFFTPK_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 31 12 AVG_GRAY_1 |
| | | if (strlen(pCellData->m_strAvgGray_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_1); |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 26 12 PORTION_1 |
| | | // 32 12 PORTION_1 |
| | | if (strlen(pCellData->m_strPortion_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_1); |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 27 12 AVG_GRAY_2 |
| | | |
| | | //kyh 0622 |
| | | // 33 12 CORNER_GRAY_1 |
| | | if (strlen(pCellData->m_strCorner_Gray_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 34 12 AVG_AMP_1 |
| | | if (strlen(pCellData->m_strAvgAmp_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 35 12 FFT_VAR_1 |
| | | if (strlen(pCellData->m_strFFTVar_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 36 12 FFT_VAH_1 |
| | | if (strlen(pCellData->m_strFFTVah_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 37 12 FFT_VAQ_1 |
| | | if (strlen(pCellData->m_strFFTVaq_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 38 12 FFT_PK_1 |
| | | if (strlen(pCellData->m_strFFTPK_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 39 12 AVG_GRAY_2 |
| | | if (strlen(pCellData->m_strAvgGray_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_2); |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 28 12 PORTION_2 |
| | | // 40 12 PORTION_2 |
| | | if (strlen(pCellData->m_strPortion_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_2); |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 29 12 AVG_GRAY_3 |
| | | |
| | | //kyh 0622 |
| | | // 41 12 CORNER_GRAY_2 |
| | | if (strlen(pCellData->m_strCorner_Gray_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 42 12 AVG_AMP_2 |
| | | if (strlen(pCellData->m_strAvgAmp_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 43 12 FFT_VAR_2 |
| | | if (strlen(pCellData->m_strFFTVar_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 44 12 FFT_VAH_2 |
| | | if (strlen(pCellData->m_strFFTVah_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 45 12 FFT_VAQ_2 |
| | | if (strlen(pCellData->m_strFFTVaq_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 46 12 FFT_PK_2 |
| | | if (strlen(pCellData->m_strFFTPK_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 47 12 AVG_GRAY_3 |
| | | if (strlen(pCellData->m_strAvgGray_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_3); |
| | |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 30 12 PORTION_3 |
| | | // 48 12 PORTION_3 |
| | | if (strlen(pCellData->m_strPortion_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 49 12 CORNER_GRAY_3 |
| | | if (strlen(pCellData->m_strCorner_Gray_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 50 12 AVG_AMP_3 |
| | | if (strlen(pCellData->m_strAvgAmp_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 51 12 FFT_VAR_3 |
| | | if (strlen(pCellData->m_strFFTVar_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 52 12 FFT_VAH_3 |
| | | if (strlen(pCellData->m_strFFTVah_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 53 12 FFT_VAQ_3 |
| | | if (strlen(pCellData->m_strFFTVaq_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 54 12 FFT_PK_3 |
| | | if (strlen(pCellData->m_strFFTPK_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_3); |
| | | } |
| | | else |
| | | { |
| | |
| | | nValue = nValue << 1; |
| | | } |
| | | SPRINTRAW(12, "%04X", nValue); |
| | | |
| | | // 22 12 DEFECT_SIZE // Common 04 ë¶ë í¬ê¸° (L,H,M,S) |
| | | if (pDefectData->m_DefectSizeType == SizeType_Small) |
| | | { |
| | |
| | | // 49 12 Frame Shrink ì ë³´ ì¶ê° |
| | | SPRINTRAW(12, "%d", pDefectData->m_bShrinked); |
| | | |
| | | // 50 12 CLASS_NO // Zone Classification NO |
| | | // Zone Data |
| | | nValue = 0; |
| | | for (int i = 15; i >= 0; i--) |
| | | { |
| | | if (pDefectData->m_sZoneClassPixelCount[i] > 0) |
| | | nValue += 1; |
| | | if (i > 0) |
| | | nValue = nValue << 1; |
| | | } |
| | | SPRINTRAW(12, "%04X", nValue); |
| | | |
| | | SPRINTRAWEND; //ì¤ì!!! ì ¤ ë§ì§ë§ì ê¼ ìì´ì¼í¨!!!(ìì ê¸ì§) [ê¹íí2020/9/23] |
| | | |
| | |
| | | if (strlen(buffer) <= 0) continue; |
| | | paser.process(buffer, " "); |
| | | int nTokNum = paser.getTokNum(); |
| | | if (nTokNum < 31) continue; |
| | | if (nTokNum < 52) continue; //kyh 31->52 |
| | | MacroSubPanel.PRO_IMAGE = paser.getTokStr(20); |
| | | MacroSubPanel.AVG_GRAY_0 = paser.getTokStr(21); |
| | | MacroSubPanel.PORTION_0 = paser.getTokStr(22); |
| | | MacroSubPanel.AVG_GRAY_1 = paser.getTokStr(24); |
| | | MacroSubPanel.PORTION_1 = paser.getTokStr(25); |
| | | MacroSubPanel.AVG_GRAY_2 = paser.getTokStr(27); |
| | | MacroSubPanel.PORTION_2 = paser.getTokStr(28); |
| | | MacroSubPanel.AVG_GRAY_3 = paser.getTokStr(30); |
| | | MacroSubPanel.PORTION_3 = paser.getTokStr(31); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_0 = paser.getTokStr(23); |
| | | MacroSubPanel.AVG_AMP_0 = paser.getTokStr(24); |
| | | MacroSubPanel.FFT_VAR_0 = paser.getTokStr(25); |
| | | MacroSubPanel.FFT_VAH_0 = paser.getTokStr(26); |
| | | MacroSubPanel.FFT_VAQ_0 = paser.getTokStr(27); |
| | | MacroSubPanel.FFT_PK_0 = paser.getTokStr(28); |
| | | |
| | | MacroSubPanel.AVG_GRAY_1 = paser.getTokStr(29); |
| | | MacroSubPanel.PORTION_1 = paser.getTokStr(30); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_1 = paser.getTokStr(31); |
| | | MacroSubPanel.AVG_AMP_1 = paser.getTokStr(32); |
| | | MacroSubPanel.FFT_VAR_1 = paser.getTokStr(33); |
| | | MacroSubPanel.FFT_VAH_1 = paser.getTokStr(34); |
| | | MacroSubPanel.FFT_VAQ_1 = paser.getTokStr(35); |
| | | MacroSubPanel.FFT_PK_1 = paser.getTokStr(36); |
| | | |
| | | MacroSubPanel.AVG_GRAY_2 = paser.getTokStr(37); |
| | | MacroSubPanel.PORTION_2 = paser.getTokStr(38); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_2 = paser.getTokStr(39); |
| | | MacroSubPanel.AVG_AMP_2 = paser.getTokStr(40); |
| | | MacroSubPanel.FFT_VAR_2 = paser.getTokStr(41); |
| | | MacroSubPanel.FFT_VAH_2 = paser.getTokStr(42); |
| | | MacroSubPanel.FFT_VAQ_2 = paser.getTokStr(43); |
| | | MacroSubPanel.FFT_PK_2 = paser.getTokStr(44); |
| | | |
| | | MacroSubPanel.AVG_GRAY_3 = paser.getTokStr(45); |
| | | MacroSubPanel.PORTION_3 = paser.getTokStr(46); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_3 = paser.getTokStr(47); |
| | | MacroSubPanel.AVG_AMP_3 = paser.getTokStr(48); |
| | | MacroSubPanel.FFT_VAR_3 = paser.getTokStr(49); |
| | | MacroSubPanel.FFT_VAH_3 = paser.getTokStr(50); |
| | | MacroSubPanel.FFT_VAQ_3 = paser.getTokStr(51); |
| | | MacroSubPanel.FFT_PK_3 = paser.getTokStr(52); |
| | | |
| | | vecMacroSubPanel.push_back(MacroSubPanel); |
| | | } |
| | |
| | | strcpy(pGrmMura->m_strProImage, m_vecMacroSubPanel[i].PRO_IMAGE.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgGray_0, m_vecMacroSubPanel[i].AVG_GRAY_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_0, m_vecMacroSubPanel[i].PORTION_0.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_0, m_vecMacroSubPanel[i].CORNER_GRAY_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_0, m_vecMacroSubPanel[i].AVG_AMP_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_0, m_vecMacroSubPanel[i].FFT_VAR_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_0, m_vecMacroSubPanel[i].FFT_VAH_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_0, m_vecMacroSubPanel[i].FFT_VAQ_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_0, m_vecMacroSubPanel[i].FFT_PK_0.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_1, m_vecMacroSubPanel[i].AVG_GRAY_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_1, m_vecMacroSubPanel[i].PORTION_1.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_1, m_vecMacroSubPanel[i].CORNER_GRAY_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_1, m_vecMacroSubPanel[i].AVG_AMP_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_1, m_vecMacroSubPanel[i].FFT_VAR_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_1, m_vecMacroSubPanel[i].FFT_VAH_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_1, m_vecMacroSubPanel[i].FFT_VAQ_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_1, m_vecMacroSubPanel[i].FFT_PK_1.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_2, m_vecMacroSubPanel[i].AVG_GRAY_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_2, m_vecMacroSubPanel[i].PORTION_2.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_2, m_vecMacroSubPanel[i].CORNER_GRAY_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_2, m_vecMacroSubPanel[i].AVG_AMP_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_2, m_vecMacroSubPanel[i].FFT_VAR_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_2, m_vecMacroSubPanel[i].FFT_VAH_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_2, m_vecMacroSubPanel[i].FFT_VAQ_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_2, m_vecMacroSubPanel[i].FFT_PK_2.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_3, m_vecMacroSubPanel[i].AVG_GRAY_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_3, m_vecMacroSubPanel[i].PORTION_3.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_3, m_vecMacroSubPanel[i].CORNER_GRAY_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_3, m_vecMacroSubPanel[i].AVG_AMP_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_3, m_vecMacroSubPanel[i].FFT_VAR_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_3, m_vecMacroSubPanel[i].FFT_VAH_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_3, m_vecMacroSubPanel[i].FFT_VAQ_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_3, m_vecMacroSubPanel[i].FFT_PK_3.GetBuffer(0)); |
| | | } |
| | | strcpy(pShared->GetGlassData()->m_strMaxAvgGray, strMaxAvgGray.GetBuffer(0)); |
| | | strcpy(pShared->GetGlassData()->m_strMaxPortion, strMaxPortion.GetBuffer(0)); |
| | |
| | | CString PRO_IMAGE; |
| | | CString AVG_GRAY_0; // 0 Scan 0 Model |
| | | CString PORTION_0; |
| | | CString CORNER_GRAY_0; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_0; |
| | | CString FFT_VAR_0; |
| | | CString FFT_VAH_0; |
| | | CString FFT_VAQ_0; |
| | | CString FFT_PK_0; // kyh end |
| | | CString AVG_GRAY_1; // 0 Scan 1 Model |
| | | CString PORTION_1; |
| | | CString CORNER_GRAY_1; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_1; |
| | | CString FFT_VAR_1; |
| | | CString FFT_VAH_1; |
| | | CString FFT_VAQ_1; |
| | | CString FFT_PK_1; // kyh end |
| | | CString AVG_GRAY_2; // 1 Scan 0 Model |
| | | CString PORTION_2; |
| | | CString CORNER_GRAY_2; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_2; |
| | | CString FFT_VAR_2; |
| | | CString FFT_VAH_2; |
| | | CString FFT_VAQ_2; |
| | | CString FFT_PK_2; // kyh end |
| | | CString AVG_GRAY_3; // 1 Scan 1 Model |
| | | CString PORTION_3; |
| | | CString CORNER_GRAY_3; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_3; |
| | | CString FFT_VAR_3; |
| | | CString FFT_VAH_3; |
| | | CString FFT_VAQ_3; |
| | | CString FFT_PK_3; // kyh end |
| | | }; |
| | | |
| | | class CMacroResultFile |
| | |
| | | return SetCommand(grcReadBin); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::WriteReviewRawBinFile() |
| | | { |
| | | return SetCommand(grcReviewWriteBIn); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetCommand( emGlassRawCommand nCmd ) |
| | | { |
| | | if(m_pGlassRawInfo == NULL) return FALSE; |
| | |
| | | |
| | | int nCmdId = (m_pGlassRawInfo->m_nCommandIdxWrite+1) % COMMAND_MAXCOUNT; |
| | | |
| | | if(m_pGlassRawInfo->m_nCommandIdxRead == nCmdId)//ëì´ ê°ë¤ëê²ì ìíë¬ ë²í¼ê° íë°í´ ëìë¤ëê²!! [ê¹íí 2018/11/12] |
| | | if(m_pGlassRawInfo->m_nCommandIdxRead == nCmdId)//���� ���ٴ°��� ��ŧ�� ���۰� �ѹ��� ���Ҵٴ°�!! [������ 2018/11/12] |
| | | { |
| | | m_pGlassRawInfo->m_nCommandIdxRead++;//ê°ì¥ ì¤ëë ëª
ë ¹ íë를 ìì íë¤. [ê¹íí 2018/11/12] |
| | | m_pGlassRawInfo->m_nCommandIdxRead++;//���� ������ ��� �ϳ��� �����Ѵ�. [������ 2018/11/12] |
| | | } |
| | | |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].nCommand = (short)nCmd; |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].strParam; |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].nResult = -1; //-1ìíì , 0ì¤í¨, 1ì±ê³µ [ê¹íí 2018/11/13] |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].nResult = -1; //-1������, 0����, 1���� [������ 2018/11/13] |
| | | |
| | | |
| | | m_nLastCommandIdx = m_pGlassRawInfo->m_nCommandIdxWrite = nCmdId; |
| | |
| | | void CDitGlassRawClient::RemoveReviewDefects() |
| | | { |
| | | int nDefectNum = m_pGlassData->m_nDefectNum; |
| | | int nRightDefectNum = 0;//기ì¤ì ì¤ë¥¸ìª½ì ìì¹í ê²°í¨ ê°¯ì |
| | | int nRightDefectNum = 0;//������ �����ʿ� ��ġ�� ���� ���� |
| | | int nDefectDeleteNum = 0; |
| | | for(int i=nDefectNum-1; i>=0; i--) |
| | | { |
| | |
| | | |
| | | BOOL SetReviewComtomize(); |
| | | |
| | | void RemoveReviewDefects();//AOIìì ìì±í ëí ì 보를 ì ì¸íê³ , 리뷰ìì ìì±í User í¹ì Reflow ê²°í¨ì ì ì¸íë¤. |
| | | void RemoveReviewDefects();//AOI���� ������ ���� ������ �����ϰ�, ���信�� ������ User Ȥ�� Reflow ������ �����Ѵ�. |
| | | |
| | | _grmDitMemInfo* GetGlassMeminfo(){return (_grmDitMemInfo*)m_pGlassRawInfo;}; |
| | | _grmGlassData* GetGlassData(){return m_pGlassData;}; |
| | |
| | | _grmDefectData* GetDefectData(int nIndex){return &m_pDefectData[nIndex];}; |
| | | _grmDefectData* GetStackData(int nIndex) { return &m_pStackData[nIndex];}; |
| | | |
| | | //ê²°ê³¼ íì¼ ê°ì ì°ê¸° ëª
ë ¹ [ê¹íí 2018/11/12] |
| | | //��� ���� ���� ���� ��� [������ 2018/11/12] |
| | | BOOL WriteAOIRawFile(); |
| | | |
| | | //ê²°ê³¼íì¼ ê°ì ë°ì´ë리 ííë¡ ì°ê¸° [ê¹íí 2018/11/12] |
| | | //������� ���� ���̳ʸ� ���·� ���� [������ 2018/11/12] |
| | | BOOL WriteAOIRawBinFile(); |
| | | |
| | | //ê²°ê³¼íì¼ ê°ì ë°ì´ë리 ì½ê¸° |
| | | //������� ���� ���̳ʸ� �б� |
| | | BOOL ReadAOIRawBinFile(); |
| | | |
| | | BOOL WriteReviewRawBinFile(); |
| | | |
| | | protected: |
| | | BOOL ConnectGlassRawInfo(); |
| | | BOOL ConnectGlassRawData(); |
| | |
| | | memset(this, 0, sizeof(_grmGlassData)); |
| | | } |
| | | |
| | | //Glass ì ë³´ |
| | | //Glass ���� |
| | | char m_strFileName[64]; |
| | | char m_strPath[256]; |
| | | |
| | |
| | | |
| | | int m_nOriginDirection; //{ GD_LeftTop = 0, GD_RightTop = 1, GD_LeftBottom = 10, GD_RightBottom = 11 }; |
| | | int m_nConerCutDirection; |
| | | int m_nScanCoordinateY; //ì¬ê¸°ê° 0ì´ë©´ ì¼ë°, 1ì´ë©´ Scanë°©í¥ì´ yì¶(ì¦ scanë°©í¥ì´ ë¨ì¶, offline ì¤ë¹ ê°ì) |
| | | int m_nScanCoordinateY; //���Ⱑ 0�̸� �Ϲ�, 1�̸� Scan������ y��(�� scan������ ����, offline ���� ����) |
| | | |
| | | int m_nGlassSizeWidth; |
| | | int m_nGlassSizeHeight; |
| | | |
| | | //ì¤ë¹ì ë³´ |
| | | //�������� |
| | | char m_strLine[32]; |
| | | char m_strEquipType[32]; |
| | | char m_strEquipID[32]; |
| | |
| | | CTime m_tmReviewLoading; |
| | | CTime m_tmReviewEnd; |
| | | |
| | | //기본 물ë¥ì ë³´ |
| | | //�⺻ �������� |
| | | char m_strGlassID[32]; //Glass ID |
| | | char m_strPPID[32]; |
| | | char m_strEPPID[32]; |
| | |
| | | char m_strVCRGlassID[32]; |
| | | |
| | | |
| | | //ê²°í¨ ê°¯ì ê´ë¦¬ ë³ì |
| | | //���� ���� ���� ���� |
| | | int m_nDefectNumSizeSmall; |
| | | int m_nDefectNumSizeMid; |
| | | int m_nDefectNumSizeLarge; |
| | |
| | | int m_nDefectNumStackSP; |
| | | |
| | | |
| | | //ì¹´ë©ë¼/ì¤ìº ì ë³´ [ê¹íí 2018/12/5] |
| | | //ī�޶�/��ĵ ���� [������ 2018/12/5] |
| | | short m_nCameraNum; |
| | | short m_nScanNum; |
| | | unsigned char m_nGrayLevelAvg[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | unsigned char m_nGrayLevelMin[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | unsigned char m_nGrayLevelMax[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | |
| | | //ì¼ë¼ì¸ ì ë³´ um[ê¹íí 2018/12/10] |
| | | //����� ���� um[������ 2018/12/10] |
| | | double m_nAlignCcdTheta; |
| | | double m_nAlignCcdShitftX; |
| | | double m_nAlignCcdShitftY; |
| | |
| | | double m_nAlignBasicTheta; |
| | | double m_nAlignBasicShitftX; |
| | | double m_nAlignBasicShitftY; |
| | | char m_strAlignFirst[64]; |
| | | char m_strAlignSecond[64]; |
| | | // char m_strAlignPath[256]; |
| | | |
| | | //CSOTì© ë¬¼ë¥ ì ë³´ [ê¹íí 2018/12/5] |
| | | //CSOT�� ���� ���� [������ 2018/12/5] |
| | | char m_strCassetteSequenceNo[16]; |
| | | char m_strOwnerCode[16]; //2. OWNER_CODE |
| | | char m_strOwnerType[16]; //3. OWNER_TYPE |
| | |
| | | char m_strGroupID[16]; //14.GROUP_ID |
| | | char m_cAutoSampleFlag; //15.AUTOSAMPLEFLAG |
| | | |
| | | // CPRJì© ë¬¼ë¥ ì ë³´ |
| | | // CPRJ�� ���� ���� |
| | | char m_strProdType[3]; |
| | | char m_strBatchID[13]; |
| | | char m_strPairHPanelID[13]; |
| | |
| | | BYTE m_nGlassDataBitSignal[4]; |
| | | bool m_bJob_end; |
| | | |
| | | //201217 CJH - ì°ì Defect Review ê°ì |
| | | //201217 CJH - ���� Defect Review ���� |
| | | int m_nReviewNum; |
| | | //201221 CJH - íì±í Stack ê²°ê³¼ |
| | | //201221 CJH - �Ľ��� Stack ��� |
| | | int m_nStackNum; |
| | | BOOL m_bStackRead; |
| | | |
| | | //210203 CJH - CutOff ëì ê²°í¨ ì |
| | | //210203 CJH - CutOff ��� ���� �� |
| | | int m_nCutOffDefectNum; |
| | | //210323 CJH - Server/Frame Shrink ì ë³´ ì¶ê° |
| | | //210323 CJH - Server/Frame Shrink ���� �߰� |
| | | char m_strShrinked[6]; |
| | | //210326 CJH - RAW ì
ë ¥ Defect ìë ìí ì¬ì©ì¬ë¶ |
| | | //210326 CJH - RAW �Է� Defect ���� ���� ��뿩�� |
| | | BOOL m_bRawCutoff; |
| | | |
| | | }; |
| | |
| | | } |
| | | int getTotalDefectNum(){return m_nDefectNumTypeTB+m_nDefectNumTypeTW+m_nDefectNumTypeRB+m_nDefectNumTypeRW; }; |
| | | int m_nCellID; //1. PANEL_ID |
| | | short m_nModelIdx; // ëª ë²ì§¸ 모ë¸ì¸ê°? |
| | | short m_nModelIdx; // �� ��° ���ΰ�? |
| | | |
| | | char m_strCellName[32]; |
| | | int m_rectCellLeft; |
| | |
| | | int m_nJudgeGlade; |
| | | |
| | | |
| | | //ê²°í¨ ê°¯ì ê´ë¦¬ ë³ì |
| | | //���� ���� ���� ���� |
| | | int m_nDefectNumSizeSmall; |
| | | int m_nDefectNumSizeMid; |
| | | int m_nDefectNumSizeLarge; |
| | |
| | | char m_strProImage[32]; |
| | | char m_strAvgGray_0[12]; |
| | | char m_strPortion_0[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_0[12]; |
| | | char m_strAvgAmp_0[12]; |
| | | char m_strFFTVar_0[12]; |
| | | char m_strFFTVah_0[12]; |
| | | char m_strFFTVaq_0[12]; |
| | | char m_strFFTPK_0[12]; |
| | | |
| | | char m_strAvgGray_1[12]; |
| | | char m_strPortion_1[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_1[12]; |
| | | char m_strAvgAmp_1[12]; |
| | | char m_strFFTVar_1[12]; |
| | | char m_strFFTVah_1[12]; |
| | | char m_strFFTVaq_1[12]; |
| | | char m_strFFTPK_1[12]; |
| | | |
| | | char m_strAvgGray_2[12]; |
| | | char m_strPortion_2[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_2[12]; |
| | | char m_strAvgAmp_2[12]; |
| | | char m_strFFTVar_2[12]; |
| | | char m_strFFTVah_2[12]; |
| | | char m_strFFTVaq_2[12]; |
| | | char m_strFFTPK_2[12]; |
| | | |
| | | char m_strAvgGray_3[12]; |
| | | char m_strPortion_3[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_3[12]; |
| | | char m_strAvgAmp_3[12]; |
| | | char m_strFFTVar_3[12]; |
| | | char m_strFFTVah_3[12]; |
| | | char m_strFFTVaq_3[12]; |
| | | char m_strFFTPK_3[12]; |
| | | |
| | | int m_nDefectNumJudgeOKWhite; |
| | | int m_nDefectNumJudgeOKBlack; |
| | |
| | | |
| | | int m_nReflowResult[8]; // 0: Reflow X 1: Reflow OK 2: Reflow NG |
| | | |
| | | // Filteringë Stackë³ ì |
| | | // Filtering�� Stack�� �� |
| | | int m_nDefectTDCount; |
| | | int m_nDefectSDCount; |
| | | int m_nDefectPDCount; |
| | | int m_nDefectSPCount; |
| | | |
| | | // Gate/Data ì´ ê°¯ì |
| | | // Gate/Data �� ���� |
| | | int m_nGateNum; |
| | | int m_nDataNum; |
| | | |
| | | // 210129 CJH - Cell Origin ë°©í¥ |
| | | // 210129 CJH - Cell Origin ���� |
| | | int m_nCellXDir; |
| | | int m_nCellYDir; |
| | | }; |
| | |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //ì¬ê¸°ì ë¶í° 리뷰 ìì [ê¹íí 2019/1/19] |
| | | //���⼠���� ���� ���� [������ 2019/1/19] |
| | | ditRaw::ReviewPlanType m_nPlanType ; |
| | | int m_nResultCode; //0:None, 1:Success |
| | | int m_nShotIndex; //리뷰 ì°ì ìë² [ê¹íí 2018/12/5] |
| | | int m_nShotIndex; //���� ���� ���� [������ 2018/12/5] |
| | | int m_nModuleIndex; |
| | | int m_nMagnificIndex; |
| | | float m_fManification; |
| | | float m_fManificResoultion; |
| | | char m_strRevImageName[256]; |
| | | char m_strRevImagePath[256]; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Measure ìì |
| | | // Measure ���� |
| | | int m_nMeasure_Index; |
| | | int m_nMeasure_ResultCode; //0:None, 1:Success |
| | | float m_fMesure_ResultData[8]; // 0:Type, 1:ShiftX, 2:ShiftY |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // WSIìì |
| | | // WSI���� |
| | | int m_nWsi_ResultCode; //0:None, 1:Success |
| | | int m_nWsi_Type; // í¨ëª° / ë기 |
| | | int m_nWsi_Type; // �Ը� / ���� |
| | | float m_fWsi_ResultData[8]; // 0:Type, 1:Height(um), 2:Width |
| | | char m_strWsi_2DImageFilename[256]; |
| | | char m_strWsi_3DImageFilename[256]; |
| | |
| | | int m_nWsi_pReflowResultData[8]; |
| | | double m_dWsi_DamDistance; |
| | | |
| | | double m_dWsiMmMotorX; // WSI ëª¨í° ì¢í 20180223 HJH |
| | | double m_dWsiMmMotorX; // WSI ���� ��ǥ 20180223 HJH |
| | | double m_dWsiMmMotorY; |
| | | float m_fWsiManification; // WSI ë°°ì¨ |
| | | float m_fWsiManification; // WSI ���� |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Reflow ìì |
| | | // Reflow ���� |
| | | int m_nReflow_Index; |
| | | int m_nReflow_ResultCode; //0:None, // ê²ì¶í Lineì ê°ì. 3 ë¯¸ë§ : DAM2 Reflow íì , 4~5 : DAM1 Reflow íì , 6 : no Reflow íì / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side |
| | | int m_nReflow_ResultCode; //0:None, // ������ Line�� ����. 3 �̸� : DAM2 Reflow ����, 4~5 : DAM1 Reflow ����, 6 : no Reflow ���� / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side |
| | | float m_fReflow_LinePosData[8]; |
| | | int m_nReflow_Side; |
| | | int m_nReflow_InspectionMode; |
| | |
| | | short m_nDefectID; |
| | | short m_nCameraID; |
| | | short m_nScanIdx; |
| | | //short m_nDefectIdx; // ì¹´ë©ë¼ììì ê²°í¨ ì¸ë±ì¤ |
| | | int m_nDefectIdx; // ì¹´ë©ë¼ììì ê²°í¨ ì¸ë±ì¤ 201207 CJH - ì릿 ì ë침. intíì¼ë¡ ë³ê²½ |
| | | //short m_nDefectIdx; // ī�޶󿡼��� ���� �ε��� |
| | | int m_nDefectIdx; // ī�޶󿡼��� ���� �ε��� 201207 CJH - �ڸ� �� ��ħ. int������ ���� |
| | | |
| | | int m_nPixelConv; // pixel ë¨ì ì¢í |
| | | int m_nPixelScan; // pixel ë¨ì ì¢í |
| | | int m_nPixelConv; // pixel ���� ��ǥ |
| | | int m_nPixelScan; // pixel ���� ��ǥ |
| | | |
| | | short m_nPixelSize; // ê²°í¨í¬ê¸° ---------------------------------PS |
| | | short/*SERVER_DefectType*/ m_DefectType; // ê²°í¨ íì
---------------------------------DT |
| | | short/*SERVER_DefectSubType*/ m_DefectSubType; // ê²°í¨ì íì ìí. |
| | | short/*SERVER_DefectBDType*/ m_DefectBDType; // ê²°í¨ íì
- Bright, Dark, Both |
| | | short m_nPixelSize; // ����ũ�� ---------------------------------PS |
| | | short/*SERVER_DefectType*/ m_DefectType; // ���� Ÿ�� ---------------------------------DT |
| | | short/*SERVER_DefectSubType*/ m_DefectSubType; // ������ ��������. |
| | | short/*SERVER_DefectBDType*/ m_DefectBDType; // ���� Ÿ�� - Bright, Dark, Both |
| | | |
| | | short m_sPixelWidth; // í½ì
ë¨ì ê²°í¨ ëë¹ |
| | | short m_sPixelHeight; // í½ì
ë¨ì ê²°í¨ ëì´ |
| | | short m_nLevelSrcMin; // ê²°í¨ ë°ê¸° Min -----------------------------SN |
| | | short m_nLevelSrcMax; // ê²°í¨ ë°ê¸° Max -----------------------------SX |
| | | short m_nLevelSrcAvg; // ê²°í¨ ë°ê¸° Avg -----------------------------SA |
| | | short m_nLevelRefMin; // ë¹êµëì ë°ê¸° Min -------------------------RN |
| | | short m_nLevelRefMax; // ë¹êµëì ë°ê¸° Max -------------------------RX |
| | | short m_nLevelRefAvg; // ë¹êµëì ë°ê¸° Avg -------------------------RA |
| | | short m_nLevelDiffMin; // ë¹êµì°¨ Min ---------------------------------DN |
| | | short m_nLevelDiffMax; // ë¹êµì°¨ Max ---------------------------------DX |
| | | short m_nLevelDiffAvg; // ë¹êµì°¨ Avg ---------------------------------DA |
| | | short m_sPixelWidth; // �ȼ����� ���� �ʺ� |
| | | short m_sPixelHeight; // �ȼ����� ���� ���� |
| | | short m_nLevelSrcMin; // ���� ��� Min -----------------------------SN |
| | | short m_nLevelSrcMax; // ���� ��� Max -----------------------------SX |
| | | short m_nLevelSrcAvg; // ���� ��� Avg -----------------------------SA |
| | | short m_nLevelRefMin; // �񱳴�� ��� Min -------------------------RN |
| | | short m_nLevelRefMax; // �񱳴�� ��� Max -------------------------RX |
| | | short m_nLevelRefAvg; // �񱳴�� ��� Avg -------------------------RA |
| | | short m_nLevelDiffMin; // ���� Min ---------------------------------DN |
| | | short m_nLevelDiffMax; // ���� Max ---------------------------------DX |
| | | short m_nLevelDiffAvg; // ���� Avg ---------------------------------DA |
| | | |
| | | int m_nDefectRScale; // í½ì
ë¨ì ê²°í¨ ëì´ -------------------------RS |
| | | short m_sThreshold; // ê²°í¨ì ê²ì¶í ëì Threshold |
| | | short m_sThresholdAvg; // ê²°í¨ì ê²ì¶í ëì Threshold AVG |
| | | short m_sDefectPeak; // ê²°í¨ì Peak. |
| | | short m_sDefectLevel; // (DiffAvg - Th) BOE 8G ìì²ì¬í |
| | | int m_nDefectRScale; // �ȼ����� ���� ���� -------------------------RS |
| | | short m_sThreshold; // ������ ������ ���� Threshold |
| | | short m_sThresholdAvg; // ������ ������ ���� Threshold AVG |
| | | short m_sDefectPeak; // ������ Peak. |
| | | short m_sDefectLevel; // (DiffAvg - Th) BOE 8G ��û���� |
| | | |
| | | int m_nPixelGlassStart; // Glass ìì í½ì
|
| | | int m_nPixelGlassStart; // Glass ���� �ȼ� |
| | | short m_sDefectLoc; |
| | | |
| | | short m_sZonePixelCount[16]; // Zoneë³ ê²°í¨ Pixel ì |
| | | short m_sZoneValueMin[16]; // Zoneë³ ê²°í¨ Min |
| | | short m_sZoneValueMax[16]; // Zoneë³ ê²°í¨ Max |
| | | short m_sZoneValueAvg[16]; // Zoneë³ ê²°í¨ Avg |
| | | short m_sZoneClassPixelCount[16]; |
| | | short m_sZonePixelCount[16]; // Zone�� ���� Pixel �� |
| | | short m_sZoneValueMin[16]; // Zone�� ���� Min |
| | | short m_sZoneValueMax[16]; // Zone�� ���� Max |
| | | short m_sZoneValueAvg[16]; // Zone�� ���� Avg |
| | | short m_sZonePixelPercent[16]; // --------------------------------------Z0~ZF |
| | | |
| | | //210127 CJH - Zoneë³ Source Gray ì
ë ¥ |
| | | short m_sZoneValueSrcMin[16]; // Zoneë³ Source Min |
| | | short m_sZoneValueSrcMax[16]; // Zoneë³ Source Max |
| | | short m_sZoneValueSrcAvg[16]; // Zoneë³ Source Avg |
| | | //210127 CJH - Zone�� Source Gray �Է� |
| | | short m_sZoneValueSrcMin[16]; // Zone�� Source Min |
| | | short m_sZoneValueSrcMax[16]; // Zone�� Source Max |
| | | short m_sZoneValueSrcAvg[16]; // Zone�� Source Avg |
| | | |
| | | int m_nUMOriginX; // umë¨ì xì¢í (ìì 기ì¤) |
| | | int m_nUMOriginY; // umë¨ì yì¡°í (ìì 기ì¤) |
| | | int m_nUMCenterAlignX; // umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | int m_nUMCenterAlignY; // umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | int m_nUMCenterX; // umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì ì ) |
| | | int m_nUMCenterY; // umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì ì ) |
| | | int m_nUMSizeX; // umë¨ì X í¬ê¸° -----------------------------UX |
| | | int m_nUMSizeY; // umë¨ì Y í¬ê¸° -----------------------------UY |
| | | int m_nUMSize; // umë¨ì í¬ê¸°. |
| | | CRect m_RectUM; // ëí ì¼í° ê¸°ì¤ ì¬ê°í. |
| | | int m_nUMOriginX; // um���� x��ǥ (��������) |
| | | int m_nUMOriginY; // um���� y��ǥ (��������) |
| | | int m_nUMCenterAlignX; // um���� X��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterAlignY; // um���� Y��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterX; // um���� X��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterY; // um���� Y��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMSizeX; // um���� X ũ�� -----------------------------UX |
| | | int m_nUMSizeY; // um���� Y ũ�� -----------------------------UY |
| | | int m_nUMSize; // um���� ũ��. |
| | | CRect m_RectUM; // ���� ���� ���� �簢��. |
| | | |
| | | short/*SERVER_DefectSizeType*/ m_DefectSizeType; // ê²°í¨ í¬ê¸° ì¢
ë¥enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | short/*SERVER_DefectPeakType*/ m_DefectPeakType; // Peakì ì¢
ë¥. |
| | | short/*Judgement*/ m_DefectJudgement; // ê²°í¨ íì . |
| | | BOOL m_bDefectCutoff; // ì»· ì¤í ëí(TRUE= Cutoff, FALSE) |
| | | short/*MAP16_DefectClass*/ m_DefectClass; // BOE Defect Class 16ë±ë¶ êµ¬ë¶ |
| | | int m_nPadRegionIdx; // PAD ìì ì¸ë±ì¤ |
| | | short/*SERVER_DefectSizeType*/ m_DefectSizeType; // ���� ũ�� ����enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | short/*SERVER_DefectPeakType*/ m_DefectPeakType; // Peak�� ����. |
| | | short/*Judgement*/ m_DefectJudgement; // ���� ����. |
| | | BOOL m_bDefectCutoff; // �� ���� ����(TRUE= Cutoff, FALSE) |
| | | short/*MAP16_DefectClass*/ m_DefectClass; // BOE Defect Class 16��� ���� |
| | | int m_nPadRegionIdx; // PAD ���� ��� |
| | | |
| | | int m_nUMCellX; // ì
ìì ê¸°ì¤ x ì¢í |
| | | int m_nUMCellY; // ì
ìì ê¸°ì¤ y ì¢í |
| | | short m_nModelIdx; // ëª ë²ì§¸ 모ë¸ì¸ê°? |
| | | short m_nCellIdx; // ëªë²ì§¸ ì
ì¸ê°? |
| | | short m_nCellGate; // ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | short m_nCellData; // ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | short m_nCellGateAlign; // ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | short m_nCellDataAlign; // ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | int m_nUMCellX; // �� ���� ���� x ��ǥ |
| | | int m_nUMCellY; // �� ���� ���� y ��ǥ |
| | | short m_nModelIdx; // �� ��° ���ΰ�? |
| | | short m_nCellIdx; // ���° ���ΰ�? |
| | | short m_nCellGate; // ���� Gate����(����� ���� ��) |
| | | short m_nCellData; // ���� Data����(����� ���� ��) |
| | | short m_nCellGateAlign; // ���� Gate����(����� ���� ��) |
| | | short m_nCellDataAlign; // ���� Data����(����� ���� ��) |
| | | |
| | | int m_nUMShotX; // ì· ê¸°ì¤ Xì¢í |
| | | int m_nUMShotY; // ì· ê¸°ì¤ Yì¢í |
| | | short m_nMaskDefectIdx; // í Glassìì ë°ê²¬ë ë§ì¤í¬ê²°í¨ 묶ìì ì¸ë±ì¤. |
| | | short m_nShotIdx; // ë
¸ê´ì· ë²í¸ |
| | | short m_nMatchShotCount; // ëì¼í ë§ì¤í¬ ê²°í¨ì ì. |
| | | short m_nMatchMaxSize; // ëì¼í ë§ì¤í¬ ì¤ ê°ì¥ í° ê²°í¨ì í¬ê¸°. |
| | | int m_nUMShotX; // �� ���� X��ǥ |
| | | int m_nUMShotY; // �� ���� Y��ǥ |
| | | short m_nMaskDefectIdx; // �� Glass���� �߰ߵ� ����ũ���� ������ �ε���. |
| | | short m_nShotIdx; // �뱤�� ��ȣ |
| | | short m_nMatchShotCount; // ������ ����ũ ������ ��. |
| | | short m_nMatchMaxSize; // ������ ����ũ �� ���� ū ������ ũ��. |
| | | |
| | | short m_nRepeatCount; // ì°ìê²°í¨ë°ê²¬ìí ëì¼ì¢í ë°ë³µì |
| | | short m_nRepeatCount; // ���Ӱ��Թ߰����� ������ǥ �ݺ��� |
| | | short m_nMaskRepeatCount; |
| | | int m_StackInfo; // Stack Flag |
| | | BOOL m_bRealStack; // Stack 머ì§ì ìí TD(TRUE) ì¸ì§, íí°ë§ì ìí TD(FALSE)구ë¶í ì ìë¤. |
| | | short m_nStackStepCount; // Stack ì |
| | | short m_nStackColorIdx; // Color를 ì ííë ì¸ë±ì¤. |
| | | BOOL m_bRealStack; // Stack ������ ���� TD(TRUE) ����, ���͸��� ���� TD(FALSE)������ �� �ִ�. |
| | | short m_nStackStepCount; // Stack �� |
| | | short m_nStackColorIdx; // Color�� �����ϴ� �ε���. |
| | | //CString m_strStackStep[CFDEFECT_STACKCOUNT]; // Stack Step. |
| | | char m_strStackFirst[60]; // Stack Step. //201221 CJH - ìµë ì¬ì´ì¦ 60bytes |
| | | char m_strUnitID[16]; // ì ëìì´ë |
| | | char m_strStackFirst[60]; // Stack Step. //201221 CJH - �ִ� ������ 60bytes |
| | | char m_strUnitID[16]; // ���־��̵� |
| | | |
| | | int m_ClassificationType; // enum ClassificationType { ClassType_None= 0, ClassType_PI_Over= 1, ClassType_PI_Under= 2, ClassType_TFE_Circle= 3, ClassType_Bubble, ClassType_Scratch, ClassType_Particle}; Classification Type, PIë TFEë± ì¶ê° ë¶ë¥ ìê³ ë¦¬ì¦ ì ì© ê²°ê³¼. |
| | | int m_nAtomWidth; // TFE íµ ëë¹ |
| | | int m_nAtomHeight; // TFE íµ ëì´ |
| | | short/*ReKind*/ m_DefectKind; // ê²°í¨ ì¢
ë¥ |
| | | int m_ClassificationType; // enum ClassificationType { ClassType_None= 0, ClassType_PI_Over= 1, ClassType_PI_Under= 2, ClassType_TFE_Circle= 3, ClassType_Bubble, ClassType_Scratch, ClassType_Particle}; Classification Type, PI�� TFE�� �߰� �з� �˰���� ���� ���. |
| | | int m_nAtomWidth; // TFE �� �ʺ� |
| | | int m_nAtomHeight; // TFE �� ���� |
| | | short/*ReKind*/ m_DefectKind; // ���� ���� |
| | | |
| | | char m_strDefectCode[32]; // Defect Code |
| | | BOOL m_bMergeState; // Merge Status |
| | | char m_strAoiImageName[256]; // Defect Image Name(CCD Image) |
| | | int m_nDefectMerge; // íì¬ ëíì ë¨¸ì§ ì¬ë¶ |
| | | int m_nDefectMerge; // ���� ������ ���� ���� |
| | | |
| | | |
| | | int m_nPixelSizeOrigin; |
| | | int m_nScratchRatio; |
| | | int m_nDensity; // ìí ê²°í¨ êµ¬ë¶ì ìí ë°ë [2017.8.2 bhs] |
| | | int m_nDensity; // ���� ���� ������ ���� �е� [2017.8.2 bhs] |
| | | |
| | | char m_strDefectName[16]; |
| | | char m_strDefectType[16]; |
| | |
| | | double m_dScanResolution; |
| | | double m_dConvResolution; |
| | | |
| | | int m_nAngle; // ê°ë |
| | | int m_nMajor; // ì¥ì¶ 길ì´(Long) |
| | | int m_nMinor; // ë¨ì¶ 길ì´(Short) |
| | | int m_nCompact; // Blob ì¥ì¶ì ì§ë¦ì¼ë¡ íë ìì ëì´ì Blob ëì´ì ë¹ì¨ |
| | | int m_nThickness; // Blob ëì´ì ì¥ì¶ì ë¹ì¨ (Area / Major) |
| | | int m_nAngle; // ���� |
| | | int m_nMajor; // ���� ����(Long) |
| | | int m_nMinor; // ���� ����(Short) |
| | | int m_nCompact; // Blob ������ �������� �ϴ� ���� ���̿� Blob ������ ���� |
| | | int m_nThickness; // Blob ���̿� ������ ���� (Area / Major) |
| | | |
| | | short m_nHliLevelIdx; // ëª ë²ì§¸ ë 벨(ì±ë)ì¸ê°? |
| | | int m_nHliLayers; // í´ë¹ê²°í¨ì í¬í¨ë ë ì´ì´ bitì²ë¦¬ |
| | | short m_nHliLevelIdx; // �� ��° ����(ä��)�ΰ�? |
| | | int m_nHliLayers; // �ش���Կ� ���Ե� ���̾� bitó�� |
| | | |
| | | BOOL m_bShrinked; //210323 CJH - Frame Shrink ì ë³´ ì¶ê° |
| | | BOOL m_bShrinked; //210323 CJH - Frame Shrink ���� �߰� |
| | | |
| | | char m_strAoiImagePath[255]; |
| | | char m_strReviewImagePath[255]; |
| | | |
| | | int m_nAlignRectLeft; |
| | | int m_nAlignRectTop; |
| | | int m_nAlignRectBottom; |
| | | int m_nAlignRectRight; |
| | | |
| | | |
| | | //리뷰 ëí ì ë³´ [ê¹íí 2019/1/19] |
| | | //���� ���� ���� [������ 2019/1/19] |
| | | _grmDefectReviewData m_ReviewDefect; |
| | | }; |
| | | |
| | |
| | | grcWriteBin = 201, |
| | | grcReadBin = 202, |
| | | |
| | | grcReviewWriteBIn = 301, |
| | | |
| | | grcGlassRawCommand |
| | | }; |
| | | |
| | |
| | | |
| | | struct _grmDitMemInfo |
| | | { |
| | | //ê³µì ë©ëª¨ë¦¬ ìì±í ê³µê° ê²°ì [ê¹íí 2018/11/12] |
| | | //���� �޸� ������ ���� ���� [������ 2018/11/12] |
| | | size_t m_nGlassRawDataSize; |
| | | int m_nGlassMaxDataNum; |
| | | int m_nBlockMaxDataNum; |
| | |
| | | int m_nDefectMaxDataNum; |
| | | int m_nStackMaxDataNum; |
| | | |
| | | //Char ê¸°ì¤ ìë£ê° ìë ìì ìì¹ [ê¹íí 2018/11/12] |
| | | //Char ���� �ڷᰡ �ִ� ���� ��ġ [������ 2018/11/12] |
| | | int m_nGlassDataPoint; |
| | | int m_nBlockDataPoint; |
| | | int m_nCellDataPoint; |
| | |
| | | struct _grmDitGlassRawInfo : public _grmDitMemInfo, public _grmDitCommand |
| | | { |
| | | size_t m_nGlassLoadingCount; |
| | | emAOIProcStep m_ClientProcStep; //AOI, Reviewê° ë³´ë¸ ëª
ë ¹ |
| | | emAOIProcStep m_ServerProcStep; //GlassRaw Messenger(Server)ê° ì²ë¦¬ ìë£ í ëª
ë ¹ |
| | | emAOIProcStep m_ClientProcStep; //AOI, Review�� ���� ��� |
| | | emAOIProcStep m_ServerProcStep; //GlassRaw Messenger(Server)�� ó�� �Ϸ� �� ��� |
| | | }; |
| | | |
| | | class CgrmGlassRawData |
| | |
| | | { |
| | | if(pInfo == NULL || pData == NULL) return FALSE; |
| | | |
| | | if(1) //new type //ë©ëª¨ë¦¬ ì´ ê³µê° í¬ê¸°ì ìê´ìì´ |
| | | if(1) //new type //�޸� �� ���� ũ�⿡ ������� |
| | | { |
| | | //if(pInfo->m_nGlassRawDataSize != m_MemInfo.m_nGlassRawDataSize) return FALSE; |
| | | |
»õ ÆÄÀÏ |
| | |
| | | // DefectListDlg.cpp: 구í íì¼ |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReveiwHistory.h" |
| | | #include "AlignDlg.h" |
| | | #include "afxdialogex.h" |
| | | #include <algorithm> |
| | | #include <functional> |
| | | |
| | | // CFormtListDlg ëí ìì |
| | | |
| | | IMPLEMENT_DYNAMIC(CAlignDlg, CDialog) |
| | | |
| | | enum { FORMLIST_POPUP_FORMALL = 15000, FORMLIST_POPUP_FORMSELECT, FORMLIST_POPUP_End }; |
| | | |
| | | |
| | | CAlignDlg::CAlignDlg(CWnd* pParent /*=nullptr*/) |
| | | : CDialog(IDD_DLG_ALIGN, pParent) |
| | | { |
| | | m_pDefectFormation = NULL; |
| | | m_bAsending = FALSE; |
| | | m_nLastSortCol = 0; |
| | | m_nSelectedCol = 0; |
| | | m_nSelectedRow = 0; |
| | | m_nSelectedFormIdRclick = -1; |
| | | } |
| | | |
| | | CAlignDlg::~CAlignDlg() |
| | | { |
| | | } |
| | | |
| | | void CAlignDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialog::DoDataExchange(pDX); |
| | | } |
| | | |
| | | BOOL CAlignDlg::Create(CWnd * pParentWnd) |
| | | { |
| | | return CDialog::Create(IDD, pParentWnd); |
| | | } |
| | | |
| | | BOOL CAlignDlg::PreTranslateMessage(MSG * pMsg) |
| | | { |
| | | if (pMsg->message == WM_KEYDOWN) |
| | | { |
| | | if (pMsg->wParam == VK_ESCAPE) |
| | | { |
| | | ShowWindow(SW_HIDE); |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | | |
| | | return __super::PreTranslateMessage(pMsg); |
| | | } |
| | | |
| | | void CAlignDlg::OnDestroy() |
| | | { |
| | | CDialog::OnDestroy(); |
| | | } |
| | | |
| | | void CAlignDlg::OnShowWindow(BOOL bShow, UINT nStatus) |
| | | { |
| | | __super::OnShowWindow(bShow, nStatus); |
| | | |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (TRUE == bShow) |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CAlignDlg, CDialog) |
| | | ON_BN_CLICKED(IDOK, &CAlignDlg::OnBnClickedOk) |
| | | ON_CONTROL_RANGE(BN_CLICKED, FORMLIST_POPUP_FORMALL, FORMLIST_POPUP_End, OnPopupMenuFormList) |
| | | ON_WM_SIZE() |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CFormtListDlg ë©ìì§ ì²ë¦¬ê¸° |
| | | |
| | | |
| | | void CAlignDlg::OnBnClickedOk() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CDialog::OnOK(); |
| | | } |
| | | |
| | | |
| | | BOOL CAlignDlg::OnInitDialog() |
| | | { |
| | | CDialog::OnInitDialog(); |
| | | |
| | | // TODO: ì¬ê¸°ì ì¶ê° ì´ê¸°í ìì
ì ì¶ê°í©ëë¤. |
| | | |
| | | m_vecStrGridDefectHeader.push_back(" "); |
| | | m_vecStrGridDefectHeader.push_back("1st X Pos"); |
| | | m_vecStrGridDefectHeader.push_back("1st Y Pos"); |
| | | m_vecStrGridDefectHeader.push_back("2nd X Pos"); |
| | | m_vecStrGridDefectHeader.push_back("2nd Y Pos"); |
| | | |
| | | CakGridCtrl* pGrid = &m_gridFormInfo; |
| | | { |
| | | std::vector<CString>* pVecHeader = &m_vecStrGridDefectHeader; |
| | | |
| | | CRect rectGrid; |
| | | GetDlgItem(IDC_STATIC_GRID_ALIGN)->GetWindowRect(&rectGrid); |
| | | ScreenToClient(&rectGrid); |
| | | pGrid->Create(rectGrid, this, IDC_STATIC_GRID_ALIGN); |
| | | |
| | | |
| | | pGrid->GetDefaultCell(TRUE, FALSE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, TRUE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, FALSE)->SetBackClr(GRID_COLOR); |
| | | pGrid->SetFixedBkColor(GRID_FIX_COLOR); |
| | | pGrid->SetGridLines(GVL_BOTH); |
| | | |
| | | |
| | | pGrid->SetVirtualMode(TRUE); |
| | | pGrid->SetCallbackFunc(NULL, 0); |
| | | pGrid->AllowReorderColumn(FALSE); // implemented now only if m_bCallback |
| | | pGrid->EnableDragRowMode(FALSE); |
| | | |
| | | pGrid->SetColumnCount((int)pVecHeader->size()); |
| | | pGrid->SetDoubleBuffering(TRUE); |
| | | pGrid->SetRowCount(2); |
| | | pGrid->SetFixedRowCount(1); |
| | | pGrid->SetFixedColumnCount(0); |
| | | |
| | | pGrid->SetEditable(FALSE); |
| | | pGrid->EnableSelection(TRUE); |
| | | pGrid->SetFixedRowSelection(TRUE); |
| | | pGrid->SetHeaderSort(FALSE); |
| | | |
| | | // fill it up with stuff |
| | | pGrid->SetEditable(TRUE); |
| | | pGrid->EnableDragAndDrop(TRUE); |
| | | |
| | | |
| | | pGrid->AutoSize(); |
| | | pGrid->Invalidate(); |
| | | } |
| | | |
| | | m_WndArrange.setParentWnd(this); |
| | | m_WndArrange.addChildWnd(&m_gridFormInfo, WA_RESIZE_WIDTH | WA_RESIZE_HEIGHT); |
| | | |
| | | GetDlgItem(IDC_IMG_ALIGN1)->GetWindowRect(m_picture_rect); |
| | | GetDlgItem(IDC_IMG_ALIGN2)->GetWindowRect(m_picture_rect2); |
| | | |
| | | ScreenToClient(m_picture_rect); |
| | | ScreenToClient(m_picture_rect2); |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // ìì¸: OCX ìì± íì´ì§ë FALSE를 ë°íí´ì¼ í©ëë¤. |
| | | } |
| | | |
| | | |
| | | BOOL CAlignDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) |
| | | { |
| | | // TODO: ì¬ê¸°ì í¹ìíë ì½ë를 ì¶ê° ë°/ëë 기본 í´ëì¤ë¥¼ í¸ì¶í©ëë¤. |
| | | if (m_gridFormInfo.GetSafeHwnd() && wParam == (WPARAM)m_gridFormInfo.GetDlgCtrlID()) |
| | | { |
| | | *pResult = 1; |
| | | GV_DISPINFO *pDispInfo = (GV_DISPINFO*)lParam; |
| | | if (GVN_GETDISPINFO == pDispInfo->hdr.code) |
| | | { |
| | | getDispInfoDefect(pDispInfo->item.col, pDispInfo->item.row, &pDispInfo->item.strText); |
| | | |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row == 0) |
| | | { |
| | | SortListDefect(pDispInfo->item.col); |
| | | m_gridFormInfo.Refresh(); |
| | | } |
| | | else if (pDispInfo->item.row > 0) |
| | | { |
| | | if (pDispInfo->item.row <= m_vecSortForm.size()) |
| | | { |
| | | int nFormID = m_vecSortForm[pDispInfo->item.row - 1]->m_nFormLabel; |
| | | GetParent()->PostMessage(UM_FORMLIST_FORMSELECT, nFormID); |
| | | } |
| | | |
| | | } |
| | | m_nSelectedCol = pDispInfo->item.col; |
| | | } |
| | | else if (NM_RCLICK == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row>0 && pDispInfo->item.row <= m_vecSortForm.size()) |
| | | { |
| | | m_nSelectedFormIdRclick = m_vecSortForm[pDispInfo->item.row - 1]->m_nFormLabel; |
| | | } |
| | | else if (pDispInfo->item.row == 0) |
| | | { |
| | | m_nSelectedFormIdRclick = -1; |
| | | } |
| | | else |
| | | { |
| | | m_nSelectedFormIdRclick = -1; |
| | | } |
| | | |
| | | |
| | | // { |
| | | // CString strText; |
| | | // CMenu menu; |
| | | // VERIFY(menu.CreatePopupMenu()); |
| | | // |
| | | // menu.AppendMenu(MF_STRING, FORMLIST_POPUP_FORMALL, (LPCTSTR)"ì 체보기"); |
| | | // |
| | | // if (m_nSelectedFormIdRclick < 0) |
| | | // { |
| | | // |
| | | // } |
| | | // else if (m_nSelectedFormIdRclick >= 0) |
| | | // { |
| | | // strText.Format("Form%d 보기", m_nSelectedFormIdRclick); |
| | | // menu.AppendMenu(MF_STRING, FORMLIST_POPUP_FORMSELECT, (LPCTSTR)strText); |
| | | // } |
| | | // |
| | | // |
| | | // CPoint ptPoint; |
| | | // GetCursorPos(&ptPoint); |
| | | // |
| | | // menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_LEFTBUTTON, ptPoint.x, ptPoint.y, this); |
| | | // |
| | | // } |
| | | |
| | | } |
| | | else if (GVN_ODCACHEHINT == pDispInfo->hdr.code) |
| | | { |
| | | GV_CACHEHINT *pCacheHint = (GV_CACHEHINT*)pDispInfo; |
| | | } |
| | | } |
| | | return CDialog::OnNotify(wParam, lParam, pResult); |
| | | } |
| | | |
| | | void CAlignDlg::setFormShow(int nFormID, BOOL bEnsureVisible) |
| | | { |
| | | const int nDefectCol = 1; |
| | | |
| | | if (nFormID >= 0) |
| | | { |
| | | int iRow = m_nSelectedRow;//for (int iRow = 0; iRow < m_gridDefectInfo.GetRowCount(); iRow++) |
| | | { |
| | | for (int iCol = 0; iCol < m_gridFormInfo.GetColumnCount(); iCol++) |
| | | { |
| | | m_gridFormInfo.SetItemState(iRow, iCol, m_gridFormInfo.GetItemState(iRow, iCol) & ~GVIS_SELECTED /*& ~GVIS_FOCUSED*/); |
| | | } |
| | | } |
| | | } |
| | | for (int i = 0; i < m_vecSortForm.size(); i++) |
| | | { |
| | | if (m_vecSortForm[i]->m_nFormLabel == nFormID) |
| | | { |
| | | int iRow = i+1; |
| | | for (int iCol = 0; iCol < m_gridFormInfo.GetColumnCount(); iCol++) |
| | | { |
| | | m_gridFormInfo.SetItemState(iRow, iCol, LVIS_SELECTED); |
| | | } |
| | | m_nSelectedRow = iRow; |
| | | if (bEnsureVisible) |
| | | { |
| | | m_gridFormInfo.EnsureVisible(iRow, m_nSelectedCol); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | m_gridFormInfo.Invalidate(); |
| | | } |
| | | |
| | | void CAlignDlg::getDispInfoDefect(int nCol, int nRow, CString* pStrData) |
| | | { |
| | | if (nRow < 0) return; |
| | | |
| | | if (nRow == 0) //header |
| | | { |
| | | *pStrData = m_vecStrGridDefectHeader[nCol]; |
| | | } |
| | | else |
| | | { |
| | | if (m_pDefectFormation == NULL) return; |
| | | |
| | | int nDataIndex = nRow - 1; |
| | | |
| | | if (nDataIndex >= m_vecSortForm.size()) return; |
| | | |
| | | _akFormation* pForm = m_vecSortForm[nDataIndex]; |
| | | |
| | | if (pForm == NULL) |
| | | return; |
| | | |
| | | CString strItem; |
| | | BOOL bPixel = FALSE; |
| | | |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 0: strItem.Format("%d", nRow); break; |
| | | case 1: strItem.Format("%d", pForm->m_nFormLabel); break; |
| | | case 2: |
| | | { |
| | | if (pForm->m_nFormJudge == 0) strItem = ""; |
| | | else if (pForm->m_nFormJudge == 1) strItem = "ì ê±°"; |
| | | }break; |
| | | case 3: |
| | | { |
| | | if (pForm->m_nFormType == 0) strItem = "ROUND"; |
| | | else if (pForm->m_nFormType == 1) strItem = "LINE"; |
| | | }break; |
| | | case 4: strItem.Format("%d", pForm->m_vecForms.size()); break; |
| | | case 5: strItem.Format("%d", pForm->m_nDefectNumS); break; |
| | | case 6: strItem.Format("%d", pForm->m_nDefectNumM); break; |
| | | case 7: strItem.Format("%d", pForm->m_nDefectNumL); break; |
| | | |
| | | case 8: strItem.Format("%.3lf", pForm->m_dSizeAvg); break; |
| | | case 9: strItem.Format("%.3lf", pForm->m_dSizeStdDev); break; |
| | | |
| | | case 10: strItem.Format("%d", pForm->m_nDefectNum1Px); break; |
| | | case 11: strItem.Format("%d", pForm->m_nDefectNumWhite); break; |
| | | case 12: strItem.Format("%d", pForm->m_nDefectNumBlack); break; |
| | | case 13: strItem.Format("%d", pForm->m_nDefectNum1PxWhite); break; |
| | | |
| | | case 14: strItem.Format("%.0lf", 100.0* ((double)pForm->m_nDefectNum1Px /(double)pForm->m_vecForms.size())); break; |
| | | case 15: strItem.Format("%.0lf", 100.0* ((double)pForm->m_nDefectNumWhite / (double)pForm->m_vecForms.size())); break; |
| | | case 16: strItem.Format("%.0lf", 100.0* ((double)pForm->m_nDefectNumBlack / (double)pForm->m_vecForms.size())); break; |
| | | case 17: strItem.Format("%.0lf", 100.0* ((double)pForm->m_nDefectNum1PxWhite / (double)pForm->m_vecForms.size())); break; |
| | | |
| | | case 18: strItem.Format("%.3lf", pForm->m_dDiffStdDev); break; |
| | | case 19: strItem.Format("%.3lf", pForm->m_dDiffStdDevAbs); break; |
| | | } |
| | | |
| | | |
| | | |
| | | *pStrData = strItem; |
| | | } |
| | | } |
| | | |
| | | void CAlignDlg::updateDefectInfo() |
| | | { |
| | | if (m_pDefectFormation && m_pDefectDisplayOption) |
| | | { |
| | | int nFormType; |
| | | int nFormLabel; |
| | | m_vecSortForm.clear(); |
| | | for (int i = 0; i < m_pDefectFormation->m_vecFormation.size(); i++) |
| | | { |
| | | nFormType = m_pDefectFormation->m_vecFormation[i].m_nFormType; |
| | | nFormLabel = i; |
| | | |
| | | if (nFormLabel >= 0) |
| | | { |
| | | nFormType = m_pDefectFormation->m_vecFormation[i].m_nFormType; |
| | | } |
| | | |
| | | if (m_pDefectDisplayOption->m_bShowDefectNormal == FALSE) |
| | | { |
| | | if (nFormType < 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupRound == FALSE) |
| | | { |
| | | if (nFormType == 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupLine == FALSE) |
| | | { |
| | | if (nFormType == 1) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_nShowLabel >= 0) |
| | | { |
| | | if (nFormLabel != m_pDefectDisplayOption->m_nShowLabel) continue;; |
| | | } |
| | | |
| | | m_vecSortForm.push_back(&m_pDefectFormation->m_vecFormation[i]); |
| | | } |
| | | if(m_nLastSortCol>0) SortListDefect(m_nLastSortCol); |
| | | m_gridFormInfo.SetRowCount(m_vecSortForm.size()+1); |
| | | m_gridFormInfo.Invalidate(); |
| | | } |
| | | } |
| | | |
| | | |
| | | void CAlignDlg::OnSize(UINT nType, int cx, int cy) |
| | | { |
| | | CDialog::OnSize(nType, cx, cy); |
| | | |
| | | m_WndArrange.process(cx, cy); |
| | | } |
| | | |
| | | void CAlignDlg::OnPopupMenuFormList(UINT nID) |
| | | { |
| | | if (nID == FORMLIST_POPUP_FORMALL) |
| | | { |
| | | GetParent()->PostMessage(UM_FORMLIST_FORMSELECT, -1, 1); |
| | | } |
| | | else if(nID == FORMLIST_POPUP_FORMSELECT) |
| | | { |
| | | GetParent()->PostMessage(UM_FORMLIST_FORMSELECT, m_nSelectedFormIdRclick, 1); |
| | | } |
| | | |
| | | } |
| | | |
| | | void CAlignDlg::SortListDefect(int nCol) |
| | | { |
| | | if (nCol == 0) |
| | | return; |
| | | |
| | | if (m_pDefectFormation == NULL) return; |
| | | |
| | | m_bAsending = !m_bAsending; |
| | | |
| | | { |
| | | _akFormation *pForm; |
| | | std::vector< std::pair<CString, _akFormation*> > vecString; |
| | | std::vector< std::pair<double, _akFormation*> > vecValue; |
| | | CString strValue; |
| | | double dValue; |
| | | |
| | | for (int i = 0; i < m_vecSortForm.size(); i++) |
| | | { |
| | | pForm = m_vecSortForm[i]; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 1: dValue = pForm->m_nFormLabel; break; |
| | | case 2: dValue = pForm->m_nFormJudge; break; |
| | | case 3: dValue = pForm->m_nFormType; break; |
| | | case 4: dValue = pForm->m_vecForms.size(); break; |
| | | case 5: dValue = pForm->m_nDefectNumS; break; |
| | | case 6: dValue = pForm->m_nDefectNumM; break; |
| | | case 7: dValue = pForm->m_nDefectNumL; break; |
| | | case 8: dValue = pForm->m_dSizeAvg; break; |
| | | case 9: dValue = pForm->m_dSizeStdDev; break; |
| | | case 10: dValue = pForm->m_nDefectNum1Px; break; |
| | | case 11: dValue = pForm->m_nDefectNumWhite; break; |
| | | case 12: dValue = pForm->m_nDefectNumBlack; break; |
| | | case 13: dValue = pForm->m_nDefectNum1PxWhite; break; |
| | | |
| | | case 14: dValue = pForm->m_nDefectNum1Px; break; |
| | | case 15: dValue = pForm->m_nDefectNumWhite ; break; |
| | | case 16: dValue = pForm->m_nDefectNumBlack ; break; |
| | | case 17: dValue = pForm->m_nDefectNum1PxWhite ; break; |
| | | |
| | | case 18: dValue = pForm->m_dDiffStdDev; break; |
| | | case 19: dValue = pForm->m_dDiffStdDevAbs; break; |
| | | |
| | | } |
| | | |
| | | if(strValue.IsEmpty() == FALSE) vecString.push_back(std::make_pair(strValue, pForm)); |
| | | else vecValue.push_back(std::make_pair(dValue, pForm)); |
| | | } |
| | | |
| | | if (!vecString.empty()) |
| | | { |
| | | if (m_bAsending == TRUE) |
| | | std::sort(vecString.begin(), vecString.end(), std::greater< std::pair<CString, _akFormation*> >()); |
| | | else |
| | | std::sort(vecString.begin(), vecString.end(), std::less< std::pair<CString, _akFormation*> >()); |
| | | |
| | | m_vecSortForm.clear(); |
| | | std::vector< std::pair<CString, _akFormation*> >::iterator itVec; |
| | | for (itVec = vecString.begin(); itVec != vecString.end(); ++itVec) |
| | | { |
| | | m_vecSortForm.push_back(itVec->second); |
| | | } |
| | | } |
| | | else//if (!vecString.empty()) |
| | | { |
| | | if (m_bAsending == TRUE) |
| | | std::sort(vecValue.begin(), vecValue.end(), std::greater< std::pair<double, _akFormation*> >()); |
| | | else |
| | | std::sort(vecValue.begin(), vecValue.end(), std::less< std::pair<double, _akFormation*> >()); |
| | | |
| | | m_vecSortForm.clear(); |
| | | std::vector< std::pair<double, _akFormation*> >::iterator itVec; |
| | | for (itVec = vecValue.begin(); itVec != vecValue.end(); ++itVec) |
| | | { |
| | | m_vecSortForm.push_back(itVec->second); |
| | | } |
| | | } |
| | | } |
| | | |
| | | m_nLastSortCol = nCol; |
| | | } |
| | | |
| | | void CAlignDlg::DrawnoImage() |
| | | { |
| | | CPaintDC dc(this); |
| | | |
| | | m_AlignImage.Destroy(); |
| | | m_AlignImage2.Destroy(); |
| | | |
| | | CString DeftectPath; |
| | | CFileStatus FileOn; |
| | | TCHAR chFilePath[256] = { 0, }; |
| | | GetModuleFileName(NULL, chFilePath, 256); |
| | | CString strFolderPath(chFilePath); |
| | | strFolderPath = strFolderPath.Left(strFolderPath.ReverseFind('\\')); |
| | | |
| | | strFolderPath = strFolderPath + "\\no-image.png"; |
| | | m_AlignImage.Load(strFolderPath); |
| | | m_AlignImage2.Load(strFolderPath); |
| | | |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | InvalidateRect(m_picture_rect, FALSE); |
| | | InvalidateRect(m_picture_rect2, FALSE); |
| | | |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignImage.Draw(dc, m_picture_rect); |
| | | m_AlignImage2.Draw(dc, m_picture_rect2); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | |
| | | // CFormtListDlg ëí ìì |
| | | #include "akGridCtrl/akGridCtrl.h" |
| | | #include "akDefectFormation.h" |
| | | #include "akWndArrange.h" |
| | | #include "Singleton.h" |
| | | |
| | | #define UM_FORMLIST_FORMSELECT WM_USER+0x3101 |
| | | |
| | | |
| | | class CAlignDlg : public CDialog, public CSingleton< CAlignDlg > |
| | | { |
| | | DECLARE_DYNAMIC(CAlignDlg) |
| | | |
| | | public: |
| | | CAlignDlg(CWnd* pParent = nullptr); // íì¤ ìì±ìì
ëë¤. |
| | | virtual ~CAlignDlg(); |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | //#ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DLG_ALIGN }; |
| | | //#endif |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | public: |
| | | virtual BOOL Create(CWnd* pParentWnd = NULL); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | |
| | | afx_msg void OnDestroy(); |
| | | afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); |
| | | |
| | | void setFormShow(int nDefectID, BOOL bEnsureVisible); |
| | | void getDispInfoDefect(int nCol, int nRow, CString* pStrData); |
| | | void updateDefectInfo(); |
| | | void SortListDefect(int nCol); |
| | | void DrawnoImage(); |
| | | public: |
| | | CakGridCtrl m_gridFormInfo; |
| | | std::vector<CString> m_vecStrGridDefectHeader; |
| | | //std::vector<int> m_vecGridColDataType;//0:string, 1:int, 2:double, 11:string to int, 12:string to double |
| | | akDefectFormation* m_pDefectFormation; |
| | | CakWndArrange m_WndArrange; |
| | | std::vector<_akFormation*> m_vecSortForm; |
| | | BOOL m_bAsending; |
| | | _DefectDisplayOption* m_pDefectDisplayOption; |
| | | int m_nLastSortCol; |
| | | int m_nSelectedCol; |
| | | int m_nSelectedRow; |
| | | |
| | | CImage m_AlignImage; |
| | | CImage m_AlignImage2; |
| | | |
| | | CRect m_picture_rect; |
| | | CRect m_picture_rect2; |
| | | |
| | | int m_nSelectedFormIdRclick; |
| | | public: |
| | | afx_msg void OnBnClickedOk(); |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); |
| | | afx_msg void OnSize(UINT nType, int cx, int cy); |
| | | afx_msg void OnPopupMenuFormList(UINT nID); |
| | | |
| | | }; |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "AnaResultFile.h" |
| | | #include "akCore/akFileDB.h" |
| | | #include "akLoggerExt.h" |
| | | #ifdef _DEBUG |
| | | #undef THIS_FILE |
| | | static char THIS_FILE[]=__FILE__; |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | CAnaResultFile::CAnaResultFile(void) |
| | | { |
| | | } |
| | | |
| | | CAnaResultFile::~CAnaResultFile(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CAnaResultFile::MakeAnaFile(CgrmGlassRawData* pData) |
| | | { |
| | | //return TRUE; |
| | | |
| | | CString strFilePathName; |
| | | strFilePathName.Format("%s\\%sana", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if (pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | fprintf(pf, "%s\n", pData->GetGlassData()->m_strGlassID); |
| | | fprintf(pf, "m_strImageName, m_strDefectCode, UMCenterAlignX, UMCenterAlignY, m_nLevelSrcMin, m_nLevelSrcMax, m_nLevelSrcAvg, m_nLevelRefMin, m_nLevelRefMax, m_nLevelRefAvg, m_nLevelDiffMin, m_nLevelDiffMax, m_nLevelDiffAvg"); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",Zone%02d", i); |
| | | //210123 CJH - Zoneë³ min, max, avg ê° í기 |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneDiffMin%02d", i); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneDiffMax%02d", i); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneDiffAvg%02d", i); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneSrcMin%02d", i); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneSrcMax%02d", i); |
| | | for (int i = 0; i < MAX_ZONE_NUM; i++) fprintf(pf, ",ZoneSrcAvg%02d", i); |
| | | fprintf(pf, ", m_sDefectPeak, m_nPixelSize, DefectType, UMSize, Density, ScrtRatio, MergeState, Angle, Major, Minor, Compact, Thickness"); |
| | | fprintf(pf, "\n"); |
| | | |
| | | for (int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if (pData->GetGlassData()->m_nScanCoordinateY == 1) //ë¶íì¤ë¹ì ê²½ì° XYë°ì |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignY / 1000.0, (double)pDefect->m_nUMCenterAlignX / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | //210123 CJH - Zoneë³ min, max, avg ê° í기 |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueMin[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueMax[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueAvg[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcMin[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcMax[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcAvg[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, (int)pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | else |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignX / 1000.0, (double)pDefect->m_nUMCenterAlignY / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | //210123 CJH - Zoneë³ min, max, avg ê° í기 |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueMin[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueMax[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueAvg[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcMin[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcMax[iz]); |
| | | } |
| | | for (int iz = 0; iz < MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZoneValueSrcAvg[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, (int)pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | } |
| | | AKLOG("MakeAnaFile Complete %s", strFilePathName); |
| | | fclose(pf); |
| | | |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "DitGlassRawStruct.h" |
| | | |
| | | class CAnaResultFile |
| | | { |
| | | public: |
| | | CAnaResultFile(void); |
| | | virtual ~CAnaResultFile(void); |
| | | |
| | | public: |
| | | BOOL MakeAnaFile(CgrmGlassRawData* pData); |
| | | |
| | | |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "CHRectTracker.h" |
| | | |
| | | AFX_STATIC_DATA HCURSOR _afxCursors[10] = { 0, }; |
| | | AFX_STATIC_DATA HBRUSH _afxHatchBrush = 0; |
| | | AFX_STATIC_DATA HPEN _afxBlackDottedPen = 0; |
| | | AFX_STATIC_DATA int _afxHandleSize = 0; |
| | | |
| | | CCHRectTracker::CCHRectTracker(void) |
| | | { |
| | | } |
| | | |
| | | CCHRectTracker::CCHRectTracker(LPCRECT lpSrcRect, UINT nStyle) |
| | | { |
| | | CRectTracker(lpSrcRect, nStyle); |
| | | } |
| | | |
| | | CCHRectTracker::~CCHRectTracker(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CCHRectTracker::TrackRubberBand(CWnd* pWnd, CPoint point, BOOL bAllowInvert) |
| | | { |
| | | // simply call helper function to track from bottom right handle |
| | | m_bAllowInvert = bAllowInvert; |
| | | m_rect.SetRect(point.x, point.y, point.x, point.y); |
| | | |
| | | return TrackHandle(hitBottomRight, pWnd, point, NULL); |
| | | } |
| | | |
| | | BOOL CCHRectTracker::Track(CWnd* pWnd, CPoint point, BOOL bAllowInvert, CWnd* pWndClipTo) |
| | | { |
| | | // perform hit testing on the handles |
| | | int nHandle = HitTestHandles(point); |
| | | if (nHandle < 0) |
| | | { |
| | | // didn't hit a handle, so just return FALSE |
| | | return FALSE; |
| | | } |
| | | |
| | | // otherwise, call helper function to do the tracking |
| | | m_bAllowInvert = bAllowInvert; |
| | | |
| | | return TrackHandle(nHandle, pWnd, point, pWndClipTo); |
| | | } |
| | | |
| | | void CCHRectTracker::Draw(CDC* pDC) const |
| | | { |
| | | // set initial DC state |
| | | VERIFY(pDC->SaveDC() != 0); |
| | | #ifndef _AFX_NO_GDITRANSFORM_SUPPORT |
| | | pDC->SetMapMode(MM_TEXT); |
| | | pDC->SetViewportOrg(0, 0); |
| | | pDC->SetWindowOrg(0, 0); |
| | | #endif // !_AFX_NO_GDITRANSFORM_SUPPORT |
| | | // get normalized rectangle |
| | | CRect rect = m_rect; |
| | | rect.NormalizeRect(); |
| | | |
| | | CPen* pOldPen = NULL; |
| | | CBrush* pOldBrush = NULL; |
| | | CGdiObject* pTemp; |
| | | int nOldROP; |
| | | |
| | | CPen pen; |
| | | //pen.CreatePen(PS_DOT, 1, RGB(255,255,255)); |
| | | pen.CreatePen(PS_DOT, 1, RGB(255,0,0)); |
| | | |
| | | rect.InflateRect(+1, +1); // borders are one pixel outside |
| | | |
| | | // draw lines |
| | | if ((m_nStyle & (dottedLine|solidLine)) != 0) |
| | | { |
| | | if (m_nStyle & dottedLine) |
| | | pOldPen = pDC->SelectObject(&pen); |
| | | //pOldPen = (CPen*)pDC->SelectStockObject(WHITE_PEN); |
| | | else |
| | | pOldPen = (CPen*)pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = (CBrush*)pDC->SelectStockObject(NULL_BRUSH); |
| | | nOldROP = pDC->SetROP2(R2_COPYPEN); |
| | | |
| | | // rect |
| | | pDC->Rectangle(rect.left, rect.top, rect.right, rect.bottom); |
| | | |
| | | // cross line |
| | | if ((m_nStyle & (crossLine)) != 0) |
| | | { |
| | | pDC->MoveTo(rect.left+rect.Width()/2, rect.top); |
| | | pDC->LineTo(rect.left+rect.Width()/2, rect.bottom); |
| | | pDC->MoveTo(rect.left, rect.top+rect.Height()/2); |
| | | pDC->LineTo(rect.right, rect.top+rect.Height()/2); |
| | | } |
| | | |
| | | // x line |
| | | if ((m_nStyle & (xLine)) != 0) |
| | | { |
| | | pDC->MoveTo(rect.left, rect.top); |
| | | pDC->LineTo(rect.right, rect.bottom); |
| | | pDC->MoveTo(rect.right, rect.top); |
| | | pDC->LineTo(rect.left, rect.bottom); |
| | | } |
| | | |
| | | pDC->SetROP2(nOldROP); |
| | | } |
| | | |
| | | |
| | | #ifndef _WIN32_WCE // unsupported win32 api call to UnrealizeObject |
| | | // if hatchBrush is going to be used, need to unrealize it |
| | | if ((m_nStyle & (hatchInside|hatchedBorder)) != 0) |
| | | UnrealizeObject(_afxHatchBrush); |
| | | #endif // !_WIN32_WCE |
| | | |
| | | // hatch inside |
| | | if ((m_nStyle & hatchInside) != 0) |
| | | { |
| | | pTemp = pDC->SelectStockObject(NULL_PEN); |
| | | if (pOldPen == NULL) |
| | | pOldPen = (CPen*)pTemp; |
| | | pTemp = pDC->SelectObject(CBrush::FromHandle(_afxHatchBrush)); |
| | | if (pOldBrush == NULL) |
| | | pOldBrush = (CBrush*)pTemp; |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | nOldROP = pDC->SetROP2(R2_MASKNOTPEN); |
| | | pDC->Rectangle(rect.left+1, rect.top+1, rect.right, rect.bottom); |
| | | pDC->SetROP2(nOldROP); |
| | | } |
| | | |
| | | // draw hatched border |
| | | if ((m_nStyle & hatchedBorder) != 0) |
| | | { |
| | | pTemp = pDC->SelectObject(CBrush::FromHandle(_afxHatchBrush)); |
| | | if (pOldBrush == NULL) |
| | | pOldBrush = (CBrush*)pTemp; |
| | | pDC->SetBkMode(OPAQUE); |
| | | CRect rectTrue; |
| | | GetTrueRect(&rectTrue); |
| | | pDC->PatBlt(rectTrue.left, rectTrue.top, rectTrue.Width(), |
| | | rect.top-rectTrue.top, 0x000F0001 /* Pn */); |
| | | pDC->PatBlt(rectTrue.left, rect.bottom, |
| | | rectTrue.Width(), rectTrue.bottom-rect.bottom, 0x000F0001 /* Pn */); |
| | | pDC->PatBlt(rectTrue.left, rect.top, rect.left-rectTrue.left, |
| | | rect.Height(), 0x000F0001 /* Pn */); |
| | | pDC->PatBlt(rect.right, rect.top, rectTrue.right-rect.right, |
| | | rect.Height(), 0x000F0001 /* Pn */); |
| | | } |
| | | |
| | | // draw resize handles |
| | | if ((m_nStyle & (resizeInside|resizeOutside)) != 0) |
| | | { |
| | | UINT mask = GetHandleMask(); |
| | | for (int i = 0; i < 8; ++i) |
| | | { |
| | | if (mask & (1<<i)) |
| | | { |
| | | GetHandleRect((TrackerHit)i, &rect); |
| | | pDC->FillSolidRect(rect, RGB(255, 255, 255)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // cleanup pDC state |
| | | if (pOldPen != NULL) |
| | | pDC->SelectObject(pOldPen); |
| | | if (pOldBrush != NULL) |
| | | pDC->SelectObject(pOldBrush); |
| | | VERIFY(pDC->RestoreDC(-1)); |
| | | } |
| | | |
| | | BOOL CCHRectTracker::TrackHandle(int nHandle, CWnd* pWnd, CPoint point, CWnd* pWndClipTo) |
| | | { |
| | | ASSERT(nHandle >= 0); |
| | | ASSERT(nHandle <= 8); // handle 8 is inside the rect |
| | | |
| | | // don't handle if capture already set |
| | | if (::GetCapture() != NULL) |
| | | return FALSE; |
| | | |
| | | AfxLockTempMaps(); // protect maps while looping |
| | | |
| | | ASSERT(!m_bFinalErase); |
| | | |
| | | // save original width & height in pixels |
| | | int nWidth = m_rect.Width(); |
| | | int nHeight = m_rect.Height(); |
| | | |
| | | // set capture to the window which received this message |
| | | pWnd->SetCapture(); |
| | | ASSERT(pWnd == CWnd::GetCapture()); |
| | | pWnd->UpdateWindow(); |
| | | if (pWndClipTo != NULL) |
| | | pWndClipTo->UpdateWindow(); |
| | | CRect rectSave = m_rect; |
| | | |
| | | // find out what x/y coords we are supposed to modify |
| | | int *px, *py; |
| | | int xDiff, yDiff; |
| | | GetModifyPointers(nHandle, &px, &py, &xDiff, &yDiff); |
| | | xDiff = point.x - xDiff; |
| | | yDiff = point.y - yDiff; |
| | | |
| | | // get DC for drawing |
| | | CDC* pDrawDC; |
| | | if (pWndClipTo != NULL) |
| | | { |
| | | // clip to arbitrary window by using adjusted Window DC |
| | | pDrawDC = pWndClipTo->GetDCEx(NULL, DCX_CACHE); |
| | | } |
| | | else |
| | | { |
| | | // otherwise, just use normal DC |
| | | pDrawDC = pWnd->GetDC(); |
| | | } |
| | | ENSURE_VALID(pDrawDC); |
| | | |
| | | CRect rectOld; |
| | | BOOL bMoved = FALSE; |
| | | |
| | | // get messages until capture lost or cancelled/accepted |
| | | for (;;) |
| | | { |
| | | MSG msg; |
| | | VERIFY(::GetMessage(&msg, NULL, 0, 0)); |
| | | |
| | | if (CWnd::GetCapture() != pWnd) |
| | | break; |
| | | |
| | | switch (msg.message) |
| | | { |
| | | // handle movement/accept messages |
| | | case WM_LBUTTONUP: |
| | | { |
| | | if (pWnd) |
| | | pWnd->SendMessage(WM_LBUTTONUP, static_cast<WPARAM>(0), MAKELPARAM(0, 0)); |
| | | } |
| | | case WM_MOUSEMOVE: |
| | | rectOld = m_rect; |
| | | // handle resize cases (and part of move) |
| | | if (px != NULL) |
| | | *px = GET_X_LPARAM(msg.lParam) - xDiff; |
| | | if (py != NULL) |
| | | *py = GET_Y_LPARAM(msg.lParam) - yDiff; |
| | | |
| | | // handle move case |
| | | if (nHandle == hitMiddle) |
| | | { |
| | | m_rect.right = m_rect.left + nWidth; |
| | | m_rect.bottom = m_rect.top + nHeight; |
| | | } |
| | | // allow caller to adjust the rectangle if necessary |
| | | AdjustRect(nHandle, &m_rect); |
| | | |
| | | // only redraw and callback if the rect actually changed! |
| | | m_bFinalErase = (msg.message == WM_LBUTTONUP); |
| | | if (!rectOld.EqualRect(&m_rect) || m_bFinalErase) |
| | | { |
| | | if (bMoved) |
| | | { |
| | | m_bErase = TRUE; |
| | | DrawTrackerRect(&rectOld, pWndClipTo, pDrawDC, pWnd); |
| | | } |
| | | OnChangedRect(rectOld); |
| | | if (msg.message != WM_LBUTTONUP) |
| | | bMoved = TRUE; |
| | | } |
| | | if (m_bFinalErase) |
| | | goto ExitLoop; |
| | | |
| | | if (!rectOld.EqualRect(&m_rect)) |
| | | { |
| | | m_bErase = FALSE; |
| | | DrawTrackerRect(&m_rect, pWndClipTo, pDrawDC, pWnd); |
| | | } |
| | | break; |
| | | |
| | | // handle cancel messages |
| | | case WM_KEYDOWN: |
| | | if (msg.wParam != VK_ESCAPE) |
| | | break; |
| | | case WM_RBUTTONDOWN: |
| | | if (bMoved) |
| | | { |
| | | m_bErase = m_bFinalErase = TRUE; |
| | | DrawTrackerRect(&m_rect, pWndClipTo, pDrawDC, pWnd); |
| | | } |
| | | m_rect = rectSave; |
| | | goto ExitLoop; |
| | | |
| | | case WM_LBUTTONDBLCLK: |
| | | if (pWnd) |
| | | pWnd->SendMessage(WM_LBUTTONDBLCLK, static_cast<WPARAM>(0), MAKELPARAM(0, 0)); |
| | | break; |
| | | // just dispatch rest of the messages |
| | | default: |
| | | DispatchMessage(&msg); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | ExitLoop: |
| | | if (pWndClipTo != NULL) |
| | | pWndClipTo->ReleaseDC(pDrawDC); |
| | | else |
| | | pWnd->ReleaseDC(pDrawDC); |
| | | ReleaseCapture(); |
| | | |
| | | AfxUnlockTempMaps(FALSE); |
| | | |
| | | // restore rect in case bMoved is still FALSE |
| | | if (!bMoved) |
| | | m_rect = rectSave; |
| | | m_bFinalErase = FALSE; |
| | | m_bErase = FALSE; |
| | | |
| | | // return TRUE only if rect has changed |
| | | return !rectSave.EqualRect(&m_rect); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | #include "afxext.h" |
| | | |
| | | |
| | | enum CHStyleFlags |
| | | { |
| | | // solidLine = 1, dottedLine = 2, hatchedBorder = 4, |
| | | // resizeInside = 8, resizeOutside = 16, hatchInside = 32, |
| | | |
| | | crossLine = 64, xLine = 128, |
| | | }; |
| | | |
| | | |
| | | class AFX_EXT_CLASS CCHRectTracker : public CRectTracker |
| | | { |
| | | public: |
| | | CCHRectTracker(); |
| | | CCHRectTracker(LPCRECT lpSrcRect, UINT nStyle); |
| | | BOOL Track(CWnd* pWnd, CPoint point, BOOL bAllowInvert, CWnd* pWndClipTo=NULL); |
| | | BOOL TrackRubberBand(CWnd* pWnd, CPoint point, BOOL bAllowInvert); |
| | | void Draw(CDC* pDC) const; |
| | | virtual ~CCHRectTracker(void); |
| | | |
| | | protected: |
| | | BOOL TrackHandle(int nHandle, CWnd* pWnd, CPoint point, CWnd* pWndClipTo); |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | // CHTrackerView.cpp : 구í íì¼ì
ëë¤. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "CHTrackerView.h" |
| | | #include "CHBufferDC.h" |
| | | |
| | | // CCHTrackerView |
| | | |
| | | IMPLEMENT_DYNAMIC(CCHTrackerView, CCHImageView) |
| | | |
| | | CCHTrackerView::CCHTrackerView() : CCHImageView() |
| | | { |
| | | m_rectTracker.m_rect = CRect(0,0,0,0); |
| | | m_rectTracker.m_nStyle = CRectTracker::dottedLine | CRectTracker::resizeOutside; |
| | | m_rectTracker.m_sizeMin = CSize(8,8); |
| | | m_bDrawTracker = FALSE; |
| | | } |
| | | |
| | | |
| | | CCHTrackerView::CCHTrackerView(CWnd *pParentWnd) : CCHImageView(pParentWnd) |
| | | { |
| | | m_rectTracker.m_rect = CRect(0,0,0,0); |
| | | m_rectTracker.m_nStyle = CRectTracker::dottedLine | CRectTracker::resizeOutside; |
| | | m_rectTracker.m_sizeMin = CSize(8,8); |
| | | m_bDrawTracker = FALSE; |
| | | } |
| | | |
| | | CCHTrackerView::~CCHTrackerView() |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CCHTrackerView, CCHImageView) |
| | | ON_WM_SETCURSOR() |
| | | ON_WM_PAINT() |
| | | ON_WM_LBUTTONDOWN() |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | |
| | | // CCHTrackerView ë©ìì§ ì²ë¦¬ê¸°ì
ëë¤. |
| | | |
| | | BOOL CCHTrackerView::GetTrackerRect(CRect& rtRect) |
| | | { |
| | | if (m_rectTracker.m_rect.Width()<0 || m_rectTracker.m_rect.Height()<0) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | rtRect = m_rectTracker.m_rect; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CCHTrackerView::SetTrackerRect(const CRect& rtRect) |
| | | { |
| | | m_rectTracker.m_rect = rtRect; |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCHTrackerView::ClearTrackerRect() |
| | | { |
| | | m_rectTracker.m_rect = CRect(0,0,0,0); |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | BOOL CCHTrackerView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_rectTracker.SetCursor(this, nHitTest)) |
| | | return TRUE; |
| | | |
| | | return CCHImageView::OnSetCursor(pWnd, nHitTest, message); |
| | | } |
| | | |
| | | void CCHTrackerView::OnPaint() |
| | | { |
| | | |
| | | CCHBufferDC *pDC = new CCHBufferDC(this); // device context for painting |
| | | |
| | | UpdateImageView(pDC); |
| | | |
| | | m_rectTracker.m_rect.NormalizeRect(); |
| | | |
| | | if (m_rectTracker.m_rect.left>0 && m_rectTracker.m_rect.right<GetWidth()) |
| | | { |
| | | if (m_rectTracker.m_rect.top>0 && m_rectTracker.m_rect.bottom<GetHeight()) |
| | | { |
| | | m_rectTracker.Draw(pDC); |
| | | } |
| | | } |
| | | |
| | | delete pDC; |
| | | |
| | | } |
| | | |
| | | void CCHTrackerView::OnLButtonDown(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | |
| | | if (m_pParentWnd==NULL || !GetImageExist()) return; |
| | | |
| | | if (point.x > -1 && point.x < GetScaleWidth() && |
| | | point.y > -1 && point.y < GetScaleHeight() ) |
| | | { |
| | | if (m_rectTracker.HitTest(point) < 0) |
| | | { |
| | | // just to demonstrate CRectTracker::TrackRubberBand |
| | | if (m_rectTracker.TrackRubberBand(this, point, TRUE)) |
| | | { |
| | | Invalidate(); |
| | | } |
| | | } |
| | | else if (m_rectTracker.Track(this, point, TRUE)) |
| | | { |
| | | Invalidate(); |
| | | } |
| | | } |
| | | |
| | | CCHImageView::OnLButtonDown(nFlags, point); |
| | | } |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | |
| | | // CCHTrackerView |
| | | #include "CHImageView.h" |
| | | |
| | | class AFX_EXT_CLASS CCHTrackerView : public CCHImageView |
| | | { |
| | | DECLARE_DYNAMIC(CCHTrackerView) |
| | | |
| | | public: |
| | | CCHTrackerView(); |
| | | CCHTrackerView(CWnd *pParentWnd); |
| | | virtual ~CCHTrackerView(); |
| | | |
| | | BOOL GetTrackerRect(CRect& rtRect); |
| | | void SetTrackerRect(const CRect& rtRect); |
| | | void ClearTrackerRect(); |
| | | |
| | | protected: |
| | | // tracker |
| | | BOOL m_bDrawTracker; |
| | | CPoint m_ptTrackerStart; |
| | | CCHRectTracker m_rectTracker; |
| | | |
| | | protected: |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | public: |
| | | afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); |
| | | afx_msg void OnPaint(); |
| | | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); |
| | | }; |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | // CameraImageView.cpp : 구í íì¼ì
ëë¤. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReveiwHistory.h" |
| | | #include "CameraImageView.h" |
| | | #include "CHImageControls/CHBufferDC.h" |
| | | |
| | | using namespace CHImageControls; |
| | | // CDlgReviewCamera ëí ììì
ëë¤. |
| | | |
| | | // CCameraImageView |
| | | |
| | | IMPLEMENT_DYNAMIC(CCameraImageView, CWnd) |
| | | |
| | | CCameraImageView::CCameraImageView(CWnd *pParentWnd) |
| | | { |
| | | m_strViewName = _T(""); |
| | | m_pParentWnd = pParentWnd; |
| | | |
| | | m_nHScroll = 0; |
| | | m_nVScroll = 0; |
| | | |
| | | m_nMaxHScroll = 0; |
| | | m_nMaxVScroll = 0; |
| | | m_nDrawMode = 0; |
| | | |
| | | m_rtClientRect = CRect(0,0,0,0); |
| | | m_bDrawCenterLine = FALSE; |
| | | m_bDrawRuler = FALSE; |
| | | m_bDrawViewName = FALSE; |
| | | m_nViewBand = BandTypeColor; |
| | | m_nDrawMode = 1; |
| | | |
| | | m_dWidthScale = 1.0; |
| | | m_dHeightScale = 1.0; |
| | | m_nScaleWidth = 0; |
| | | m_nScaleHeight = 0; |
| | | |
| | | m_dResolution = 1.0; // um |
| | | m_dRulerGab = 100.0; //um |
| | | |
| | | m_pCIV2P = NULL; |
| | | |
| | | InitializeCriticalSection(&m_csImageData); |
| | | |
| | | } |
| | | |
| | | CCameraImageView::~CCameraImageView() |
| | | { |
| | | DeleteCriticalSection(&m_csImageData); |
| | | } |
| | | |
| | | // CCameraImageView ë©ìì§ ì²ë¦¬ê¸°ì
ëë¤. |
| | | BEGIN_MESSAGE_MAP(CCameraImageView, CWnd) |
| | | |
| | | ON_COMMAND(IDR_LOAD_IMAGE, &CCameraImageView::OnLoadImage) |
| | | ON_COMMAND(IDR_SAVE_IMAGE, &CCameraImageView::OnSaveImage) |
| | | ON_COMMAND(IDR_CENTER_LINE, &CCameraImageView::OnCenterLine) |
| | | ON_COMMAND(IDR_RULER, &CCameraImageView::OnRuler) |
| | | ON_COMMAND(IDR_VIEW_ORIGIN, &CCameraImageView::OnViewOrigin) |
| | | ON_COMMAND(IDR_VIEW_FIT, &CCameraImageView::OnViewFit) |
| | | |
| | | ON_COMMAND(IDR_VIEW_COLOR, &CCameraImageView::OnViewColor) |
| | | ON_COMMAND(IDR_VIEW_GRAY,&CCameraImageView::OnViewGray) |
| | | ON_COMMAND(IDR_VIEW_RED, &CCameraImageView::OnViewRed) |
| | | ON_COMMAND(IDR_VIEW_GREEN, &CCameraImageView::OnViewGreen) |
| | | ON_COMMAND(IDR_VIEW_BLUE, &CCameraImageView::OnViewBlue) |
| | | |
| | | ON_WM_PAINT() |
| | | ON_WM_MOUSEMOVE() |
| | | ON_WM_LBUTTONDOWN() |
| | | ON_WM_LBUTTONUP() |
| | | ON_WM_RBUTTONDOWN() |
| | | ON_WM_RBUTTONUP() |
| | | ON_WM_DESTROY() |
| | | ON_WM_HSCROLL() |
| | | ON_WM_VSCROLL() |
| | | ON_WM_LBUTTONDBLCLK() |
| | | ON_WM_RBUTTONDBLCLK() |
| | | ON_WM_CREATE() |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CCHImageView ë©ìì§ ì²ë¦¬ê¸°ì
ëë¤. |
| | | void CCameraImageView::OnPaint() |
| | | { |
| | | CCHBufferDC *pDC = new CCHBufferDC(this); // device context for painting |
| | | |
| | | UpdateImageView(pDC); |
| | | |
| | | delete pDC; |
| | | } |
| | | |
| | | void CCameraImageView::UpdateImageView(CDC *pDC) |
| | | { |
| | | CRect rtCurrentRect , rtSourceRect; |
| | | GetClientRect(rtCurrentRect); |
| | | |
| | | //DrawText(CPoint(30, 30), RGB(255,255,0), _T("Defect Size")); |
| | | |
| | | if (GetImageExist()) |
| | | { |
| | | if (m_rtClientRect!=rtCurrentRect) SetDrawMode(m_nDrawMode); |
| | | |
| | | int nSrcWidth = GetWidth(); |
| | | int nSrcHeight = GetHeight(); |
| | | |
| | | int nWidth = int(double(nSrcWidth) * m_dWidthScale + 0.5); |
| | | int nHeight = int(double(nSrcHeight) * m_dHeightScale + 0.5); |
| | | |
| | | if (m_nScaleWidth!=nWidth || m_nScaleHeight!=nHeight) |
| | | { |
| | | SetDrawMode(m_nDrawMode); |
| | | } |
| | | |
| | | switch(m_nDrawMode) |
| | | { |
| | | case 0: |
| | | pDC->SelectStockObject(GRAY_BRUSH); |
| | | pDC->Rectangle(rtCurrentRect); |
| | | ShowImage(pDC->m_hDC, 0, 0, rtCurrentRect.Width(), rtCurrentRect.Height(), m_nHScroll, m_nVScroll); |
| | | break; |
| | | |
| | | case 1: |
| | | ShowImage(pDC->m_hDC, rtCurrentRect); |
| | | break; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | pDC->SelectStockObject(GRAY_BRUSH); |
| | | pDC->Rectangle(rtCurrentRect); |
| | | } |
| | | |
| | | if (m_bDrawCenterLine) DrawCenterLine(pDC); |
| | | |
| | | if (m_bDrawRuler) DrawRuler(pDC); |
| | | |
| | | if (m_bDrawViewName) DrawViewName(pDC); |
| | | |
| | | } |
| | | |
| | | void CCameraImageView::OnMouseMove(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | CRect rect; |
| | | this->GetClientRect(rect); |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | |
| | | if (point.x > 0 && point.x < this->GetScaleWidth()-1 && |
| | | point.y > 0 && point.y < this->GetScaleHeight()-1 && nFlags == MK_LBUTTON) |
| | | { |
| | | m_pParentWnd->SendMessage(WM_MOUSEMOVE, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | } |
| | | |
| | | __super::OnMouseMove(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnLButtonDown(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | CRect rect; |
| | | this->GetClientRect(rect); |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | |
| | | if (point.x > 0 && point.x < this->GetScaleWidth()-1 && |
| | | point.y > 0 && point.y < this->GetScaleHeight()-1 ) |
| | | { |
| | | m_pParentWnd->SendMessage(WM_LBUTTONDOWN, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | } |
| | | |
| | | __super::OnLButtonDown(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnLButtonUp(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | CRect rect; |
| | | this->GetClientRect(rect); |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | |
| | | if (point.x > 0 && point.x < this->GetScaleWidth()-1 && |
| | | point.y > 0 && point.y < this->GetScaleHeight()-1 ) |
| | | { |
| | | m_pParentWnd->SendMessage(WM_LBUTTONUP, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | } |
| | | |
| | | __super::OnLButtonUp(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnLButtonDblClk(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | m_pParentWnd->SendMessage(WM_LBUTTONDBLCLK, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | |
| | | __super::OnLButtonDblClk(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnRButtonDown(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | CMenu menu; |
| | | CMenu popMenu; |
| | | menu.CreateMenu(); // ìµìì ë¼ë ë©ë´ |
| | | popMenu.CreatePopupMenu(); // íì
ë©ë´ |
| | | BOOL bAddMenu = FALSE; |
| | | |
| | | popMenu.AppendMenu(MF_STRING, IDR_LOAD_IMAGE, _T("Load Image")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_SAVE_IMAGE, _T("Save Image")); // ììì ìë¸ë©ë´ ì¶ê° |
| | | popMenu.AppendMenu(MF_SEPARATOR); |
| | | popMenu.AppendMenu(MF_STRING, IDR_CENTER_LINE, _T("Center Line")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_RULER, _T("Ruler")); |
| | | popMenu.AppendMenu(MF_SEPARATOR); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_ORIGIN, _T("1:1 View")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_FIT, _T("Fit View")); // ììì ìë¸ë©ë´ ì¶ê° |
| | | popMenu.AppendMenu(MF_SEPARATOR); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_COLOR, _T("Color")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_GRAY, _T("Gray")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_RED, _T("Red")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_GREEN, _T("Green")); |
| | | popMenu.AppendMenu(MF_STRING, IDR_VIEW_BLUE, _T("Blue")); |
| | | |
| | | // ë©ë´ ìí ì²ë¦¬ |
| | | if (m_bDrawCenterLine) |
| | | { |
| | | popMenu.CheckMenuItem(IDR_CENTER_LINE, MF_CHECKED); |
| | | } |
| | | |
| | | if (m_bDrawRuler) |
| | | { |
| | | popMenu.CheckMenuItem(IDR_RULER, MF_CHECKED); |
| | | } |
| | | |
| | | |
| | | switch(m_nDrawMode) |
| | | { |
| | | case 0: |
| | | popMenu.CheckMenuItem(IDR_VIEW_ORIGIN, MF_CHECKED); |
| | | break; |
| | | case 1: |
| | | popMenu.CheckMenuItem(IDR_VIEW_FIT, MF_CHECKED); |
| | | break; |
| | | } |
| | | |
| | | // ë©ë´ ìí ì²ë¦¬ |
| | | switch(m_nViewBand) |
| | | { |
| | | case BandTypeRed: |
| | | popMenu.CheckMenuItem(IDR_VIEW_RED, MF_CHECKED); |
| | | break; |
| | | case BandTypeGreen: |
| | | popMenu.CheckMenuItem(IDR_VIEW_GREEN, MF_CHECKED); |
| | | break; |
| | | case BandTypeBlue: |
| | | popMenu.CheckMenuItem(IDR_VIEW_BLUE, MF_CHECKED); |
| | | break; |
| | | case BandTypeGray: |
| | | popMenu.CheckMenuItem(IDR_VIEW_GRAY, MF_CHECKED); |
| | | break; |
| | | default: |
| | | popMenu.CheckMenuItem(IDR_VIEW_COLOR, MF_CHECKED); |
| | | break; |
| | | } |
| | | |
| | | // 컨í
ì¤í¸ ë©ë´ í¸ì¶ |
| | | CRect rect; |
| | | GetWindowRect(rect); |
| | | int nX = rect.left + point.x; |
| | | int nY = rect.top + point.y; |
| | | |
| | | popMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, nX, nY, this); |
| | | |
| | | if (m_pParentWnd==NULL) return; |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | m_pParentWnd->SendMessage(WM_RBUTTONDOWN, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | |
| | | __super::OnRButtonDown(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnRButtonUp(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | m_pParentWnd->SendMessage(WM_RBUTTONUP, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | |
| | | __super::OnRButtonUp(nFlags, point); |
| | | } |
| | | |
| | | void CCameraImageView::OnRButtonDblClk(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (m_pParentWnd==NULL) return; |
| | | |
| | | point.x += m_nHScroll; |
| | | point.y += m_nVScroll; |
| | | m_pParentWnd->SendMessage(WM_RBUTTONDBLCLK, static_cast<WPARAM>(nFlags), MAKELPARAM(point.x, point.y)); |
| | | |
| | | __super::OnRButtonDblClk(nFlags, point); |
| | | } |
| | | |
| | | |
| | | void CCameraImageView::SetDrawCenterLine(BOOL bDraw) |
| | | { |
| | | m_bDrawCenterLine = bDraw; |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::SetDrawRuler(BOOL bDraw) |
| | | { |
| | | m_bDrawRuler = bDraw; |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::SetDrawMode(int nDrawMode) |
| | | { |
| | | m_nDrawMode = nDrawMode; |
| | | |
| | | GetClientRect(m_rtClientRect); |
| | | |
| | | m_nScaleWidth = GetScaleWidth(); |
| | | m_nScaleHeight = GetScaleHeight(); |
| | | |
| | | switch(m_nDrawMode) |
| | | { |
| | | case 0: |
| | | if (m_rtClientRect.Width() >= m_nScaleWidth) |
| | | { |
| | | m_nMaxHScroll = 0; |
| | | } |
| | | else |
| | | { |
| | | m_nMaxHScroll = m_nScaleWidth - (m_rtClientRect.Width()+17); |
| | | if (m_nMaxHScroll < 0) |
| | | { |
| | | m_nMaxHScroll = 0; |
| | | } |
| | | else |
| | | { |
| | | m_nMaxHScroll += 17; |
| | | } |
| | | } |
| | | |
| | | if (m_rtClientRect.Height() >= m_nScaleHeight) |
| | | { |
| | | m_nMaxVScroll = 0; |
| | | } |
| | | else |
| | | { |
| | | m_nMaxVScroll = m_nScaleHeight - (m_rtClientRect.Height()+17); |
| | | if (m_nMaxVScroll < 0) |
| | | { |
| | | m_nMaxVScroll = 0; |
| | | } |
| | | else |
| | | { |
| | | m_nMaxVScroll += 17; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | |
| | | case 1: |
| | | m_nMaxHScroll = m_nMaxVScroll = 0; |
| | | break; |
| | | } |
| | | |
| | | m_nHScroll = m_nVScroll = 0; |
| | | |
| | | SetScrollRange(SB_HORZ, 0, m_nMaxHScroll); |
| | | SetScrollRange(SB_VERT, 0, m_nMaxVScroll); |
| | | SetScrollPos(SB_HORZ, m_nHScroll); |
| | | SetScrollPos(SB_VERT, m_nVScroll); |
| | | |
| | | } |
| | | |
| | | void CCameraImageView::DrawCenterLine(CDC *pDC) |
| | | { |
| | | if (m_rtClientRect.Width()==0 || m_rtClientRect.Height()==0) return; |
| | | |
| | | CRect rtDraw = m_rtClientRect; |
| | | if (m_nDrawMode==0) |
| | | { |
| | | rtDraw.right = GetWidth(); |
| | | rtDraw.bottom = GetHeight(); |
| | | } |
| | | |
| | | rtDraw.left -= m_nHScroll; |
| | | rtDraw.top -= m_nVScroll; |
| | | rtDraw.right -= m_nHScroll; |
| | | rtDraw.bottom -= m_nVScroll; |
| | | |
| | | CPen pen, *pPen=NULL; |
| | | pen.CreatePen(PS_SOLID, 2, RGB(255,0,0)); |
| | | pDC->SelectObject(&pen); |
| | | |
| | | //pDC->SelectStockObject(WHITE_PEN); |
| | | |
| | | // center line |
| | | pDC->MoveTo( (rtDraw.Width()/2)-m_nHScroll, 0); |
| | | pDC->LineTo((rtDraw.Width()/2)-m_nHScroll, rtDraw.Height()); |
| | | pDC->MoveTo(0, (rtDraw.Height()/2)-m_nVScroll); |
| | | pDC->LineTo(rtDraw.Width(), (rtDraw.Height()/2)-m_nVScroll); |
| | | } |
| | | |
| | | void CCameraImageView::DrawRuler(CDC *pDC) |
| | | { |
| | | if (m_dRulerGab==0.0) return; |
| | | |
| | | if (m_rtClientRect.Width()==0 || m_rtClientRect.Height()==0) return; |
| | | |
| | | CRect rtDraw = m_rtClientRect; |
| | | if (m_nDrawMode==0) |
| | | { |
| | | rtDraw.right = GetWidth(); |
| | | rtDraw.bottom = GetHeight(); |
| | | } |
| | | |
| | | rtDraw.left -= m_nHScroll; |
| | | rtDraw.top -= m_nVScroll; |
| | | rtDraw.right -= m_nHScroll; |
| | | rtDraw.bottom -= m_nVScroll; |
| | | |
| | | pDC->SelectStockObject(WHITE_PEN); |
| | | |
| | | CFont font; |
| | | VERIFY(font.CreateFont( |
| | | 10, // nHeight |
| | | 5, // nWidth |
| | | 0, // nEscapement |
| | | 0, // nOrientation |
| | | FW_NORMAL, // nWeight |
| | | FALSE, // bItalic |
| | | FALSE, // bUnderline |
| | | 0, // cStrikeOut |
| | | ANSI_CHARSET, // nCharSet |
| | | OUT_DEFAULT_PRECIS, // nOutPrecision |
| | | CLIP_DEFAULT_PRECIS, // nClipPrecision |
| | | DEFAULT_QUALITY, // nQuality |
| | | DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily |
| | | _T("Arial"))); // lpszFacename |
| | | |
| | | // Do something with the font just created... |
| | | CFont* def_font = pDC->SelectObject(&font); |
| | | pDC->SetTextColor(RGB(255,255,255)); |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | |
| | | // ruler |
| | | double dResX = m_dResolution / m_dWidthScale; |
| | | double dResY = m_dResolution / m_dHeightScale; |
| | | double dGabX = m_dRulerGab / dResX; // um |
| | | double dGabY = m_dRulerGab / dResY; // um |
| | | |
| | | if (dGabX<=0.0 || dGabY<=0.0) return; |
| | | |
| | | double dWidth = GetScaleWidth(); |
| | | double dHeight = GetScaleHeight(); |
| | | |
| | | double dCenterX = rtDraw.Width()/2; |
| | | double dCenterY = rtDraw.Height()/2; |
| | | |
| | | // x direction |
| | | CString strValue = _T(""); |
| | | strValue.Format(_T("%.1lf um"), m_dRulerGab); |
| | | pDC->TextOut(-m_nHScroll+5, rtDraw.Height()/2-m_nVScroll+5, strValue); |
| | | for (double dPos=dCenterX; dPos>=0.0; dPos-=dGabX) |
| | | { |
| | | pDC->MoveTo((int)(dPos+0.5)-m_nHScroll, -m_nVScroll); |
| | | pDC->LineTo((int)(dPos+0.5)-m_nHScroll, -m_nVScroll+6); |
| | | } |
| | | for (double dPos=dCenterX+dGabX; dPos<dWidth; dPos+=dGabX) |
| | | { |
| | | pDC->MoveTo((int)(dPos+0.5)-m_nHScroll, -m_nVScroll); |
| | | pDC->LineTo((int)(dPos+0.5)-m_nHScroll, -m_nVScroll+6); |
| | | } |
| | | |
| | | // y direction |
| | | strValue.Format(_T("%.1lf um"), m_dRulerGab); |
| | | pDC->TextOut(rtDraw.Width()/2-m_nHScroll+5, 5-m_nVScroll, strValue); |
| | | for (double dPos=dCenterY; dPos>0.0; dPos-=dGabY) |
| | | { |
| | | pDC->MoveTo(-m_nHScroll, (int)(dPos+0.5)-m_nVScroll); |
| | | pDC->LineTo(-m_nHScroll+6, (int)(dPos+0.5)-m_nVScroll); |
| | | } |
| | | for (double dPos=dCenterY+dGabY; dPos<dHeight; dPos+=dGabY) |
| | | { |
| | | pDC->MoveTo(-m_nHScroll, (int)(dPos+0.5)-m_nVScroll); |
| | | pDC->LineTo(-m_nHScroll+6, (int)(dPos+0.5)-m_nVScroll); |
| | | } |
| | | } |
| | | |
| | | BOOL CCameraImageView::SetViewImage(CCHImageData* pImageData) |
| | | { |
| | | if (pImageData==NULL) return FALSE; |
| | | |
| | | if (!pImageData->GetImageExist()) return FALSE; |
| | | |
| | | EnterCriticalSection(&m_csImageData); |
| | | |
| | | this->CopyImageFrom(pImageData); |
| | | |
| | | LeaveCriticalSection(&m_csImageData); |
| | | |
| | | this->Invalidate(TRUE); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CCameraImageView::SetOriginImage(CCHImageData* pImageData) |
| | | { |
| | | if (pImageData==NULL) return FALSE; |
| | | |
| | | if (!pImageData->GetImageExist()) return FALSE; |
| | | |
| | | EnterCriticalSection(&m_csImageData); |
| | | |
| | | m_OriginImage.CopyImageFrom(pImageData); |
| | | |
| | | m_OriginImage.GetBandImage(m_nViewBand, this); |
| | | |
| | | LeaveCriticalSection(&m_csImageData); |
| | | |
| | | this->Invalidate(TRUE); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CCameraImageView::SetOriginImage(int nWidth, int nHeight, int nChannels, int nWidthStep, const BYTE* pBuffer) |
| | | { |
| | | if (nWidth<0 || nHeight<0 || nChannels<0 || pBuffer==NULL) return FALSE; |
| | | |
| | | EnterCriticalSection(&m_csImageData); |
| | | |
| | | if (nWidth!=m_OriginImage.GetWidth() || nHeight!=m_OriginImage.GetHeight() || nChannels!=m_OriginImage.GetChannels()) |
| | | { |
| | | if (m_OriginImage.CreateImage(nWidth, nHeight, 8, nChannels)==FALSE) |
| | | { |
| | | LeaveCriticalSection(&m_csImageData); |
| | | return FALSE; |
| | | } |
| | | } |
| | | |
| | | memcpy(m_OriginImage.GetImageBuffer(), pBuffer, nWidthStep*nHeight); |
| | | |
| | | if (nChannels==1) m_nViewBand = BandTypeGray; |
| | | |
| | | BOOL bResult = m_OriginImage.GetBandImage(m_nViewBand, this); |
| | | |
| | | LeaveCriticalSection(&m_csImageData); |
| | | |
| | | return bResult; |
| | | } |
| | | |
| | | |
| | | BOOL CCameraImageView::GetViewImage(CCHImageData* pImageData) |
| | | { |
| | | if (pImageData==NULL) return FALSE; |
| | | |
| | | EnterCriticalSection(&m_csImageData); |
| | | |
| | | BOOL bReturn = this->CopyImageTo(pImageData); |
| | | |
| | | LeaveCriticalSection(&m_csImageData); |
| | | |
| | | return bReturn; |
| | | } |
| | | |
| | | BOOL CCameraImageView::GetOriginImage(CCHImageData* pImageData) |
| | | { |
| | | if (pImageData==NULL) return FALSE; |
| | | |
| | | EnterCriticalSection(&m_csImageData); |
| | | |
| | | BOOL bReturn = m_OriginImage.CopyImageTo(pImageData); |
| | | |
| | | LeaveCriticalSection(&m_csImageData); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CCameraImageView::DrawViewName(CDC *pDC) |
| | | { |
| | | CFont font; |
| | | VERIFY(font.CreateFont( |
| | | 20, // nHeight |
| | | 10, // nWidth |
| | | 0, // nEscapement |
| | | 0, // nOrientation |
| | | FW_NORMAL, // nWeight |
| | | FALSE, // bItalic |
| | | FALSE, // bUnderline |
| | | 0, // cStrikeOut |
| | | ANSI_CHARSET, // nCharSet |
| | | OUT_DEFAULT_PRECIS, // nOutPrecision |
| | | CLIP_DEFAULT_PRECIS, // nClipPrecision |
| | | DEFAULT_QUALITY, // nQuality |
| | | DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily |
| | | _T("Arial"))); // lpszFacename |
| | | |
| | | // Do something with the font just created... |
| | | CFont* def_font = pDC->SelectObject(&font); |
| | | pDC->SetTextColor(RGB(255,255,255)); |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | |
| | | int nStrLength = (m_strViewName.GetLength() * 10); |
| | | |
| | | pDC->TextOut(m_rtClientRect.Width() - nStrLength - 30, 5, m_strViewName); |
| | | pDC->SelectObject(def_font); |
| | | } |
| | | |
| | | int CCameraImageView::GetScaleWidth() |
| | | { |
| | | CRect rect; |
| | | int nWidth = GetWidth(); |
| | | |
| | | switch(m_nDrawMode) |
| | | { |
| | | case 0: |
| | | m_dWidthScale = 1.0; |
| | | return nWidth; |
| | | |
| | | case 1: |
| | | GetClientRect(rect); |
| | | if (nWidth!=0) |
| | | m_dWidthScale = double(rect.Width()) / double(nWidth); |
| | | return int(double(nWidth) * m_dWidthScale + 0.5); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | int CCameraImageView::GetScaleHeight() |
| | | { |
| | | CRect rect; |
| | | int nHeight = GetHeight(); |
| | | |
| | | switch(m_nDrawMode) |
| | | { |
| | | case 0: |
| | | m_dHeightScale = 1.0; |
| | | return nHeight; |
| | | |
| | | case 1: |
| | | GetClientRect(rect); |
| | | if (nHeight!=0) |
| | | m_dHeightScale = double(rect.Height()) / double(nHeight); |
| | | return int(double(nHeight) * m_dHeightScale + 0.5); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | int CCameraImageView::GetHScrollPos(void) |
| | | { |
| | | return m_nHScroll; |
| | | } |
| | | |
| | | int CCameraImageView::GetVScrollPos(void) |
| | | { |
| | | return m_nVScroll; |
| | | } |
| | | |
| | | void CCameraImageView::SetViewName(const CString strViewName) |
| | | { |
| | | m_strViewName = strViewName; |
| | | } |
| | | |
| | | void CCameraImageView::SetParentWnd(CWnd* pParentWnd) |
| | | { |
| | | m_pParentWnd = pParentWnd; |
| | | } |
| | | |
| | | BOOL CCameraImageView::LoadImage(const CString& strFilename) |
| | | { |
| | | if (!CCHImageData::LoadImage(strFilename)) |
| | | { |
| | | m_nHScroll = m_nVScroll = 0; |
| | | m_nMaxHScroll = m_nMaxVScroll = 0; |
| | | SetScrollRange(SB_HORZ, 0, m_nMaxHScroll); |
| | | SetScrollRange(SB_VERT, 0, m_nMaxVScroll); |
| | | SetScrollPos(SB_HORZ, m_nHScroll); |
| | | SetScrollPos(SB_VERT, m_nVScroll); |
| | | return FALSE; |
| | | } |
| | | |
| | | SetDrawMode(m_nDrawMode); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CCameraImageView::OnDestroy() |
| | | { |
| | | __super::OnDestroy(); |
| | | } |
| | | |
| | | void CCameraImageView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | switch (nSBCode) |
| | | { |
| | | case SB_LEFT: // Scroll to far left. |
| | | break; |
| | | case SB_RIGHT: // Scroll to far right. |
| | | break; |
| | | case SB_ENDSCROLL: // End scroll. |
| | | break; |
| | | case SB_LINELEFT: // Scroll left. |
| | | if (m_nHScroll > 0) |
| | | m_nHScroll--; |
| | | break; |
| | | case SB_LINERIGHT: // Scroll right. |
| | | if (m_nHScroll < m_nMaxHScroll) |
| | | m_nHScroll++; |
| | | break; |
| | | case SB_PAGELEFT: // Scroll one page left. |
| | | if (5 < m_nMaxHScroll / 256) |
| | | m_nHScroll -= 20;//m_nHScroll -= 5; |
| | | else |
| | | m_nHScroll -= 10;//m_nHScroll -= m_nMaxHScroll / 256; |
| | | |
| | | if (m_nHScroll < 0) |
| | | m_nHScroll = 0; |
| | | break; |
| | | case SB_PAGERIGHT: // Scroll one page right. |
| | | if (5 < m_nMaxHScroll / 256) |
| | | m_nHScroll += 20;//m_nHScroll += 5; |
| | | else |
| | | m_nHScroll += 10;//m_nHScroll += m_nMaxHScroll / 256; |
| | | |
| | | if (m_nHScroll > m_nMaxHScroll) |
| | | m_nHScroll = m_nMaxHScroll; |
| | | break; |
| | | case SB_THUMBPOSITION: // Scroll to absolute position. nPos is the position |
| | | break; |
| | | case SB_THUMBTRACK: // Drag scroll box to specified position. nPos is the |
| | | m_nHScroll = nPos; |
| | | break; |
| | | } |
| | | |
| | | // Set the new position of the thumb (scroll box). |
| | | SetScrollPos(SB_HORZ, m_nHScroll); |
| | | |
| | | Invalidate(FALSE); |
| | | |
| | | __super::OnHScroll(nSBCode, nPos, pScrollBar); |
| | | } |
| | | |
| | | void CCameraImageView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | switch (nSBCode) |
| | | { |
| | | case SB_BOTTOM: // Scroll to bottom. |
| | | break; |
| | | case SB_ENDSCROLL: // End scroll. |
| | | break; |
| | | case SB_LINEDOWN: // Scroll one line down. |
| | | if (m_nVScroll < m_nMaxVScroll) |
| | | m_nVScroll++; |
| | | break; |
| | | case SB_LINEUP: // Scroll one line up. |
| | | if (m_nVScroll > 0) |
| | | m_nVScroll--; |
| | | break; |
| | | case SB_PAGEDOWN: // Scroll one page down. |
| | | if (5 < m_nMaxVScroll / 256) |
| | | m_nVScroll += 20;//m_nVScroll += 5; |
| | | else |
| | | m_nVScroll += 10;//m_nVScroll += (m_nMaxVScroll / 256); |
| | | |
| | | if (m_nVScroll > m_nMaxVScroll) |
| | | m_nVScroll = m_nMaxVScroll; |
| | | break; |
| | | case SB_PAGEUP: // Scroll one page up. |
| | | if (5 < m_nMaxVScroll / 256) |
| | | m_nVScroll -= 20;//m_nVScroll -= 5; |
| | | else |
| | | m_nVScroll -= 10;//m_nVScroll -= (m_nMaxVScroll / 256); |
| | | |
| | | if (m_nVScroll < 0) |
| | | m_nVScroll = 0; |
| | | break; |
| | | case SB_THUMBPOSITION: // Scroll to the absolute position. The current position is provided in nPos. |
| | | break; |
| | | case SB_THUMBTRACK: // Drag scroll box to specified position. The current position is provided in nPos. |
| | | m_nVScroll = nPos; |
| | | break; |
| | | case SB_TOP: // Scroll to top. |
| | | break; |
| | | } |
| | | |
| | | // Set the new position of the thumb (scroll box). |
| | | SetScrollPos(SB_VERT, m_nVScroll); |
| | | |
| | | Invalidate(FALSE); |
| | | |
| | | __super::OnVScroll(nSBCode, nPos, pScrollBar); |
| | | } |
| | | |
| | | |
| | | void CCameraImageView::OnLoadImage() |
| | | { |
| | | //CString szFilter = _T("All Files(*.*)|*.*||"); |
| | | CString szFilter = _T("BMP(*.bmp)|*.bmp| JPG(*.jpg)|*.jpg| All Files(*.*)|*.*||"); |
| | | |
| | | CString strPath; |
| | | CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, szFilter); |
| | | dlg.m_ofn.lpstrTitle = _T("Load Image"); |
| | | |
| | | if(dlg.DoModal() == IDOK) |
| | | { |
| | | if (m_OriginImage.LoadImage(dlg.GetPathName())) |
| | | { |
| | | if (m_nViewBand==4) |
| | | { |
| | | m_OriginImage.CopyImageTo(this); |
| | | } |
| | | else |
| | | { |
| | | m_OriginImage.GetBandImage(m_nViewBand, this); |
| | | } |
| | | |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnSaveImage() |
| | | { |
| | | CString szFilter = _T("BMP(*.bmp)|*.bmp| JPG(*.jpg)|*.jpg| All Files(*.*)|*.*||"); |
| | | |
| | | CString strPath; |
| | | CFileDialog dlg(FALSE, szFilter, NULL, OFN_HIDEREADONLY, szFilter); |
| | | dlg.m_ofn.lpstrTitle = _T("Save Image"); |
| | | |
| | | if(dlg.DoModal() == IDOK) |
| | | { |
| | | if (SaveImage(dlg.GetPathName())) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnCenterLine() |
| | | { |
| | | m_bDrawCenterLine = !m_bDrawCenterLine; |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::OnRuler() |
| | | { |
| | | m_bDrawRuler = !m_bDrawRuler; |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::OnViewOrigin() |
| | | { |
| | | m_nDrawMode = 0; |
| | | |
| | | SetDrawMode(m_nDrawMode); |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::OnViewFit() |
| | | { |
| | | m_nDrawMode = 1; |
| | | |
| | | SetDrawMode(m_nDrawMode); |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CCameraImageView::OnViewColor() |
| | | { |
| | | if (m_OriginImage.GetChannels()==1) |
| | | { |
| | | m_nViewBand = BandTypeGray; |
| | | return; |
| | | } |
| | | |
| | | if (m_nViewBand == BandTypeColor) return; |
| | | |
| | | if (m_OriginImage.CopyImageTo(this)) |
| | | { |
| | | m_nViewBand = BandTypeColor; |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnViewGray() |
| | | { |
| | | if (m_nViewBand == BandTypeGray) return; |
| | | |
| | | if (m_OriginImage.GetBandImage(BandTypeGray, this)) |
| | | { |
| | | m_nViewBand = BandTypeGray; |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnViewRed() |
| | | { |
| | | if (m_OriginImage.GetChannels()==1) |
| | | { |
| | | m_nViewBand = BandTypeGray; |
| | | return; |
| | | } |
| | | |
| | | if (m_nViewBand == BandTypeRed) return; |
| | | |
| | | if (m_OriginImage.GetBandImage(BandTypeRed, this)) |
| | | { |
| | | m_nViewBand = BandTypeRed; |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnViewGreen() |
| | | { |
| | | if (m_OriginImage.GetChannels()==1) |
| | | { |
| | | m_nViewBand = BandTypeGray; |
| | | return; |
| | | } |
| | | |
| | | if (m_nViewBand == BandTypeGreen) return; |
| | | |
| | | if (m_OriginImage.GetBandImage(BandTypeGreen, this)) |
| | | { |
| | | m_nViewBand = BandTypeGreen; |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::OnViewBlue() |
| | | { |
| | | if (m_OriginImage.GetChannels()==1) |
| | | { |
| | | m_nViewBand = BandTypeGray; |
| | | return; |
| | | } |
| | | |
| | | if (m_nViewBand == BandTypeBlue) return; |
| | | |
| | | if (m_OriginImage.GetBandImage(BandTypeBlue, this)) |
| | | { |
| | | m_nViewBand = BandTypeBlue; |
| | | Invalidate(TRUE); |
| | | } |
| | | } |
| | | |
| | | void CCameraImageView::SetResolution(double dRes) |
| | | { |
| | | if (dRes<0.0) return; |
| | | |
| | | m_dResolution = dRes; |
| | | } |
| | | |
| | | void CCameraImageView::SetRulerGab(double dGab) |
| | | { |
| | | if (dGab<0.0) return; |
| | | |
| | | m_dRulerGab = dGab; |
| | | } |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "CHImageControls/CHImageData.h" |
| | | |
| | | #define IDR_LOAD_IMAGE 9000 |
| | | #define IDR_SAVE_IMAGE 9001 |
| | | #define IDR_ONLY_SAVE_IMAGE 9002 |
| | | |
| | | #define IDR_CENTER_LINE 9100 |
| | | #define IDR_RULER 9101 |
| | | #define IDR_ROI_RECT 9102 |
| | | #define IDR_CLEAR_ROI_RECT 9103 |
| | | #define IDR_SAVE_ROI_RECT 9104 |
| | | |
| | | #define IDR_VIEW_ORIGIN 9200 |
| | | #define IDR_VIEW_FIT 9201 |
| | | |
| | | #define IDR_VIEW_COLOR 9300 |
| | | #define IDR_VIEW_GRAY 9301 |
| | | #define IDR_VIEW_RED 9302 |
| | | #define IDR_VIEW_BLUE 9303 |
| | | #define IDR_VIEW_GREEN 9304 |
| | | |
| | | |
| | | // CDlgHistory ëí ììì
ëë¤. |
| | | interface ICameraImageView2Parent |
| | | { |
| | | virtual void CIV2P_GetImagePathName(CString& strFilename) = 0; |
| | | virtual void CIV2P_ManualSimulation(CCHImageData* pImageData) = 0; |
| | | }; |
| | | |
| | | class CCameraImageView : public CWnd, public CCHImageData |
| | | { |
| | | DECLARE_DYNAMIC(CCameraImageView) |
| | | |
| | | public: |
| | | CCameraImageView(CWnd *pParentWnd); |
| | | virtual ~CCameraImageView(); |
| | | void SetCIV2P(ICameraImageView2Parent* pCIV2P) { m_pCIV2P = pCIV2P; } |
| | | |
| | | BOOL GetViewImage(CCHImageData* pImageData); |
| | | BOOL GetOriginImage(CCHImageData* pImageData); |
| | | BOOL SetViewImage(CCHImageData* pImageData); |
| | | BOOL SetOriginImage(CCHImageData* pImageData); |
| | | BOOL SetOriginImage(int nWidth, int nHeight, int nChannels, int nWidthStep, const BYTE* pBuffer); |
| | | |
| | | // getter |
| | | int GetScaleWidth(void); |
| | | int GetScaleHeight(void); |
| | | int GetHScrollPos(void); |
| | | int GetVScrollPos(void); |
| | | double GetWidthScale() { return m_dWidthScale; } |
| | | double GetHeightScale() { return m_dHeightScale; } |
| | | |
| | | // setter |
| | | void SetDrawObject(BOOL bDraw); |
| | | void SetDrawMode(int nDrawMode); |
| | | void SetViewName(const CString strViewName); |
| | | void SetParentWnd(CWnd* pParentWnd); |
| | | void SetDrawCenterLine(BOOL bDraw); |
| | | void SetDrawRuler(BOOL bDraw); |
| | | |
| | | void SetResolution(double dRes); |
| | | void SetRulerGab(double dGab); |
| | | |
| | | BOOL LoadImage(const CString& strFilename); |
| | | |
| | | protected: |
| | | void UpdateImageView(CDC *pDC); |
| | | void DrawCenterLine(CDC *pDC); |
| | | void DrawRuler(CDC *pDC); |
| | | void DrawViewName(CDC *pDC); |
| | | |
| | | ICameraImageView2Parent* m_pCIV2P; |
| | | |
| | | CRITICAL_SECTION m_csImageData; |
| | | CWnd *m_pParentWnd; |
| | | CString m_strViewName; |
| | | CCHImageData m_OriginImage; |
| | | |
| | | // pre draw info |
| | | int m_nViewBand; |
| | | CRect m_rtClientRect; |
| | | int m_nScaleWidth; |
| | | int m_nScaleHeight; |
| | | double m_dWidthScale; |
| | | double m_dHeightScale; |
| | | |
| | | // Scroll Pos |
| | | int m_nVScroll; |
| | | int m_nHScroll; |
| | | // Max Scroll Pos |
| | | int m_nMaxVScroll; |
| | | int m_nMaxHScroll; |
| | | |
| | | // image draw |
| | | int m_nDrawMode; |
| | | BOOL m_bDrawViewName; |
| | | |
| | | BOOL m_bDrawCenterLine; |
| | | BOOL m_bDrawRuler; |
| | | double m_dRulerGab; |
| | | double m_dResolution; |
| | | |
| | | protected: |
| | | DECLARE_MESSAGE_MAP() |
| | | afx_msg void OnLoadImage(); |
| | | afx_msg void OnSaveImage(); |
| | | afx_msg void OnCenterLine(); |
| | | afx_msg void OnRuler(); |
| | | afx_msg void OnViewOrigin(); |
| | | afx_msg void OnViewFit(); |
| | | afx_msg void OnViewColor(); |
| | | afx_msg void OnViewGray(); |
| | | afx_msg void OnViewRed(); |
| | | afx_msg void OnViewGreen(); |
| | | afx_msg void OnViewBlue(); |
| | | afx_msg void OnDestroy(); |
| | | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); |
| | | afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); |
| | | |
| | | afx_msg void OnPaint(); |
| | | |
| | | afx_msg void OnMouseMove(UINT nFlags, CPoint point); |
| | | |
| | | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); |
| | | afx_msg void OnLButtonUp(UINT nFlags, CPoint point); |
| | | afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); |
| | | |
| | | afx_msg void OnRButtonDown(UINT nFlags, CPoint point); |
| | | afx_msg void OnRButtonUp(UINT nFlags, CPoint point); |
| | | afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point); |
| | | |
| | | public: |
| | | |
| | | }; |
| | | |
| | | // typedef std::vector<CCameraImageView*> VectorCameraImageView; |
| | | // typedef std::vector<CCameraImageView*>::iterator VectorCameraImageViewIt; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "CustomizeReview.h" |
| | | #include "akCore/akFileDB.h" |
| | | #include "akGridData.h" |
| | | |
| | | #ifdef _DEBUG |
| | | #undef THIS_FILE |
| | | static char THIS_FILE[]=__FILE__; |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | #define CUSTOMIZE_RECIPE_PATH "C:\\DIT_Review\\Recipe" |
| | | |
| | | CCustomizeReview::CCustomizeReview(void) |
| | | { |
| | | m_bReadSuccess = FALSE; |
| | | } |
| | | |
| | | CCustomizeReview::~CCustomizeReview(void) |
| | | { |
| | | m_vecCustomizeReview.clear(); |
| | | } |
| | | |
| | | BOOL CCustomizeReview::openFile( char* pRecipeName ) |
| | | { |
| | | m_bReadSuccess = FALSE; |
| | | m_nCustomizePlanType = 0; |
| | | m_vecCustomizeReview.clear(); |
| | | |
| | | CString strFileName; |
| | | { |
| | | CString strRecipeFileName; |
| | | strRecipeFileName.Format("%s\\%s.rcp", CUSTOMIZE_RECIPE_PATH, pRecipeName); |
| | | if(PathFileExists(strRecipeFileName)) |
| | | { |
| | | strFileName.Format("%s\\%s.cri", CUSTOMIZE_RECIPE_PATH, pRecipeName); |
| | | } |
| | | else |
| | | { |
| | | strFileName.Format("%s\\%s.cri", CUSTOMIZE_RECIPE_PATH, "Default"); |
| | | } |
| | | } |
| | | |
| | | |
| | | char* pFileName = strFileName.GetBuffer(0); |
| | | FILE* pf = fopen(pFileName, "r"); |
| | | |
| | | if(pf == NULL) |
| | | return FALSE; |
| | | |
| | | std::vector<_CustomizeReview> vecCustomizeReview; |
| | | _CustomizeReview CustomizeReviewData; |
| | | char buffer[1024]; |
| | | |
| | | char* pReadPoint = NULL; |
| | | char *pStr; |
| | | |
| | | CakParser akParser; |
| | | pStr = fgets(buffer, 1024, pf); |
| | | m_nCustomizePlanType = atoi(pStr); //customize type |
| | | while(!feof(pf)) |
| | | { |
| | | pStr = fgets(buffer, 1024, pf); |
| | | |
| | | if(strlen(buffer) <= 0 || pStr == NULL) |
| | | break; |
| | | |
| | | akParser.process(pStr, " \r\n\t,^"); |
| | | if(akParser.getTokNum() <= 0) break; |
| | | |
| | | CustomizeReviewData.m_nCustomizeDefectType = atoi( akParser.getTokStr(0) ); |
| | | CustomizeReviewData.m_dCustomizeDefectPosXmm = atof( akParser.getTokStr(1) ); |
| | | CustomizeReviewData.m_dCustomizeDefectPosYmm = atof( akParser.getTokStr(2) ); |
| | | CustomizeReviewData.m_nCustomizeParam1 = atoi( akParser.getTokStr(3) ); |
| | | CustomizeReviewData.m_nCustomizeParam2 = atoi( akParser.getTokStr(4) ); |
| | | vecCustomizeReview.push_back(CustomizeReviewData); |
| | | } |
| | | |
| | | fclose(pf); |
| | | |
| | | m_vecCustomizeReview = vecCustomizeReview; |
| | | m_bReadSuccess = TRUE; |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | |
| | | struct _CustomizeReview |
| | | { |
| | | int m_nCustomizeDefectType ;//0:Location(User, Fiexed) Review, 1:reflower, 2:Wsi |
| | | double m_dCustomizeDefectPosXmm; //mm ë¨ì x ì½ë ì¢í [ê¹íí 2019/1/17] |
| | | double m_dCustomizeDefectPosYmm; //mm ë¨ì y ì½ë ì¢í |
| | | int m_nCustomizeParam1 ; |
| | | int m_nCustomizeParam2 ; |
| | | }; |
| | | |
| | | class CCustomizeReview |
| | | { |
| | | public: |
| | | CCustomizeReview(void); |
| | | virtual ~CCustomizeReview(void); |
| | | |
| | | public: |
| | | BOOL openFile(char* pRecipeName); |
| | | BOOL IsRead() { return m_bReadSuccess; } |
| | | int GetCustomizeReviewNum() { return (int)m_vecCustomizeReview.size();} |
| | | _CustomizeReview* GetCustomizeReivew(int i) { return &m_vecCustomizeReview[i]; } |
| | | int GetCustomizeType(){return m_nCustomizePlanType;}; |
| | | public: |
| | | CString m_strCustomizeReviewRecipePath; |
| | | |
| | | DWORD m_dwMacroReadTime; |
| | | |
| | | protected: |
| | | char* getParsingData(char* pBuf, int nLen, CString* pOutData); |
| | | char* getParsingData(char* pBuf, int nLen, int* pOutData); |
| | | |
| | | protected: |
| | | BOOL m_bReadSuccess; |
| | | int m_nCustomizePlanType; |
| | | std::vector<_CustomizeReview> m_vecCustomizeReview; |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "DitGlassRawClient.h" |
| | | |
| | | CDitGlassRawClient::CDitGlassRawClient(void) |
| | | : m_mxCommandProcess(FALSE, MUTEX_RAWMESSENGER) |
| | | { |
| | | m_hMapBasicInfo = NULL; |
| | | m_hMapGlassData = NULL; |
| | | |
| | | m_pGlassRawInfo = NULL; |
| | | m_pGlassRawData = NULL; |
| | | |
| | | m_nLastCommandIdx = -1; |
| | | } |
| | | |
| | | CDitGlassRawClient::~CDitGlassRawClient(void) |
| | | { |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | m_pGlassRawInfo = NULL; |
| | | } |
| | | |
| | | if (m_hMapGlassData!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapGlassData); |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::ConnectServer() |
| | | { |
| | | if(isConnect()) return TRUE; |
| | | |
| | | if(ConnectGlassRawInfo() == FALSE) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | if(ConnectGlassRawData() == FALSE) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::ConnectGlassRawInfo() |
| | | { |
| | | if(m_hMapBasicInfo == NULL) |
| | | { |
| | | m_hMapBasicInfo = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_BASICINFO); |
| | | |
| | | if (m_hMapBasicInfo) |
| | | { |
| | | m_pGlassRawInfo = (_grmDitGlassRawInfo*)::MapViewOfFile(m_hMapBasicInfo, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(_grmDitGlassRawInfo)); |
| | | } |
| | | |
| | | if(m_hMapBasicInfo == NULL || m_pGlassRawInfo == NULL) |
| | | { |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | m_pGlassRawInfo = NULL; |
| | | } |
| | | m_pGlassRawInfo = NULL; |
| | | return FALSE; |
| | | } |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::ConnectGlassRawData() |
| | | { |
| | | SIZE_T nGlassRawSharedSize = m_pGlassRawInfo->m_nGlassRawDataSize; |
| | | |
| | | if(m_hMapGlassData == NULL) |
| | | { |
| | | m_hMapGlassData = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_GLASSDATA); |
| | | |
| | | if (m_hMapGlassData) |
| | | { |
| | | m_pGlassRawData = (char*)::MapViewOfFile(m_hMapGlassData, FILE_MAP_ALL_ACCESS, 0, 0, nGlassRawSharedSize); |
| | | } |
| | | |
| | | if(m_hMapGlassData == NULL || m_pGlassRawData == NULL) |
| | | { |
| | | if (m_hMapGlassData != NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapGlassData); |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | m_pGlassRawData = NULL; |
| | | return FALSE; |
| | | } |
| | | } |
| | | m_pGlassData = (_grmGlassData*)&m_pGlassRawData[m_pGlassRawInfo->m_nGlassDataPoint]; |
| | | m_pBlockData = (_grmBlockData*)&m_pGlassRawData[m_pGlassRawInfo->m_nBlockDataPoint]; |
| | | m_pCellData = (_grmCellData*)&m_pGlassRawData[m_pGlassRawInfo->m_nCellDataPoint]; |
| | | m_pDefectData = (_grmDefectData*)&m_pGlassRawData[m_pGlassRawInfo->m_nDefectDataPoint]; |
| | | m_pStackData = (_grmDefectData*)&m_pGlassRawData[m_pGlassRawInfo->m_nStackDataPoint]; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::WriteAOIRawFile() |
| | | { |
| | | return SetCommand(grcWriteRaw); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::WriteAOIRawBinFile() |
| | | { |
| | | return SetCommand(grcWriteBin); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::ReadAOIRawBinFile() |
| | | { |
| | | return SetCommand(grcReadBin); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::WriteReviewRawBinFile() |
| | | { |
| | | return SetCommand(grcReviewWriteBIn); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetCommand( emGlassRawCommand nCmd ) |
| | | { |
| | | if(m_pGlassRawInfo == NULL) return FALSE; |
| | | |
| | | m_mxCommandProcess.Lock(); |
| | | |
| | | int nCmdId = (m_pGlassRawInfo->m_nCommandIdxWrite+1) % COMMAND_MAXCOUNT; |
| | | |
| | | if(m_pGlassRawInfo->m_nCommandIdxRead == nCmdId)//���� ���ٴ°��� ��ŧ�� ���۰� �ѹ��� ���Ҵٴ°�!! [������ 2018/11/12] |
| | | { |
| | | m_pGlassRawInfo->m_nCommandIdxRead++;//���� ������ ��� �ϳ��� �����Ѵ�. [������ 2018/11/12] |
| | | } |
| | | |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].nCommand = (short)nCmd; |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].strParam; |
| | | m_pGlassRawInfo->m_nCommandBuffer[nCmdId].nResult = -1; //-1������, 0����, 1���� [������ 2018/11/13] |
| | | |
| | | |
| | | m_nLastCommandIdx = m_pGlassRawInfo->m_nCommandIdxWrite = nCmdId; |
| | | |
| | | m_mxCommandProcess.Unlock(); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | emAOIProcStep CDitGlassRawClient::GetProcessStep() |
| | | { |
| | | if(isConnect() == FALSE) return APS_None; |
| | | |
| | | if(m_pGlassRawInfo) |
| | | { |
| | | return m_pGlassRawInfo->m_ClientProcStep; |
| | | } |
| | | |
| | | return APS_None; |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetGlassLoading() |
| | | { |
| | | if(isConnect() == FALSE) return FALSE; |
| | | m_pGlassRawInfo->m_ClientProcStep = APS_GlassLoading; |
| | | m_pGlassData->m_bStackRead = FALSE; |
| | | return SetCommand(grcSequenceGlassLoading); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetInspectEnd() |
| | | { |
| | | if(isConnect() == FALSE) return FALSE; |
| | | m_pGlassRawInfo->m_ClientProcStep = APS_InspectEnd; |
| | | return SetCommand(grcSequenceInspectEnd); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetReviewStart() |
| | | { |
| | | if(isConnect() == FALSE) return FALSE; |
| | | m_pGlassRawInfo->m_ClientProcStep = APS_ReviewStart; |
| | | return SetCommand(grcSequenceReviewStart); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetReviewEnd() |
| | | { |
| | | if(isConnect() == FALSE) return FALSE; |
| | | m_pGlassRawInfo->m_ClientProcStep = APS_ReviewEnd; |
| | | return SetCommand(grcSequenceReviewEnd); |
| | | } |
| | | |
| | | BOOL CDitGlassRawClient::SetReviewComtomize() |
| | | { |
| | | if(isConnect() == FALSE) return FALSE; |
| | | m_pGlassRawInfo->m_ClientProcStep = APS_CustomReviewRead; |
| | | return SetCommand(grcSequenceCustomReviewDataRead); |
| | | } |
| | | |
| | | void CDitGlassRawClient::RemoveReviewDefects() |
| | | { |
| | | int nDefectNum = m_pGlassData->m_nDefectNum; |
| | | int nRightDefectNum = 0;//������ �����ʿ� ��ġ�� ���� ���� |
| | | int nDefectDeleteNum = 0; |
| | | for(int i=nDefectNum-1; i>=0; i--) |
| | | { |
| | | if(m_pDefectData[i].m_ReviewDefect.m_nPlanType > 0 && |
| | | m_pDefectData[i].m_ReviewDefect.m_nPlanType != 1000 ) |
| | | { |
| | | nDefectDeleteNum++; |
| | | if(nRightDefectNum) |
| | | { |
| | | memcpy(&m_pDefectData[i], &m_pDefectData[i+1], sizeof(_grmDefectData)*nRightDefectNum); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | nRightDefectNum++; |
| | | } |
| | | } |
| | | |
| | | m_pGlassData->m_nDefectNum = nDefectNum-nDefectDeleteNum; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "DitGlassRawStruct.h" |
| | | |
| | | class CDitGlassRawClient |
| | | { |
| | | public: |
| | | CDitGlassRawClient(void); |
| | | ~CDitGlassRawClient(void); |
| | | |
| | | public: |
| | | BOOL ConnectServer(); |
| | | BOOL isConnect(){return m_hMapBasicInfo == NULL || m_hMapGlassData == NULL ? FALSE : TRUE;}; |
| | | |
| | | emAOIProcStep GetProcessStep(); |
| | | |
| | | BOOL SetGlassLoading(); |
| | | BOOL SetInspectEnd(); |
| | | |
| | | BOOL SetReviewStart(); |
| | | BOOL SetReviewEnd(); |
| | | |
| | | BOOL SetReviewComtomize(); |
| | | |
| | | void RemoveReviewDefects();//AOI���� ������ ���� ������ �����ϰ�, ���信�� ������ User Ȥ�� Reflow ������ �����Ѵ�. |
| | | |
| | | _grmDitMemInfo* GetGlassMeminfo(){return (_grmDitMemInfo*)m_pGlassRawInfo;}; |
| | | _grmGlassData* GetGlassData(){return m_pGlassData;}; |
| | | _grmBlockData* GetBlockData(){return m_pBlockData;}; |
| | | _grmCellData* GetCellData(int nIndex){return &m_pCellData[nIndex];}; |
| | | _grmDefectData* GetDefectData(int nIndex){return &m_pDefectData[nIndex];}; |
| | | _grmDefectData* GetStackData(int nIndex) { return &m_pStackData[nIndex];}; |
| | | |
| | | //��� ���� ���� ���� ��� [������ 2018/11/12] |
| | | BOOL WriteAOIRawFile(); |
| | | |
| | | //������� ���� ���̳ʸ� ���·� ���� [������ 2018/11/12] |
| | | BOOL WriteAOIRawBinFile(); |
| | | |
| | | //������� ���� ���̳ʸ� �б� |
| | | BOOL ReadAOIRawBinFile(); |
| | | |
| | | BOOL WriteReviewRawBinFile(); |
| | | |
| | | protected: |
| | | BOOL ConnectGlassRawInfo(); |
| | | BOOL ConnectGlassRawData(); |
| | | BOOL SetCommand(emGlassRawCommand nCmd); |
| | | |
| | | protected: |
| | | _grmGlassData* m_pGlassData; |
| | | _grmBlockData* m_pBlockData; |
| | | _grmCellData* m_pCellData; |
| | | _grmDefectData* m_pDefectData; |
| | | _grmDefectData* m_pStackData; |
| | | |
| | | protected: |
| | | HANDLE m_hMapBasicInfo; |
| | | HANDLE m_hMapGlassData; |
| | | _grmDitGlassRawInfo* m_pGlassRawInfo; |
| | | char* m_pGlassRawData; |
| | | |
| | | CMutex m_mxCommandProcess; |
| | | int m_nLastCommandIdx; |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "DitGlassRawServer.h" |
| | | |
| | | CDitGlassRawServer::CDitGlassRawServer(void) |
| | | : m_mxCommandProcess(FALSE, MUTEX_RAWMESSENGER) |
| | | { |
| | | m_hMapBasicInfo = NULL; |
| | | m_hMapGlassData = NULL; |
| | | |
| | | m_pGlassRawInfo = NULL; |
| | | m_pGlassRawData = NULL; |
| | | |
| | | m_nLastCommandIdx = -1; |
| | | } |
| | | |
| | | CDitGlassRawServer::~CDitGlassRawServer(void) |
| | | { |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | m_pGlassRawInfo = NULL; |
| | | } |
| | | |
| | | if (m_hMapGlassData!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapGlassData); |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | } |
| | | |
| | | |
| | | BOOL CDitGlassRawServer::CreateServer( int nCellNum /*= 100*/, int nDefectNum /*= 2000*/ ) |
| | | { |
| | | if(CreateGlassRawInfo() == FALSE) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | if(sizeof(_grmGlassData) != m_pGlassRawInfo->m_nSizeOfGlassData |
| | | || sizeof(_grmBlockData) != m_pGlassRawInfo->m_nSizeOfBlockData |
| | | || sizeof(_grmCellData) != m_pGlassRawInfo->m_nSizeOfCellData |
| | | || sizeof(_grmDefectData) != m_pGlassRawInfo->m_nSizeOfDefectData |
| | | || sizeof(_grmDefectData) != m_pGlassRawInfo->m_nSizeOfStackData) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | m_pGlassRawInfo->m_nGlassMaxDataNum = 1; |
| | | m_pGlassRawInfo->m_nBlockMaxDataNum = 1; |
| | | m_pGlassRawInfo->m_nCellMaxDataNum = nCellNum; |
| | | m_pGlassRawInfo->m_nDefectMaxDataNum = nDefectNum; |
| | | m_pGlassRawInfo->m_nStackMaxDataNum = nDefectNum; |
| | | |
| | | m_pGlassRawInfo->m_nGlassRawDataSize; |
| | | { |
| | | int nDataNum = 0; |
| | | |
| | | m_pGlassRawInfo->m_nGlassDataPoint = nDataNum; |
| | | nDataNum += m_pGlassRawInfo->m_nSizeOfGlassData + m_pGlassRawInfo->m_nSizeOfGlassData%4; |
| | | |
| | | m_pGlassRawInfo->m_nBlockDataPoint = nDataNum; |
| | | nDataNum += m_pGlassRawInfo->m_nSizeOfBlockData + m_pGlassRawInfo->m_nSizeOfBlockData%4; |
| | | |
| | | m_pGlassRawInfo->m_nCellDataPoint = nDataNum; |
| | | nDataNum += (m_pGlassRawInfo->m_nSizeOfCellData + m_pGlassRawInfo->m_nSizeOfCellData%4)*nCellNum; |
| | | |
| | | m_pGlassRawInfo->m_nDefectDataPoint = nDataNum; |
| | | nDataNum += (m_pGlassRawInfo->m_nSizeOfDefectData + m_pGlassRawInfo->m_nSizeOfDefectData%4)*nDefectNum; |
| | | |
| | | m_pGlassRawInfo->m_nStackDataPoint = nDataNum; |
| | | nDataNum += (m_pGlassRawInfo->m_nSizeOfStackData + m_pGlassRawInfo->m_nSizeOfStackData % 4)*nDefectNum; |
| | | |
| | | m_pGlassRawInfo->m_nGlassRawDataSize = nDataNum; |
| | | } |
| | | |
| | | |
| | | if(CreateGlassRawData() == FALSE) |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CDitGlassRawServer::CreateGlassRawInfo() |
| | | { |
| | | if(m_hMapBasicInfo == NULL) |
| | | { |
| | | BOOL bCreateMem = TRUE; |
| | | |
| | | m_hMapBasicInfo = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, sizeof(_grmDitGlassRawInfo), SHAREDMEMNAME_BASICINFO); |
| | | |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | m_hMapBasicInfo = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_BASICINFO); |
| | | bCreateMem = FALSE; |
| | | } |
| | | |
| | | if (m_hMapBasicInfo) |
| | | { |
| | | m_pGlassRawInfo = (_grmDitGlassRawInfo*)::MapViewOfFile(m_hMapBasicInfo, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(_grmDitGlassRawInfo)); |
| | | } |
| | | |
| | | if(m_hMapBasicInfo == NULL || m_pGlassRawInfo == NULL) |
| | | { |
| | | if (m_hMapBasicInfo!=NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapBasicInfo); |
| | | m_pGlassRawInfo = NULL; |
| | | } |
| | | m_pGlassRawInfo = NULL; |
| | | return FALSE; |
| | | } |
| | | |
| | | //0ì¼ë¡ ì´ê¸°í |
| | | if(bCreateMem && m_pGlassRawInfo) |
| | | { |
| | | ZeroMemory(m_pGlassRawInfo,sizeof(_grmDitGlassRawInfo)); |
| | | |
| | | m_pGlassRawInfo->m_nSizeOfGlassData = sizeof(_grmGlassData) ; |
| | | m_pGlassRawInfo->m_nSizeOfBlockData = sizeof(_grmBlockData); |
| | | m_pGlassRawInfo->m_nSizeOfCellData = sizeof(_grmCellData); |
| | | m_pGlassRawInfo->m_nSizeOfDefectData = sizeof(_grmDefectData); |
| | | m_pGlassRawInfo->m_nSizeOfStackData = sizeof(_grmDefectData); |
| | | |
| | | int bytealign = m_pGlassRawInfo->m_nSizeOfGlassData%4; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CDitGlassRawServer::CreateGlassRawData() |
| | | { |
| | | int nGlassRawSharedSize = (int)(m_pGlassRawInfo->m_nGlassRawDataSize); |
| | | |
| | | if(m_hMapGlassData == NULL) |
| | | { |
| | | BOOL bCreateMem = TRUE; |
| | | |
| | | m_hMapGlassData = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, nGlassRawSharedSize, SHAREDMEMNAME_GLASSDATA); |
| | | |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | m_hMapGlassData = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,SHAREDMEMNAME_GLASSDATA); |
| | | bCreateMem = FALSE; |
| | | } |
| | | |
| | | if (m_hMapGlassData) |
| | | { |
| | | m_pGlassRawData = (char*)::MapViewOfFile(m_hMapGlassData, FILE_MAP_ALL_ACCESS, 0, 0, nGlassRawSharedSize); |
| | | } |
| | | |
| | | if(m_hMapGlassData == NULL || m_pGlassRawData == NULL) |
| | | { |
| | | if (m_hMapGlassData != NULL) |
| | | { |
| | | ::UnmapViewOfFile(m_hMapGlassData); |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | m_pGlassRawData = NULL; |
| | | return FALSE; |
| | | } |
| | | |
| | | //0ì¼ë¡ ì´ê¸°í |
| | | if(bCreateMem && m_pGlassRawData) ZeroMemory(m_pGlassRawData,sizeof(char)*nGlassRawSharedSize); |
| | | } |
| | | |
| | | m_pGlassData = (_grmGlassData*)&m_pGlassRawData[m_pGlassRawInfo->m_nGlassDataPoint]; |
| | | m_pBlockData = (_grmBlockData*)&m_pGlassRawData[m_pGlassRawInfo->m_nBlockDataPoint]; |
| | | m_pCellData = (_grmCellData*)&m_pGlassRawData[m_pGlassRawInfo->m_nCellDataPoint]; |
| | | m_pDefectData = (_grmDefectData*)&m_pGlassRawData[m_pGlassRawInfo->m_nDefectDataPoint]; |
| | | m_pStackData = (_grmDefectData*)&m_pGlassRawData[m_pGlassRawInfo->m_nStackDataPoint]; |
| | | |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "DitGlassRawStruct.h" |
| | | |
| | | |
| | | |
| | | class CDitGlassRawServer |
| | | { |
| | | public: |
| | | CDitGlassRawServer(void); |
| | | ~CDitGlassRawServer(void); |
| | | |
| | | public: |
| | | BOOL CreateServer(int nCellNum = 200, int nDefectNum = 12000); |
| | | |
| | | _grmGlassData* GetGlassData(){return m_pGlassData;}; |
| | | _grmBlockData* GetBlockData(){return m_pBlockData;}; |
| | | _grmCellData* GetCellData(int nIndex){return &m_pCellData[nIndex];}; |
| | | _grmDefectData* GetDefectData(int nIndex){return &m_pDefectData[nIndex];}; |
| | | _grmDefectData* GetStackData(int nIndex) { return &m_pStackData[nIndex]; }; |
| | | |
| | | _grmDitGlassRawInfo* GetGlassRawInfo(){return m_pGlassRawInfo;}; |
| | | |
| | | protected: |
| | | BOOL CreateGlassRawInfo(); |
| | | BOOL CreateGlassRawData(); |
| | | |
| | | protected: |
| | | _grmGlassData* m_pGlassData; |
| | | _grmBlockData* m_pBlockData; |
| | | _grmCellData* m_pCellData; |
| | | _grmDefectData* m_pDefectData; |
| | | _grmDefectData* m_pStackData; |
| | | |
| | | |
| | | protected: |
| | | HANDLE m_hMapBasicInfo; |
| | | HANDLE m_hMapGlassData; |
| | | _grmDitGlassRawInfo* m_pGlassRawInfo; |
| | | char* m_pGlassRawData; |
| | | |
| | | CMutex m_mxCommandProcess; |
| | | int m_nLastCommandIdx; |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #define SHAREDMEMNAME_BASICINFO _T("DIT.GLASSRAWSYSTEM.SHAREDMEM.BASICINFO") |
| | | #define SHAREDMEMNAME_GLASSDATA _T("DIT.GLASRAWSYSTEM.SHAREDMEM.GLASSDATA") |
| | | #define MUTEX_RAWMESSENGER _T("MUTEX_RAWMESSENGER_IPC") |
| | | |
| | | #define COMMAND_MAXCOUNT 8 |
| | | |
| | | #define RAWMESSENGER_MAXCAMNUM 30 |
| | | #define RAWMESSENGER_MAXSCANNUM 20 |
| | | |
| | | #define MAX_ZONE_NUM 16 |
| | | |
| | | namespace ditRaw |
| | | { |
| | | enum ReviewPlanType |
| | | { |
| | | RPT_Review = 0, |
| | | RPT_User, |
| | | RTP_WSI, |
| | | RTP_PlanMeasure, |
| | | RTP_Reflow, |
| | | RTP_WsiReflow, |
| | | RTP_UserWsi, |
| | | RPT_AOICustom = 1000, |
| | | }; |
| | | }; |
| | | enum emAOIProcStep |
| | | { |
| | | APS_None = 0, |
| | | |
| | | //AOI |
| | | APS_GlassLoading, |
| | | APS_InspectEnd, |
| | | //Review |
| | | APS_CustomReviewRead, |
| | | APS_ReviewStart, |
| | | APS_ReviewEnd, |
| | | |
| | | RPS_StepNum |
| | | }; |
| | | |
| | | struct _grmGlassData |
| | | { |
| | | void clear() |
| | | { |
| | | memset(this, 0, sizeof(_grmGlassData)); |
| | | } |
| | | |
| | | //Glass ���� |
| | | char m_strFileName[64]; |
| | | char m_strPath[256]; |
| | | |
| | | int m_nCellNum; |
| | | int m_nDefectNum; |
| | | |
| | | int m_nOriginDirection; //{ GD_LeftTop = 0, GD_RightTop = 1, GD_LeftBottom = 10, GD_RightBottom = 11 }; |
| | | int m_nConerCutDirection; |
| | | int m_nScanCoordinateY; //���Ⱑ 0�̸� �Ϲ�, 1�̸� Scan������ y��(�� scan������ ����, offline ���� ����) |
| | | |
| | | int m_nGlassSizeWidth; |
| | | int m_nGlassSizeHeight; |
| | | |
| | | //�������� |
| | | char m_strLine[32]; |
| | | char m_strEquipType[32]; |
| | | char m_strEquipID[32]; |
| | | char m_strStepID[32]; |
| | | char m_strOperID[32]; |
| | | |
| | | CTime m_tmGlassLoading; //3. START_TIME |
| | | CTime m_tmInspectionStart; //3. START_TIME |
| | | CTime m_tmInspectionEND; //4. END_TIME |
| | | CTime m_tmReviewLoading; |
| | | CTime m_tmReviewEnd; |
| | | |
| | | //�⺻ �������� |
| | | char m_strGlassID[32]; //Glass ID |
| | | char m_strPPID[32]; |
| | | char m_strEPPID[32]; |
| | | char m_strLotID[32]; //LOT_ID |
| | | char m_strSLotID[32]; //SLOT_ID |
| | | char m_strRecipeName[32]; //RECIPE_NAME |
| | | char m_strGlassJudge[32]; //GLASS_JUDGE |
| | | char m_strGlassCode[32]; //Grade or Code |
| | | char m_strProductID[16]; //4. PRODUCT_ID |
| | | |
| | | //VCR |
| | | int m_nVcrResultCode; |
| | | char m_strVCRResult[32]; |
| | | char m_strVCRGlassID[32]; |
| | | |
| | | |
| | | //���� ���� ���� ���� |
| | | int m_nDefectNumSizeSmall; |
| | | int m_nDefectNumSizeMid; |
| | | int m_nDefectNumSizeLarge; |
| | | int m_nDefectNumSizeHuge; |
| | | int m_nDefectNumSizeUltra; |
| | | |
| | | int m_nDefectNumLocActive; |
| | | int m_nDefectNumLocPad; |
| | | int m_nDefectNumLocCrack; |
| | | int m_nDefectNumLocBM; |
| | | |
| | | int m_nDefectNumTypeTB; |
| | | int m_nDefectNumTypeTW; |
| | | int m_nDefectNumTypeRB; |
| | | int m_nDefectNumTypeRW; |
| | | int m_nDefectNumTypeMD; |
| | | int m_nDefectNumTypeCD; |
| | | int m_nDefectNumTypeMC; |
| | | |
| | | int m_nDefectNumJudgeOKWhite; |
| | | int m_nDefectNumJudgeOKBlack; |
| | | int m_nDefectNumJudgeNG; |
| | | int m_nDefectNumJudgeRW; |
| | | int m_nDefectNumJudgeRP; |
| | | int m_nDefectNumJudgeRV; |
| | | int m_nDefectNumJudgeTR; |
| | | int m_nDefectNumJudgePR; |
| | | |
| | | int m_nDefectNumStackTD; |
| | | int m_nDefectNumStackSD; |
| | | int m_nDefectNumStackPD; |
| | | int m_nDefectNumStackSP; |
| | | |
| | | |
| | | //ī�޶�/��ĵ ���� [������ 2018/12/5] |
| | | short m_nCameraNum; |
| | | short m_nScanNum; |
| | | unsigned char m_nGrayLevelAvg[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | unsigned char m_nGrayLevelMin[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | unsigned char m_nGrayLevelMax[RAWMESSENGER_MAXCAMNUM*RAWMESSENGER_MAXSCANNUM]; |
| | | |
| | | //����� ���� um[������ 2018/12/10] |
| | | double m_nAlignCcdTheta; |
| | | double m_nAlignCcdShitftX; |
| | | double m_nAlignCcdShitftY; |
| | | double m_nAlignPreTheta; |
| | | double m_nAlignPreShitftX; |
| | | double m_nAlignPreShitftY; |
| | | double m_nAlignBasicTheta; |
| | | double m_nAlignBasicShitftX; |
| | | double m_nAlignBasicShitftY; |
| | | char m_strAlignFirst[64]; |
| | | char m_strAlignSecond[64]; |
| | | // char m_strAlignPath[256]; |
| | | |
| | | //CSOT�� ���� ���� [������ 2018/12/5] |
| | | char m_strCassetteSequenceNo[16]; |
| | | char m_strOwnerCode[16]; //2. OWNER_CODE |
| | | char m_strOwnerType[16]; //3. OWNER_TYPE |
| | | |
| | | char m_strProcessID[21]; //5. PROCESS_ID |
| | | char m_strProductGroup[16]; //6. PRODUCT_GROUP |
| | | char m_strCSTID[16]; //8. CST_ID |
| | | char m_strPreProcessID[16]; //10.PRE_PROCESS_ID |
| | | char m_strPreEQPID[16]; //11.PRE_EQP_ID |
| | | char m_strPreChamerID[16]; //12.PRE_CHAMBER_ID |
| | | char m_strPreRecipeID[32]; //13.PRE_RECIPE_ID |
| | | char m_strGroupID[16]; //14.GROUP_ID |
| | | char m_cAutoSampleFlag; //15.AUTOSAMPLEFLAG |
| | | |
| | | // CPRJ�� ���� ���� |
| | | char m_strProdType[3]; |
| | | char m_strBatchID[13]; |
| | | char m_strPairHPanelID[13]; |
| | | char m_strGlassThickNess[2]; |
| | | char m_strCompCount[2]; |
| | | char m_strGlassState[2]; |
| | | char m_strInsFlag[2]; |
| | | char m_strPanelPosition[2]; |
| | | char m_strFlowHistory[2]; |
| | | char m_strCount1[2]; |
| | | char m_strCount2[2]; |
| | | |
| | | //Mura Data 0412 nwh |
| | | char m_strMaxAvgGray[12]; |
| | | char m_strMaxPortion[12]; |
| | | |
| | | |
| | | //1226NWH |
| | | char m_strReadingFlag[2]; |
| | | BYTE m_nUniqueID[4]; |
| | | int m_nSlot_No; |
| | | |
| | | BYTE m_nGlassDataBitSignal[4]; |
| | | bool m_bJob_end; |
| | | |
| | | //201217 CJH - ���� Defect Review ���� |
| | | int m_nReviewNum; |
| | | //201221 CJH - �Ľ��� Stack ��� |
| | | int m_nStackNum; |
| | | BOOL m_bStackRead; |
| | | |
| | | //210203 CJH - CutOff ��� ���� �� |
| | | int m_nCutOffDefectNum; |
| | | //210323 CJH - Server/Frame Shrink ���� �߰� |
| | | char m_strShrinked[6]; |
| | | //210326 CJH - RAW �Է� Defect ���� ���� ��뿩�� |
| | | BOOL m_bRawCutoff; |
| | | |
| | | }; |
| | | struct _grmBlockData |
| | | { |
| | | void clear() |
| | | { |
| | | memset(this, 0, sizeof(_grmBlockData)); |
| | | } |
| | | char m_strBlockID[16]; //1. BLOCK_ID |
| | | char m_cBlockJudgeAOI; //2. BLOCK_JUDGE_AOI |
| | | char m_cBlockJudgeATS; //4. BLOCK_JUDGE_ATS |
| | | char m_cBlockJudgeTEG; //5. BLOCK_JUDGE_TEG |
| | | int m_nGlassIdDCR; //22. GLASS_ID_DCR |
| | | }; |
| | | struct _grmCellData |
| | | { |
| | | void clear() |
| | | { |
| | | memset(this, 0, sizeof(_grmCellData)); |
| | | } |
| | | int getTotalDefectNum(){return m_nDefectNumTypeTB+m_nDefectNumTypeTW+m_nDefectNumTypeRB+m_nDefectNumTypeRW; }; |
| | | int m_nCellID; //1. PANEL_ID |
| | | short m_nModelIdx; // �� ��° ���ΰ�? |
| | | |
| | | char m_strCellName[32]; |
| | | int m_rectCellLeft; |
| | | int m_rectCellTop; |
| | | int m_rectCellRight; |
| | | int m_rectCellBottom; |
| | | |
| | | int/*Judgement*/ m_nJudgement; |
| | | int m_nJudgeFlag; |
| | | int m_nJudgeGlade; |
| | | |
| | | |
| | | //���� ���� ���� ���� |
| | | int m_nDefectNumSizeSmall; |
| | | int m_nDefectNumSizeMid; |
| | | int m_nDefectNumSizeLarge; |
| | | int m_nDefectNumSizeHuge; |
| | | int m_nDefectNumSizeUltra; |
| | | |
| | | int m_nDefectNumLocActive; |
| | | int m_nDefectNumLocPad; |
| | | int m_nDefectNumLocCrack; |
| | | int m_nDefectNumLocBM; |
| | | |
| | | int m_nDefectNumTypeTB; |
| | | int m_nDefectNumTypeTW; |
| | | int m_nDefectNumTypeRB; |
| | | int m_nDefectNumTypeRW; |
| | | int m_nDefectNumTypeMD; |
| | | int m_nDefectNumTypeCD; |
| | | int m_nDefectNumTypeMC; |
| | | |
| | | //Mura Data nwh 0404 |
| | | char m_strProImage[32]; |
| | | char m_strAvgGray_0[12]; |
| | | char m_strPortion_0[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_0[12]; |
| | | char m_strAvgAmp_0[12]; |
| | | char m_strFFTVar_0[12]; |
| | | char m_strFFTVah_0[12]; |
| | | char m_strFFTVaq_0[12]; |
| | | char m_strFFTPK_0[12]; |
| | | |
| | | char m_strAvgGray_1[12]; |
| | | char m_strPortion_1[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_1[12]; |
| | | char m_strAvgAmp_1[12]; |
| | | char m_strFFTVar_1[12]; |
| | | char m_strFFTVah_1[12]; |
| | | char m_strFFTVaq_1[12]; |
| | | char m_strFFTPK_1[12]; |
| | | |
| | | char m_strAvgGray_2[12]; |
| | | char m_strPortion_2[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_2[12]; |
| | | char m_strAvgAmp_2[12]; |
| | | char m_strFFTVar_2[12]; |
| | | char m_strFFTVah_2[12]; |
| | | char m_strFFTVaq_2[12]; |
| | | char m_strFFTPK_2[12]; |
| | | |
| | | char m_strAvgGray_3[12]; |
| | | char m_strPortion_3[12]; |
| | | //kyh Mura Data �߰� 0622 |
| | | char m_strCorner_Gray_3[12]; |
| | | char m_strAvgAmp_3[12]; |
| | | char m_strFFTVar_3[12]; |
| | | char m_strFFTVah_3[12]; |
| | | char m_strFFTVaq_3[12]; |
| | | char m_strFFTPK_3[12]; |
| | | |
| | | int m_nDefectNumJudgeOKWhite; |
| | | int m_nDefectNumJudgeOKBlack; |
| | | int m_nDefectNumJudgeNG; |
| | | int m_nDefectNumJudgeRW; |
| | | int m_nDefectNumJudgeRP; |
| | | int m_nDefectNumJudgeRV; |
| | | int m_nDefectNumJudgeTR; |
| | | int m_nDefectNumJudgePR; |
| | | |
| | | int m_nReflowResult[8]; // 0: Reflow X 1: Reflow OK 2: Reflow NG |
| | | |
| | | // Filtering�� Stack�� �� |
| | | int m_nDefectTDCount; |
| | | int m_nDefectSDCount; |
| | | int m_nDefectPDCount; |
| | | int m_nDefectSPCount; |
| | | |
| | | // Gate/Data �� ���� |
| | | int m_nGateNum; |
| | | int m_nDataNum; |
| | | |
| | | // 210129 CJH - Cell Origin ���� |
| | | int m_nCellXDir; |
| | | int m_nCellYDir; |
| | | }; |
| | | |
| | | struct _grmDefectReviewData |
| | | { |
| | | void clear() |
| | | { |
| | | memset(this, 0, sizeof(_grmDefectReviewData)); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //���⼠���� ���� ���� [������ 2019/1/19] |
| | | ditRaw::ReviewPlanType m_nPlanType ; |
| | | int m_nResultCode; //0:None, 1:Success |
| | | int m_nShotIndex; //���� ���� ���� [������ 2018/12/5] |
| | | int m_nModuleIndex; |
| | | int m_nMagnificIndex; |
| | | float m_fManification; |
| | | float m_fManificResoultion; |
| | | char m_strRevImageName[256]; |
| | | char m_strRevImagePath[256]; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Measure ���� |
| | | int m_nMeasure_Index; |
| | | int m_nMeasure_ResultCode; //0:None, 1:Success |
| | | float m_fMesure_ResultData[8]; // 0:Type, 1:ShiftX, 2:ShiftY |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // WSI���� |
| | | int m_nWsi_ResultCode; //0:None, 1:Success |
| | | int m_nWsi_Type; // �Ը� / ���� |
| | | float m_fWsi_ResultData[8]; // 0:Type, 1:Height(um), 2:Width |
| | | char m_strWsi_2DImageFilename[256]; |
| | | char m_strWsi_3DImageFilename[256]; |
| | | int m_nWsiReflowPositionIndex; // WsiReflowPositionIndex |
| | | int m_nWsi_pReflowResultData[8]; |
| | | double m_dWsi_DamDistance; |
| | | |
| | | double m_dWsiMmMotorX; // WSI ���� ��ǥ 20180223 HJH |
| | | double m_dWsiMmMotorY; |
| | | float m_fWsiManification; // WSI ���� |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Reflow ���� |
| | | int m_nReflow_Index; |
| | | int m_nReflow_ResultCode; //0:None, // ������ Line�� ����. 3 �̸� : DAM2 Reflow ����, 4~5 : DAM1 Reflow ����, 6 : no Reflow ���� / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side |
| | | float m_fReflow_LinePosData[8]; |
| | | int m_nReflow_Side; |
| | | int m_nReflow_InspectionMode; |
| | | }; |
| | | |
| | | struct _grmDefectData |
| | | { |
| | | void clear() |
| | | { |
| | | memset(this, 0, sizeof(_grmDefectData)); |
| | | } |
| | | |
| | | short m_nDefectID; |
| | | short m_nCameraID; |
| | | short m_nScanIdx; |
| | | //short m_nDefectIdx; // ī�޶󿡼��� ���� �ε��� |
| | | int m_nDefectIdx; // ī�޶󿡼��� ���� �ε��� 201207 CJH - �ڸ� �� ��ħ. int������ ���� |
| | | |
| | | int m_nPixelConv; // pixel ���� ��ǥ |
| | | int m_nPixelScan; // pixel ���� ��ǥ |
| | | |
| | | short m_nPixelSize; // ����ũ�� ---------------------------------PS |
| | | short/*SERVER_DefectType*/ m_DefectType; // ���� Ÿ�� ---------------------------------DT |
| | | short/*SERVER_DefectSubType*/ m_DefectSubType; // ������ ��������. |
| | | short/*SERVER_DefectBDType*/ m_DefectBDType; // ���� Ÿ�� - Bright, Dark, Both |
| | | |
| | | short m_sPixelWidth; // �ȼ����� ���� �ʺ� |
| | | short m_sPixelHeight; // �ȼ����� ���� ���� |
| | | short m_nLevelSrcMin; // ���� ��� Min -----------------------------SN |
| | | short m_nLevelSrcMax; // ���� ��� Max -----------------------------SX |
| | | short m_nLevelSrcAvg; // ���� ��� Avg -----------------------------SA |
| | | short m_nLevelRefMin; // �񱳴�� ��� Min -------------------------RN |
| | | short m_nLevelRefMax; // �񱳴�� ��� Max -------------------------RX |
| | | short m_nLevelRefAvg; // �񱳴�� ��� Avg -------------------------RA |
| | | short m_nLevelDiffMin; // ���� Min ---------------------------------DN |
| | | short m_nLevelDiffMax; // ���� Max ---------------------------------DX |
| | | short m_nLevelDiffAvg; // ���� Avg ---------------------------------DA |
| | | |
| | | int m_nDefectRScale; // �ȼ����� ���� ���� -------------------------RS |
| | | short m_sThreshold; // ������ ������ ���� Threshold |
| | | short m_sThresholdAvg; // ������ ������ ���� Threshold AVG |
| | | short m_sDefectPeak; // ������ Peak. |
| | | short m_sDefectLevel; // (DiffAvg - Th) BOE 8G ��û���� |
| | | |
| | | int m_nPixelGlassStart; // Glass ���� �ȼ� |
| | | short m_sDefectLoc; |
| | | |
| | | short m_sZoneClassPixelCount[16]; |
| | | short m_sZonePixelCount[16]; // Zone�� ���� Pixel �� |
| | | short m_sZoneValueMin[16]; // Zone�� ���� Min |
| | | short m_sZoneValueMax[16]; // Zone�� ���� Max |
| | | short m_sZoneValueAvg[16]; // Zone�� ���� Avg |
| | | short m_sZonePixelPercent[16]; // --------------------------------------Z0~ZF |
| | | |
| | | //210127 CJH - Zone�� Source Gray �Է� |
| | | short m_sZoneValueSrcMin[16]; // Zone�� Source Min |
| | | short m_sZoneValueSrcMax[16]; // Zone�� Source Max |
| | | short m_sZoneValueSrcAvg[16]; // Zone�� Source Avg |
| | | |
| | | int m_nUMOriginX; // um���� x��ǥ (��������) |
| | | int m_nUMOriginY; // um���� y��ǥ (��������) |
| | | int m_nUMCenterAlignX; // um���� X��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterAlignY; // um���� Y��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterX; // um���� X��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMCenterY; // um���� Y��ǥ (Glass Center ����, ����κ��� ��) |
| | | int m_nUMSizeX; // um���� X ũ�� -----------------------------UX |
| | | int m_nUMSizeY; // um���� Y ũ�� -----------------------------UY |
| | | int m_nUMSize; // um���� ũ��. |
| | | CRect m_RectUM; // ���� ���� ���� �簢��. |
| | | |
| | | short/*SERVER_DefectSizeType*/ m_DefectSizeType; // ���� ũ�� ����enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | short/*SERVER_DefectPeakType*/ m_DefectPeakType; // Peak�� ����. |
| | | short/*Judgement*/ m_DefectJudgement; // ���� ����. |
| | | BOOL m_bDefectCutoff; // �� ���� ����(TRUE= Cutoff, FALSE) |
| | | short/*MAP16_DefectClass*/ m_DefectClass; // BOE Defect Class 16��� ���� |
| | | int m_nPadRegionIdx; // PAD ���� ��� |
| | | |
| | | int m_nUMCellX; // �� ���� ���� x ��ǥ |
| | | int m_nUMCellY; // �� ���� ���� y ��ǥ |
| | | short m_nModelIdx; // �� ��° ���ΰ�? |
| | | short m_nCellIdx; // ���° ���ΰ�? |
| | | short m_nCellGate; // ���� Gate����(����� ���� ��) |
| | | short m_nCellData; // ���� Data����(����� ���� ��) |
| | | short m_nCellGateAlign; // ���� Gate����(����� ���� ��) |
| | | short m_nCellDataAlign; // ���� Data����(����� ���� ��) |
| | | |
| | | int m_nUMShotX; // �� ���� X��ǥ |
| | | int m_nUMShotY; // �� ���� Y��ǥ |
| | | short m_nMaskDefectIdx; // �� Glass���� �߰ߵ� ����ũ���� ������ �ε���. |
| | | short m_nShotIdx; // �뱤�� ��ȣ |
| | | short m_nMatchShotCount; // ������ ����ũ ������ ��. |
| | | short m_nMatchMaxSize; // ������ ����ũ �� ���� ū ������ ũ��. |
| | | |
| | | short m_nRepeatCount; // ���Ӱ��Թ߰����� ������ǥ �ݺ��� |
| | | short m_nMaskRepeatCount; |
| | | int m_StackInfo; // Stack Flag |
| | | BOOL m_bRealStack; // Stack ������ ���� TD(TRUE) ����, ���͸��� ���� TD(FALSE)������ �� �ִ�. |
| | | short m_nStackStepCount; // Stack �� |
| | | short m_nStackColorIdx; // Color�� �����ϴ� �ε���. |
| | | //CString m_strStackStep[CFDEFECT_STACKCOUNT]; // Stack Step. |
| | | char m_strStackFirst[60]; // Stack Step. //201221 CJH - �ִ� ������ 60bytes |
| | | char m_strUnitID[16]; // ���־��̵� |
| | | |
| | | int m_ClassificationType; // enum ClassificationType { ClassType_None= 0, ClassType_PI_Over= 1, ClassType_PI_Under= 2, ClassType_TFE_Circle= 3, ClassType_Bubble, ClassType_Scratch, ClassType_Particle}; Classification Type, PI�� TFE�� �߰� �з� �˰���� ���� ���. |
| | | int m_nAtomWidth; // TFE �� �ʺ� |
| | | int m_nAtomHeight; // TFE �� ���� |
| | | short/*ReKind*/ m_DefectKind; // ���� ���� |
| | | |
| | | char m_strDefectCode[32]; // Defect Code |
| | | BOOL m_bMergeState; // Merge Status |
| | | char m_strAoiImageName[256]; // Defect Image Name(CCD Image) |
| | | int m_nDefectMerge; // ���� ������ ���� ���� |
| | | |
| | | |
| | | int m_nPixelSizeOrigin; |
| | | int m_nScratchRatio; |
| | | int m_nDensity; // ���� ���� ������ ���� �е� [2017.8.2 bhs] |
| | | |
| | | char m_strDefectName[16]; |
| | | char m_strDefectType[16]; |
| | | |
| | | double m_dScanResolution; |
| | | double m_dConvResolution; |
| | | |
| | | int m_nAngle; // ���� |
| | | int m_nMajor; // ���� ����(Long) |
| | | int m_nMinor; // ���� ����(Short) |
| | | int m_nCompact; // Blob ������ �������� �ϴ� ���� ���̿� Blob ������ ���� |
| | | int m_nThickness; // Blob ���̿� ������ ���� (Area / Major) |
| | | |
| | | short m_nHliLevelIdx; // �� ��° ����(ä��)�ΰ�? |
| | | int m_nHliLayers; // �ش���Կ� ���Ե� ���̾� bitó�� |
| | | |
| | | BOOL m_bShrinked; //210323 CJH - Frame Shrink ���� �߰� |
| | | |
| | | char m_strAoiImagePath[255]; |
| | | char m_strReviewImagePath[255]; |
| | | |
| | | int m_nAlignRectLeft; |
| | | int m_nAlignRectTop; |
| | | int m_nAlignRectBottom; |
| | | int m_nAlignRectRight; |
| | | |
| | | |
| | | //���� ���� ���� [������ 2019/1/19] |
| | | _grmDefectReviewData m_ReviewDefect; |
| | | }; |
| | | |
| | | |
| | | enum emGlassRawCommand |
| | | { |
| | | grcNone = 0, |
| | | |
| | | //AOI Sequence |
| | | grcSequenceGlassLoading = 1, |
| | | grcSequenceInspectEnd = 2, |
| | | //Review Sequence |
| | | grcSequenceReviewStart = 3, |
| | | grcSequenceReviewEnd = 4, |
| | | |
| | | grcSequenceCustomReviewDataRead = 10, |
| | | |
| | | grcWriteRaw = 101, |
| | | grcReadRaw = 102, |
| | | |
| | | grcWriteBin = 201, |
| | | grcReadBin = 202, |
| | | |
| | | grcReviewWriteBIn = 301, |
| | | |
| | | grcGlassRawCommand |
| | | }; |
| | | |
| | | |
| | | struct _grmDitCommand |
| | | { |
| | | struct _grmCommand |
| | | { |
| | | int nCommand; |
| | | char strParam[256]; |
| | | short nResult; |
| | | }; |
| | | short m_nCommandIdxWrite; |
| | | short m_nCommandIdxRead; |
| | | _grmCommand m_nCommandBuffer[COMMAND_MAXCOUNT]; |
| | | }; |
| | | |
| | | struct _grmDitMemInfo |
| | | { |
| | | //���� �޸� ������ ���� ���� [������ 2018/11/12] |
| | | size_t m_nGlassRawDataSize; |
| | | int m_nGlassMaxDataNum; |
| | | int m_nBlockMaxDataNum; |
| | | int m_nCellMaxDataNum; |
| | | int m_nDefectMaxDataNum; |
| | | int m_nStackMaxDataNum; |
| | | |
| | | //Char ���� �ڷᰡ �ִ� ���� ��ġ [������ 2018/11/12] |
| | | int m_nGlassDataPoint; |
| | | int m_nBlockDataPoint; |
| | | int m_nCellDataPoint; |
| | | int m_nDefectDataPoint; |
| | | int m_nStackDataPoint; |
| | | |
| | | int m_nSizeOfGlassData; |
| | | int m_nSizeOfBlockData; |
| | | int m_nSizeOfCellData; |
| | | int m_nSizeOfDefectData; |
| | | int m_nSizeOfStackData; |
| | | }; |
| | | struct _grmDitGlassRawInfo : public _grmDitMemInfo, public _grmDitCommand |
| | | { |
| | | size_t m_nGlassLoadingCount; |
| | | emAOIProcStep m_ClientProcStep; //AOI, Review�� ���� ��� |
| | | emAOIProcStep m_ServerProcStep; //GlassRaw Messenger(Server)�� ó�� �Ϸ� �� ��� |
| | | }; |
| | | |
| | | class CgrmGlassRawData |
| | | { |
| | | public: |
| | | CgrmGlassRawData() |
| | | { |
| | | m_pGlassRawData = NULL; |
| | | m_bRefAlloc = FALSE; |
| | | }; |
| | | |
| | | ~CgrmGlassRawData() |
| | | { |
| | | clear(); |
| | | }; |
| | | |
| | | void clear() |
| | | { |
| | | if(m_bRefAlloc) { m_pGlassRawData = NULL; return;} |
| | | |
| | | if(m_pGlassRawData) |
| | | { |
| | | delete [] m_pGlassRawData; |
| | | m_pGlassRawData = NULL; |
| | | } |
| | | }; |
| | | BOOL ImportGlassRaw(_grmDitMemInfo* pInfo, char* pData, bool bRefAlloc = false) |
| | | { |
| | | if(pInfo == NULL) return FALSE; |
| | | |
| | | if(m_pGlassRawData && pInfo->m_nGlassRawDataSize != m_MemInfo.m_nGlassRawDataSize) clear(); |
| | | |
| | | if(m_pGlassRawData == NULL) m_pGlassRawData = new char[ pInfo->m_nGlassRawDataSize ]; |
| | | |
| | | m_MemInfo = *pInfo; |
| | | |
| | | m_nGlassRawDataSize = pInfo->m_nGlassRawDataSize; |
| | | |
| | | m_nGlassMaxDataNum = pInfo->m_nGlassMaxDataNum ; |
| | | m_nBlockMaxDataNum = pInfo->m_nBlockMaxDataNum ; |
| | | m_nCellMaxDataNum = pInfo->m_nCellMaxDataNum ; |
| | | m_nDefectMaxDataNum = pInfo->m_nDefectMaxDataNum; |
| | | m_nStackMaxDataNum = pInfo->m_nStackMaxDataNum ; |
| | | |
| | | m_nGlassDataPoint = pInfo->m_nGlassDataPoint ; |
| | | m_nBlockDataPoint = pInfo->m_nBlockDataPoint ; |
| | | m_nCellDataPoint = pInfo->m_nCellDataPoint ; |
| | | m_nDefectDataPoint = pInfo->m_nDefectDataPoint ; |
| | | m_nStackDataPoint = pInfo->m_nStackDataPoint ; |
| | | |
| | | m_nSizeOfGlassData = pInfo->m_nSizeOfGlassData ; |
| | | m_nSizeOfBlockData = pInfo->m_nBlockDataPoint ; |
| | | m_nSizeOfCellData = pInfo->m_nSizeOfCellData ; |
| | | m_nSizeOfDefectData = pInfo->m_nSizeOfDefectData; |
| | | m_nSizeOfStackData = pInfo->m_nSizeOfStackData ; |
| | | |
| | | if(bRefAlloc) |
| | | { |
| | | m_pGlassRawData = pData; |
| | | } |
| | | else |
| | | { |
| | | if(pData) |
| | | { |
| | | memcpy(m_pGlassRawData, pData, sizeof(char)*pInfo->m_nGlassRawDataSize); |
| | | } |
| | | else |
| | | { |
| | | memset(m_pGlassRawData, 0, sizeof(char)*pInfo->m_nGlassRawDataSize ); |
| | | } |
| | | } |
| | | |
| | | |
| | | m_pGlassData = (_grmGlassData*)&m_pGlassRawData[pInfo->m_nGlassDataPoint]; |
| | | m_pBlockData = (_grmBlockData*)&m_pGlassRawData[pInfo->m_nBlockDataPoint]; |
| | | m_pCellData = (_grmCellData*)&m_pGlassRawData[pInfo->m_nCellDataPoint]; |
| | | m_pDefectData = (_grmDefectData*)&m_pGlassRawData[pInfo->m_nDefectDataPoint]; |
| | | m_pStackData = (_grmDefectData*)&m_pGlassRawData[pInfo->m_nStackDataPoint]; |
| | | |
| | | m_bRefAlloc = bRefAlloc; |
| | | return TRUE; |
| | | }; |
| | | BOOL ExportGlassRaw(_grmDitMemInfo* pInfo, char* pData) |
| | | { |
| | | if(pInfo == NULL || pData == NULL) return FALSE; |
| | | |
| | | if(1) //new type //�޸� �� ���� ũ�⿡ ������� |
| | | { |
| | | //if(pInfo->m_nGlassRawDataSize != m_MemInfo.m_nGlassRawDataSize) return FALSE; |
| | | |
| | | if(pInfo->m_nSizeOfGlassData != m_MemInfo.m_nSizeOfGlassData) return FALSE; |
| | | if(pInfo->m_nSizeOfBlockData != m_MemInfo.m_nSizeOfBlockData) return FALSE; |
| | | if(pInfo->m_nSizeOfCellData != m_MemInfo.m_nSizeOfCellData) return FALSE; |
| | | if(pInfo->m_nSizeOfDefectData != m_MemInfo.m_nSizeOfDefectData) return FALSE; |
| | | if(pInfo->m_nSizeOfStackData != m_MemInfo.m_nSizeOfStackData) return FALSE; |
| | | |
| | | if(pInfo->m_nCellMaxDataNum < m_pGlassData->m_nCellNum) return FALSE; |
| | | if(pInfo->m_nDefectMaxDataNum < m_pGlassData->m_nDefectNum) return FALSE; |
| | | if(pInfo->m_nStackMaxDataNum < m_pGlassData->m_nDefectNum) return FALSE; |
| | | |
| | | memcpy(&pData[pInfo->m_nGlassDataPoint], m_pGlassData, pInfo->m_nSizeOfGlassData* 1); |
| | | memcpy(&pData[pInfo->m_nBlockDataPoint], m_pBlockData, pInfo->m_nSizeOfBlockData* 1); |
| | | memcpy(&pData[pInfo->m_nCellDataPoint], m_pCellData, pInfo->m_nSizeOfCellData*m_pGlassData->m_nCellNum); |
| | | memcpy(&pData[pInfo->m_nDefectDataPoint], m_pDefectData, pInfo->m_nSizeOfDefectData*m_pGlassData->m_nDefectNum); |
| | | memcpy(&pData[pInfo->m_nStackDataPoint], m_pStackData, pInfo->m_nSizeOfStackData*m_pGlassData->m_nDefectNum); |
| | | } |
| | | else //if() //type old |
| | | { |
| | | if(pInfo->m_nGlassRawDataSize != m_MemInfo.m_nGlassRawDataSize) return FALSE; |
| | | |
| | | if(pInfo->m_nSizeOfGlassData != m_MemInfo.m_nSizeOfGlassData) return FALSE; |
| | | if(pInfo->m_nSizeOfBlockData != m_MemInfo.m_nSizeOfBlockData) return FALSE; |
| | | if(pInfo->m_nSizeOfCellData != m_MemInfo.m_nSizeOfCellData) return FALSE; |
| | | if(pInfo->m_nSizeOfDefectData != m_MemInfo.m_nSizeOfDefectData) return FALSE; |
| | | |
| | | memcpy(pData, m_pGlassRawData, sizeof(char)*pInfo->m_nGlassRawDataSize); |
| | | } |
| | | |
| | | |
| | | return TRUE; |
| | | }; |
| | | |
| | | _grmGlassData* GetGlassData(){return m_pGlassData;}; |
| | | _grmBlockData* GetBlockData(int nIndex){return &m_pBlockData[nIndex];}; |
| | | _grmCellData* GetCellData(int nIndex){return &m_pCellData[nIndex];}; |
| | | _grmDefectData* GetDefectData(int nIndex){return &m_pDefectData[nIndex];}; |
| | | _grmDitMemInfo* GetMemInfo(){return &m_MemInfo;}; |
| | | _grmDefectData* GetStackData(int nIndex) { return &m_pStackData[nIndex]; }; |
| | | protected: |
| | | _grmDitMemInfo m_MemInfo; |
| | | char* m_pGlassRawData; |
| | | |
| | | _grmGlassData* m_pGlassData; |
| | | _grmBlockData* m_pBlockData; |
| | | _grmCellData* m_pCellData; |
| | | _grmDefectData* m_pDefectData; |
| | | _grmDefectData* m_pStackData; |
| | | |
| | | size_t m_nGlassRawDataSize; |
| | | |
| | | int m_nGlassMaxDataNum; |
| | | int m_nBlockMaxDataNum; |
| | | int m_nCellMaxDataNum; |
| | | int m_nDefectMaxDataNum; |
| | | int m_nStackMaxDataNum; |
| | | |
| | | int m_nGlassDataPoint; |
| | | int m_nBlockDataPoint; |
| | | int m_nCellDataPoint; |
| | | int m_nDefectDataPoint; |
| | | int m_nStackDataPoint; |
| | | |
| | | int m_nSizeOfGlassData; |
| | | int m_nSizeOfBlockData; |
| | | int m_nSizeOfCellData; |
| | | int m_nSizeOfDefectData; |
| | | int m_nSizeOfStackData; |
| | | |
| | | private: |
| | | bool m_bRefAlloc; |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawBase.h" |
| | | |
| | | #include "akLoggerExt.h" |
| | | |
| | | CGlassRawBase::CGlassRawBase(void) |
| | | { |
| | | } |
| | | |
| | | CGlassRawBase::~CGlassRawBase(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawBase::WriteBinFile( CgrmGlassRawData* pData ) |
| | | { |
| | | AKLOG("WriteBinFile Start"); |
| | | CString strFileName; |
| | | strFileName.Format("%s\\%s", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "wb"); |
| | | if(pf) |
| | | { |
| | | fwrite(pData->GetMemInfo(), sizeof(_grmDitMemInfo), 1, pf); |
| | | |
| | | fwrite(pData->GetGlassData(), pData->GetMemInfo()->m_nSizeOfGlassData, sizeof(char), pf); |
| | | |
| | | for(int i=0; i<pData->GetGlassData()->m_nCellNum; i++) |
| | | { |
| | | fwrite(pData->GetCellData(i), pData->GetMemInfo()->m_nSizeOfCellData, sizeof(char), pf); |
| | | } |
| | | |
| | | for(int i=0; i<pData->GetGlassData()->m_nDefectNum; i++) |
| | | { |
| | | fwrite(pData->GetDefectData(i), pData->GetMemInfo()->m_nSizeOfDefectData, sizeof(char), pf); |
| | | } |
| | | |
| | | fclose(pf); |
| | | } |
| | | else |
| | | { |
| | | AKLOG("WriteBinFile Fail"); |
| | | return FALSE; |
| | | } |
| | | AKLOG("WriteBinFile Finish"); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawBase::ReadBinFile( CgrmGlassRawData* pData ) |
| | | { |
| | | CString strFileName; |
| | | strFileName.Format("%s\\%s", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "rb"); |
| | | if(pf) |
| | | { |
| | | _grmDitMemInfo MemInfo; |
| | | fread(&MemInfo, sizeof(_grmDitMemInfo), 1, pf); |
| | | |
| | | //pData->ImportGlassRaw(pData->GetMemInfo(), NULL); |
| | | BOOL bFileFormDiff = FALSE; |
| | | bFileFormDiff = FALSE; |
| | | { |
| | | if(pData->GetMemInfo()->m_nSizeOfGlassData != MemInfo.m_nSizeOfGlassData) bFileFormDiff |= TRUE; |
| | | if(pData->GetMemInfo()->m_nSizeOfBlockData != MemInfo.m_nSizeOfBlockData) bFileFormDiff |= TRUE; |
| | | if(pData->GetMemInfo()->m_nSizeOfCellData != MemInfo.m_nSizeOfCellData) bFileFormDiff |= TRUE; |
| | | if(pData->GetMemInfo()->m_nSizeOfDefectData != MemInfo.m_nSizeOfDefectData) bFileFormDiff |= TRUE; |
| | | |
| | | //if(pData->m_nCellMaxDataNum < m_pGlassData->m_nCellNum) return FALSE; |
| | | //if(pData->m_nDefectMaxDataNum < m_pGlassData->m_nDefectNum) return FALSE; |
| | | |
| | | if(bFileFormDiff) {fclose(pf); return FALSE;} |
| | | } |
| | | |
| | | fread(pData->GetGlassData(), pData->GetMemInfo()->m_nSizeOfGlassData, sizeof(char), pf); |
| | | |
| | | bFileFormDiff = FALSE; |
| | | { |
| | | if(pData->GetMemInfo()->m_nCellMaxDataNum < pData->GetGlassData()->m_nCellNum) bFileFormDiff |= TRUE; |
| | | if(pData->GetMemInfo()->m_nDefectMaxDataNum < pData->GetGlassData()->m_nDefectNum) bFileFormDiff |= TRUE; |
| | | |
| | | if(bFileFormDiff) {fclose(pf); return FALSE;} |
| | | } |
| | | |
| | | for(int i=0; i<pData->GetGlassData()->m_nCellNum; i++) |
| | | { |
| | | fread(pData->GetCellData(i), pData->GetMemInfo()->m_nSizeOfCellData, sizeof(char), pf); |
| | | } |
| | | |
| | | for(int i=0; i<pData->GetGlassData()->m_nDefectNum; i++) |
| | | { |
| | | fread(pData->GetDefectData(i), pData->GetMemInfo()->m_nSizeOfDefectData, sizeof(char), pf); |
| | | } |
| | | |
| | | fclose(pf); |
| | | } |
| | | else |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawBase::ReviewWriteBin(CgrmGlassRawData* pData) |
| | | { |
| | | CString strFileName; |
| | | strFileName.Format("D:\\DIT_ResultData\\RawBin\\%s", pData->GetGlassData()->m_strFileName); |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "wb"); |
| | | if (pf) |
| | | { |
| | | fwrite(pData->GetMemInfo(), sizeof(_grmDitMemInfo), 1, pf); |
| | | |
| | | fwrite(pData->GetGlassData(), pData->GetMemInfo()->m_nSizeOfGlassData, sizeof(char), pf); |
| | | |
| | | for (int i = 0; i < pData->GetGlassData()->m_nCellNum; i++) |
| | | { |
| | | fwrite(pData->GetCellData(i), pData->GetMemInfo()->m_nSizeOfCellData, sizeof(char), pf); |
| | | } |
| | | |
| | | for (int i = 0; i < pData->GetGlassData()->m_nDefectNum; i++) |
| | | { |
| | | fwrite(pData->GetDefectData(i), pData->GetMemInfo()->m_nSizeOfDefectData, sizeof(char), pf); |
| | | } |
| | | |
| | | fclose(pf); |
| | | } |
| | | else |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "DitGlassRawStruct.h" |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Recipe���� Server�� Inspector�� �����ϴ� ��������. |
| | | enum ThreadCount { Thread_1 = 0, Thread_2, Thread_4, Thread_6, Thread_8, Thread_11, Thread_12, Thread_22, Thread_24 }; |
| | | enum CameraType { CamType_Unknown = 0, CamType_Transfer, CamType_Reflex }; |
| | | enum ScanCoordinate { SC_XCoord = 0, SC_YCoord }; // ��ĵ����. ���� ��ǥ ����� �߿�. |
| | | enum ScanDirectionEng { SD_Right2Left = 0, SD_Left2Right }; // �۾��ڰ� �� ��ĵ ����. |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass ���� Scan ����. |
| | | enum ScanType { ST_SingleScan = 0, ST_DualScan }; // SingleScan - �ܹ���, DualScan - ����� |
| | | enum GlassDirection { GD_LeftTop = 0, GD_RightTop = 1, GD_LeftBottom = 10, GD_RightBottom = 11 }; |
| | | enum AcqMode { Acq_Unknown = 0, Acq_Grab, Acq_Snap, Acq_Matrox, Acq_Simul }; |
| | | enum FindBoundary { FB_NotFind = 0, FB_PitchMatching, FB_ManualMatching }; |
| | | enum InspectionMethod { IM_Convolution = 0, IM_HProjection, IM_VProjection, IM_ImageMatching }; |
| | | enum DefectLocation { DefectLoc_Pattern = 0, DefectLoc_Crack, DefectLoc_BM, DefectLoc_ASG, DefectLoc_PAD, DefectLoc_C2C, DefectLoc_EdgeLine, DefectLoc_Proj, DefectLoc_Chip, DefectLoc_Corner }; |
| | | enum CellLineType { CellLine_Gate = 0, CellLine_Data }; |
| | | enum XByXType { OneByOne = 0, TwoByTwo }; |
| | | enum DefectFiltering { Filtering_NO = 0, Filtering_CO, Filtering_Cutoff, Filtering_DXDY, Filtering_TD, Filtering_FALSE }; // Filtering_CO : Cosmic Ray FALSE |
| | | enum ALIGN_MARK_CLASSIFY { eAMC_First = 0, eAMC_Second }; |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Defect�� ���Ǵ� Ÿ�Ե�. |
| | | enum SERVER_DefectType { DefectType_TBlack = 0, DefectType_TWhite, DefectType_RBlack, DefectType_RWhite, DefectType_BBlack, DefectType_BWhite, DefectType_Unknown }; |
| | | enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | enum SERVER_DefectJudgementType { JudgementType_OK = 0, JudgementType_TR, JudgementType_PR, JudgementType_UNKNOWN }; |
| | | enum SERVER_DefectSubType { DefectSubType_Normal = 0, DefectSubType_MC, DefectSubType_Mask, DefectSubType_Common, DefectSubType_NoDefect }; |
| | | enum SERVER_DefectBDType { DefectBDType_Unknown = 0, DefectBDType_Bright = 1, DefectBDType_Dark = 2, DefectBDType_Both = 64, DefectBDType_Both_B = 65 }; |
| | | enum SERVER_DefectPeakType { PeakType_Unknown = 0, PeakType_Low, PeakType_Center, PeakType_High, PeakType_OverHigh }; |
| | | enum StackInfo { Stack_Unknown = 0, Stack_TD, Stack_SD, Stack_PD, Stack_SP, Stack_CD }; // lmk 2012.12.21 CD (A2E CurrentData) |
| | | enum DefectShowOption { DefectShow_Type, DefectShow_StackFlag, DefectShow_StackStep, DefectShow_Size, DefectShow_Judgement, DefectShow_Code }; |
| | | |
| | | enum ClassificationType { ClassType_None = 0, ClassType_PI_Over = 1, ClassType_PI_Under = 2, ClassType_TFE_Circle = 3, ClassType_Bubble, ClassType_Scratch, ClassType_Particle }; |
| | | enum ReKind { Re_Other, Re_TFE_CIRCLE, Re_PI_CONVEX, Re_PI_CONCAVE, Re_PI_1, Re_PI_2, Re_PI_3 }; |
| | | |
| | | //choigudal jude fix 2012.03.07 |
| | | enum Judgement { Judge_OK = 0, Judge_RP, Judge_NG, Judge_TR, Judge_PR, Judge_PT, Judge_Review, Judge_RC, Judge_Size, Judge_VI, Judge_Rework, Judge_Unknown };//2016.07.13 LHS Judge_Size �߰� |
| | | enum MAP16_DefectClass { CLASS_C1 = 1, CLASS_C2, CLASS_C3, CLASS_C4, CLASS_C5, CLASS_C6, CLASS_C7, CLASS_C8, CLASS_C9, CLASS_C10, CLASS_C11, CLASS_C12, CLASS_C13, CLASS_C14, CLASS_C15, CLASS_C16 }; |
| | | enum MAP16_SizeType { SIZE_SS = 0, SIZE_SM, SIZE_SL, SIZE_SOH, SIZE_IDX_MAX }; |
| | | enum MAP16_PeakType { PEEK_PS = 0, PEEK_PL, PEEK_PH, PEEK_POH, PEAK_IDX_MAX }; |
| | | enum GlassCode_TSP { A_SET = 0, B_SET, C_SET, D_SET, MAX_SET };//2016.07.11 LHS |
| | | enum DefectShape { CIRCLE = 0, LINE };//2016.07.13 LHS |
| | | enum AAILightSource { TRANSLIGHT = 5, REFLIGHT, BACKLIGHT };//2016.07.12 LHS |
| | | |
| | | enum CAMTYPE { _eCT_Reflex = 0, _eCT_Transfer }; |
| | | |
| | | class CGlassRawBase |
| | | { |
| | | public: |
| | | CGlassRawBase(void); |
| | | virtual ~CGlassRawBase(void); |
| | | |
| | | static char* GetClassName(){return "Base";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL SequenceCustomizeReview(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | virtual BOOL WriteBinFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadBinFile(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL ReviewWriteBin(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | virtual BOOL SequenceFtpUpload(char* pRawFileName){return TRUE;}; |
| | | |
| | | virtual void NotifyUpdateOptionInfo(){}; |
| | | |
| | | |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawCEC.h" |
| | | #include "akLoggerExt.h" |
| | | |
| | | CGlassRawCEC::CGlassRawCEC(void) |
| | | { |
| | | } |
| | | |
| | | CGlassRawCEC::~CGlassRawCEC(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::SequenceGlassLoading( CgrmGlassRawData* pData ) |
| | | { |
| | | //ëì¤ì ì¤ííì¼ ì½ê¸° ì²ë¦¬ë ì¬ê¸°ì íê² íë©´ ì¢ìë¯ [ê¹íí 2018/11/14] |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::SequenceInspectEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | WriteAOIFile(pData); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::SequenceReviewStart( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::SequenceReviewEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | WriteAOIFile(pData); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCEC::WriteAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | BOOL bResult = TRUE; |
| | | |
| | | |
| | | bResult &= MakeAOIFile(pData); |
| | | bResult &= MakeAnaFile(pData); |
| | | |
| | | AKLOG("WriteAOIFile Complete"); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::MakeAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | CString strFilePathName; |
| | | strFilePathName.Format("%s\\%s", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) return FALSE; |
| | | |
| | | for(int iCell = 0; iCell < pData->GetGlassData()->m_nCellNum; iCell++) |
| | | { |
| | | _grmCellData* pCell = pData->GetCellData(iCell); |
| | | |
| | | fprintCell(pf, pCell); |
| | | } |
| | | |
| | | fprintf(pf, "<HEAD DEFECE> sdlkfjlsd sdlkflsdkjf sdlkfjslkdjf sldkfjsdf\n"); |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | |
| | | fprintDefect(pf, pDefect); |
| | | } |
| | | |
| | | AKLOG("MakeAOIFile Complete"); |
| | | fclose(pf); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCEC::MakeAnaFile( CgrmGlassRawData* pData ) |
| | | { |
| | | CString strFilePathName; |
| | | strFilePathName.Format("%s\\%sana", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | |
| | | AKLOG("MakeAnaFile Complete"); |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawCEC::fprintDefect( FILE* pf, _grmDefectData* pData ) |
| | | { |
| | | //defect pos |
| | | fprintf(pf, "%d ", pData->m_nUMCenterAlignX); //defect pos |
| | | |
| | | fprintf(pf, "%d ", pData->m_nUMCenterAlignX); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | |
| | | class CGlassRawCEC : public CGlassRawBase |
| | | { |
| | | public: |
| | | CGlassRawCEC(void); |
| | | ~CGlassRawCEC(void); |
| | | |
| | | static char* GetClassName(){return "CEC_PANDA";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | BOOL MakeAOIFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAnaFile(CgrmGlassRawData* pData); |
| | | |
| | | void fprintCell(FILE* pf, _grmCellData* pData){}; |
| | | void fprintDefect(FILE* pf, _grmDefectData* pData); |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawCPJT.h" |
| | | #include "akLoggerExt.h" |
| | | #include "MacroResultFile.h" |
| | | #include "akCore/akFileUtil.h" |
| | | #include "akGridData.h" |
| | | |
| | | //#include "AOIDefinitionType.h" |
| | | //#include "AOIDefinition.h" |
| | | |
| | | #define LOCAL_INDEX_PATH "D:\\DIT_ResultData\\Index\\" |
| | | #define LOCAL_REV_IMAGE_PATH "D:\\ResultData\\UploadImage\\" |
| | | #define LOCAL_AOI_IMAGE_PATH "D:\\Image\\Defect\\" |
| | | #define LOCAL_MURA_IMAGE_PATH "D:\\DIT_ResultData\\Mura\\IMG\\" |
| | | #define LOCAL_DEEP_PATH "D:\\DIT_ResultData\\Deeplearning\\" |
| | | |
| | | #define LOCAL_RTMS_INFO_PATH "D:\\RTMS_TEMP\\" |
| | | |
| | | #define LOCAL_RAWPATH_INFO_INI_PATH "D:\\ResultData\\" |
| | | #define RAWINFO_FILE_NAME "RESULT_INFO.ini" |
| | | |
| | | #define LOCAL_AOIRAWDFS_PATH "D:\\DIT_ResultData\\Raw" |
| | | #define LOCAL_AOIRAWBIN_PATH "D:\\DIT_ResultData\\RawBin" |
| | | #define NETWORK_AOIRAWDFS_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\Raw" |
| | | #define NETWORK_AOIRAWBIN_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\RawBin" |
| | | |
| | | #define NETWORK_AOIRAWFILE_SUB_PATH "\\\\126.100.100.1\\d\\Raw_im\\" |
| | | #define NETWORK_AOI_IMAGE_PATH "\\\\126.100.100.1\\d\\Image\\Defect\\" |
| | | //0404NWH |
| | | #define NETWORK_MURARAW_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\Mura\\RAW" //0405nwh |
| | | #define NETWORK_MURA_IMAGE_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\Mura\\IMG" //0405nwh |
| | | |
| | | char* g_pCellCode = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; |
| | | |
| | | void _TimeDelay(int delay) |
| | | { |
| | | MSG msg; |
| | | BOOL fRst = FALSE; |
| | | |
| | | clock_t lBlockTime = delay + clock(); |
| | | |
| | | while (lBlockTime > clock()) |
| | | { |
| | | fRst = (BOOL)PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); |
| | | if (fRst) |
| | | { |
| | | TranslateMessage(&msg); |
| | | DispatchMessage(&msg); |
| | | } |
| | | Sleep(10); |
| | | } |
| | | } |
| | | |
| | | CGlassRawCPJT::CGlassRawCPJT(void) |
| | | { |
| | | CreateDirectory("D:\\RTMS_Signal", NULL); |
| | | CreateDirectory(LOCAL_AOIRAWDFS_PATH, NULL); |
| | | CreateDirectory(LOCAL_AOIRAWBIN_PATH, NULL); |
| | | CreateDirectory("D:\\Raw_im", NULL); |
| | | m_MuraResultFile.readOptionFile("C:\\DIT_Review\\ReviewServerConfig\\MacroInfo.cfg"); |
| | | |
| | | m_GlassRawRTMS.SetMuraResult(&m_MuraResultFile); |
| | | m_nWriteRawDefectIdx = 1; |
| | | m_bReviewEndCheck = FALSE; |
| | | } |
| | | |
| | | CGlassRawCPJT::~CGlassRawCPJT(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::SequenceGlassLoading( CgrmGlassRawData* pData ) |
| | | { |
| | | //ì¤íê¸°ë¥ |
| | | if(m_StackResult.getStackUse()) |
| | | { |
| | | //201218 CJH - Stack Download ìë |
| | | SendMessageFTPDownloadStack(pData->GetGlassData()); |
| | | |
| | | m_StackResult.StackFileReadStart(pData->GetGlassData()->m_strGlassID); |
| | | } |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::SequenceInspectEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_bReviewEndCheck = FALSE; |
| | | //210128 |
| | | m_tmReviewEnd = m_tmReviewStart = CTime::GetCurrentTime(); |
| | | pData->GetGlassData()->m_tmReviewEnd = m_tmReviewEnd; // Insp End ì Raw ì
ë¡ëë¡, E_TIME, LD_TIME ì
ë ¥ [ 21-03-18 KJG ] |
| | | m_tmFileCreateTime = CTime::GetCurrentTime(); |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | { |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | CTime CurrTime = pGlassData->m_tmGlassLoading; |
| | | CString strTime=_T(""), strFileName=_T(""); |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.bin", pGlassData->m_strGlassID, pGlassData->m_strStepID, strTime.GetBuffer(0)); |
| | | |
| | | strcpy(pData->GetGlassData()->m_strFileName, strFileName.GetBuffer(0)); |
| | | } |
| | | strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | |
| | | if(!WriteBinFile(pData)) |
| | | return FALSE; |
| | | |
| | | |
| | | if (1) ReadMuraFile(pData); |
| | | |
| | | |
| | | if (WriteAOIFile(pData) == FALSE) |
| | | return FALSE; |
| | | |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | _TimeDelay(5000); // ì´ë¯¸ì§ ë³µì¬ ìê° ë기 |
| | | //210218 CJH - ê²ì¬ ì¢
ë£ì ê²°ê³¼íì¼ ë° CCD Image ì
ë¡ë |
| | | SendMessageFTPUploadRaw(pData->GetGlassData()); |
| | | SendMessageFTPUploadImage(pData->GetGlassData(), FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pData->GetGlassData(), FTPCMD_MURA_IMAGE);//0405nwh |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::SequenceReviewStart( CgrmGlassRawData* pData ) |
| | | { |
| | | //210128 |
| | | m_tmReviewStart = m_tmReviewEnd = CTime::GetCurrentTime(); |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | strcpy(pData->GetGlassData()->m_strPath, NETWORK_AOIRAWBIN_PATH); |
| | | |
| | | //strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | CString strFindFile; |
| | | int nCloseTime = 600*100000;//sec |
| | | int nReTryTime = 30; |
| | | { |
| | | CTime tmReviewLoading = CTime::GetCurrentTime(); |
| | | CString strWild; |
| | | |
| | | strWild.Format("%s\\%s_%s_*.bin", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strGlassID,pData->GetGlassData()->m_strStepID); |
| | | CakFileUtil akFileFinder; |
| | | while(nReTryTime--) |
| | | { |
| | | akFileFinder.FindFile(strWild.GetBuffer(0), FALSE); |
| | | VECFINDDATA* pFindData = akFileFinder.getFindData(); |
| | | int nFileNamePos = strlen(akFileFinder.getProcessPath()); |
| | | std::map<LONGLONG, CString> mapSpanFileName; |
| | | for(int i=0; i<pFindData->size(); i++) |
| | | { |
| | | char* pFileName = &((*pFindData)[i]).name[nFileNamePos]; |
| | | { |
| | | CakParser parser; |
| | | parser.process(pFileName, "_."); |
| | | if(parser.getTokNum() < 4) continue; |
| | | |
| | | int nDataTime[8]={}; |
| | | { |
| | | int nTokIndex=0; |
| | | const char* pGlassId = parser.getTokStr(nTokIndex++); |
| | | const char* pStepId = parser.getTokStr(nTokIndex++); |
| | | char* pDate = &pFileName[parser.getTokPos(nTokIndex++)]; |
| | | char* pTime = &pFileName[parser.getTokPos(nTokIndex++)]; |
| | | |
| | | nDataTime[0] = (pDate[0]-'0')*1000 + (pDate[1]-'0')*100 + (pDate[2]-'0')*10+ (pDate[3]-'0')*1; |
| | | nDataTime[1] = (pDate[4]-'0')*10+ (pDate[5]-'0')*1; |
| | | nDataTime[2] = (pDate[6]-'0')*10+ (pDate[7]-'0')*1; |
| | | nDataTime[3] = (pTime[0]-'0')*10+ (pTime[1]-'0')*1; |
| | | nDataTime[4] = (pTime[2]-'0')*10+ (pTime[3]-'0')*1; |
| | | nDataTime[5] = (pTime[4]-'0')*10+ (pTime[5]-'0')*1; |
| | | } |
| | | |
| | | CTime tmTemp(nDataTime[0], nDataTime[1], nDataTime[2], nDataTime[3], nDataTime[4], nDataTime[5] ); |
| | | CTimeSpan tmSpan = tmReviewLoading-tmTemp; |
| | | mapSpanFileName.insert(std::make_pair(tmSpan.GetTotalSeconds(), pFileName)); |
| | | } |
| | | } |
| | | |
| | | if(mapSpanFileName.empty() == FALSE) |
| | | { |
| | | if(mapSpanFileName.begin()->first < nCloseTime) |
| | | { |
| | | //ê°ì¥ ìµê·¼ ê²°ê³¼íì¼ ì°¾ê¸° ì±ê³µ [ê¹íí 2019/7/17] |
| | | strFindFile = mapSpanFileName.begin()->second; |
| | | break; |
| | | } |
| | | } |
| | | akFileFinder.clear(); |
| | | Sleep(100); |
| | | } |
| | | } |
| | | |
| | | if(strFindFile.IsEmpty()) return FALSE; |
| | | |
| | | strcpy(pData->GetGlassData()->m_strFileName, strFindFile.GetBuffer(0)); |
| | | |
| | | |
| | | if(!ReadBinFile(pData)) |
| | | return FALSE; |
| | | |
| | | strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | pData->GetGlassData()->m_tmReviewLoading = m_tmReviewStart; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCPJT::SequenceReviewEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_bReviewEndCheck = TRUE; |
| | | m_tmReviewEnd = m_tmReviewStart = CTime::GetCurrentTime(); |
| | | m_tmFileCreateTime = CTime::GetCurrentTime(); |
| | | pData->GetGlassData()->m_tmReviewEnd = m_tmReviewEnd; |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | strcpy(pData->GetGlassData()->m_strPath, NETWORK_AOIRAWDFS_PATH); |
| | | |
| | | if(1) ReadMuraFile(pData); |
| | | |
| | | if(WriteAOIFile(pData) == FALSE) |
| | | return FALSE; |
| | | |
| | | //210126 CJH - Review Endììë§ RTMS ê²°ê³¼íì¼ ìì±íëë¡ ë³ê²½ |
| | | if (m_GlassRawRTMS.WriteAOIFile(pData) == FALSE) |
| | | return FALSE; |
| | | |
| | | if(1) |
| | | { |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_MURA_IMAGE);//0405nwh |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::SequenceFtpUpload(char* pRawFilePathName) |
| | | { |
| | | // Manual Upload ê¸°ë¥ [21-02-05 KJG] |
| | | CTime tmFileCreate; |
| | | _grmGlassData GlassData; |
| | | _grmGlassData* pGlassData = &GlassData; |
| | | |
| | | //ì ë³´ ì»ì´ì¤ê¸° [ê¹íí 2019/1/25] |
| | | char* pFileName = CakFileUtil::getFileName(pRawFilePathName); |
| | | char* pext = CakFileUtil::getFileExt(pRawFilePathName); |
| | | |
| | | if (!strcmp(pext, "") == FALSE) return FALSE; // íì¥ìê° ìì |
| | | |
| | | CakParser parser; |
| | | FILE* pf = fopen(pRawFilePathName, "r"); |
| | | if (pf) |
| | | { |
| | | CString strParse, strLDTime; |
| | | char buffer[512]; |
| | | fgets(buffer, 512, pf); |
| | | fgets(buffer, 512, pf); |
| | | fgets(buffer, 512, pf); |
| | | fgets(buffer, 512, pf); |
| | | parser.process(buffer, " "); |
| | | |
| | | if (parser.getTokNum() < 20) return FALSE; |
| | | strParse = parser.getTokStr(0); |
| | | if (strParse != "DATA") return FALSE; |
| | | strParse = parser.getTokStr(1); |
| | | if (strParse != "PANEL") return FALSE; |
| | | |
| | | strcpy(pGlassData->m_strProcessID, ""); |
| | | strcpy(pGlassData->m_strProductID, ""); |
| | | strcpy(pGlassData->m_strLotID, ""); |
| | | strcpy(pGlassData->m_strStepID, ""); |
| | | strcpy(pGlassData->m_strGlassID, ""); |
| | | |
| | | strcpy(pGlassData->m_strProcessID, parser.getTokStr(4)); |
| | | strcpy(pGlassData->m_strProductID, parser.getTokStr(5)); |
| | | strcpy(pGlassData->m_strLotID, parser.getTokStr(5)); // C-PJT - m_strLotID = m_strProductID |
| | | strcpy(pGlassData->m_strStepID, parser.getTokStr(6)); |
| | | strcpy(pGlassData->m_strGlassID, parser.getTokStr(9)); |
| | | strLDTime = parser.getTokStr(19); |
| | | |
| | | if (pGlassData->m_strProcessID == "" || pGlassData->m_strProductID == "" || pGlassData->m_strLotID == "" || pGlassData->m_strStepID == "" || pGlassData->m_strGlassID == "") |
| | | { |
| | | AKLOG("Manual Upload Fail : Parsing Data is Empty"); |
| | | return FALSE; |
| | | } |
| | | int nYear = _ttoi(strLDTime.Left(4)); |
| | | int nMon = _ttoi(strLDTime.Mid(4, 2)); |
| | | int nDay = _ttoi(strLDTime.Mid(6, 2)); |
| | | int nHour = _ttoi(strLDTime.Mid(8, 2)); |
| | | int nMin = _ttoi(strLDTime.Mid(10, 2)); |
| | | int nSec = _ttoi(strLDTime.Mid(12, 2)); |
| | | pGlassData->m_tmGlassLoading = CTime(nYear, nMon, nDay, nHour, nMin, nSec); |
| | | |
| | | m_tmFileCreateTime = CTime::GetCurrentTime(); |
| | | strcpy(pGlassData->m_strPath, NETWORK_AOIRAWDFS_PATH); |
| | | |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | AKLOG("Manual Success : %s File Send FTPUploader Command", pRawFilePathName); |
| | | |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Manual Upload Fail : Can't Open File"); |
| | | return FALSE; |
| | | } |
| | | |
| | | fclose(pf); |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCPJT::WriteAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | BOOL bResult = TRUE; |
| | | |
| | | bResult &= MakeAOIFile(pData); |
| | | |
| | | m_GlassRawAna.MakeAnaFile(pData); |
| | | //m_GlassRawRTMS.WriteAOIFile(pData); |
| | | |
| | | AKLOG("WriteAOIFile Complete"); |
| | | return bResult; |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::MakeAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | AKLOG("MakeAOIFile Start"); |
| | | m_nWriteRawDefectIdx = 1; |
| | | |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | CString strFilePathName; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmReviewEnd; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s", pGlass->m_strGlassID); // ì 기ë íë¡ ìì² íì¥ì ìì |
| | | } |
| | | |
| | | strFilePathName.Format("%s\\%s", pGlass->m_strPath, strFileName);//pGlass->m_strFileName); |
| | | //strFilePathName.Format("C:\\AOIServer\\NFS\\RAW\\%s", pData->GetGlassData()->m_strFileName); |
| | | |
| | | // ê¸ë¼ì¤ IDë§ ì¡´ì¬íì¬ ì¬ê²ì¬ ì íì¼ ìì± ì¤í¨. ìì íë¤ |
| | | DeleteFile(strFilePathName); |
| | | //FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | |
| | | CString strBuffer; |
| | | CString strLine; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //HEDER ITEM |
| | | { |
| | | makeDataHeader(strLine, pGlass); |
| | | fprintf(pf, "%s\n", strLine.GetBuffer(0)); |
| | | } |
| | | |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //GLASSDATA |
| | | { |
| | | makeDataGlass(strLine, pGlass); |
| | | fprintf(pf, "%s\n", strLine.GetBuffer(0)); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //CELL & DEFECT DATA |
| | | { |
| | | |
| | | //make |
| | | { |
| | | for (int iCell = 0; iCell < pData->GetGlassData()->m_nCellNum; iCell++) |
| | | { |
| | | _grmCellData* pCell = pData->GetCellData(iCell); |
| | | makeDataCell(strLine, pData, pCell); |
| | | fprintf(pf, "%s\n", strLine); |
| | | |
| | | for (int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if (pDefect->m_nCellIdx != iCell) continue; |
| | | //210203 CJH - CutOff ëì ê²°ê³¼íì¼ ìì± ì ì¸ |
| | | if (pDefect->m_bDefectCutoff == TRUE) continue; |
| | | |
| | | if (makeDataDefect(strLine, pData, pDefect)) |
| | | { |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | AKLOG("MakeAOIFile Complete : [%s]", strFilePathName.GetBuffer(0)); |
| | | fclose(pf); |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawCPJT::makeDataHeader( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | |
| | | strValue = "ITEM PANEL MODULETYPE MODULEID PROCESSID PRODUCTID STEPID PROD_TYPE BATCHID H_PANELID E_PANELID P_PANELID OPERID COMP_COUNT PPID GRADE CODE R_GRADE MAP_IMAGE L_TIME U_TIME S_TIME E_TIME T_DEFECT TR PR TB TW RB RW T_STACK MAX_AVG_GRAY MAX_PORTION OK_CELL RJ_CELL RW_CELL NR_CELL CSTID SLOT_NO JOB_END TD_DEFECT SD_DEFECT PD_DEFECT SP_DEFECT PAD_GATE PAD_DATA M_DEFECT C_DEFECT BR_DEFECT IMG_COUNT RECIPE SHRINK RAW_CUT"; //53ea |
| | | strLine += strValue; strLine += "\n"; |
| | | strValue = "ITEM SUBPANEL SUBPANELID COORD_X COORD_Y SIZE_X SIZE_Y GATELINE DATALINE GRADE CODE R_GRADE T_DEFECT TD_DEFECT SD_DEFECT PD_DEFECT SP_DEFECT PAD_GATE PAD_DATA M_DEFECT C_DEFECT PRO_IMAGE AVG_GRAY_0 PORTION_0 CORNER_GRAY_0 AVG_AMP_0 FFT_VAR_0 FFT_VAH_0 FFT_VAQ_0 FFT_PK_0 AVG_GRAY_1 PORTION_1 CORNER_GRAY_1 AVG_AMP_1 FFT_VAR_1 FFT_VAH_1 FFT_VAQ_1 FFT_PK_1 AVG_GRAY_2 PORTION_2 CORNER_GRAY_2 AVG_AMP_2 FFT_VAR_2 FFT_VAH_2 FFT_VAQ_2 FFT_PK_2 AVG_GRAY_3 PORTION_3 CORNER_GRAY_3 AVG_AMP_3 FFT_VAR_3 FFT_VAH_3 FFT_VAQ_3 FFT_PK_3"; //54ea 21-06-21 Mura Data ì¶ê° |
| | | strLine += strValue; strLine += "\n"; |
| | | //210405 |
| | | //ITEM DEFECT ID DEF_NO COORD_X COORD_Y GATELINE DATALINE SIZE_S SIZE_W SIZE_L SIZE_H GRADE CODE STACK_FLAG STACK_COUNT STACK_STEP IMAGE_FILE DSC_CODE VC_CODE DCR_CODE DEFECT_SIZE REPEAT_DEFECT WSI_HEIGHT CS_HEIGHT C_GRADE GRAY_MIN GRAY_MAX GRAY_AVG GRAY_DEF WSI_IMAGE USE_CCDIMAGE SCAN_NUM CAM_POSITION CCD_NO R_GRAY_MIN R_GRAY_MAX R_GRAY_AVG SCAN_AI REVIEW_AI INS_MODE INS_CHANNEL COMPACTNESS THICKNESS MAJOR MINOR WSI_TYPE DEFECT_TYPE SHRINK |
| | | strValue = "ITEM DEFECT ID DEF_NO COORD_X COORD_Y GATELINE DATALINE SIZE_S SIZE_W SIZE_L SIZE_H GRADE CODE STACK_FLAG STACK_COUNT STACK_STEP IMAGE_FILE DSC_CODE VC_CODE DCR_CODE DEFECT_SIZE REPEAT_DEFECT WSI_HEIGHT CS_HEIGHT C_GRADE GRAY_MIN GRAY_MAX GRAY_AVG GRAY_DEF WSI_IMAGE USE_CCDIMAGE SCAN_NUM CAM_POSITION CCD_NO R_GRAY_MIN R_GRAY_MAX R_GRAY_AVG R_HEIGHT G_HEIGHT B_HEIGHT INS_CHANNEL COMPACTNESS THICKNESS MAJOR MINOR WSI_TYPE DEFECT_TYPE SHRINK CLASS_CODE"; //50ea |
| | | strLine += strValue; |
| | | |
| | | } |
| | | #define SPRINTRAWSTART char strItemValue[1024];int nItemValueLen, nItemValuePos = 0;memset(strItemValue, ' ', sizeof(char)*1024) |
| | | #define SPRINTRAW(ITEMSIZE, fmt, ...) nItemValueLen = sprintf(strItemValue+nItemValuePos, fmt,##__VA_ARGS__); strItemValue[nItemValuePos+ nItemValueLen] = ' ';nItemValuePos+=ITEMSIZE+1 |
| | | #define SPRINTRAWEND strItemValue[nItemValuePos - 1] = 0; strLine = strItemValue |
| | | void CGlassRawCPJT::makeDataGlass( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | SPRINTRAWSTART; |
| | | |
| | | CString strValue; |
| | | |
| | | /* PANEL ITEM |
| | | 01 4 ITEM // ITEM Separator |
| | | 02 5 PANEL // PANEL Separator |
| | | 03 5 MODULETYPE // Module Type |
| | | 04 27 MODULEID // Module ID |
| | | 05 20 PROCESSID // ProcessID |
| | | 06 20 PRODUCTID // ProductID |
| | | 07 10 STEPID // StepID |
| | | 08 2 PROD_TYPE // Prod Type |
| | | 09 12 BATCHID // Batch ID |
| | | 10 12 H_PANELID // Host Panel ID |
| | | 11 12 E_PANELID // Panel ID Reading by VCR |
| | | 12 12 P_PANELID // Pair Panel ID |
| | | 13 16 OPERID // Perator ID or Module ID |
| | | 14 3 COMP_COUNT // Cell Count |
| | | 15 16 PPID // PPID (Recipe Name) |
| | | 16 4 GRADE // Grade (Judgement) |
| | | 17 4 CODE // Grade Code (Judgement Code) |
| | | 18 4 R_GRADE // Grade by Operator (Re-Judgement) |
| | | 19 16 MAP_IMAGE // Map Image File Name |
| | | 20 14 L_TIME // Cassette or Conveyorìì OUTë ìê° |
| | | 21 14 U_TIME // Cassette or Conveyorìì INë ìê° |
| | | 22 14 S_TIME // Stageìì ê²ì¬/ê³ì¸¡ ììë ìê° |
| | | 23 14 E_TIME // Stageìì ê²ì¬/ê³ì¸¡ ì¢
ë£ë ìê° |
| | | 24 12 T_DEFECT // Common Item 1 - Total Defect Count |
| | | 25 12 TR // Panel ì ë³´ 02 |
| | | 26 12 PR // Panel ì ë³´ 03 |
| | | 27 12 TB // Panel ì ë³´ 04 |
| | | 28 12 TW // Panel ì ë³´ 05 |
| | | 29 12 RB // Panel ì ë³´ 06 |
| | | 30 12 RW // Panel ì ë³´ 07 |
| | | 31 12 T_STACK // SD+SP ì |
| | | 32 12 BMDF // Panel ì ë³´ 09 -> ë³ê²½ MAX_AVG_GRAY 04/12 |
| | | 33 12 CJ // Panel ì ë³´ 10 -> ë³ê²½ MAX_PORTION 04/12 |
| | | 34 12 OK_CELL // OK Cell Count |
| | | 35 12 RJ_CELL // RJ Cell Count |
| | | 36 12 RW_CELL // RW Cell Count |
| | | 37 12 NR_CELL // NR Cell Count |
| | | 38 12 MASK_CELL // MASK Cell Count - CST ID |
| | | 39 12 A_CELL // ì´ì Cell Count - SLOT NO |
| | | 40 12 P_CELL // Pattern Shift Cell Count - JOB END |
| | | 41 12 TD_DEFECT // Total Defect Count -> TD Defect Count |
| | | 42 12 SD_DEFECT // SD Defect Count |
| | | 43 12 PD_DEFECT // PD Defect Count |
| | | 44 12 SP_DEFECT // SP Defect Count |
| | | 45 12 PAD_GATE // PAD Gate ë¶ë ì |
| | | 46 12 PAD_DATA // PAD Data ë¶ë ì |
| | | 47 12 M_DEFECT // MASK ë¶ë ì |
| | | 48 12 C_DEFECT // COMMON ë¶ë |
| | | 49 12 BR_DEFECT // SCRATCH ë¶ë ì |
| | | 50 12 CRACK // Crack ë¶ë ì - Image ì´¬ì ê°¯ì |
| | | 51 12 P_SHIFT // Pattern Shift ë¶ë ì - ë ìí¼ ì´ë¦ |
| | | */ |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // [ê¹íí2020/9/15] |
| | | // SPRINTRAW(ë°ì´í° í¬ê¸°, "VALUE"); |
| | | |
| | | // 01 4 ITEM // ITEM Separator |
| | | SPRINTRAW(4, "DATA"); |
| | | // 02 5 PANEL // PANEL Separator |
| | | SPRINTRAW(5, "PANEL"); |
| | | // 03 5 MODULETYPE // Module Type |
| | | /*SPRINTRAW(5, "*");*/ |
| | | if (strlen(pGlassData->m_strEquipID) == 0) |
| | | { |
| | | SPRINTRAW(5, "*"); |
| | | } |
| | | else |
| | | { |
| | | CString temp = pGlassData->m_strEquipID; |
| | | SPRINTRAW(5, "%s", temp.Left(5)); |
| | | } |
| | | // 04 27 MODULEID // Module ID |
| | | if (strlen(pGlassData->m_strOperID) == 0) |
| | | { |
| | | SPRINTRAW(27, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(27, "%s", pGlassData->m_strOperID); |
| | | } |
| | | // 05 20 PROCESSID // ProcessID |
| | | if (strlen(pGlassData->m_strProcessID) == 0) |
| | | { |
| | | SPRINTRAW(20, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(20, "%s", pGlassData->m_strProcessID); |
| | | } |
| | | // 06 20 PRODUCTID // ProductID |
| | | if (strlen(pGlassData->m_strProductID) == 0) |
| | | { |
| | | SPRINTRAW(20, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(20, "%s", pGlassData->m_strProductID); |
| | | } |
| | | // 07 10 STEPID // StepID |
| | | if (strlen(pGlassData->m_strStepID) == 0) |
| | | { |
| | | SPRINTRAW(10, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(10, "%s", pGlassData->m_strStepID); |
| | | } |
| | | // 08 2 PROD_TYPE // Prod Type |
| | | if (strlen(pGlassData->m_strProdType) == 0) |
| | | { |
| | | SPRINTRAW(2, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(2, "%s", pGlassData->m_strProdType); |
| | | } |
| | | // 09 12 BATCHID // Batch ID - Glass ID ì 6ì리 |
| | | strValue = pGlassData->m_strGlassID; |
| | | SPRINTRAW(12, "%s", strValue.Left(6)); |
| | | // 10 12 H_PANELID // Host Panel ID |
| | | if (strlen(pGlassData->m_strGlassID) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strGlassID); |
| | | } |
| | | // 11 12 E_PANELID // Panel ID Reading by VCR |
| | | if (strlen(pGlassData->m_strEPPID) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strEPPID); |
| | | } |
| | | // 12 12 P_PANELID // Pair Panel ID |
| | | if (strlen(pGlassData->m_strPairHPanelID) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strPairHPanelID); |
| | | } |
| | | // 13 16 OPERID // Perator ID or Module ID |
| | | if (strlen(pGlassData->m_strOperID) == 0) |
| | | { |
| | | SPRINTRAW(16, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(16, "%s", pGlassData->m_strOperID); |
| | | } |
| | | // 14 3 COMP_COUNT // Cell Count |
| | | SPRINTRAW(3, "%d", pGlassData->m_nCellNum); |
| | | // 15 16 PPID // PPID (Recipe Name) |
| | | if (strlen(pGlassData->m_strPPID) == 0) |
| | | { |
| | | SPRINTRAW(16, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(16, "%s", pGlassData->m_strPPID); |
| | | } |
| | | // 16 4 GRADE // Grade (Judgement) |
| | | if (strlen(pGlassData->m_strGlassJudge) == 0) |
| | | { |
| | | SPRINTRAW(4, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(4, "%s", pGlassData->m_strGlassJudge); |
| | | } |
| | | // 17 4 CODE // Grade Code (Judgement Code) |
| | | if (strlen(pGlassData->m_strGlassCode) == 0) |
| | | { |
| | | SPRINTRAW(4, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(4, "%s", pGlassData->m_strGlassCode); |
| | | } |
| | | // 18 4 R_GRADE // Grade by Operator (Re-Judgement) |
| | | SPRINTRAW(4, "*"); |
| | | // 19 16 MAP_IMAGE // Map Image File Name |
| | | // if (strlen(pGlassData->m_strFileName) == 0) |
| | | // { |
| | | // SPRINTRAW(16, "*"); |
| | | // } |
| | | // else |
| | | // { |
| | | // SPRINTRAW(16, "%s", pGlassData->m_strFileName); |
| | | // } |
| | | SPRINTRAW(16, "map01.jpg"); //Defect Map ì릿ìê° 20ìë¦¬ê° ëëë¤.. |
| | | // 20 14 L_TIME // Cassette or Conveyorìì OUTë ìê° |
| | | strValue.Format("%04d%02d%02d%02d%02d%02d" // START_TIME |
| | | , pGlassData->m_tmGlassLoading.GetYear() |
| | | , pGlassData->m_tmGlassLoading.GetMonth() |
| | | , pGlassData->m_tmGlassLoading.GetDay() |
| | | , pGlassData->m_tmGlassLoading.GetHour() |
| | | , pGlassData->m_tmGlassLoading.GetMinute() |
| | | , pGlassData->m_tmGlassLoading.GetSecond()); |
| | | SPRINTRAW(14, "%s", (LPSTR)(LPCTSTR)strValue); |
| | | // 21 14 U_TIME // Cassette or Conveyorìì INë ìê° |
| | | strValue.Format("%04d%02d%02d%02d%02d%02d" // E_TIME |
| | | , pGlassData->m_tmReviewEnd.GetYear() |
| | | , pGlassData->m_tmReviewEnd.GetMonth() |
| | | , pGlassData->m_tmReviewEnd.GetDay() |
| | | , pGlassData->m_tmReviewEnd.GetHour() |
| | | , pGlassData->m_tmReviewEnd.GetMinute() |
| | | , pGlassData->m_tmReviewEnd.GetSecond()); |
| | | SPRINTRAW(14, "%s", (LPSTR)(LPCTSTR)strValue); |
| | | // 22 14 S_TIME // Stageìì ê²ì¬/ê³ì¸¡ ììë ìê° |
| | | strValue.Format("%04d%02d%02d%02d%02d%02d" // START_TIME |
| | | , pGlassData->m_tmInspectionStart.GetYear() |
| | | , pGlassData->m_tmInspectionStart.GetMonth() |
| | | , pGlassData->m_tmInspectionStart.GetDay() |
| | | , pGlassData->m_tmInspectionStart.GetHour() |
| | | , pGlassData->m_tmInspectionStart.GetMinute() |
| | | , pGlassData->m_tmInspectionStart.GetSecond()); |
| | | SPRINTRAW(14, "%s", (LPSTR)(LPCTSTR)strValue); |
| | | // 23 14 E_TIME // Stageìì ê²ì¬/ê³ì¸¡ ì¢
ë£ë ìê° |
| | | strValue.Format("%04d%02d%02d%02d%02d%02d" // E_TIME |
| | | , pGlassData->m_tmReviewEnd.GetYear() |
| | | , pGlassData->m_tmReviewEnd.GetMonth() |
| | | , pGlassData->m_tmReviewEnd.GetDay() |
| | | , pGlassData->m_tmReviewEnd.GetHour() |
| | | , pGlassData->m_tmReviewEnd.GetMinute() |
| | | , pGlassData->m_tmReviewEnd.GetSecond()); |
| | | SPRINTRAW(14, "%s", (LPSTR)(LPCTSTR)strValue); |
| | | // 24 6 T_DEFECT // Common Item 1 - Total Defect Count |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNum - pGlassData->m_nCutOffDefectNum); //210203 CJH - Cutoff ê²°í¨ì ì ì²´ê°ììì ì ì¸í´ì¤ë¤. |
| | | // 25 6 TR // Panel ì ë³´ 02 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumJudgeTR); |
| | | // 26 6 PR // Panel ì ë³´ 03 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumJudgePR); |
| | | // 27 6 TB // Panel ì ë³´ 04 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeTB); |
| | | // 28 6 TW // Panel ì ë³´ 05 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeTW); |
| | | // 29 6 RB // Panel ì ë³´ 06 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeRB); |
| | | // 30 6 RW // Panel ì ë³´ 07 |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeRW); |
| | | // 31 6 T_STACK // Panel ì ë³´ 08 SD+SP ì ì
ë ¥ |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumStackSD + pGlassData->m_nDefectNumStackSP); |
| | | //32 6 BMDF // Panel ì ë³´ 09 -> ë³ê²½ MAX_AVG_GRAY 04/12 nwh |
| | | if (strlen(pGlassData->m_strMaxAvgGray) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strMaxAvgGray); |
| | | } |
| | | // 33 6 CJ // Panel ì ë³´ 10 -> ë³ê²½ MAX_PORTION 04/12 nwh |
| | | if (strlen(pGlassData->m_strMaxPortion) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strMaxPortion); |
| | | } |
| | | // 34 6 OK_CELL // OK Cell Count |
| | | SPRINTRAW(12, "*"); |
| | | // 35 6 RJ_CELL // RJ Cell Count |
| | | SPRINTRAW(12, "*"); |
| | | // 36 6 RW_CELL // RW Cell Count |
| | | SPRINTRAW(12, "*"); |
| | | // 37 6 NR_CELL // NR Cell Count |
| | | SPRINTRAW(12, "*"); |
| | | // 38 6 MASK_CELL // MASK Cell Count //201215 CJH - CSTIDë¡ ë³ê²½ |
| | | if (strlen(pGlassData->m_strCSTID) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strCSTID); |
| | | } |
| | | |
| | | SPRINTRAW(12, "%d", pGlassData->m_nSlot_No); // SLot_No ì¶ê° [ 21-03-18 KJG ] |
| | | |
| | | SPRINTRAW(12, "%d", pGlassData->m_bJob_end); // Job_end ì¶ê° [ 21-03-18 KJG ] |
| | | |
| | | // 41 6 TD_DEFECT // TD Defect Count -> íê³µì ìì ëì¨ ëª¨ë ê²°í¨ : Total - SD |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumStackTD); |
| | | // 42 6 SD_DEFECT // SD Defect Count -> TD ê²°í¨ìì Stack ê²°í¨ì ì ì¸í ê²°í¨(ì°ë¦¬ ì¤ë¹ìì 첫 ë°ê²¬ë ê²°í¨) |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumStackSD); |
| | | // 43 6 PD_DEFECT // PD Defect Count -> íì¬ ê³µì ìì ê²ì¶ë í¹ì Partial ê²°í¨(ì¬ìì ììë Zoneì´ë¼ ëì´ìì¼ë ì¤ì§ì ì¼ë¡ë Classficationì íµê³¼ë ê²°í¨) |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumStackPD); |
| | | // 44 6 SP_DEFECT // SP Defect Count -> íì¬ ê³µì ìì ê²ì¶ë í¹ì Partial ê²°í¨ ì¤, ì´ì ê³µì ì Partial ê²°í¨ì ì ì¸í ê²°í¨ |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumStackSP); |
| | | // 45 6 PAD_GATE // PAD Gate ë¶ë ì |
| | | SPRINTRAW(12, "*"); |
| | | // 46 6 PAD_DATA // PAD Data ë¶ë ì |
| | | SPRINTRAW(12, "*"); |
| | | // 47 6 M_DEFECT // MASK ë¶ë ì |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeMD); |
| | | // 48 6 C_DEFECT // COMMON ë¶ë |
| | | SPRINTRAW(12, "%d", pGlassData->m_nDefectNumTypeCD); |
| | | // 49 6 S_DEFECT // SCRATCH ë¶ë ì |
| | | SPRINTRAW(12, "*"); |
| | | // 50 6 CRACK // Crack ë¶ë ì //201217 CJH - Image ì´¬ì ê°ìë¡ ë³ê²½ |
| | | //SPRINTRAW(12, "%d", pGlassData->m_nDefectNumLocCrack); |
| | | SPRINTRAW(12, "%d", pGlassData->m_nReviewNum); |
| | | // 51 6 P_SHIFT // Pattern Shift ë¶ë ì //201217 CJH - Recipeë¡ ë³ê²½ |
| | | if (strlen(pGlassData->m_strRecipeName) == 0) |
| | | { |
| | | SPRINTRAW(16, "*"); |
| | | } |
| | | else if(strlen(pGlassData->m_strRecipeName) <= 16) |
| | | { |
| | | SPRINTRAW(16, "%s", pGlassData->m_strRecipeName); |
| | | } |
| | | else if (strlen(pGlassData->m_strRecipeName) > 16) |
| | | { |
| | | CString temp = pGlassData->m_strRecipeName; // ë ìí¼ 17ì리 ëì´ê°ë©´ DCOLL ë°ìì¼ë¡ ìì¸ì²ë¦¬ [ 21-06-02 KJG ] |
| | | temp = temp.Left(16); |
| | | SPRINTRAW(16, "%s", temp.GetBuffer(0)); |
| | | } |
| | | |
| | | // 52 12 SHRINK // Server or Frame Shrink ëì ì¬ë¶ |
| | | if (strlen(pGlassData->m_strShrinked) == 0) |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%s", pGlassData->m_strShrinked); |
| | | } |
| | | // 53 12 RAW_CUT // RAW ì
ë ¥ Defect ìë ìí ì¬ì©ì¬ë¶ |
| | | if (pGlassData->m_bRawCutoff) |
| | | { |
| | | SPRINTRAW(12, "USE"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "UNUSE"); |
| | | } |
| | | |
| | | SPRINTRAWEND; //ì¤ì!!! ì ¤ ë§ì§ë§ì ê¼ ìì´ì¼í¨!!!(ìì ê¸ì§) [ê¹íí2020/9/23] |
| | | } |
| | | |
| | | void CGlassRawCPJT::makeDataCell( CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData ) |
| | | { |
| | | SPRINTRAWSTART; |
| | | |
| | | /* SUBPanel ITEM |
| | | 01 4 ITEM // ITEM |
| | | 02 8 SUBPANEL // SUBPANEL |
| | | 03 12 SUBPANELID // Subpanel ID |
| | | 04 7 COORD_X // X Beginnign Coord |
| | | 05 7 COORD_Y // Y Beginning Coord |
| | | 06 7 SIZE_X // X-axis Size |
| | | 07 7 SIZE_Y // Y-axis Size |
| | | 08 6 GATELINE // GateLine |
| | | 09 6 DATALINE // DataLine |
| | | 10 4 GRADE // Grade (Judgement) |
| | | 11 4 CODE // Grade Code (Judgement) |
| | | 12 4 R_GRADE // Grade by Operator (Re-Judgement) |
| | | 13 12 T_DEFECT // Total Defect Count |
| | | 14 12 TD_DEFECT // TD Defect Count |
| | | 15 12 SD_DEFECT // SD Defect Count |
| | | 16 12 PD_DEFECT // PD Defect Count |
| | | 17 12 SP_DEFECT // SP Defect Coun |
| | | 18 12 PAD_GATE // PAD Gate Defect Count |
| | | 19 12 PAD_DATA // PAD Data Defect Count |
| | | 20 12 M_DEFECT // MASK Defect Count |
| | | 21 12 C_DEFECT // COMMON Defect Count |
| | | 22 12 S_DEFECT // SCRATCH Defect Count |
| | | 23 12 CRACK // CRACK Defect Count |
| | | 24 12 P_SHIFT // Pattern Shift Defect Count |
| | | */ |
| | | |
| | | // 01 4 ITEM // ITEM |
| | | SPRINTRAW(4, "DATA"); |
| | | // 02 8 SUBPANEL // SUBPANEL |
| | | SPRINTRAW(8, "SUBPANEL"); |
| | | // 03 12 SUBPANELID // Subpanel ID |
| | | //SPRINTRAW(12, "%d", pCellData->m_nCellID); |
| | | SPRINTRAW(12, "%s%c%c", pData->GetGlassData()->m_strGlassID, '0' + pCellData->m_nCellID / 36, g_pCellCode[pCellData->m_nCellID % 36]); |
| | | |
| | | // ê¸ë¼ì¤ ìì ê¸°ì¤ Yì¢í ë°ë |
| | | // ì½ëì»· 기ì¤ì¼ë¡ ê²°ê³¼íì¼ ì¢íê° ìì±ëëë° ê³ ê°ì¬ì ëª
íí íì¸ íì |
| | | // Serverë 모ë ì¢í를 ê¸ë¼ì¤ ìì 기ì¤ì¼ë¡ íëë° ì½ëì»· 기ì¤ì´ ëì´ì¼íëì§ ë´ì¼í¨ |
| | | // ì
ìì¹ë ê¸ë¼ì¤ ìì , ì¢íë ì½ëì»·??? |
| | | // 210129 CJH - ì
ìì ìì¹ì ë°ë¼ ì¢íìì¹ ë³ê²½ LeftTop(1,-1) RightTop(-1,-1) LeftBottom(1,1) RightBottom(-1,1) |
| | | if (pCellData->m_nCellXDir == 1) |
| | | { |
| | | // 04 7 COORD_X // X Beginning Coord |
| | | SPRINTRAW(8, "%d", pCellData->m_rectCellLeft); |
| | | } |
| | | else |
| | | { |
| | | // 04 7 COORD_X // X Beginning Coord |
| | | SPRINTRAW(8, "%d", pCellData->m_rectCellRight); |
| | | } |
| | | |
| | | if (pCellData->m_nCellYDir == 1) |
| | | { |
| | | // 05 7 COORD_Y // Y Beginning Coord //Topì í´ì¼ ì ëë¡ ê°ì´ ë¤ì´ê°...Rectë¶í° ì못 ë¤ì´ê°ëë¯ |
| | | SPRINTRAW(8, "%d", pCellData->m_rectCellTop * -1); |
| | | } |
| | | else |
| | | { |
| | | // 05 7 COORD_Y // Y Beginning Coord |
| | | SPRINTRAW(8, "%d", pCellData->m_rectCellBottom * -1); |
| | | } |
| | | // 06 7 SIZE_X // X-axis Size |
| | | SPRINTRAW(7, "%d", pCellData->m_rectCellRight - pCellData->m_rectCellLeft); |
| | | // 07 7 SIZE_Y // Y-axis Size |
| | | SPRINTRAW(7, "%d", pCellData->m_rectCellBottom - pCellData->m_rectCellTop); |
| | | // 08 6 GATELINE // ì´ GateLine ì |
| | | SPRINTRAW(6, "%d", pCellData->m_nGateNum); |
| | | // 09 6 DATALINE // ì´ DataLine ì |
| | | SPRINTRAW(6, "%d", pCellData->m_nDataNum); |
| | | // 10 4 GRADE // Grade (Judgement) |
| | | SPRINTRAW(4, "%s", GetDefectInfoToString(DMT_DefectJudge, pCellData->m_nJudgement)); |
| | | |
| | | // 11 4 CODE // Grade Code (Judgement) |
| | | SPRINTRAW(4, "OOOO"); |
| | | // 12 4 R_GRADE // Grade by Operator (Re-Judgement) |
| | | SPRINTRAW(4, "*"); |
| | | // 13 6 T_DEFECT // Total Defect Count |
| | | SPRINTRAW(12, "%d", pCellData->getTotalDefectNum()); |
| | | // 14 6 TD_DEFECT // TD Defect Count - total defect |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectTDCount); |
| | | // 15 6 SD_DEFECT // SD Defect Count - stack defect |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectSDCount); |
| | | // 16 6 PD_DEFECT // PD Defect Count - partial defect |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectPDCount); |
| | | // 17 6 SP_DEFECT // SP Defect Count - stack partial |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectSPCount); |
| | | // 18 6 PAD_GATE // PAD Gate Defect Count |
| | | SPRINTRAW(12, "*"); |
| | | // 19 6 PAD_DATA // PAD Data Defect Count |
| | | SPRINTRAW(12, "*"); |
| | | // 20 6 M_DEFECT // MASK Defect Count |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectNumTypeMD); |
| | | // 21 6 C_DEFECT // COMMON Defect Count |
| | | SPRINTRAW(12, "%d", pCellData->m_nDefectNumTypeCD); |
| | | |
| | | // 22 6 S_DEFECT -> 22 6 PRO_IMAGE ë³ê²½ nwh0404 |
| | | if (strlen(pCellData->m_strProImage)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strProImage); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12,"*"); |
| | | } |
| | | |
| | | // 23 12 AVG_GRAY_0 |
| | | if (strlen(pCellData->m_strAvgGray_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 24 12 PORTION_0 |
| | | if (strlen(pCellData->m_strPortion_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 25 12 CORNER_GRAY_0 |
| | | if (strlen(pCellData->m_strCorner_Gray_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 26 12 AVG_AMP_0 |
| | | if (strlen(pCellData->m_strAvgAmp_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 27 12 FFT_VAR_0 |
| | | if (strlen(pCellData->m_strFFTVar_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 28 12 FFT_VAH_0 |
| | | if (strlen(pCellData->m_strFFTVah_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 29 12 FFT_VAQ_0 |
| | | if (strlen(pCellData->m_strFFTVaq_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 30 12 FFT_PK_0 |
| | | if (strlen(pCellData->m_strFFTPK_0)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_0); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 31 12 AVG_GRAY_1 |
| | | if (strlen(pCellData->m_strAvgGray_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 32 12 PORTION_1 |
| | | if (strlen(pCellData->m_strPortion_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 33 12 CORNER_GRAY_1 |
| | | if (strlen(pCellData->m_strCorner_Gray_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 34 12 AVG_AMP_1 |
| | | if (strlen(pCellData->m_strAvgAmp_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 35 12 FFT_VAR_1 |
| | | if (strlen(pCellData->m_strFFTVar_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 36 12 FFT_VAH_1 |
| | | if (strlen(pCellData->m_strFFTVah_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 37 12 FFT_VAQ_1 |
| | | if (strlen(pCellData->m_strFFTVaq_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 38 12 FFT_PK_1 |
| | | if (strlen(pCellData->m_strFFTPK_1)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_1); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 39 12 AVG_GRAY_2 |
| | | if (strlen(pCellData->m_strAvgGray_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 40 12 PORTION_2 |
| | | if (strlen(pCellData->m_strPortion_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 41 12 CORNER_GRAY_2 |
| | | if (strlen(pCellData->m_strCorner_Gray_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 42 12 AVG_AMP_2 |
| | | if (strlen(pCellData->m_strAvgAmp_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 43 12 FFT_VAR_2 |
| | | if (strlen(pCellData->m_strFFTVar_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 44 12 FFT_VAH_2 |
| | | if (strlen(pCellData->m_strFFTVah_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 45 12 FFT_VAQ_2 |
| | | if (strlen(pCellData->m_strFFTVaq_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 46 12 FFT_PK_2 |
| | | if (strlen(pCellData->m_strFFTPK_2)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_2); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 47 12 AVG_GRAY_3 |
| | | if (strlen(pCellData->m_strAvgGray_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgGray_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 48 12 PORTION_3 |
| | | if (strlen(pCellData->m_strPortion_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strPortion_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | //kyh 0622 |
| | | // 49 12 CORNER_GRAY_3 |
| | | if (strlen(pCellData->m_strCorner_Gray_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strCorner_Gray_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 50 12 AVG_AMP_3 |
| | | if (strlen(pCellData->m_strAvgAmp_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strAvgAmp_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 51 12 FFT_VAR_3 |
| | | if (strlen(pCellData->m_strFFTVar_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVar_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 52 12 FFT_VAH_3 |
| | | if (strlen(pCellData->m_strFFTVah_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVah_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 53 12 FFT_VAQ_3 |
| | | if (strlen(pCellData->m_strFFTVaq_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTVaq_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 54 12 FFT_PK_3 |
| | | if (strlen(pCellData->m_strFFTPK_3)) |
| | | { |
| | | SPRINTRAW(12, "%s", pCellData->m_strFFTPK_3); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | SPRINTRAWEND; //ì¤ì!!! ì ¤ ë§ì§ë§ì ê¼ ìì´ì¼í¨!!!(ìì ê¸ì§) [ê¹íí2020/9/23] |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::makeDataDefect( CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData ) |
| | | { |
| | | SPRINTRAWSTART; |
| | | CString strItem; |
| | | /* DEFECT ITEM |
| | | // 01 4 ITEM // ITEM |
| | | // 02 6 DEFECT // DEFECT |
| | | // 03 12 ID // Subpanel ID |
| | | // 04 5 DEF_NO // Defect Number of Panel |
| | | // 05 7 COORD_X // Defect Location from origin point X |
| | | // 06 7 COORD_Y // Defect Location from origin point Y |
| | | // 07 6 GATELINE // Defect Gateline |
| | | // 08 6 DATALINE // Defect Dataline |
| | | // 09 4 SIZE_S // Defect Size (Square) |
| | | // 10 4 SIZE_W // Defect Size (Width) |
| | | // 11 4 SIZE_L // Defect Size (Length) |
| | | // 12 4 SIZE_H // Defect Size (Height) |
| | | // 13 4 GRADE // Defect Grade |
| | | // 14 4 CODE // Defect Code |
| | | // 15 2 STACK_FLAG // Current Defect Flag |
| | | // 16 2 STACK_COUNT // Count of Defect detected step |
| | | // 17 60 STACK_STEP // Flow(Step) of defect detection |
| | | // 18 16 IMAGE_FILE // Image file Name |
| | | // 19 12 DSC Code |
| | | // 20 12 Image ë¶ë¥ Code |
| | | // 21 12 ë¶ëì´ ìì¹í Zone No ì
ë ¥ |
| | | // 22 12 ë¶ë í¬ê¸° (L,H,M,S) |
| | | // 23 12 M/N/C/S/K/* |
| | | // 24 12 미ì¬ì© |
| | | // 25 12 미ì¬ì© |
| | | // 26 12 ì STEP íì D/F ì 무 |
| | | // 27 12 Gray Min |
| | | // 28 12 Gray Max |
| | | // 29 12 Gray Average |
| | | // 30 12 Defect Peak |
| | | // 31 12 미ì¬ì© |
| | | // 32 12 미ì¬ì© |
| | | // 33 12 Scan ë²í¸ |
| | | // 34 12 Camera ID |
| | | // 35 12 미ì¬ì© |
| | | // 36 12 R_SRC_MIN |
| | | // 37 12 R_SRC_MAX |
| | | // 38 12 R_SRC_AVG |
| | | // 39 12 Scan AI ë¶ë¥ê²°ê³¼ |
| | | // 40 12 Review AI ë¶ë¥ê²°ê³¼ |
| | | // 41 12 ê²ì¶ëª¨ë (Dark or Bright) |
| | | // 42 12 ê²ì¶ì±ë RGB |
| | | */ |
| | | |
| | | // 01 4 ITEM // ITEM |
| | | SPRINTRAW(4, "DATA"); |
| | | // 02 6 DEFECT // DEFECT |
| | | SPRINTRAW(6, "DEFECT"); |
| | | // 03 12 ID // Subpanel ID |
| | | SPRINTRAW(12, "%s%c%c", pData->GetGlassData()->m_strGlassID, '0' + pDefectData->m_nCellIdx / 36, g_pCellCode[pDefectData->m_nCellIdx % 36]); |
| | | // 04 5 DEF_NO // Defect Number of Panel |
| | | // RAW íì¼ì© Defect Index |
| | | //SPRINTRAW(5, "%d", pDefectData->m_nDefectIdx); |
| | | SPRINTRAW(5, "%d", m_nWriteRawDefectIdx++); |
| | | // 05 8 COORD_X // Defect Location from origin point X |
| | | SPRINTRAW(8, "%d", pDefectData->m_nUMCenterAlignX); |
| | | // 06 8 COORD_Y // Defect Location from origin point Y |
| | | // ì 기ëíë¡ ìì² ìì ìì |
| | | SPRINTRAW(8, "%d", pDefectData->m_nUMCenterAlignY*-1); |
| | | // 07 6 GATELINE // Defect Gateline |
| | | SPRINTRAW(6, "%d", pDefectData->m_nCellGate); |
| | | // 08 6 DATALINE // Defect Dataline |
| | | SPRINTRAW(6, "%d", pDefectData->m_nCellData); |
| | | // 09 4 SIZE_S // Defect Size (Square) |
| | | if (abs(pDefectData->m_nPixelSize) > 9999) { |
| | | SPRINTRAW(4, "%d",9999); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(4, "%d", pDefectData->m_nPixelSize); |
| | | } |
| | | |
| | | // 10 4 SIZE_W // Defect Size (Width) |
| | | if (abs(pDefectData->m_nUMSizeX) > 9999) { |
| | | SPRINTRAW(4, "%d", 9999); |
| | | } |
| | | else |
| | | { |
| | | |
| | | SPRINTRAW(4, "%d", pDefectData->m_nUMSizeX); |
| | | } |
| | | |
| | | // 11 4 SIZE_L // Defect Size (Length) |
| | | if (abs(pDefectData->m_nUMSizeY) > 9999) { |
| | | SPRINTRAW(4, "%d", 9999); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(4, "%d", pDefectData->m_nUMSizeY); |
| | | |
| | | } |
| | | |
| | | // 12 4 SIZE_H // Defect Size (Height) |
| | | if (abs(pDefectData->m_nDefectRScale) > 9999) { |
| | | SPRINTRAW(4, "%d", 9999); |
| | | } |
| | | else |
| | | { |
| | | strItem.Format("%d", pDefectData->m_nDefectRScale); |
| | | SPRINTRAW(4, "%.4s", strItem.GetBuffer(0)); |
| | | } |
| | | |
| | | |
| | | // 13 4 GRADE // Defect Grade |
| | | SPRINTRAW(4, "%s", GetDefectInfoToString(DMT_DefectJudge, pDefectData->m_DefectJudgement)); |
| | | // 14 4 CODE // Defect Code |
| | | if (strlen(pDefectData->m_strDefectCode)) |
| | | { |
| | | SPRINTRAW(4, "%.4s", pDefectData->m_strDefectCode); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(4, "*"); |
| | | } |
| | | // 15 2 STACK_FLAG // Current Defect Flag //201221 CJH - TD/SD/PD/SP |
| | | if (pDefectData->m_StackInfo == Stack_Unknown) |
| | | { |
| | | SPRINTRAW(2, "%s", "UK"); |
| | | } |
| | | else if (pDefectData->m_StackInfo == Stack_TD) |
| | | { |
| | | SPRINTRAW(2, "%s", "TD"); |
| | | } |
| | | else if (pDefectData->m_StackInfo == Stack_SD) |
| | | { |
| | | SPRINTRAW(2, "%s", "SD"); |
| | | } |
| | | else if (pDefectData->m_StackInfo == Stack_PD) |
| | | { |
| | | SPRINTRAW(2, "%s", "PD"); |
| | | } |
| | | else if (pDefectData->m_StackInfo == Stack_SP) |
| | | { |
| | | SPRINTRAW(2, "%s", "SP"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(2, "*"); |
| | | } |
| | | // 16 2 STACK_COUNT // Count of Defect detected step |
| | | SPRINTRAW(2, "%2d", pDefectData->m_nStackStepCount); |
| | | // 17 60 STACK_STEP // Flow(Step) of defect detection |
| | | if (strlen(pDefectData->m_strStackFirst)) |
| | | { |
| | | SPRINTRAW(60, "%s", pDefectData->m_strStackFirst); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(60, "*"); |
| | | } |
| | | // 18 16 IMAGE_FILE // Image file Name |
| | | // ê²ì¬ ì´ë¯¸ì§ 미ì¬ì© |
| | | if (strlen(pDefectData->m_ReviewDefect.m_strRevImageName)) |
| | | { |
| | | SPRINTRAW(16, "%s", pDefectData->m_ReviewDefect.m_strRevImageName); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(16, "*"); |
| | | } |
| | | // 19 12 DSC_CODE // Common 01 DSC Code |
| | | SPRINTRAW(12, "*"); |
| | | // 20 12 VC_CODE // Common 02 Image ë¶ë¥ Code |
| | | SPRINTRAW(12, "*"); |
| | | // 21 12 ZONE_NO // Common 03 ë¶ëì´ ìì¹í Zone No ì
ë ¥ |
| | | // Zone Data |
| | | int nValue = 0; |
| | | for (int i = 15; i >= 0; i--) |
| | | { |
| | | if (pDefectData->m_sZonePixelCount[i] > 0) |
| | | nValue += 1; |
| | | if (i > 0) |
| | | nValue = nValue << 1; |
| | | } |
| | | SPRINTRAW(12, "%04X", nValue); |
| | | |
| | | // 22 12 DEFECT_SIZE // Common 04 ë¶ë í¬ê¸° (L,H,M,S) |
| | | if (pDefectData->m_DefectSizeType == SizeType_Small) |
| | | { |
| | | SPRINTRAW(12, "S"); |
| | | } |
| | | else if (pDefectData->m_DefectSizeType == SizeType_Mid) |
| | | { |
| | | SPRINTRAW(12, "M"); |
| | | } |
| | | else if (pDefectData->m_DefectSizeType == SizeType_Large) |
| | | { |
| | | SPRINTRAW(12, "L"); |
| | | } |
| | | else if (pDefectData->m_DefectSizeType == SizeType_Huge) |
| | | { |
| | | SPRINTRAW(12, "H"); |
| | | } |
| | | else if (pDefectData->m_DefectSizeType == SizeType_Ultra) |
| | | { |
| | | SPRINTRAW(12, "U"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "S"); |
| | | } |
| | | //SizeType_Small |
| | | // 23 12 REPEAT_DEFECT // Common 05 M/N/C/S/K/* |
| | | if (pDefectData->m_DefectSubType == DefectSubType_MC) |
| | | { |
| | | SPRINTRAW(12, "MC"); |
| | | } |
| | | else if (pDefectData->m_DefectSubType == DefectSubType_Mask) |
| | | { |
| | | SPRINTRAW(12, "MD"); |
| | | } |
| | | else if (pDefectData->m_DefectSubType == DefectSubType_Common) |
| | | { |
| | | SPRINTRAW(12, "CD"); |
| | | } |
| | | else if (pDefectData->m_DefectSubType == DefectSubType_NoDefect) |
| | | { |
| | | SPRINTRAW(12, "NO"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "N"); |
| | | } |
| | | // 24 12 // Common 06 미ì¬ì© -> WSI ëì´ ê¸°ì
|
| | | //m_nPlanType == ditRaw::RTP_WSI ì´ê±¸ë¡ ë¹êµíëê¹ ê°ë ë¹êµìëê³ ëì´ê° 210205 |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | SPRINTRAW(12, "%.03lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[1]); |
| | | |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 25 12 // Common 07 미ì¬ì© -> CS ëì´ ê¸°ì
|
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | SPRINTRAW(12, "%.03lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[3]); |
| | | |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 26 12 // Common 08 ì STEP íì D/F ì 무 |
| | | SPRINTRAW(12, "*"); |
| | | // 27 12 GRAY_MIN // Common 09 Gray Min |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelSrcMin); |
| | | // 28 12 GRAY_MAX // Common 10 Gray Max |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelSrcMax); |
| | | // 29 12 GRAY_AVG // Common 11 Gray Average |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelSrcAvg); |
| | | // 30 12 GRAY_DEF // Common 12 Defect Peak |
| | | if (static_cast<int>(pDefectData->m_sDefectPeak) == 0) |
| | | { |
| | | SPRINTRAW(12, "1"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "%d", pDefectData->m_sDefectPeak); |
| | | } |
| | | |
| | | // 31 NO USE -> WSI Image Name |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | if (strlen(pDefectData->m_ReviewDefect.m_strWsi_3DImageFilename)) |
| | | { |
| | | SPRINTRAW(12, "%s", pDefectData->m_ReviewDefect.m_strWsi_3DImageFilename); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 32 NO USE -> CCD Image ì 무 |
| | | if (strlen(pDefectData->m_strAoiImageName)) |
| | | { |
| | | SPRINTRAW(12, "O"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "X"); |
| | | } |
| | | // 33 12 CAM_POSITION // Common 15 Scan ë²í¸ |
| | | SPRINTRAW(12, "%d", pDefectData->m_nScanIdx); |
| | | // 34 12 CAM_POSITION // Common 16 Camera ID |
| | | SPRINTRAW(12, "%d", pDefectData->m_nCameraID); |
| | | // 35 12 Defect Idx // Common 25 Defect Idx |
| | | SPRINTRAW(12, "%d", pDefectData->m_nDefectIdx); |
| | | // 36 12 R_SRC_MIN // Common 18 R_SRC_MIN |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelRefMin); |
| | | // 37 12 R_SRC_MAX // Common 19 R_SRC_MAX |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelRefMax); |
| | | // 38 12 R_SRC_AVG // Common 20 R_SRC_AVG |
| | | SPRINTRAW(12, "%d", pDefectData->m_nLevelRefAvg); |
| | | // 39 12 Scan AI ë¶ë¥ê²°ê³¼ // Common 21 ê³ ê°ì¬ ì
ë ¥==>>>> 0405ë³ê²½WSI R Height//210405 |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | SPRINTRAW(12, "%.03lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[4]); |
| | | |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 40 12 Review AI ë¶ë¥ê²°ê³¼ // Common 22 ê³ ê°ì¬ ì
ë ¥==>>>> 0405ë³ê²½WSI G Height//210405 |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | SPRINTRAW(12, "%.03lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[5]); |
| | | |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 41 12 ê²ì¶ëª¨ë (Dark or Bright) // Common 23 ê³ ê°ì¬ ì
ë ¥==>>>> 0405ë³ê²½WSI B Height//210405 |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | SPRINTRAW(12, "%.03lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[6]); |
| | | |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | // 42 12 ê²ì¶ì±ë RGB // Common 24 ê³ ê°ì¬ ì
ë ¥ |
| | | CString strData; // ê²ì¶ ì±ë ì¶ê° ex) 0, 1, 2 [ 21-03-23 KJG ] |
| | | int nLayers = pDefectData->m_nHliLayers; |
| | | strItem = _T(""); |
| | | for (int i = 0; i < 8; i++) |
| | | { |
| | | if (nLayers & 1) |
| | | { |
| | | if (strItem.IsEmpty()) strData.Format("%d", i); |
| | | else strData.Format(",%d", i); |
| | | strItem += strData; |
| | | } |
| | | nLayers = nLayers >> 1; |
| | | } |
| | | SPRINTRAW(12, "%s", strItem); |
| | | |
| | | // 43 12 Compactness //201215 CJH - 43~46 ì ê· Defect Feature ê²°ê³¼íì¼ ì¶ê° |
| | | SPRINTRAW(12, "%d", pDefectData->m_nCompact); |
| | | // 44 12 Thickness |
| | | SPRINTRAW(12, "%d", pDefectData->m_nThickness); |
| | | // 45 12 Major |
| | | SPRINTRAW(12, "%d", pDefectData->m_nMajor); |
| | | // 46 12 Minor |
| | | SPRINTRAW(12, "%d", pDefectData->m_nMinor); |
| | | // 47 12 WSI Defect Type 0 normal 1 metal 2Huge 3diffuse 4 trashy |
| | | if (pDefectData->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | if (strlen(GetWsiDefectType(pDefectData->m_ReviewDefect.m_fWsi_ResultData[0]))) |
| | | { |
| | | SPRINTRAW(12, "%s", GetWsiDefectType(pDefectData->m_ReviewDefect.m_fWsi_ResultData[0])); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "*"); |
| | | } |
| | | |
| | | // 48 12 Defect Type ì¶ê° [ 21-03-23 KJG ] |
| | | if (pDefectData->m_DefectType == DefectType_RBlack) |
| | | { |
| | | SPRINTRAW(12, "RB"); |
| | | } |
| | | else if (pDefectData->m_DefectType == DefectType_RWhite) |
| | | { |
| | | SPRINTRAW(12, "RW"); |
| | | } |
| | | else if (pDefectData->m_DefectType == DefectType_TBlack) |
| | | { |
| | | SPRINTRAW(12, "TB"); |
| | | } |
| | | else if (pDefectData->m_DefectType == DefectType_TWhite) |
| | | { |
| | | SPRINTRAW(12, "TW"); |
| | | } |
| | | else |
| | | { |
| | | SPRINTRAW(12, "UN"); |
| | | } |
| | | |
| | | // 49 12 Frame Shrink ì ë³´ ì¶ê° |
| | | SPRINTRAW(12, "%d", pDefectData->m_bShrinked); |
| | | |
| | | // 50 12 CLASS_NO // Zone Classification NO |
| | | // Zone Data |
| | | nValue = 0; |
| | | for (int i = 15; i >= 0; i--) |
| | | { |
| | | if (pDefectData->m_sZoneClassPixelCount[i] > 0) |
| | | nValue += 1; |
| | | if (i > 0) |
| | | nValue = nValue << 1; |
| | | } |
| | | SPRINTRAW(12, "%04X", nValue); |
| | | |
| | | SPRINTRAWEND; //ì¤ì!!! ì ¤ ë§ì§ë§ì ê¼ ìì´ì¼í¨!!!(ìì ê¸ì§) [ê¹íí2020/9/23] |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCPJT::ReadMuraFile( CgrmGlassRawData* pData )//0404nwh |
| | | { |
| | | CString strMacroFilePath; |
| | | { |
| | | strMacroFilePath.Format("%s\\%s", NETWORK_MURARAW_PATH, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | CFileFind FF; |
| | | |
| | | if (FF.FindFile(strMacroFilePath)) |
| | | { |
| | | FF.FindNextFile(); |
| | | strMacroFilePath = FF.GetFilePath(); |
| | | FF.Close(); |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Find Macro File Fail. [%s]", strMacroFilePath); |
| | | return FALSE; |
| | | } |
| | | } |
| | | ////Mura Image Server í¹ì í´ëì ì ì¥ |
| | | CString strMacroImageSrcPath; |
| | | CString strMacroImageTarPath; |
| | | |
| | | strMacroImageSrcPath.Format("%s\\%s", NETWORK_MURA_IMAGE_PATH, pData->GetGlassData()->m_strGlassID); |
| | | strMacroImageTarPath.Format("%s\\%s\\MuraImage", NETWORK_AOI_IMAGE_PATH, pData->GetGlassData()->m_strGlassID); //ìê°ì¢í´ë³´ì |
| | | |
| | | //CreateDirectory("D:\\Image\\Defect\\Mura",NULL); ìí´ëë ê±°ê°ì |
| | | if (strMacroImageSrcPath.IsEmpty() == FALSE) |
| | | { |
| | | AKLOG("Macro Image File Copy Start[%s]", strMacroImageTarPath); |
| | | CakFileUtil::CopyFolder(strMacroImageSrcPath.GetBuffer(0), strMacroImageTarPath.GetBuffer(0), FALSE); |
| | | |
| | | if (m_bReviewEndCheck == TRUE) |
| | | { |
| | | CakFileUtil::DeleteFolder(strMacroImageSrcPath.GetBuffer(0), FALSE); |
| | | } |
| | | AKLOG("Macro Image File Copy End"); |
| | | } |
| | | |
| | | ///Mura ê²°ê³¼íì¼ ì½ê³ ì°ê¸° ìì |
| | | if (m_MuraResultFile.openFile_Mura(strMacroFilePath.GetBuffer(0)) == TRUE) |
| | | { |
| | | AKLOG("Macro File Read Success : %dItem", m_MuraResultFile.GetSubPanelNum()); |
| | | if (m_bReviewEndCheck == TRUE) |
| | | { |
| | | DeleteFile(strMacroFilePath); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Macro File Read Fail[%s]", strMacroFilePath); |
| | | //DeleteFile(strMacroResultTargetPath); |
| | | return FALSE; |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | void CGlassRawCPJT::SendMessageFTPUploadRaw( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | char strRTMSFile[32] = {}; |
| | | char strServerRawFileSubPath[256] = {}; |
| | | char strServer_SubFileName[32] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_RAW, strServerFolder, strServerFile, strLocalFolder, pLocalFile, strRTMSFile, strServerRawFileSubPath, strServer_SubFileName,pGlassData); //taek 201211 |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SubFilePath, strServerRawFileSubPath); |
| | | strcpy(upParam.m_strServer_SubFileName, strServer_SubFileName); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | strcpy(upParam.m_strRTMS_FileName, ""); //taek 201211 |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | upParam.m_nDataType = CFTPCopyDataParam::FTPDataType_Raw; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 30000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CGlassRawCPJT::SendMessageFTPDownloadStack( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | char strRTMSFile[32] = {}; |
| | | char strServerRawFileSubPath[256] = {}; |
| | | char strServer_SubFileName[256] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_STACK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, strRTMSFile, strServerRawFileSubPath, strServer_SubFileName,pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | strcpy(upParam.m_strRTMS_FileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | upParam.m_nDataType = CFTPCopyDataParam::FTPDataType_Stack; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawCPJT::SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPDownloader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | //GetFormatDescription(FTPCMD_DATAFILE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | { |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | sprintf(strServerFolder, "%s", pGlassData->m_strCassetteSequenceNo); |
| | | sprintf(strServerFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | sprintf(strLocalFolder, "D:\\DIT_ResultData\\DownloadData"); |
| | | sprintf(pLocalFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | upParam.m_nDataType = CFTPCopyDataParam::FTPDataType_Unknown; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawCPJT::SendMessageFTPUploadImage( _grmGlassData* pGlassData, emFTPCommand sort) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[32];// = "*.*"; |
| | | char strLocalFolder[256] = {}; |
| | | char strLocalFile[32];// = "*.*"; |
| | | char strRTMSFile[256] = {}; //taek 201211 |
| | | char strServerRawFileSubPath[256] = {}; |
| | | char strServer_SubFileName[256] = {}; |
| | | |
| | | GetFormatDescription(sort, strServerFolder, strServerFile, strLocalFolder, strLocalFile, strRTMSFile, strServerRawFileSubPath, strServer_SubFileName,pGlassData); //taek 201211 |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, strLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | strcpy(upParam.m_strRTMS_FileName, strRTMSFile); //taek 201211 |
| | | upParam.m_nCreateSignalFile = FALSE; |
| | | upParam.m_nSendResultCode = FALSE; |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | upParam.m_nDataType = CFTPCopyDataParam::FTPDataType_Image; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_ImageUpload; // FTP Uploaderììë 구ë¶ëì´ ìì§ ìì! |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCPJT::SendMessageFTPUploadIndexFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) |
| | | return FALSE; |
| | | |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return FALSE; |
| | | |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | char strRTMSFile[32] = {}; |
| | | char strServerRawFileSubPath[256]; |
| | | char strServer_SubFileName[256] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_INDEX, strServerFolder, strServerFile, strLocalFolder, pLocalFile, strRTMSFile, strServerRawFileSubPath, strServer_SubFileName, pGlassData); |
| | | |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // ServerFile = "ftptestfile.txt"; |
| | | // |
| | | // sprintf(strLocalFolder, "D:"); |
| | | // pLocalFile = "ftptestfile.txt"; |
| | | // } |
| | | |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | strcpy(upParam.m_strRTMS_FileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | upParam.m_nDataType = CFTPCopyDataParam::FTPDataType_Index; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawCPJT::GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, char* pRTMSFile, char* pServerFileSubPath, char* pServerFileSubName, _grmGlassData* pGlassData) //taek 201211 |
| | | { |
| | | CString strGlassID = pGlassData->m_strGlassID; |
| | | //For test |
| | | //if (strlen(strGlassID) == 0) strGlassID = "HPANELID"; |
| | | |
| | | CString strGlassIDLevel6th = strGlassID.Left(6); |
| | | CString strGlassIDLevel5th = strGlassID.Left(5); |
| | | CString strGlassIDLevel8th = strGlassID.Left(8); |
| | | |
| | | CString strLotID = pGlassData->m_strLotID; |
| | | CString strStepID = pGlassData->m_strStepID; |
| | | CString strProcessID = pGlassData->m_strProcessID; |
| | | //For test |
| | | //if (strlen(strStepID) == 0) strStepID = "F11112"; |
| | | |
| | | strLotID.MakeLower(); |
| | | strStepID.MakeLower(); |
| | | strGlassID.MakeLower(); |
| | | strGlassIDLevel6th.MakeLower(); |
| | | strProcessID.MakeLower(); |
| | | |
| | | switch(sort) |
| | | { |
| | | case FTPCMD_AOI_IMAGE: |
| | | { |
| | | if(strGlassID.GetLength() > 6) |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th, strGlassID); |
| | | else |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_AOI_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_REVIEW_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | |
| | | CString strTime = NULL; |
| | | CString strInsEndTime = NULL; |
| | | |
| | | strTime = pGlassData->m_tmGlassLoading.Format("%Y%m%d%H%M%S"); |
| | | strInsEndTime = pGlassData->m_tmInspectionEND.Format("%Y%m%d%H%M%S"); |
| | | |
| | | if (strGlassID.GetLength() > 6) |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th, strGlassID); |
| | | else |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th); |
| | | |
| | | sprintf(pLocalPath, "%s%s_%s", LOCAL_REV_IMAGE_PATH, strGlassID.GetBuffer(0), strTime); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | //Result ini 리뷰 ì´ë¯¸ì§ path ì±ì°ê¸° |
| | | CString strRawFilePathName = NULL; |
| | | CString strLine = NULL; |
| | | CString strPath = NULL; |
| | | strRawFilePathName += LOCAL_RAWPATH_INFO_INI_PATH; |
| | | strRawFilePathName += RAWINFO_FILE_NAME; |
| | | FILE* pf = fopen(strRawFilePathName.GetBuffer(0), "a"); |
| | | if(pf != NULL) |
| | | { |
| | | strLine = pServerPath; |
| | | strPath = strLine.Left(strLine.GetLength() - 1); |
| | | fprintf(pf, "IMGPATH= Z:\%s\n", strPath.GetBuffer(0)); |
| | | fprintf(pf, "DISK=FILESERVER\n"); |
| | | fclose(pf); |
| | | } |
| | | |
| | | //RTMS ê²°ê³¼ íì¼ ì
ë¡ë |
| | | CString strRTMSPathFileName = NULL; |
| | | CString strRTMSFileName = NULL; |
| | | |
| | | strRTMSFileName.Format("%s#%s#%04d%02d%02d%02d%02d%02d.Signal", pGlassData->m_strEquipID, pGlassData->m_strProductID, time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); |
| | | |
| | | strRTMSPathFileName += LOCAL_RTMS_INFO_PATH; |
| | | strRTMSPathFileName += strRTMSFileName; |
| | | |
| | | // strRTMSFileName = strRawFilePath.Left(strRawFilePath.GetLength()-1); //taek ë§ì§ë§ ê° ë¹¼ê³ ê°ì ¸ì¤ê¸° test |
| | | |
| | | FILE* pfile = fopen(strRTMSPathFileName.GetBuffer(0), "a"); |
| | | |
| | | sprintf(pRTMSFile, "%s", strRTMSPathFileName); //taek 201211 |
| | | |
| | | if (pfile != NULL) |
| | | { |
| | | fprintf(pfile, "MODULE_ID = %s\n", pGlassData->m_strEquipID); |
| | | fprintf(pfile, "PRODUCT_ID = %s\n", pGlassData->m_strProductID); |
| | | fprintf(pfile, "PROCESS_ID = %s\n", pGlassData->m_strProcessID); |
| | | fprintf(pfile, "STEP_ID = %s\n", pGlassData->m_strStepID); |
| | | fprintf(pfile, "PANEL_ID = %s\n", pGlassData->m_strGlassID); |
| | | fprintf(pfile, "RESULT = *\n"); |
| | | fprintf(pfile, "REASON_CODE = *\n"); |
| | | fprintf(pfile, "RDP_PATH_RAW = \\cfq1raw1cai1coi%s\n", GetRawFilePath()); |
| | | fprintf(pfile, "RDP_PATH_IMAGE = \\cfq1img1cai1coi%s\n", strLine.Left(strLine.GetLength() - 1)); |
| | | fprintf(pfile, "INSP_TIME = %s\n", strInsEndTime); |
| | | fclose(pfile); |
| | | } |
| | | } |
| | | break; |
| | | case FTPCMD_RAW: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | SetRawFilePath(""); |
| | | |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | // ìê°, íì¥ì ìì° [11/20/2020 Server] |
| | | strFileName.Format("%s", pGlassData->m_strGlassID); |
| | | strFileName.MakeLower(); |
| | | } |
| | | /*sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); */ |
| | | |
| | | //if (strGlassID.GetLength() > 6) |
| | | // sprintf(pServerPath, "\\%s\\%s\\%s\\%s\\", strLotID, strStepID, strGlassIDLevel6th, strGlassID); |
| | | //else |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | |
| | | CString strServerSubRawFilePath= NULL; |
| | | CString strServerSubRawFileName = NULL; |
| | | { |
| | | strServerSubRawFilePath += NETWORK_AOIRAWFILE_SUB_PATH; |
| | | |
| | | CString strTime; |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | // ìê°, íì¥ì ìì° [11/20/2020 Server] |
| | | strServerSubRawFileName.Format("\\%s_%s", pGlassData->m_strGlassID, strTime); |
| | | //strServerSubRawFilePath += strServerSubRawFileName; |
| | | BOOL bIsBDI = strcmp((pGlassData->m_strLine), _T("BDI")) == 0 ? TRUE : FALSE; // BDI ì¸ ê²½ì° InspectorEnd ìì SubFile ìì± [ 21-03-23 KJG ] |
| | | if (m_bReviewEndCheck || bIsBDI) // InspectEnd ììë SubFile 미ìì± ë³ê²½ [ 21-03-18 KJG ] |
| | | { |
| | | sprintf(pServerFileSubName, "%s", strServerSubRawFileName.GetBuffer(0)); |
| | | sprintf(pServerFileSubPath, "%s", strServerSubRawFilePath.GetBuffer(0)); |
| | | } |
| | | else |
| | | { |
| | | sprintf(pServerFileSubName, "%s", ""); |
| | | sprintf(pServerFileSubPath, "%s", ""); |
| | | } |
| | | |
| | | } |
| | | |
| | | //Result ini raw íì¼ì´ë¦(pathí¬í¨)write |
| | | CString strRawFilePathName = NULL; |
| | | CString strLine = NULL; |
| | | strRawFilePathName += LOCAL_RAWPATH_INFO_INI_PATH; |
| | | strRawFilePathName += RAWINFO_FILE_NAME; |
| | | FILE* pf = fopen(strRawFilePathName.GetBuffer(0), "w"); |
| | | if(pf != NULL) |
| | | { |
| | | strLine = pServerPath + strFileName; |
| | | fprintf(pf, "[RESULT_PATH]\n"); |
| | | fprintf(pf, "RAWPATH= X:\%s\n", strLine.GetBuffer(0)); |
| | | SetRawFilePath(strLine.GetBuffer(0)); |
| | | fprintf(pf, "SUMPATH= \n"); |
| | | fclose(pf); |
| | | } |
| | | } |
| | | break; |
| | | case FTPCMD_STACK: |
| | | { |
| | | //201218 CJH - Stack Download ê²½ë¡ ì¤ì |
| | | sprintf(pServerPath, "\\stack\\%s\\%s\\%s", strProcessID, |
| | | strStepID, |
| | | strGlassIDLevel6th.GetBuffer(0)); |
| | | |
| | | sprintf(pServerFile, "%s", |
| | | strGlassID); |
| | | |
| | | sprintf(pLocalPath, "%s", m_StackResult.getStackLocalPath()); |
| | | sprintf(pLocalFile, "%s", strGlassID.GetBuffer(0)); |
| | | } |
| | | break; |
| | | |
| | | case FTPCMD_MURA_IMAGE: //0404nwh |
| | | { // |
| | | /*CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_MURA_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*");*/ |
| | | |
| | | if (strGlassID.GetLength() > 6) |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th, strGlassID); |
| | | else |
| | | sprintf(pServerPath, "\\%s\\%s\\%s\\", strProcessID, strStepID, strGlassIDLevel6th); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_MURA_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | |
| | | break; |
| | | case FTPCMD_INDEX: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "INDEX\\%s", pGlassData->m_strEquipID); |
| | | sprintf(pServerFile, "%04d%02d%02d_%s.csv", time.GetYear(), time.GetMonth(), time.GetDay(), pGlassData->m_strStepID); |
| | | |
| | | sprintf(pLocalPath, "%s", LOCAL_INDEX_PATH); |
| | | sprintf(pLocalFile, "%s", pServerFile); |
| | | } |
| | | break; |
| | | |
| | | case FTPCMD_LINK: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%s\\%s\\%s\\%s", "LINK", pGlassData->m_strEquipID, |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | CString CGlassRawCPJT::GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam) |
| | | { |
| | | CString sStr; |
| | | switch(nDefectInfoType) |
| | | { |
| | | case DMT_DefectJudge:// Judge |
| | | { |
| | | switch (nParam) |
| | | { |
| | | case Judge_OK: sStr.Format("OK"); |
| | | break; |
| | | case Judge_RP: sStr.Format("RP"); |
| | | break; |
| | | case Judge_NG: sStr.Format("NG"); |
| | | break; |
| | | case Judge_TR: sStr.Format("TR"); |
| | | break; |
| | | case Judge_PR: sStr.Format("PR"); |
| | | break; |
| | | case Judge_PT: sStr.Format("PT"); |
| | | break; |
| | | case Judge_Review: sStr.Format("RV"); |
| | | break; |
| | | case Judge_RC: sStr.Format("RC"); |
| | | break; |
| | | case Judge_Size: sStr.Format("SZ"); |
| | | break; |
| | | case Judge_VI: sStr.Format("VI"); |
| | | break; |
| | | case Judge_Rework: sStr.Format("RW"); |
| | | break; |
| | | case Judge_Unknown: sStr.Format("OK");//sStr.Format("Unknown"); //Unknownë ì¼ë¨ OK |
| | | break; |
| | | default: sStr.Format("OK");//sStr.Format("Ets"); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case DMT_DefectSizeType: |
| | | { |
| | | sStr = "S"; |
| | | switch(nParam) |
| | | { |
| | | //case SizeType_Unknown: sStr.Format("U"); break; |
| | | case 1/*SizeType_Small*/: sStr.Format("S"); |
| | | break; |
| | | case 2/*SizeType_Mid*/: sStr.Format("M"); |
| | | break; |
| | | case 3/*SizeType_Large*/: sStr.Format("L"); |
| | | break; |
| | | case 4/*SizeType_Huge*/: sStr.Format("O"); |
| | | break; |
| | | //case SizeType_Ultra: sStr.Format("Ultra"); break; |
| | | //default: sStr.Format("Ets"); break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return sStr; |
| | | } |
| | | |
| | | CString CGlassRawCPJT::GetWsiDefectType(int nType) |
| | | { |
| | | CString strDefectType=_T(""); |
| | | switch (nType) |
| | | { |
| | | case 0: strDefectType.Format("normal"); |
| | | break; |
| | | case 1: strDefectType.Format("metal"); |
| | | break; |
| | | case 2: strDefectType.Format("huge"); |
| | | break; |
| | | case 3: strDefectType.Format("diffuse"); |
| | | break; |
| | | case 4: strDefectType.Format("trashy"); |
| | | break; |
| | | } |
| | | return strDefectType; |
| | | } |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | #include "GlassRawRTMS.h" |
| | | #include "StackResultCPJT.h" |
| | | #include "AnaResultFile.h" |
| | | #include "MacroResultFile.h" |
| | | #include "CustomizeReview.h" |
| | | #include "InterfaceFTP.h" |
| | | |
| | | class CGlassRawCPJT : public CGlassRawBase, public CInterfaceFTP |
| | | { |
| | | public: |
| | | enum emDefectMemberType |
| | | { |
| | | DMT_DefectJudge = 0, |
| | | DMT_DefectSizeType |
| | | }; |
| | | |
| | | public: |
| | | CGlassRawCPJT(void); |
| | | ~CGlassRawCPJT(void); |
| | | |
| | | static char* GetClassName(){return "C-PJT";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData); |
| | | |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | virtual BOOL SequenceFtpUpload(char* pRawFileName); |
| | | |
| | | virtual void NotifyUpdateOptionInfo(){/*m_StackResult.readOptionFile();*/}; |
| | | |
| | | |
| | | protected: |
| | | |
| | | virtual void SendMessageFTPUploadRaw(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadStack(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPUploadImage(_grmGlassData* pGlassData, emFTPCommand sort); |
| | | virtual BOOL SendMessageFTPUploadIndexFile(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData); |
| | | virtual void GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, char* pRTMSFile,char* pServerFileSubPath, char* pServerFileSubName,_grmGlassData* pGlassData); |
| | | |
| | | |
| | | BOOL ReadMuraFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAOIFile(CgrmGlassRawData* pData); |
| | | |
| | | void SetRawFilePath(CString strPath) { m_strRawFilePath = strPath; } |
| | | CString GetRawFilePath() { return m_strRawFilePath; } |
| | | |
| | | void makeDataHeader(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataGlass(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataCell(CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData); |
| | | BOOL makeDataDefect(CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData); |
| | | |
| | | CString GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam); |
| | | |
| | | public: |
| | | void SetEquipType(int nType){m_nEquipType = nType;}; |
| | | CString GetWsiDefectType(int nType); |
| | | protected: |
| | | |
| | | protected: |
| | | int m_nEquipType; // 0:Inline, 1:Offline |
| | | |
| | | CString m_strRawFilePath; |
| | | |
| | | CAnaResultFile m_GlassRawAna; //ëíë¶ìì©ê²°ê³¼íì¼ [ê¹íí2020/9/15] |
| | | CGlassRawRTMS m_GlassRawRTMS;//RTMSì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | CMacroResultFile m_MuraResultFile; //무ë¼ì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | |
| | | CStackResultCPJT m_StackResult; |
| | | BOOL m_bReviewEndCheck; // InspectEnd ìì Raw_im í´ëì SubFile ìì± ìí기 ìí´ ì¬ì© [ 21-03-18 KJG ] |
| | | CTime m_tmReviewStart; |
| | | CTime m_tmReviewEnd; |
| | | |
| | | int m_nWriteRawDefectIdx; |
| | | }; |
| | | |
| | | struct stCellData |
| | | { |
| | | int iModel; |
| | | int ixCell, iyCell; |
| | | void SetIndex(int im, int ix, int iy) |
| | | { |
| | | iModel = im; |
| | | ixCell = ix; |
| | | iyCell = iy; |
| | | } |
| | | BOOL AddDefect(_grmDefectData* pDefect) |
| | | { |
| | | if (iModel == pDefect->m_nModelIdx)// edge crackì í¬í¨ìëê².. 모ë¸ì´ í¨í´ë¶ì¸ì§ íì¸ìì
ì¤ì´ê¸°. |
| | | { |
| | | m_Defects.push_back(pDefect); |
| | | return TRUE; |
| | | } |
| | | return FALSE; |
| | | } |
| | | _grmDefectData* GetDefect(int i) { return m_Defects[i]; } |
| | | int GetDefectCount() { return (int)m_Defects.size(); } |
| | | std::vector<_grmDefectData*> m_Defects; |
| | | }; |
| | | struct stCellStorage |
| | | { |
| | | stCellData *m_pCells; |
| | | int m_nCell; |
| | | stCellStorage(int n) |
| | | { |
| | | m_nCell = n; |
| | | m_pCells = new stCellData[n]; |
| | | } |
| | | ~stCellStorage() |
| | | { |
| | | delete[] m_pCells; |
| | | } |
| | | stCellData* GetCellData(int iCell) |
| | | { |
| | | return m_pCells + iCell; |
| | | } |
| | | BOOL AddDefect(_grmDefectData *pDefect) |
| | | { |
| | | if (pDefect->m_nCellIdx < 0) |
| | | { |
| | | return FALSE; |
| | | } |
| | | return GetCellData(pDefect->m_nCellIdx)->AddDefect(pDefect); |
| | | } |
| | | int GetCellCount() { return m_nCell; } |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawCSOT.h" |
| | | #include "akLoggerExt.h" |
| | | #include "MacroResultFile.h" |
| | | #include "akCore/akFileUtil.h" |
| | | #include "akGridData.h" |
| | | |
| | | //#include "AOIDefinitionType.h" |
| | | //#include "AOIDefinition.h" |
| | | |
| | | #define FTPCopyDataCmd_RawDownload 1 |
| | | #define FTPCopyDataCmd_RawUpload 2 |
| | | #define FTPCopyDataCmd_LotUpload 3 |
| | | #define FTPCopyDataCmd_ImageUpload 4 |
| | | |
| | | #define MAX_PATH_NUM 255 |
| | | #define MAX_FILE_NUM 100 |
| | | |
| | | #define LOCAL_INDEX_PATH "D:\\DIT_ResultData\\Index\\" |
| | | #define LOCAL_REV_IMAGE_PATH "D:\\ResultData\\Upload\\Image\\" |
| | | #define LOCAL_AOI_IMAGE_PATH "D:\\Image\\Defect\\" |
| | | #define LOCAL_MURA_IMAGE_PATH "D:\\DIT_ResultData\\Mura\\IMG\\" |
| | | #define LOCAL_DEEP_PATH "D:\\DIT_ResultData\\Deeplearning\\" |
| | | |
| | | enum FTPProcessType { FTPProcessType_DownFile=0, FTPProcessType_UpFile, FTPProcessType_Count }; |
| | | class CFTPCopyDataParam |
| | | { |
| | | public: |
| | | CFTPCopyDataParam() { Reset(); } |
| | | virtual ~CFTPCopyDataParam() { Reset(); } |
| | | void Reset() |
| | | { |
| | | memset(this, 0, sizeof(CFTPCopyDataParam)); |
| | | m_hSenderWnd = GetCurrentProcessWndHandle(); |
| | | } |
| | | |
| | | const HWND GetSenderWnd() const { return m_hSenderWnd; } |
| | | void SetSenderWnd(HWND hWnd) { m_hSenderWnd = hWnd; } |
| | | |
| | | public: |
| | | int m_nProcessType; // íë¡ì¸ì¤ íì
|
| | | int m_nCreateSignalFile; // ìê·¸ë íì¼ ìì±ì 무 |
| | | int m_bFirstPriority; // ìµìì ì°ì ììì 무 |
| | | int m_nSendResultCode; // ë³´ë¸ ê²°ê³¼ ì½ë |
| | | |
| | | TCHAR m_strServer_FolderName[MAX_PATH_NUM]; // ìë² ê²½ë¡ëª
|
| | | TCHAR m_strServer_FileName[MAX_FILE_NUM]; // ìë² íì¼ëª
|
| | | |
| | | TCHAR m_strLocal_FolderName[MAX_PATH_NUM]; // ë¡ì»¬ ê²½ë¡ëª
|
| | | TCHAR m_strLocal_FileName[MAX_FILE_NUM]; // ë¡ì»¬ íì¼ëª
|
| | | |
| | | TCHAR m_strServer_SignalFolderName[MAX_PATH_NUM]; // ìë² ìê·¸ë ê²½ë¡ëª
|
| | | TCHAR m_strServer_SignalFileName[MAX_FILE_NUM]; // ìë² ìê·¸ë íì¼ëª
|
| | | |
| | | protected: |
| | | HWND m_hSenderWnd; // ë³´ë¸ íë¡ê·¸ë¨ ìëì° |
| | | |
| | | static HWND GetCurrentProcessWndHandle() |
| | | { |
| | | DWORD dwPID = GetCurrentProcessId(); |
| | | HWND hWnd = FindWindow(NULL, NULL); |
| | | while (hWnd != NULL) |
| | | { |
| | | if (GetParent(hWnd) == NULL){ |
| | | DWORD dwProcId; |
| | | GetWindowThreadProcessId(hWnd, &dwProcId); |
| | | if (dwPID == dwProcId){ |
| | | return hWnd; |
| | | } |
| | | } |
| | | hWnd = GetWindow(hWnd, GW_HWNDNEXT); |
| | | } |
| | | return NULL; |
| | | } |
| | | }; |
| | | |
| | | |
| | | CGlassRawCSOT::CGlassRawCSOT(void) |
| | | { |
| | | m_GlassRawRTMS.SetMuraResult(&m_MuraResultFile); |
| | | } |
| | | |
| | | CGlassRawCSOT::~CGlassRawCSOT(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::SequenceGlassLoading( CgrmGlassRawData* pData ) |
| | | { |
| | | if(m_StackResult.getStackUse()) |
| | | { |
| | | SendMessageFTPDownloadStack(pData->GetGlassData()); //ì¤ííì¼ ë¤ì´ ìì² [ê¹íí 2019/1/12] |
| | | m_StackResult.StackFileReadStart(pData->GetGlassData()->m_strGlassID); |
| | | } |
| | | |
| | | SendMessageFTPDownloadDataFile(pData->GetGlassData()); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::SequenceInspectEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewEnd = m_tmReviewStart = CTime::GetCurrentTime(); |
| | | |
| | | |
| | | if(m_StackResult.getStackUse()) |
| | | { |
| | | m_StackResult.StackFileReadStop(); |
| | | } |
| | | |
| | | ReadMuraFile(pData); |
| | | |
| | | if(0) //ì´ì endìì ì íì¼ ìì±íì§ ìì(íì¼ìê°ë문ì ëë² ì¬ë¼ê°ììì) [ê¹íí 2019/1/15] |
| | | { |
| | | if(!WriteAOIFile(pData)) |
| | | return FALSE; |
| | | |
| | | SendMessageFTPUploadRaw(pData->GetGlassData()); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::SequenceReviewStart( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewStart = m_tmReviewEnd = CTime::GetCurrentTime(); |
| | | |
| | | SequenceCustomizeReview(pData); |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCSOT::SequenceCustomizeReview( CgrmGlassRawData* pData ) |
| | | { |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | /* |
| | | //ì´ì ìì±ë 커ì¤í° ë§ì´ì§ ë°ì´í° ìì |
| | | { |
| | | pGlass->m_nDefectNum; |
| | | for(int i=pGlass->m_nDefectNum-1; i>=0; i--) |
| | | { |
| | | if(pData->GetDefectData(i)->m_nCustomizeDefectType == 0 |
| | | || pData->GetDefectData(i)->m_nCustomizeDefectType == 1000) |
| | | { |
| | | pGlass->m_nDefectNum = i+1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //커ì¤í°ë§ì´ì¦ ë°ì´í° ë¡ë |
| | | { |
| | | if(m_CustomizeReview.openFile(pGlass->m_strRecipeName)) |
| | | { |
| | | pGlass->m_nCustomizePlanType = m_CustomizeReview.GetCustomizeType(); |
| | | int nCustomReviewNum = m_CustomizeReview.GetCustomizeReviewNum(); |
| | | |
| | | int nDefectStpoint = pGlass->m_nDefectNum; |
| | | if(pGlass->m_nCustomizePlanType == 2) nDefectStpoint = 0; |
| | | int nRealDefectIndex; |
| | | _grmDefectData* pGrmDefect; |
| | | _CustomizeReview* pCustomizeReview; |
| | | for(int i=0; i<nCustomReviewNum; i++) |
| | | { |
| | | nRealDefectIndex = nDefectStpoint+i; |
| | | pGrmDefect = pData->GetDefectData(nRealDefectIndex); |
| | | pCustomizeReview = m_CustomizeReview.GetCustomizeReivew(i); |
| | | |
| | | pGrmDefect->m_nCustomizeDefectType = pCustomizeReview->m_nCustomizeDefectType; |
| | | pGrmDefect->m_dCustomizeDefectPosXmm = pCustomizeReview->m_dCustomizeDefectPosXmm; |
| | | pGrmDefect->m_dCustomizeDefectPosYmm = pCustomizeReview->m_dCustomizeDefectPosYmm; |
| | | pGrmDefect->m_nCustomizeParam1 = pCustomizeReview->m_nCustomizeParam1; |
| | | pGrmDefect->m_nCustomizeParam2 = pCustomizeReview->m_nCustomizeParam2; |
| | | } |
| | | pGlass->m_nDefectNum = nDefectStpoint+nCustomReviewNum; |
| | | |
| | | pGlass->m_nCustomizeDataReadResult = 1; |
| | | } |
| | | else |
| | | { |
| | | pGlass->m_nCustomizeDataReadResult = 2; |
| | | } |
| | | } |
| | | |
| | | if(pGlass->m_nCustomizeDataReadResult == 1) return TRUE; |
| | | */ |
| | | |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCSOT::SequenceReviewEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewEnd = CTime::GetCurrentTime(); |
| | | |
| | | if(WriteAOIFile(pData) == FALSE) |
| | | return FALSE; |
| | | |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | if(m_MuraResultFile.IsRead()) SendMessageFTPUploadImage(pGlassData, FTPCMD_MURA_IMAGE); |
| | | SendMessageFTPUploadLinkFile(pGlassData); |
| | | |
| | | if(WriteIndexFile(pGlassData)) |
| | | { |
| | | SendMessageFTPUploadIndexFile(pGlassData); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::SequenceFtpUpload( char* pRawFilePathName ) |
| | | { |
| | | |
| | | CTime tmFileCreate; |
| | | _grmGlassData GlassData; |
| | | _grmGlassData* pGlassData = &GlassData; |
| | | |
| | | //ì ë³´ ì»ì´ì¤ê¸° [ê¹íí 2019/1/25] |
| | | { |
| | | //"D:\\DIT_ResultData\\Raw\\"; |
| | | //6CCF01P7_HPANELID_20190125_002545.csv |
| | | |
| | | char* pFileName = CakFileUtil::getFileName(pRawFilePathName); |
| | | char* pext = CakFileUtil::getFileExt(pRawFilePathName); |
| | | |
| | | if(!strcmp(pext, "csv") == FALSE) return FALSE; |
| | | |
| | | CakParser parser; |
| | | parser.process(pFileName, "_."); |
| | | if(parser.getTokNum() < 5) return FALSE; |
| | | |
| | | strcpy(pGlassData->m_strOperID, parser.getTokStr(0)); |
| | | strcpy(pGlassData->m_strGlassID, parser.getTokStr(1)); |
| | | char* pDate = &pFileName[parser.getTokPos(2)]; |
| | | char* pTime = &pFileName[parser.getTokPos(3)]; |
| | | int nData[8]={}; |
| | | nData[0] = (pDate[0]-'0')*1000 + (pDate[1]-'0')*100 + (pDate[2]-'0')*10+ (pDate[3]-'0')*1; |
| | | nData[1] = (pDate[4]-'0')*10+ (pDate[5]-'0')*1; |
| | | nData[2] = (pDate[6]-'0')*10+ (pDate[7]-'0')*1; |
| | | nData[3] = (pTime[0]-'0')*10+ (pTime[1]-'0')*1; |
| | | nData[4] = (pTime[2]-'0')*10+ (pTime[3]-'0')*1; |
| | | nData[5] = (pTime[4]-'0')*10+ (pTime[5]-'0')*1; |
| | | |
| | | CTime tmTemp(nData[0], nData[1], nData[2], nData[3], nData[4], nData[5] ); |
| | | tmFileCreate = tmTemp; |
| | | |
| | | FILE* pf = fopen(pRawFilePathName, "r"); |
| | | if(pf) |
| | | { |
| | | char buffer[512]; |
| | | fgets(buffer, 512, pf); |
| | | if(buffer[0] != 'H') return FALSE; |
| | | fgets(buffer, 512, pf); |
| | | fgets(buffer, 512, pf); |
| | | |
| | | fgets(buffer, 512, pf);buffer[strlen(buffer)-1] = 0; |
| | | strcpy(pGlassData->m_strEquipID, &buffer[strlen("EQUIP_TYPE:")]); |
| | | |
| | | fgets(buffer, 512, pf);buffer[strlen(buffer)-1] = 0; |
| | | strcpy(pGlassData->m_strStepID, &buffer[strlen("EQUIP_ID:")]); |
| | | } |
| | | else |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | CakFileUtil::getPath(pGlassData->m_strPath, 256, pRawFilePathName); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | m_tmReviewEnd = m_tmReviewStart = tmFileCreate; |
| | | |
| | | |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_MURA_IMAGE);//ìì¼ë©´ ì¤í¨ íê² ì§ |
| | | SendMessageFTPUploadLinkFile(pGlassData); |
| | | |
| | | if(WriteIndexFile(pGlassData)) |
| | | { |
| | | SendMessageFTPUploadIndexFile(pGlassData); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCSOT::WriteAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | BOOL bResult = TRUE; |
| | | |
| | | bResult &= MakeAOIFile(pData); |
| | | bResult &= MakeAnaFile(pData); |
| | | |
| | | m_GlassRawRTMS.WriteAOIFile(pData); |
| | | |
| | | AKLOG("WriteAOIFile Complete"); |
| | | return bResult; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::MakeAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | CString strFilePathName; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmReviewEnd; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlass->m_strOperID, pGlass->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | |
| | | strFilePathName.Format("%s\\%s", pGlass->m_strPath, strFileName);//pGlass->m_strFileName); |
| | | //strFilePathName.Format("C:\\AOIServer\\NFS\\RAW\\%s", pData->GetGlassData()->m_strFileName); |
| | | |
| | | |
| | | //FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | |
| | | CString strBuffer; |
| | | CString strLine; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //HEDER |
| | | fprintf(pf, "HEADER_BEGIN\n"); |
| | | { |
| | | makeDataHeader(strLine, pGlass); |
| | | fprintf(pf, "%s", strLine); |
| | | } |
| | | fprintf(pf, "HEADER_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //GLASS_DATA |
| | | fprintf(pf, "GLASS_DATA_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "GLASS_ID,OWNER_CODE,OWNER_TYPE,PRODUCT_ID,PROCESS_ID,PRODUCT_GROUP,LOT_ID,CST_ID,SLOT_ID,PRE_PROCESS_ID,PRE_EQP_ID,PRE_CHAMBER_ID,PRE_RECIPE_ID,GROUP_ID,AUTOSAMPLEFLAG\n"); |
| | | |
| | | makeDataGlass(strLine, pGlass); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | fprintf(pf, "GLASS_DATA_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //EQP_GLASS_DATA |
| | | fprintf(pf, "EQP_GLASS_DATA_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "RECIPE_NO,RECIPE_NAME,START_TIME,END_TIME,TACT_TIME,GLASS_YIELD,TOTAL_PANEL_CNT,OK_PANEL,NG_PANEL,X1_PANEL,X2_PANEL,X3_PANEL,X4_PANEL,X5_PANEL,X6_PANEL,X7_PANEL,X8_PANEL,X9_PANEL,TT_DEFECT_CNT,S_SIZE_DEFECT_CNT,M_SIZE_DEFECT_CNT,L_SIZE_DEFECT_CNT,GLASS_ID_DCR,TT_MURA_CNT,POINT_MURA_CNT,LINE_MURA_CNT,AREA_MURA_CNT,POINT_1,POINT_2,POINT_3,POINT_4,POINT_5,GLASS_JUDGE,GLASS_GRADE\n"); |
| | | |
| | | makeDataEQPGlass(strLine, pData); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | fprintf(pf, "EQP_GLASS_DATA_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //BLOCK_SUMMARY |
| | | fprintf(pf, "BLOCK_SUMMARY_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "BLOCK_ID,BLOCK_JUDGE_AOI,BLOCK_JUDGE_MURA,BLOCK_JUDGE_ATS,BLOCK_JUDGE_TEG,TT_PANEL,OK_PANEL,NG_PANEL,X1_PANEL,X2_PANEL,X3_PANEL,X4_PANEL,X5_PANEL,X6_PANEL,X7_PANEL,X8_PANEL,X9_PANEL,TT_DEFECT_CNT,S_SIZE_DEFECT_CNT,M_SIZE_DEFECT_CNT,L_SIZE_DEFECT_CNT,TT_MURA_CNT,POINT_MURA_CNT,LINE_MURA_CNT,AREA_MURA_CNT,GLASS_ID_DCR,POINT_1,POINT_2,POINT_3,POINT_4,POINT_5\n"); |
| | | |
| | | int nBlockNum = 1; |
| | | for(int i=0; i<nBlockNum; i++) |
| | | { |
| | | makeDataBlock(strLine, pData->GetBlockData(i)); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "BLOCK_SUMMARY_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //PANEL_SUMMARY |
| | | fprintf(pf, "PANEL_SUMMARY_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "PANEL_ID,PANEL_JUDGE_AOI,PANEL_JUDGE_MURA,PANEL_JUDGE,TT_DEFECT,TT_MURA,PANEL_ID_2D,PANEL_FLAG,PANEL_GRADE,X_D,Y_D,X_A,Y_A,DELTA_X,DELTA_Y,OK_DEFECT,NG_DEFECT,X1_DEFECT,X2_DEFECT,X3_DEFECT,X4_DEFECT,X5_DEFECT,X6_DEFECT,X7_DEFECT,X8_DEFECT,X9_DEFECT,IJP1,IJP2,IJP3,IJP4,IJP5,IJP6,IJP7,IJP8,Mark1,Mark2,Mark3,Mark4,Mark5,Mark6,Mark7,Mark8\n"); |
| | | |
| | | for(int iCell = 0; iCell < pData->GetGlassData()->m_nCellNum; iCell++) |
| | | { |
| | | _grmCellData* pCell = pData->GetCellData(iCell); |
| | | makeDataCell(strLine, pData, pCell); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "PANEL_SUMMARY_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //DEFECT_DATA |
| | | fprintf(pf, "DEFECT_DATA_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "PANEL_ID,DEFECT_NO1,DEFECT_NO2,UPDATE_TIME,STEP_1ST,RECIPE_1ST,STEP_CURRENT,RECIPE_CURRENT,GATE1,DATA1,"); |
| | | fprintf(pf, "GATE2,DATA2,X1,Y1,X2,Y2,AOI_DEFECT_TYPE,AOI_GRAY_H,AOI_GRAY_L,AOI_GRAY_AVE,"); |
| | | fprintf(pf, "AOI_DEFECT_AREA,AOI_DEFECT_LGT,AOI_DEFECT_WID,AOI_DEFECT_HGT,AOI_DEFECT_WIH,AOI_DEFECT_SIZE,DEFECT_PIX,MASK_DEFECT,REPEAT_DEFECT,DEFECT_IMAGE_DATA,"); |
| | | fprintf(pf, "AOI_CCD_NO,AOI_REVIEW_NO,OP_ID_1ST,OP_ID_2ND,OP_ID_CURRENT,DEFECT_JUGDE_1ST,DEFECT_JUGDE_2ND,DEFECT_JUGDE_CURRENT,DEFECT_REASON1,DEFECT_REASON2,"); |
| | | fprintf(pf, "DEFECT_REASON3,WSI_JUDGE,MURA_GRAY_H,MURA_GRAY_L,MURA_GRAY_AVE,MURA_AREA,MURA_LGT,MURA_WID,MURA_HGT,MURA_SIZE,"); |
| | | fprintf(pf, "MURA_PIX,MURA_TYPE,MURA_JUDGE,MURA_GRADE,MURA_IMAGE_DATA,RSRV1,RSRV2,RSRV3,RSRV4,RSRV5,"); |
| | | fprintf(pf, "RSRV6,RSRV7,RSRV8,RSRV9,FILE_NAME\n"); |
| | | |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(makeDataDefect(strLine, pData, pDefect)) |
| | | { |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "DEFECT_DATA_END\n\n"); |
| | | } |
| | | |
| | | |
| | | AKLOG("MakeAOIFile Complete : [%s]", strFilePathName.GetBuffer(0)); |
| | | fclose(pf); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::MakeAnaFile( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | |
| | | CString strFilePathName; |
| | | strFilePathName.Format("%s\\%sana", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | fprintf(pf, "%s\n", pData->GetGlassData()->m_strGlassID); |
| | | fprintf(pf, "m_strImageName, m_strDefectCode, UMCenterAlignX, UMCenterAlignY, m_nLevelSrcMin, m_nLevelSrcMax, m_nLevelSrcAvg, m_nLevelRefMin, m_nLevelRefMax, m_nLevelRefAvg, m_nLevelDiffMin, m_nLevelDiffMax, m_nLevelDiffAvg"); |
| | | for(int i=0; i<MAX_ZONE_NUM; i++) fprintf(pf, ",Zone%02d", i); |
| | | fprintf(pf, ", m_sDefectPeak, m_nPixelSize, DefectType, UMSize, Density, ScrtRatio, MergeState"); |
| | | fprintf(pf, "\n"); |
| | | |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(pData->GetGlassData()->m_nScanCoordinateY == 1) //ë¶íì¤ë¹ì ê²½ì° XYë°ì |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignY / 1000.0, (double)pDefect->m_nUMCenterAlignX / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for(int iz=0; iz<MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | else |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignX / 1000.0, (double)pDefect->m_nUMCenterAlignY / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for(int iz=0; iz<MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | } |
| | | AKLOG("MakeAnaFile Complete %s", strFilePathName); |
| | | fclose(pf); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawCSOT::makeDataHeader( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | CString strCurDateTime; |
| | | { |
| | | CTime Time = m_tmReviewEnd; |
| | | strCurDateTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | } |
| | | strValue.Format("FILE_VERSION:%.1lf\n", 1.0); |
| | | strLine += strValue; |
| | | strValue.Format("FILE_CREATED_TIME:%s\n", strCurDateTime); |
| | | strLine += strValue; |
| | | strValue.Format("EQUIP_TYPE:%s\n", pGlassData->m_strEquipID); |
| | | strLine += strValue; |
| | | strValue.Format("EQUIP_ID:%s\n", pGlassData->m_strStepID); |
| | | strLine += strValue; |
| | | strValue.Format("CONTENT:%s\n", _T("GLASS_DATA/EQP_GLASS_DATA/BLOCK_SUMMARY/PANEL_SUMMARY/DEFECT_DATA")); |
| | | strLine += strValue; |
| | | } |
| | | void CGlassRawCSOT::makeDataGlass( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | //물ë¥ì ë³´ íì±í´ì ê°ì§ê³ ì¤ê¸° CString strProcessID, strProductID, strLotID, strSlotID; |
| | | { |
| | | std::map<CString, CString> mapTransData; |
| | | |
| | | CString strTemp; |
| | | strTemp.Format("D:\\DIT_ResultData\\DownloadData\\%s.dat", pGlassData->m_strGlassID); |
| | | |
| | | FILE *pFile = fopen(strTemp.GetBuffer(0), "r"); |
| | | if(pFile) |
| | | { |
| | | const int MAX_BUFFER = 1024; |
| | | char buffer[MAX_BUFFER]; |
| | | CString strKey; |
| | | CString strValue; |
| | | char* pFlagPos; |
| | | char* pEndFlagPos; |
| | | char* pTest = "ã"; |
| | | while (fgets(buffer, MAX_BUFFER, pFile) != '\0') |
| | | { |
| | | pFlagPos = strchr(buffer, '='); |
| | | |
| | | if(pFlagPos == NULL) continue; |
| | | |
| | | if(pEndFlagPos = strchr(pFlagPos, -29)) //"ã"ëì ìë end문ìì´ ì ê±° |
| | | pEndFlagPos[0] = 0; |
| | | |
| | | pFlagPos[0] = 0; // = ì´ê±¸ 0ì¼ë¡ ë§ë¤ì´ì Key, Value ë¶ë¦¬ |
| | | |
| | | strKey = buffer; |
| | | strValue = &pFlagPos[1]; |
| | | |
| | | strValue.Remove(' ');//í¹ì 모를 공백 ì ê±° [ê¹íí 2019/1/31] |
| | | |
| | | mapTransData.insert(std::make_pair(strKey, strValue)); |
| | | } |
| | | fclose(pFile); |
| | | } |
| | | |
| | | |
| | | //GlassDataì ê°ì ë£ì´ì¤ [ê¹íí 2019/1/31] |
| | | strcpy(pGlassData->m_strSLotID, mapTransData["Slot_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strProductID, mapTransData["Product_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strProcessID, mapTransData["Process_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strLotID, mapTransData["Lot_ID"].GetBuffer(0)); |
| | | } |
| | | |
| | | |
| | | strValue.Format("%s", pGlassData->m_strGlassID); //1. Glass ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strOwnerCode); //2. OWNER_CODE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strOwnerType); //3. OWNER_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProductID); //4. PRODUCT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProcessID); //5. PROCESS_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProductGroup); //6. PRODUCT_GROUP |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strLotID); //7. LOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strCSTID); //8. CST_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strSLotID); //9.SLOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProcessID); //10.PRE_PROCESS_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strEquipID); //11.PRE_EQP_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPreChamerID); //12.PRE_CHAMBER_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPreRecipeID); //13.PRE_RECIPE_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGroupID); //14.GROUP_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pGlassData->m_cAutoSampleFlag); //15.AUTOSAMPLEFLAG |
| | | strLine += strValue; |
| | | |
| | | |
| | | } |
| | | |
| | | void CGlassRawCSOT::makeDataEQPGlass( CString& strLine, CgrmGlassRawData* pData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | _grmGlassData *pGlassData = pData->GetGlassData(); |
| | | CString strStartTime, strEndTime; |
| | | { |
| | | CTime Time; |
| | | Time = pGlassData->m_tmGlassLoading; |
| | | strStartTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | Time = pGlassData->m_tmInspectionEND; |
| | | strEndTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | } |
| | | |
| | | strValue.Format("%s", pGlassData->m_strPPID); //1. RECIPE_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); //2. RECIPE_NAME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strStartTime); //3. START_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strEndTime); //4. END_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", strEndTime - strStartTime); //5. TACT_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0000"); //6. GLASS_YIELD |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nCellNum); //7. TOTAL_PANEL_CNT(CELL COUNT) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumJudgeOKBlack+pGlassData->m_nDefectNumJudgeOKWhite); //8. OK_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumJudgeNG); //9. NG_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //10. X1_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //11. X2_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //12. X3_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //13. X4_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //14. X5_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //15. X6_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //16. X7_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //17. X8_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumSizeHuge); //18. X9_PANEL(Count) //190116 ê³ ê°ì¬ê° í¤í°ì¬ì ì¬ê¸°ìë¤ê° olê°¯ì ì ì´ ë¬ë¼ê³ ìì² |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNum); //19. TT_DEFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumSizeSmall); //20. S_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumSizeMid); //21. M_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nDefectNumSizeLarge); //22. L_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "AAAA"); //23. GLASS_ID_DCR |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", m_MuraResultFile.GetDefectNum()); //24. TT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //25. POINT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //26. LINE_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //27. AREA_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //28. POINT_1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //29. POINT_2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //30. POINT_3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //31. POINT_4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 1); //32. POINT_5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassJudge); //33. GLASS_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassCode); //34. GLASS_GRADE |
| | | strLine += strValue; |
| | | |
| | | } |
| | | |
| | | void CGlassRawCSOT::makeDataBlock( CString& strLine, _grmBlockData* pBlockData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("%s", pBlockData->m_strBlockID); //1. BLOCK_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeAOI); //2. BLOCK_JUDGE_AOI |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", 'G'); //3. BLOCK_JUDGE_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeATS); //4. BLOCK_JUDGE_ATS |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeTEG); //5. BLOCK_JUDGE_TEG |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //6. TT_PANEL |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //7. OK_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //8. NG_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //9. X1_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //10. X2_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //11. X3_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //12. X4_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //13. X5_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //14. X6_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //15. X7_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //16. X8_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //17. X9_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //18. TT_DEFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //19. S_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //20. M_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //21. L_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //22. GLASS_ID_DCR |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //23. TT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //24. POINT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //25. LINE_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //26. AREA_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //27. POINT_1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //28. POINT_2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //29. POINT_3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //30. POINT_4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //31. POINT_5 |
| | | strLine += strValue; |
| | | } |
| | | |
| | | |
| | | void CGlassRawCSOT::makeDataCell( CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | CString strJudgeCode = "O"; |
| | | CString strLastCode = "O"; |
| | | { |
| | | switch (pCellData->m_nJudgement) |
| | | { |
| | | case 0: strJudgeCode = "G"; break; |
| | | case 2: strJudgeCode = "N"; break; |
| | | case 10: strJudgeCode = "O"; break; |
| | | case 1: strJudgeCode = "O"; break; |
| | | case 6: strJudgeCode = "O"; break; |
| | | case 7: strJudgeCode = "O"; break; |
| | | } |
| | | } |
| | | strLastCode = strJudgeCode; |
| | | |
| | | strValue.Format("%s%s", pData->GetGlassData()->m_strGlassID, pCellData->m_strCellName); //1. PANEL_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strJudgeCode); //2. PANEL_JUDGE_AOI |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "O"); //3. PANEL_JUDGE_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strLastCode); //4. PANEL_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->getTotalDefectNum()); //5. tt_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", m_MuraResultFile.GetDefectNum(pCellData->m_nCellID)); //6. tt_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //7. PANEL_ID_2D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nJudgeFlag); //8. PANEL_FLAG |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nJudgeGlade); //9. PANEL_GRADE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellLeft); //10. X_D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellTop); //11. Y_D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellRight-pCellData->m_rectCellLeft); //12. X_A |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellBottom-pCellData->m_rectCellTop); //13. Y_A |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //14. DELTA_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //15. DELTA_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nDefectNumJudgeOKWhite + pCellData->m_nDefectNumJudgeOKBlack); //16. OK_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nDefectNumJudgeNG); //17. NG_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //18. X1_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //19. X2_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //20. X3_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //21. X4_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //22. X5_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //23. X6_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //24. X7_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //25. X8_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //26. X9_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //27. IJP1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //28. IJP2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //29. IJP3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //30. IJP4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //31. IJP5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //32. IJP6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //33. IJP7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //34. IJP8 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //35. Mark1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //36. Mark2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //37. Mark3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //38. Mark4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //39. Mark5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //40. Mark6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //41. Mark7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //42. Mark8 |
| | | strLine += strValue; |
| | | |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::makeDataDefect( CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | _grmCellData* pCellData = pData->GetCellData(pDefectData->m_nCellIdx); |
| | | |
| | | if(pDefectData->m_ReviewDefect.m_nPlanType == 1000 //aoiê²°í¨ |
| | | //pDefectData->m_ReviewDefect.m_nPlanType == 999 |
| | | ) return FALSE; |
| | | |
| | | CString strUpdateTime; |
| | | { |
| | | CTime Time = pGlassData->m_tmInspectionEND; |
| | | strUpdateTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | |
| | | // CTime Time = pGlassData->m_tmInspectionEND; |
| | | // strUpdateTime.Format("%04d%02d%02d%02d%02d", |
| | | // Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | // Time.GetHour(), Time.GetMinute()); |
| | | } |
| | | |
| | | CString strStepFirst;//첫ë²ì§¸ ì¤í [ê¹íí 2018/12/5] |
| | | { |
| | | if(pDefectData->m_strStackFirst[0]) |
| | | { |
| | | strStepFirst =pDefectData->m_strStackFirst; |
| | | } |
| | | else |
| | | { |
| | | strStepFirst = pGlassData->m_strStepID; |
| | | } |
| | | } |
| | | |
| | | strValue.Format("%s%s", pData->GetGlassData()->m_strGlassID, pCellData->m_strCellName); //1. CELL ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectID); //2. DEFECT_NO1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectID); //3. DEFECT_NO2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strUpdateTime); //4. UPDATE_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strStepFirst); //5. STEP_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); //6. RECIPE_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strStepID); //7. STEP_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); //8. RECIPE_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGate); //9. GATE1, ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellData); //10. DATA1, ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGateAlign); //11. GATE2, ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellDataAlign); //12. DATA2, ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | |
| | | |
| | | |
| | | //_grmGlassData* pGlass = pData->GetGlassData(); |
| | | |
| | | |
| | | |
| | | // x,yì¢í mmë¨ì ììì ì¸ì리ê¹ì§ íí (ê³ ê°ì¬ ìì²) - 2019-01-30 HJH |
| | | if(pGlassData->m_nScanCoordinateY == 1) //ë¶íì¤ë¹ì ê²½ì° XYë°ì |
| | | { |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignY / 1000.0); //13. X1, umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignX / 1000.0); //14. Y1, umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellY / 1000.0); //15. X2, ì
ìì ê¸°ì¤ x ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellX / 1000.0); //16. Y2, ì
ìì ê¸°ì¤ y ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectType); //17. AOI_DEFECT_TYPE, SERVER_DefectType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMax); //18. AOI_GRAY_H, ê²°í¨ ë°ê¸° Max |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMin); //19. AOI_GRAY_L, ê²°í¨ ë°ê¸° Min |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcAvg); //20. AOI_GRAY_AVE, ê²°í¨ ë°ê¸° Avg |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //21. AOI_DEFECT_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectRScale); //22. AOI_DEFECT_LGT, ê²°í¨ ê¸¸ì´ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectSizeType)); //23. AOI_DEFECT_WID , <- 190106 ê³ ê° ë´ë¹ì ìì² í¤í°ì¬ì ì¬ì´ì¦íì
ì¼ë¡ë¡ ë³ê²½ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_sPixelWidth); //24. AOI_DEFECT_HGT |
| | | } |
| | | else |
| | | { |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignX / 1000.0); //13. X1, umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignY / 1000.0); //14. Y1, umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellX / 1000.0); //15. X2, ì
ìì ê¸°ì¤ x ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellY / 1000.0); //16. Y2, ì
ìì ê¸°ì¤ y ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectType); //17. AOI_DEFECT_TYPE, SERVER_DefectType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMax); //18. AOI_GRAY_H, ê²°í¨ ë°ê¸° Max |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMin); //19. AOI_GRAY_L, ê²°í¨ ë°ê¸° Min |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcAvg); //20. AOI_GRAY_AVE, ê²°í¨ ë°ê¸° Avg |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //21. AOI_DEFECT_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectRScale); //22. AOI_DEFECT_LGT, ê²°í¨ ê¸¸ì´ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectSizeType)); //23. AOI_DEFECT_WID, <- 190106 ê³ ê° ë´ë¹ì ìì² í¤í°ì¬ì ì¬ì´ì¦íì
ì¼ë¡ë¡ ë³ê²½ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_sPixelHeight); //24. AOI_DEFECT_HGT |
| | | } |
| | | |
| | | |
| | | |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSizeType); //25. AOI_DEFECT_WIH, SERVER_DefectSizeType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMSize); //26. AOI_DEFECT_SIZE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //27. DEFECT_PIX |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSubType == 2 ? 1:0); //28. MASK_DEFECT, í Glassìì ë°ê²¬ë ë§ì¤í¬ê²°í¨ 묶ìì |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSubType == 3 ? 1:0); //29. REPEAT_DEFECT, ì°ìê²°í¨ë°ê²¬ìí ëì¼ì¢í ë°ë³µì |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pDefectData->m_ReviewDefect.m_strRevImageName); //30. DEFECT_IMAGE_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectIdx); //31. AOI_CCD_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_ReviewDefect.m_nShotIndex); //32. AOI_REVIEW_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //33. OP_ID_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //34. OP_ID_2ND |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //35. OP_ID_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectJudgement)); //36. DEFECT_JUGDE_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "O"); //37. DEFECT_JUGDE_2ND |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectJudgement)); //38. DEFECT_JUGDE_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //39. DEFECT_REASON1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //40. DEFECT_REASON2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //41. DEFECT_REASON3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.2lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[1]);//42. WSI_JUDGE |
| | | strLine += strValue+strDiv; |
| | | //KMS - 20190128 MuraDefect ë´ì© ì¶ê° |
| | | _MacroDefect* pMuraDefect = m_MuraResultFile.FindDefect(pDefectData->m_nUMCenterAlignX, pDefectData->m_nUMCenterAlignY); |
| | | _MacroDefect MuraDefect; |
| | | if(pMuraDefect) MuraDefect = *pMuraDefect; |
| | | strValue.Format("%d", MuraDefect.G_MAX); //43. MURA_GRAY_H |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.G_MIN); //44. MURA_GRAY_L |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.G_AVG); //45. MURA_GRAY_AVE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_S); //46. MURA_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_L); //47. MURA_LGT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_W); //48. MURA_WID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.COORD_Y1); //49. MURA_HGT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_S); //50. MURA_SIZE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.COORD_PX1); //51. MURA_PIX |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.MAIN_TYPE.GetBuffer(0)); //52. MURA_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.JUDGE.GetBuffer(0)); //53. MURA_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.SUB_TYPE.GetBuffer(0)); //54. MURA_GRADE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.IMG_FILE_NAME.GetBuffer(0)); //55. MURA_IMAGE_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //56. RSRV1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //57. RSRV2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //58. RSRV3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //59. RSRV4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //60. RSRV5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //61. RSRV6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //62. RSRV7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //63. RSRV8 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //64. RSRV9 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pDefectData->m_strAoiImageName); //65. FILE_NAME |
| | | strLine += strValue; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawCSOT::ReadMuraFile( CgrmGlassRawData* pData ) |
| | | { |
| | | if(m_MuraResultFile.m_strServerResultRawPath.IsEmpty() == FALSE)//ì½ì ê²°ê³¼ íì¼ ë³µì¬,ìì íí[2017/3/29] |
| | | { |
| | | CString strMacroFilePath; |
| | | { |
| | | strMacroFilePath.Format("%s\\%s_*.dat", m_MuraResultFile.m_strMacroResultRawPath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | CFileFind FF; |
| | | |
| | | if (FF.FindFile(strMacroFilePath)) |
| | | { |
| | | FF.FindNextFile(); |
| | | strMacroFilePath = FF.GetFilePath(); |
| | | FF.Close(); |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Find Macro File Fail. [%s]", strMacroFilePath); |
| | | return FALSE; |
| | | } |
| | | } |
| | | |
| | | |
| | | CString strMacroResultTargetPath; |
| | | strMacroResultTargetPath.Format("%s\\%s.dat", m_MuraResultFile.m_strServerResultRawPath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | if(TRUE == CopyFile(strMacroFilePath,strMacroResultTargetPath,FALSE)) |
| | | { |
| | | if(m_MuraResultFile.openFile(strMacroResultTargetPath.GetBuffer(0)) == TRUE) |
| | | { |
| | | AKLOG("Macro File Read Success : %dItem", m_MuraResultFile.GetDefectNum()); |
| | | //DeleteFile(strMacroResultTargetPath); //ìì ë hddspacectrlì´ íë ê²ì¼ë¡ íµì¼ |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Macro File Read Fail[%s]", strMacroFilePath); |
| | | //DeleteFile(strMacroResultTargetPath); //ìì ë hddspacectrlì´ íë ê²ì¼ë¡ íµì¼ |
| | | return FALSE; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //ë¬´ë¼ ì´ë¯¸ì§ ë³µì¬(ftpì
ë¡ë를 ìí¨) [ê¹íí 2018/12/5] |
| | | if(m_MuraResultFile.m_strMacroResultImagePath.IsEmpty() == FALSE && m_MuraResultFile.m_strServerResultImagePath.IsEmpty() == FALSE)//ì´ë¯¸ì§ íì¼ ë³µì¬ íí[2017/3/29] |
| | | { |
| | | CString strMacroImageSrcPath; |
| | | CString strMacroImageTarPath; |
| | | |
| | | strMacroImageSrcPath.Format("%s\\%s", m_MuraResultFile.m_strMacroResultImagePath, pData->GetGlassData()->m_strGlassID); |
| | | strMacroImageTarPath.Format("%s\\%s", m_MuraResultFile.m_strServerResultImagePath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | AKLOG("Macro Image File Copy Start[%s]", strMacroImageTarPath); |
| | | CakFileUtil::CopyFolder(strMacroImageSrcPath.GetBuffer(0), strMacroImageTarPath.GetBuffer(0), FALSE); |
| | | AKLOG("Macro Image File Copy End"); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | void CGlassRawCSOT::SendMessageFTPUploadLinkFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_LINK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CGlassRawCSOT::SendMessageFTPUploadRaw( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_RAW, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CGlassRawCSOT::SendMessageFTPDownloadStack( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_STACK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawCSOT::SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPDownloader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | //GetFormatDescription(FTPCMD_DATAFILE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | { |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | sprintf(strServerFolder, "%s", pGlassData->m_strCassetteSequenceNo); |
| | | sprintf(strServerFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | sprintf(strLocalFolder, "D:\\DIT_ResultData\\DownloadData"); |
| | | sprintf(pLocalFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawCSOT::SendMessageFTPUploadImage( _grmGlassData* pGlassData, emFTPCommand sort) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[32];// = "*.*"; |
| | | char strLocalFolder[256] = {}; |
| | | char strLocalFile[32];// = "*.*"; |
| | | |
| | | GetFormatDescription(sort, strServerFolder, strServerFile, strLocalFolder, strLocalFile, pGlassData); |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, strLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE; |
| | | upParam.m_nSendResultCode = FALSE; |
| | | upParam.m_nProcessType = FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawUpload; //<--ìê±´ ëì¤ì êµ¬ë¶ |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCSOT::SendMessageFTPUploadIndexFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) |
| | | return FALSE; |
| | | |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return FALSE; |
| | | |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_INDEX, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // ServerFile = "ftptestfile.txt"; |
| | | // |
| | | // sprintf(strLocalFolder, "D:"); |
| | | // pLocalFile = "ftptestfile.txt"; |
| | | // } |
| | | |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawCSOT::GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData) |
| | | { |
| | | |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | CString strGlassIDLevel5th = strGlassID.Left(5); |
| | | CString strGlassIDLevel8th = strGlassID.Left(8); |
| | | |
| | | switch(sort) |
| | | { |
| | | case FTPCMD_AOI_IMAGE: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_AOI_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_REVIEW_IMAGE: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_REV_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_RAW: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmReviewEnd; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_STACK: |
| | | { |
| | | CTime time = pGlassData->m_tmGlassLoading; |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", m_StackResult.getStackEquipID(), time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | //ê°ì¥ ìµê·¼ê±¸ ì°¾ìì¼ íë? [ê¹íí 2019/1/12] |
| | | sprintf(pServerFile, "%s_%s_*.csv", |
| | | m_StackResult.getStackOperID(), |
| | | pGlassData->m_strGlassID); |
| | | |
| | | sprintf(pLocalPath, "%s", m_StackResult.getStackLocalPath()); |
| | | sprintf(pLocalFile, "%s.txt", strGlassID.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_MURA_IMAGE: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_MURA_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_INDEX: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | sprintf(pServerPath, "INDEX\\%s", pGlassData->m_strEquipID); |
| | | sprintf(pServerFile, "%04d%02d%02d_%s.csv", time.GetYear(), time.GetMonth(), time.GetDay(), pGlassData->m_strStepID); |
| | | |
| | | sprintf(pLocalPath, "%s", LOCAL_INDEX_PATH); |
| | | sprintf(pLocalFile, "%s", pServerFile); |
| | | } |
| | | break; |
| | | |
| | | case FTPCMD_LINK: |
| | | { |
| | | CTime time = m_tmReviewEnd; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmReviewEnd; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%s\\%s\\%s\\%s", "LINK", pGlassData->m_strEquipID, |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawCSOT::WriteIndexFile( _grmGlassData* pGlassData) |
| | | { |
| | | CTime time = CTime::GetCurrentTime();//m_tmReviewEnd; |
| | | |
| | | CString strLocalIndexFileName; |
| | | strLocalIndexFileName.Format("%s\\%04d%02d%02d_%s.csv", LOCAL_INDEX_PATH, |
| | | time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | pGlassData->m_strStepID); |
| | | |
| | | |
| | | if(!PathFileExists(strLocalIndexFileName))//ì²ììì±ëë íì¼ì¸ì§ ì²´í¬ í´ì í¤ë ë¼ì¸ ë£ì´ì¤ |
| | | { |
| | | FILE* pFile = fopen(strLocalIndexFileName.GetBuffer(0), "w"); |
| | | if(pFile) |
| | | { |
| | | fprintf(pFile, "Date_Time, Path\n"); |
| | | fclose(pFile); |
| | | } |
| | | } |
| | | |
| | | |
| | | FILE* fp = fopen(strLocalIndexFileName.GetBuffer(0), "a"); |
| | | if(fp == NULL) |
| | | return FALSE; |
| | | |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | CString strDate; |
| | | strDate.Format("%04d/%02d/%02d %02d:%02d:%02d", time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond()); |
| | | |
| | | char* pHomePath = "/EL"; |
| | | //Review Image File |
| | | { |
| | | GetFormatDescription(FTPCMD_REVIEW_IMAGE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strLocal_FindPath; |
| | | CString strServer_Path; |
| | | |
| | | strLocal_FindPath.Format("%s\\*.*", strLocalFolder); |
| | | strServer_Path.Format("\\%s\\",strServerFolder); |
| | | |
| | | CFileFind finder; |
| | | BOOL bFind = finder.FindFile(strLocal_FindPath); |
| | | strServer_Path.Replace('\\', '/'); |
| | | while(bFind) |
| | | { |
| | | bFind = finder.FindNextFile(); |
| | | |
| | | if (finder.IsDots()) continue; |
| | | if (finder.IsDirectory()) continue; |
| | | |
| | | |
| | | fprintf(fp, "%s,%s%s%s\n", strDate, pHomePath, strServer_Path.GetBuffer(0), finder.GetFileName().GetBuffer(0)); |
| | | } |
| | | finder.Close(); |
| | | } |
| | | // Inspector Image |
| | | { |
| | | GetFormatDescription(FTPCMD_AOI_IMAGE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strLocal_FindPath; |
| | | CString strServer_Path; |
| | | |
| | | strLocal_FindPath.Format("%s\\*.*", strLocalFolder); |
| | | strServer_Path.Format("\\%s\\",strServerFolder); |
| | | |
| | | CFileFind finder; |
| | | BOOL bFind = finder.FindFile(strLocal_FindPath); |
| | | strServer_Path.Replace('\\', '/'); |
| | | while(bFind) |
| | | { |
| | | bFind = finder.FindNextFile(); |
| | | |
| | | if (finder.IsDots()) continue; |
| | | if (finder.IsDirectory()) continue; |
| | | |
| | | |
| | | fprintf(fp, "%s,%s%s%s\n", strDate, pHomePath, strServer_Path.GetBuffer(0), finder.GetFileName().GetBuffer(0)); |
| | | } |
| | | finder.Close(); |
| | | } |
| | | // RAW |
| | | { |
| | | GetFormatDescription(FTPCMD_RAW, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strServerPath = strServerFolder; |
| | | strServerPath.Replace('\\', '/'); |
| | | fprintf(fp, "%s,%s/%s/%s\n", strDate, pHomePath, strServerPath.GetBuffer(0), strServerFile); |
| | | } |
| | | if(m_MuraResultFile.IsRead())// MURA [ê¹íí 2019/1/10] |
| | | { |
| | | GetFormatDescription(FTPCMD_MURA_IMAGE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strLocal_FindPath; |
| | | CString strServer_Path; |
| | | |
| | | strLocal_FindPath.Format("%s\\*.*", strLocalFolder); |
| | | strServer_Path.Format("\\%s\\",strServerFolder); |
| | | |
| | | CFileFind finder; |
| | | BOOL bFind = finder.FindFile(strLocal_FindPath); |
| | | strServer_Path.Replace('\\', '/'); |
| | | while(bFind) |
| | | { |
| | | bFind = finder.FindNextFile(); |
| | | |
| | | if (finder.IsDots()) continue; |
| | | if (finder.IsDirectory()) continue; |
| | | |
| | | |
| | | fprintf(fp, "%s,%s/%s%s\n", strDate, pHomePath, strServer_Path.GetBuffer(0), finder.GetFileName().GetBuffer(0)); |
| | | } |
| | | finder.Close(); |
| | | } |
| | | |
| | | // Link File |
| | | { |
| | | GetFormatDescription(FTPCMD_LINK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strServerPath = strServerFolder; |
| | | strServerPath.Replace('\\', '/'); |
| | | fprintf(fp, "%s,%s/%s/%s\n", strDate, pHomePath, strServerPath.GetBuffer(0), strServerFile); |
| | | } |
| | | |
| | | // Index |
| | | { |
| | | GetFormatDescription(FTPCMD_INDEX, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | CString strServerPath = strServerFolder; |
| | | strServerPath.Replace('\\', '/'); |
| | | fprintf(fp, "%s,%s/%s/%s\n", strDate, pHomePath, strServerPath.GetBuffer(0), strServerFile); |
| | | } |
| | | |
| | | |
| | | fclose(fp); |
| | | return TRUE; |
| | | |
| | | } |
| | | |
| | | CString CGlassRawCSOT::GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam) |
| | | { |
| | | CString sStr; |
| | | switch(nDefectInfoType) |
| | | { |
| | | case DMT_DefectJudge:// Judge |
| | | { |
| | | sStr = "O"; |
| | | switch(nParam) |
| | | { |
| | | case 0: sStr.Format("O"); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case DMT_DefectSizeType: |
| | | { |
| | | sStr = "S"; |
| | | switch(nParam) |
| | | { |
| | | //case SizeType_Unknown: sStr.Format("U"); break; |
| | | case 1: sStr.Format("S"); |
| | | break; |
| | | case 2: sStr.Format("M"); |
| | | break; |
| | | case 3: sStr.Format("L"); |
| | | break; |
| | | case 4: sStr.Format("O"); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return sStr; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | #include "GlassRawRTMS.h" |
| | | #include "StackResultCSOT.h" |
| | | #include "MacroResultFile.h" |
| | | #include "CustomizeReview.h" |
| | | |
| | | enum emFTPCommand |
| | | { |
| | | FTPCMD_REVIEW_IMAGE =0, |
| | | FTPCMD_RAW , |
| | | FTPCMD_INDEX , |
| | | FTPCMD_AOI_IMAGE , |
| | | FTPCMD_MURA_RAW , |
| | | FTPCMD_MURA_IMAGE , |
| | | FTPCMD_STACK , |
| | | FTPCMD_LINK , |
| | | FILESORT_NUM |
| | | }; |
| | | |
| | | |
| | | |
| | | class CGlassRawCSOT : public CGlassRawBase |
| | | { |
| | | public: |
| | | enum emDefectMemberType |
| | | { |
| | | DMT_DefectJudge = 0, |
| | | DMT_DefectSizeType |
| | | }; |
| | | |
| | | public: |
| | | CGlassRawCSOT(void); |
| | | ~CGlassRawCSOT(void); |
| | | |
| | | static char* GetClassName(){return "CSOT T4";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceCustomizeReview(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | virtual BOOL SequenceFtpUpload(char* pRawFileName); |
| | | |
| | | virtual void NotifyUpdateOptionInfo(){m_StackResult.readOptionFile();}; |
| | | |
| | | |
| | | |
| | | void SendMessageFTPUploadRaw(_grmGlassData* pGlassData); |
| | | void SendMessageFTPDownloadStack(_grmGlassData* pGlassData); |
| | | void SendMessageFTPUploadImage(_grmGlassData* pGlassData, emFTPCommand sort); |
| | | BOOL SendMessageFTPUploadIndexFile(_grmGlassData* pGlassData); |
| | | void SendMessageFTPUploadLinkFile(_grmGlassData* pGlassData); |
| | | void SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData); |
| | | |
| | | |
| | | BOOL ReadMuraFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAOIFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAnaFile(CgrmGlassRawData* pData); |
| | | BOOL WriteIndexFile(_grmGlassData* pGlassData); |
| | | |
| | | void makeDataHeader(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataGlass(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataEQPGlass(CString& strLine, CgrmGlassRawData* pData); |
| | | void makeDataBlock(CString& strLine, _grmBlockData* pBlockData); |
| | | void makeDataCell(CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData); |
| | | BOOL makeDataDefect(CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData); |
| | | |
| | | void GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData); |
| | | CString GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam); |
| | | |
| | | |
| | | public: |
| | | CMacroResultFile* GetmuraResultFile(){return &m_MuraResultFile;} // RTMSìì Mura ë°ì´í° ì¬ì© |
| | | |
| | | |
| | | protected: |
| | | CGlassRawRTMS m_GlassRawRTMS;//RTMSì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | CMacroResultFile m_MuraResultFile; //무ë¼ì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | CStackResultCSOT m_StackResult; |
| | | CCustomizeReview m_CustomizeReview; |
| | | |
| | | CTime m_tmReviewStart; |
| | | CTime m_tmReviewEnd; |
| | | }; |
| | | |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawDemo.h" |
| | | #include "akLoggerExt.h" |
| | | #include "MacroResultFile.h" |
| | | #include "akCore/akFileUtil.h" |
| | | #include "akGridData.h" |
| | | |
| | | //#include "AOIDefinitionType.h" |
| | | //#include "AOIDefinition.h" |
| | | |
| | | #define LOCAL_INDEX_PATH "D:\\DIT_ResultData\\Index\\" |
| | | #define LOCAL_REV_IMAGE_PATH "D:\\ResultData\\Upload\\Image\\" |
| | | #define LOCAL_AOI_IMAGE_PATH "D:\\Image\\Defect\\" |
| | | #define LOCAL_MURA_IMAGE_PATH "D:\\DIT_ResultData\\Mura\\IMG\\" |
| | | #define LOCAL_DEEP_PATH "D:\\DIT_ResultData\\Deeplearning\\" |
| | | |
| | | #define LOCAL_AOIRAWDFS_PATH "D:\\DIT_ResultData\\Raw" |
| | | #define LOCAL_AOIRAWBIN_PATH "D:\\DIT_ResultData\\RawBin" |
| | | #define NETWORK_AOIRAWDFS_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\Raw" |
| | | #define NETWORK_AOIRAWBIN_PATH "\\\\126.100.100.1\\d\\DIT_ResultData\\RawBin" |
| | | |
| | | |
| | | |
| | | CGlassRawDemo::CGlassRawDemo(void) |
| | | { |
| | | CreateDirectory(LOCAL_AOIRAWDFS_PATH, NULL); |
| | | CreateDirectory(LOCAL_AOIRAWBIN_PATH, NULL); |
| | | m_MuraResultFile.readOptionFile("C:\\DIT_Review\\ReviewServerConfig\\MacroInfo.cfg"); |
| | | |
| | | m_GlassRawRTMS.SetMuraResult(&m_MuraResultFile); |
| | | } |
| | | |
| | | CGlassRawDemo::~CGlassRawDemo(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::SequenceGlassLoading( CgrmGlassRawData* pData ) |
| | | { |
| | | /* //ì¤íê¸°ë¥ |
| | | if(0)//m_StackResult.getStackUse()) |
| | | { |
| | | SendMessageFTPDownloadDataFile(pData->GetGlassData(0)); |
| | | if(IsUseDuglex(pData)) SendMessageFTPDownloadDataFile(pData->GetGlassData(1)); |
| | | |
| | | m_StackResult[0].StackFileReadStart(pData->GetGlassData(0)->m_strGlassID); |
| | | if(IsUseDuglex(pData)) m_StackResult[1].StackFileReadStart(pData->GetGlassData(1)->m_strGlassID); |
| | | } |
| | | */ |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::SequenceInspectEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewEnd = m_tmReviewStart = CTime::GetCurrentTime(); |
| | | m_tmFileCreateTime = CTime::GetCurrentTime(); |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | { |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | CTime CurrTime = pGlassData->m_tmGlassLoading; |
| | | CString strTime=_T(""), strFileName=_T(""); |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s.bin", pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | |
| | | strcpy(pData->GetGlassData()->m_strFileName, strFileName.GetBuffer(0)); |
| | | } |
| | | strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | if(!WriteBinFile(pData)) |
| | | return FALSE; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::SequenceReviewStart( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewStart = m_tmReviewEnd = CTime::GetCurrentTime(); |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | strcpy(pData->GetGlassData()->m_strPath, NETWORK_AOIRAWBIN_PATH); |
| | | //strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | CString strFindFile; |
| | | int nCloseTime = 600*100000;//sec |
| | | int nReTryTime = 30; |
| | | { |
| | | CTime tmReviewLoading = CTime::GetCurrentTime(); |
| | | CString strWild; |
| | | strWild.Format("%s\\%s_*.*", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strGlassID); |
| | | CakFileUtil akFileFinder; |
| | | while(nReTryTime--) |
| | | { |
| | | akFileFinder.FindFile(strWild.GetBuffer(0), FALSE); |
| | | VECFINDDATA* pFindData = akFileFinder.getFindData(); |
| | | int nFileNamePos = strlen(akFileFinder.getProcessPath()); |
| | | std::map<LONGLONG, CString> mapSpanFileName; |
| | | for(int i=0; i<pFindData->size(); i++) |
| | | { |
| | | char* pFileName = &((*pFindData)[i]).name[nFileNamePos]; |
| | | { |
| | | CakParser parser; |
| | | parser.process(pFileName, "_."); |
| | | if(parser.getTokNum() < 4) continue; |
| | | |
| | | int nDataTime[8]={}; |
| | | { |
| | | int nTokIndex=0; |
| | | const char* pGlassId = parser.getTokStr(nTokIndex++); |
| | | char* pDate = &pFileName[parser.getTokPos(nTokIndex++)]; |
| | | char* pTime = &pFileName[parser.getTokPos(nTokIndex++)]; |
| | | |
| | | nDataTime[0] = (pDate[0]-'0')*1000 + (pDate[1]-'0')*100 + (pDate[2]-'0')*10+ (pDate[3]-'0')*1; |
| | | nDataTime[1] = (pDate[4]-'0')*10+ (pDate[5]-'0')*1; |
| | | nDataTime[2] = (pDate[6]-'0')*10+ (pDate[7]-'0')*1; |
| | | nDataTime[3] = (pTime[0]-'0')*10+ (pTime[1]-'0')*1; |
| | | nDataTime[4] = (pTime[2]-'0')*10+ (pTime[3]-'0')*1; |
| | | nDataTime[5] = (pTime[4]-'0')*10+ (pTime[5]-'0')*1; |
| | | } |
| | | |
| | | CTime tmTemp(nDataTime[0], nDataTime[1], nDataTime[2], nDataTime[3], nDataTime[4], nDataTime[5] ); |
| | | CTimeSpan tmSpan = tmReviewLoading-tmTemp; |
| | | mapSpanFileName.insert(std::make_pair(tmSpan.GetTotalSeconds(), pFileName)); |
| | | } |
| | | } |
| | | |
| | | if(mapSpanFileName.empty() == FALSE) |
| | | { |
| | | if(mapSpanFileName.begin()->first < nCloseTime) |
| | | { |
| | | //ê°ì¥ ìµê·¼ ê²°ê³¼íì¼ ì°¾ê¸° ì±ê³µ [ê¹íí 2019/7/17] |
| | | strFindFile = mapSpanFileName.begin()->second; |
| | | break; |
| | | } |
| | | } |
| | | akFileFinder.clear(); |
| | | Sleep(100); |
| | | } |
| | | } |
| | | |
| | | if(strFindFile.IsEmpty()) return FALSE; |
| | | |
| | | strcpy(pData->GetGlassData()->m_strFileName, strFindFile.GetBuffer(0)); |
| | | |
| | | |
| | | if(!ReadBinFile(pData)) |
| | | return FALSE; |
| | | |
| | | strcpy(pData->GetGlassData()->m_strPath, LOCAL_AOIRAWBIN_PATH); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawDemo::SequenceReviewEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | m_tmReviewEnd = CTime::GetCurrentTime(); |
| | | m_tmFileCreateTime = CTime::GetCurrentTime(); |
| | | |
| | | //ì¬ê¸°ìì ë¼ì¸ë³ë¡ íì¼ëª
, í¹ì Path ìì¹ ê²°ì íë©´ë¨. AOIServer í¹ì ReviewServerìì ìí´ëë¨ [ê¹íí2019/9/4] |
| | | pData->GetGlassData()->m_strFileName; |
| | | strcpy(pData->GetGlassData()->m_strPath, NETWORK_AOIRAWDFS_PATH); |
| | | |
| | | if(0) ReadMuraFile(pData); |
| | | |
| | | if(WriteAOIFile(pData) == FALSE) |
| | | return FALSE; |
| | | |
| | | if(0) |
| | | { |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_MURA_IMAGE); |
| | | SendMessageFTPUploadLinkFile(pGlassData); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::SequenceFtpUpload( char* pRawFilePathName ) |
| | | { |
| | | |
| | | CTime tmFileCreate; |
| | | _grmGlassData GlassData; |
| | | _grmGlassData* pGlassData = &GlassData; |
| | | |
| | | //ì ë³´ ì»ì´ì¤ê¸° [ê¹íí 2019/1/25] |
| | | { |
| | | //"D:\\DIT_ResultData\\Raw\\"; |
| | | //6CCF01P7_HPANELID_20190125_002545.csv |
| | | |
| | | char* pFileName = CakFileUtil::getFileName(pRawFilePathName); |
| | | char* pext = CakFileUtil::getFileExt(pRawFilePathName); |
| | | |
| | | if(!strcmp(pext, "csv") == FALSE) return FALSE; |
| | | |
| | | CakParser parser; |
| | | parser.process(pFileName, "_."); |
| | | if(parser.getTokNum() < 5) return FALSE; |
| | | |
| | | strcpy(pGlassData->m_strOperID, parser.getTokStr(0)); |
| | | strcpy(pGlassData->m_strGlassID, parser.getTokStr(1)); |
| | | char* pDate = &pFileName[parser.getTokPos(2)]; |
| | | char* pTime = &pFileName[parser.getTokPos(3)]; |
| | | int nData[8]={}; |
| | | nData[0] = (pDate[0]-'0')*1000 + (pDate[1]-'0')*100 + (pDate[2]-'0')*10+ (pDate[3]-'0')*1; |
| | | nData[1] = (pDate[4]-'0')*10+ (pDate[5]-'0')*1; |
| | | nData[2] = (pDate[6]-'0')*10+ (pDate[7]-'0')*1; |
| | | nData[3] = (pTime[0]-'0')*10+ (pTime[1]-'0')*1; |
| | | nData[4] = (pTime[2]-'0')*10+ (pTime[3]-'0')*1; |
| | | nData[5] = (pTime[4]-'0')*10+ (pTime[5]-'0')*1; |
| | | |
| | | CTime tmTemp(nData[0], nData[1], nData[2], nData[3], nData[4], nData[5] ); |
| | | tmFileCreate = tmTemp; |
| | | |
| | | FILE* pf = fopen(pRawFilePathName, "r"); |
| | | if(pf) |
| | | { |
| | | char buffer[512]; |
| | | fgets(buffer, 512, pf); |
| | | if(buffer[0] != 'H') return FALSE; |
| | | fgets(buffer, 512, pf); |
| | | fgets(buffer, 512, pf); |
| | | |
| | | fgets(buffer, 512, pf);buffer[strlen(buffer)-1] = 0; |
| | | strcpy(pGlassData->m_strEquipID, &buffer[strlen("EQUIP_TYPE:")]); |
| | | |
| | | fgets(buffer, 512, pf);buffer[strlen(buffer)-1] = 0; |
| | | strcpy(pGlassData->m_strStepID, &buffer[strlen("EQUIP_ID:")]); |
| | | } |
| | | else |
| | | { |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | CakFileUtil::getPath(pGlassData->m_strPath, 256, pRawFilePathName); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | m_tmReviewEnd = m_tmReviewStart = tmFileCreate; |
| | | |
| | | |
| | | SendMessageFTPUploadRaw(pGlassData); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_REVIEW_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_AOI_IMAGE); |
| | | SendMessageFTPUploadImage(pGlassData, FTPCMD_MURA_IMAGE);//ìì¼ë©´ ì¤í¨ íê² ì§ |
| | | SendMessageFTPUploadLinkFile(pGlassData); |
| | | |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawDemo::WriteAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | BOOL bResult = TRUE; |
| | | |
| | | bResult &= MakeAOIFile(pData); |
| | | bResult &= MakeAnaFile(pData); |
| | | |
| | | m_GlassRawRTMS.WriteAOIFile(pData); |
| | | |
| | | AKLOG("WriteAOIFile Complete"); |
| | | return bResult; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::MakeAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | CString strFilePathName; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmReviewEnd; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s.csv", pGlass->m_strGlassID, strTime); |
| | | } |
| | | |
| | | strFilePathName.Format("%s\\%s", pGlass->m_strPath, strFileName);//pGlass->m_strFileName); |
| | | //strFilePathName.Format("C:\\AOIServer\\NFS\\RAW\\%s", pData->GetGlassData()->m_strFileName); |
| | | |
| | | |
| | | //FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | |
| | | CString strBuffer; |
| | | CString strLine; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //HEDER |
| | | fprintf(pf, "HEADER_BEGIN\n"); |
| | | { |
| | | makeDataHeader(strLine, pGlass); |
| | | fprintf(pf, "%s", strLine); |
| | | } |
| | | fprintf(pf, "HEADER_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //GLASS_DATA |
| | | fprintf(pf, "GLASS_DATA_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "GLASS_ID,OWNER_CODE,OWNER_TYPE,PRODUCT_ID,PROCESS_ID,PRODUCT_GROUP,LOT_ID,CST_ID,SLOT_ID,PRE_PROCESS_ID,PRE_EQP_ID,PRE_CHAMBER_ID,PRE_RECIPE_ID,GROUP_ID,AUTOSAMPLEFLAG\n"); |
| | | |
| | | makeDataGlass(strLine, pGlass); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | fprintf(pf, "GLASS_DATA_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //BLOCK_SUMMARY |
| | | fprintf(pf, "BLOCK_SUMMARY_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "BLOCK_ID,BLOCK_JUDGE_AOI,BLOCK_JUDGE_MURA,BLOCK_JUDGE_ATS,BLOCK_JUDGE_TEG,TT_PANEL,OK_PANEL,NG_PANEL,X1_PANEL,X2_PANEL,X3_PANEL,X4_PANEL,X5_PANEL,X6_PANEL,X7_PANEL,X8_PANEL,X9_PANEL,TT_DEFECT_CNT,S_SIZE_DEFECT_CNT,M_SIZE_DEFECT_CNT,L_SIZE_DEFECT_CNT,TT_MURA_CNT,POINT_MURA_CNT,LINE_MURA_CNT,AREA_MURA_CNT,GLASS_ID_DCR,POINT_1,POINT_2,POINT_3,POINT_4,POINT_5\n"); |
| | | |
| | | int nBlockNum = 1; |
| | | for(int i=0; i<nBlockNum; i++) |
| | | { |
| | | makeDataBlock(strLine, pData->GetBlockData(i)); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "BLOCK_SUMMARY_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //PANEL_SUMMARY |
| | | fprintf(pf, "PANEL_SUMMARY_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "PANEL_ID,PANEL_JUDGE_AOI,PANEL_JUDGE_MURA,PANEL_JUDGE,TT_DEFECT,TT_MURA,PANEL_ID_2D,PANEL_FLAG,PANEL_GRADE,X_D,Y_D,X_A,Y_A,DELTA_X,DELTA_Y,OK_DEFECT,NG_DEFECT,X1_DEFECT,X2_DEFECT,X3_DEFECT,X4_DEFECT,X5_DEFECT,X6_DEFECT,X7_DEFECT,X8_DEFECT,X9_DEFECT,IJP1,IJP2,IJP3,IJP4,IJP5,IJP6,IJP7,IJP8,Mark1,Mark2,Mark3,Mark4,Mark5,Mark6,Mark7,Mark8\n"); |
| | | |
| | | for(int iCell = 0; iCell < pData->GetGlassData()->m_nCellNum; iCell++) |
| | | { |
| | | _grmCellData* pCell = pData->GetCellData(iCell); |
| | | makeDataCell(strLine, pData, pCell); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "PANEL_SUMMARY_END\n\n"); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | //DEFECT_DATA |
| | | fprintf(pf, "DEFECT_DATA_BEGIN\n"); |
| | | { |
| | | fprintf(pf, "PANEL_ID,DEFECT_NO1,DEFECT_NO2,UPDATE_TIME,STEP_1ST,RECIPE_1ST,STEP_CURRENT,RECIPE_CURRENT,GATE1,DATA1,"); |
| | | fprintf(pf, "GATE2,DATA2,X1,Y1,X2,Y2,AOI_DEFECT_TYPE,AOI_GRAY_H,AOI_GRAY_L,AOI_GRAY_AVE,"); |
| | | fprintf(pf, "AOI_DEFECT_AREA,AOI_DEFECT_LGT,AOI_DEFECT_WID,AOI_DEFECT_HGT,AOI_DEFECT_WIH,AOI_DEFECT_SIZE,DEFECT_PIX,MASK_DEFECT,REPEAT_DEFECT,DEFECT_IMAGE_DATA,"); |
| | | fprintf(pf, "AOI_CCD_NO,AOI_REVIEW_NO,OP_ID_1ST,OP_ID_2ND,OP_ID_CURRENT,DEFECT_JUGDE_1ST,DEFECT_JUGDE_2ND,DEFECT_JUGDE_CURRENT,DEFECT_REASON1,DEFECT_REASON2,"); |
| | | fprintf(pf, "DEFECT_REASON3,WSI_JUDGE,MURA_GRAY_H,MURA_GRAY_L,MURA_GRAY_AVE,MURA_AREA,MURA_LGT,MURA_WID,MURA_HGT,MURA_SIZE,"); |
| | | fprintf(pf, "MURA_PIX,MURA_TYPE,MURA_JUDGE,MURA_GRADE,MURA_IMAGE_DATA,RSRV1,RSRV2,RSRV3,RSRV4,RSRV5,"); |
| | | fprintf(pf, "RSRV6,RSRV7,RSRV8,RSRV9,FILE_NAME\n"); |
| | | |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(makeDataDefect(strLine, pData, pDefect)) |
| | | { |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | fprintf(pf, "DEFECT_DATA_END\n\n"); |
| | | } |
| | | |
| | | |
| | | AKLOG("MakeAOIFile Complete : [%s]", strFilePathName.GetBuffer(0)); |
| | | fclose(pf); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::MakeAnaFile( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | |
| | | CString strFilePathName; |
| | | strFilePathName.Format("%s\\%sana", pData->GetGlassData()->m_strPath, pData->GetGlassData()->m_strFileName); |
| | | |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) |
| | | { |
| | | AKLOG("MakeAOIFile Fail : [%s]", strFilePathName.GetBuffer(0)); |
| | | return FALSE; |
| | | } |
| | | |
| | | fprintf(pf, "%s\n", pData->GetGlassData()->m_strGlassID); |
| | | fprintf(pf, "m_strImageName, m_strDefectCode, UMCenterAlignX, UMCenterAlignY, m_nLevelSrcMin, m_nLevelSrcMax, m_nLevelSrcAvg, m_nLevelRefMin, m_nLevelRefMax, m_nLevelRefAvg, m_nLevelDiffMin, m_nLevelDiffMax, m_nLevelDiffAvg"); |
| | | for(int i=0; i<MAX_ZONE_NUM; i++) fprintf(pf, ",Zone%02d", i); |
| | | fprintf(pf, ", m_sDefectPeak, m_nPixelSize, DefectType, UMSize, Density, ScrtRatio, MergeState"); |
| | | fprintf(pf, "\n"); |
| | | |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(pData->GetGlassData()->m_nScanCoordinateY == 1) //ë¶íì¤ë¹ì ê²½ì° XYë°ì |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignY / 1000.0, (double)pDefect->m_nUMCenterAlignX / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for(int iz=0; iz<MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, (int)pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | else |
| | | { |
| | | fprintf(pf, "%s, %s, %.3lf, %.3lf, %d, %d, %d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_strAoiImageName, pDefect->m_strDefectCode, (double)pDefect->m_nUMCenterAlignX / 1000.0, (double)pDefect->m_nUMCenterAlignY / 1000.0, |
| | | pDefect->m_nLevelSrcMin, pDefect->m_nLevelSrcMax, pDefect->m_nLevelSrcAvg, |
| | | pDefect->m_nLevelRefMin, pDefect->m_nLevelRefMax, pDefect->m_nLevelRefAvg, |
| | | pDefect->m_nLevelDiffMin, pDefect->m_nLevelDiffMax, pDefect->m_nLevelDiffAvg); |
| | | for(int iz=0; iz<MAX_ZONE_NUM; iz++) |
| | | { |
| | | fprintf(pf, ",%d", pDefect->m_sZonePixelCount[iz]); |
| | | } |
| | | fprintf(pf, ",%d, %d, %d, %d, %d, %d, %d", |
| | | pDefect->m_sDefectPeak, pDefect->m_nPixelSize, pDefect->m_DefectType, (int)pDefect->m_nUMSize, pDefect->m_nDensity, pDefect->m_nScratchRatio, pDefect->m_bMergeState); |
| | | |
| | | fprintf(pf, ", %d, %d, %d, %d, %d", pDefect->m_nAngle, pDefect->m_nMajor, pDefect->m_nMinor, pDefect->m_nCompact, pDefect->m_nThickness); |
| | | |
| | | fprintf(pf, "\n"); |
| | | } |
| | | } |
| | | AKLOG("MakeAnaFile Complete %s", strFilePathName); |
| | | fclose(pf); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawDemo::makeDataHeader( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | CString strCurDateTime; |
| | | { |
| | | CTime Time = m_tmReviewEnd; |
| | | strCurDateTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | } |
| | | strValue.Format("FILE_VERSION:%.1lf\n", 1.0); |
| | | strLine += strValue; |
| | | strValue.Format("FILE_CREATED_TIME:%s\n", strCurDateTime); |
| | | strLine += strValue; |
| | | strValue.Format("EQUIP_TYPE:%s\n", pGlassData->m_strEquipID); |
| | | strLine += strValue; |
| | | strValue.Format("EQUIP_ID:%s\n", pGlassData->m_strStepID); |
| | | strLine += strValue; |
| | | strValue.Format("CONTENT:%s\n", _T("GLASS_DATA/EQP_GLASS_DATA/BLOCK_SUMMARY/PANEL_SUMMARY/DEFECT_DATA")); |
| | | strLine += strValue; |
| | | } |
| | | void CGlassRawDemo::makeDataGlass( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | //물ë¥ì ë³´ íì±í´ì ê°ì§ê³ ì¤ê¸° CString strProcessID, strProductID, strLotID, strSlotID; |
| | | { |
| | | std::map<CString, CString> mapTransData; |
| | | |
| | | CString strTemp; |
| | | strTemp.Format("D:\\DIT_ResultData\\DownloadData\\%s.dat", pGlassData->m_strGlassID); |
| | | |
| | | FILE *pFile = fopen(strTemp.GetBuffer(0), "r"); |
| | | if(pFile) |
| | | { |
| | | const int MAX_BUFFER = 1024; |
| | | char buffer[MAX_BUFFER]; |
| | | CString strKey; |
| | | CString strValue; |
| | | char* pFlagPos; |
| | | char* pEndFlagPos; |
| | | char* pTest = "ã"; |
| | | while (fgets(buffer, MAX_BUFFER, pFile) != '\0') |
| | | { |
| | | pFlagPos = strchr(buffer, '='); |
| | | |
| | | if(pFlagPos == NULL) continue; |
| | | |
| | | if(pEndFlagPos = strchr(pFlagPos, -29)) //"ã"ëì ìë end문ìì´ ì ê±° |
| | | pEndFlagPos[0] = 0; |
| | | |
| | | pFlagPos[0] = 0; // = ì´ê±¸ 0ì¼ë¡ ë§ë¤ì´ì Key, Value ë¶ë¦¬ |
| | | |
| | | strKey = buffer; |
| | | strValue = &pFlagPos[1]; |
| | | |
| | | strValue.Remove(' ');//í¹ì 모를 공백 ì ê±° [ê¹íí 2019/1/31] |
| | | |
| | | mapTransData.insert(std::make_pair(strKey, strValue)); |
| | | } |
| | | fclose(pFile); |
| | | } |
| | | |
| | | //GlassDataì ê°ì ë£ì´ì¤ [ê¹íí 2019/1/31] |
| | | strcpy(pGlassData->m_strSLotID, mapTransData["Slot_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strProductID, mapTransData["Product_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strProcessID, mapTransData["Process_ID"].GetBuffer(0)); |
| | | strcpy(pGlassData->m_strLotID, mapTransData["Lot_ID"].GetBuffer(0)); |
| | | } |
| | | |
| | | |
| | | strValue.Format("%s", pGlassData->m_strGlassID); //1. Glass ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strOwnerCode); //2. OWNER_CODE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strOwnerType); //3. OWNER_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProductID); //4. PRODUCT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProcessID); //5. PROCESS_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProductGroup); //6. PRODUCT_GROUP |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strLotID); //7. LOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strCSTID); //8. CST_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strSLotID); //9.SLOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProcessID); //10.PRE_PROCESS_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strEquipID); //11.PRE_EQP_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPreChamerID); //12.PRE_CHAMBER_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPreRecipeID); //13.PRE_RECIPE_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGroupID); //14.GROUP_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pGlassData->m_cAutoSampleFlag); //15.AUTOSAMPLEFLAG |
| | | strLine += strValue; |
| | | |
| | | |
| | | } |
| | | |
| | | void CGlassRawDemo::makeDataBlock( CString& strLine, _grmBlockData* pBlockData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("%s", pBlockData->m_strBlockID); //1. BLOCK_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeAOI); //2. BLOCK_JUDGE_AOI |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", 'G'); //3. BLOCK_JUDGE_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeATS); //4. BLOCK_JUDGE_ATS |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c", pBlockData->m_cBlockJudgeTEG); //5. BLOCK_JUDGE_TEG |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //6. TT_PANEL |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //7. OK_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //8. NG_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //9. X1_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //10. X2_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //11. X3_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //12. X4_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //13. X5_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //14. X6_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //15. X7_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //16. X8_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //17. X9_PANEL(Count) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //18. TT_DEFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //19. S_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //20. M_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //21. L_SIZE_DFECT_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //22. GLASS_ID_DCR |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //23. TT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //24. POINT_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //25. LINE_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //26. AREA_MURA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //27. POINT_1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //28. POINT_2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //29. POINT_3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //30. POINT_4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //31. POINT_5 |
| | | strLine += strValue; |
| | | } |
| | | |
| | | |
| | | void CGlassRawDemo::makeDataCell( CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | CString strJudgeCode = "O"; |
| | | CString strLastCode = "O"; |
| | | { |
| | | switch (pCellData->m_nJudgement) |
| | | { |
| | | case 0/*Judge_OK*/: strJudgeCode = "G"; break; |
| | | case 2/*Judge_NG*/: strJudgeCode = "N"; break; |
| | | case 10/*Judge_Rework*/: strJudgeCode = "O"; break; |
| | | case 1/*Judge_RP*/: strJudgeCode = "O"; break; |
| | | case 6/*Judge_Review*/: strJudgeCode = "O"; break; |
| | | case 7/*Judge_RC*/: strJudgeCode = "O"; break; |
| | | } |
| | | } |
| | | strLastCode = strJudgeCode; |
| | | |
| | | strValue.Format("%s%s", pData->GetGlassData()->m_strGlassID, pCellData->m_strCellName); //1. PANEL_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strJudgeCode); //2. PANEL_JUDGE_AOI |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "O"); //3. PANEL_JUDGE_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strLastCode); //4. PANEL_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->getTotalDefectNum()); //5. tt_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", m_MuraResultFile.GetDefectNum(pCellData->m_nCellID)); //6. tt_MURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //7. PANEL_ID_2D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nJudgeFlag); //8. PANEL_FLAG |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nJudgeGlade); //9. PANEL_GRADE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellLeft); //10. X_D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellTop); //11. Y_D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellRight-pCellData->m_rectCellLeft); //12. X_A |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellBottom-pCellData->m_rectCellTop); //13. Y_A |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //14. DELTA_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //15. DELTA_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nDefectNumJudgeOKWhite + pCellData->m_nDefectNumJudgeOKBlack); //16. OK_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nDefectNumJudgeNG); //17. NG_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //18. X1_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //19. X2_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //20. X3_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //21. X4_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //22. X5_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //23. X6_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //24. X7_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //25. X8_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //26. X9_DEFECT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //27. IJP1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //28. IJP2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //29. IJP3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //30. IJP4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //31. IJP5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //32. IJP6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //33. IJP7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "0"); //34. IJP8 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //35. Mark1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //36. Mark2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //37. Mark3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //38. Mark4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //39. Mark5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //40. Mark6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //41. Mark7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", 0); //42. Mark8 |
| | | strLine += strValue; |
| | | |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::makeDataDefect( CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData ) |
| | | { |
| | | strLine.Empty(); |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | _grmGlassData* pGlassData = pData->GetGlassData(); |
| | | _grmCellData* pCellData = pData->GetCellData(pDefectData->m_nCellIdx); |
| | | |
| | | if(pDefectData->m_ReviewDefect.m_nPlanType == 1000 //aoiê²°í¨ |
| | | //pDefectData->m_ReviewDefect.m_nPlanType == 999 |
| | | ) return FALSE; |
| | | |
| | | CString strUpdateTime; |
| | | { |
| | | CTime Time = pGlassData->m_tmInspectionEND; |
| | | strUpdateTime.Format("%04d/%02d/%02d_%d:%02d:%02d", |
| | | Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | Time.GetHour(), Time.GetMinute(), Time.GetSecond()); |
| | | |
| | | // CTime Time = pGlassData->m_tmInspectionEND; |
| | | // strUpdateTime.Format("%04d%02d%02d%02d%02d", |
| | | // Time.GetYear(), Time.GetMonth(), Time.GetDay(), |
| | | // Time.GetHour(), Time.GetMinute()); |
| | | } |
| | | |
| | | CString strStepFirst;//첫ë²ì§¸ ì¤í [ê¹íí 2018/12/5] |
| | | { |
| | | if(pDefectData->m_strStackFirst[0]) |
| | | { |
| | | strStepFirst =pDefectData->m_strStackFirst; |
| | | } |
| | | else |
| | | { |
| | | strStepFirst = pGlassData->m_strStepID; |
| | | } |
| | | } |
| | | |
| | | strValue.Format("%s%s", pData->GetGlassData()->m_strGlassID, pCellData->m_strCellName); //1. CELL ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectID); //2. DEFECT_NO1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectID); //3. DEFECT_NO2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strUpdateTime); //4. UPDATE_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", strStepFirst); //5. STEP_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); //6. RECIPE_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strStepID); //7. STEP_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); //8. RECIPE_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGate); //9. GATE1, ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellData); //10. DATA1, ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGateAlign); //11. GATE2, ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellDataAlign); //12. DATA2, ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | |
| | | |
| | | |
| | | //_grmGlassData* pGlass = pData->GetGlassData(); |
| | | |
| | | |
| | | |
| | | // x,yì¢í mmë¨ì ììì ì¸ì리ê¹ì§ íí (ê³ ê°ì¬ ìì²) - 2019-01-30 HJH |
| | | if(pGlassData->m_nScanCoordinateY == 1) //ë¶íì¤ë¹ì ê²½ì° XYë°ì |
| | | { |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignY / 1000.0); //13. X1, umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignX / 1000.0); //14. Y1, umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellY / 1000.0); //15. X2, ì
ìì ê¸°ì¤ x ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellX / 1000.0); //16. Y2, ì
ìì ê¸°ì¤ y ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectType); //17. AOI_DEFECT_TYPE, SERVER_DefectType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMax); //18. AOI_GRAY_H, ê²°í¨ ë°ê¸° Max |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMin); //19. AOI_GRAY_L, ê²°í¨ ë°ê¸° Min |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcAvg); //20. AOI_GRAY_AVE, ê²°í¨ ë°ê¸° Avg |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //21. AOI_DEFECT_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectRScale); //22. AOI_DEFECT_LGT, ê²°í¨ ê¸¸ì´ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectSizeType)); //23. AOI_DEFECT_WID , <- 190106 ê³ ê° ë´ë¹ì ìì² í¤í°ì¬ì ì¬ì´ì¦íì
ì¼ë¡ë¡ ë³ê²½ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_sPixelWidth); //24. AOI_DEFECT_HGT |
| | | } |
| | | else |
| | | { |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignX / 1000.0); //13. X1, umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCenterAlignY / 1000.0); //14. Y1, umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellX / 1000.0); //15. X2, ì
ìì ê¸°ì¤ x ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3lf", pDefectData->m_nUMCellY / 1000.0); //16. Y2, ì
ìì ê¸°ì¤ y ì¢í |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectType); //17. AOI_DEFECT_TYPE, SERVER_DefectType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMax); //18. AOI_GRAY_H, ê²°í¨ ë°ê¸° Max |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMin); //19. AOI_GRAY_L, ê²°í¨ ë°ê¸° Min |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcAvg); //20. AOI_GRAY_AVE, ê²°í¨ ë°ê¸° Avg |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //21. AOI_DEFECT_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectRScale); //22. AOI_DEFECT_LGT, ê²°í¨ ê¸¸ì´ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectSizeType)); //23. AOI_DEFECT_WID, <- 190106 ê³ ê° ë´ë¹ì ìì² í¤í°ì¬ì ì¬ì´ì¦íì
ì¼ë¡ë¡ ë³ê²½ |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_sPixelHeight); //24. AOI_DEFECT_HGT |
| | | } |
| | | |
| | | |
| | | |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSizeType); //25. AOI_DEFECT_WIH, SERVER_DefectSizeType |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.3f", pDefectData->m_nUMSize); //26. AOI_DEFECT_SIZE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); //27. DEFECT_PIX |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSubType == 2 ? 1:0); //28. MASK_DEFECT, í Glassìì ë°ê²¬ë ë§ì¤í¬ê²°í¨ 묶ìì |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_DefectSubType == 3 ? 1:0); //29. REPEAT_DEFECT, ì°ìê²°í¨ë°ê²¬ìí ëì¼ì¢í ë°ë³µì |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pDefectData->m_ReviewDefect.m_strRevImageName); //30. DEFECT_IMAGE_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectIdx); //31. AOI_CCD_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_ReviewDefect.m_nShotIndex); //32. AOI_REVIEW_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //33. OP_ID_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //34. OP_ID_2ND |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A*"); //35. OP_ID_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectJudgement)); //36. DEFECT_JUGDE_1ST |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "O"); //37. DEFECT_JUGDE_2ND |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectSizeType, pDefectData->m_DefectJudgement)); //38. DEFECT_JUGDE_CURRENT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //39. DEFECT_REASON1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //40. DEFECT_REASON2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "A"); //41. DEFECT_REASON3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%.2lf", pDefectData->m_ReviewDefect.m_fWsi_ResultData[1]);//42. WSI_JUDGE |
| | | strLine += strValue+strDiv; |
| | | //KMS - 20190128 MuraDefect ë´ì© ì¶ê° |
| | | _MacroDefect* pMuraDefect = m_MuraResultFile.FindDefect(pDefectData->m_nUMCenterAlignX, pDefectData->m_nUMCenterAlignY); |
| | | _MacroDefect MuraDefect; |
| | | if(pMuraDefect) MuraDefect = *pMuraDefect; |
| | | strValue.Format("%d", MuraDefect.G_MAX); //43. MURA_GRAY_H |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.G_MIN); //44. MURA_GRAY_L |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.G_AVG); //45. MURA_GRAY_AVE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_S); //46. MURA_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_L); //47. MURA_LGT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_W); //48. MURA_WID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.COORD_Y1); //49. MURA_HGT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.SIZE_S); //50. MURA_SIZE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", MuraDefect.COORD_PX1); //51. MURA_PIX |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.MAIN_TYPE.GetBuffer(0)); //52. MURA_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.JUDGE.GetBuffer(0)); //53. MURA_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.SUB_TYPE.GetBuffer(0)); //54. MURA_GRADE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", MuraDefect.IMG_FILE_NAME.GetBuffer(0)); //55. MURA_IMAGE_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //56. RSRV1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //57. RSRV2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //58. RSRV3 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //59. RSRV4 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //60. RSRV5 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //61. RSRV6 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //62. RSRV7 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //63. RSRV8 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "*"); //64. RSRV9 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pDefectData->m_strAoiImageName); //65. FILE_NAME |
| | | strLine += strValue; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawDemo::ReadMuraFile( CgrmGlassRawData* pData ) |
| | | { |
| | | if(m_MuraResultFile.m_strServerResultRawPath.IsEmpty() == FALSE)//ì½ì ê²°ê³¼ íì¼ ë³µì¬,ìì íí[2017/3/29] |
| | | { |
| | | CString strMacroFilePath; |
| | | { |
| | | strMacroFilePath.Format("%s\\%s_*.dat", m_MuraResultFile.m_strMacroResultRawPath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | CFileFind FF; |
| | | |
| | | if (FF.FindFile(strMacroFilePath)) |
| | | { |
| | | FF.FindNextFile(); |
| | | strMacroFilePath = FF.GetFilePath(); |
| | | FF.Close(); |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Find Macro File Fail. [%s]", strMacroFilePath); |
| | | return FALSE; |
| | | } |
| | | } |
| | | |
| | | |
| | | CString strMacroResultTargetPath; |
| | | strMacroResultTargetPath.Format("%s\\%s.dat", m_MuraResultFile.m_strServerResultRawPath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | if(TRUE == CopyFile(strMacroFilePath,strMacroResultTargetPath,FALSE)) |
| | | { |
| | | if(m_MuraResultFile.openFile(strMacroResultTargetPath.GetBuffer(0)) == TRUE) |
| | | { |
| | | AKLOG("Macro File Read Success : %dItem", m_MuraResultFile.GetDefectNum()); |
| | | //DeleteFile(strMacroResultTargetPath); //ìì ë hddspacectrlì´ íë ê²ì¼ë¡ íµì¼ |
| | | } |
| | | else |
| | | { |
| | | AKLOG("Macro File Read Fail[%s]", strMacroFilePath); |
| | | //DeleteFile(strMacroResultTargetPath); //ìì ë hddspacectrlì´ íë ê²ì¼ë¡ íµì¼ |
| | | return FALSE; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //ë¬´ë¼ ì´ë¯¸ì§ ë³µì¬(ftpì
ë¡ë를 ìí¨) [ê¹íí 2018/12/5] |
| | | if(m_MuraResultFile.m_strMacroResultImagePath.IsEmpty() == FALSE && m_MuraResultFile.m_strServerResultImagePath.IsEmpty() == FALSE)//ì´ë¯¸ì§ íì¼ ë³µì¬ íí[2017/3/29] |
| | | { |
| | | CString strMacroImageSrcPath; |
| | | CString strMacroImageTarPath; |
| | | |
| | | strMacroImageSrcPath.Format("%s\\%s", m_MuraResultFile.m_strMacroResultImagePath, pData->GetGlassData()->m_strGlassID); |
| | | strMacroImageTarPath.Format("%s\\%s", m_MuraResultFile.m_strServerResultImagePath, pData->GetGlassData()->m_strGlassID); |
| | | |
| | | AKLOG("Macro Image File Copy Start[%s]", strMacroImageTarPath); |
| | | CakFileUtil::CopyFolder(strMacroImageSrcPath.GetBuffer(0), strMacroImageTarPath.GetBuffer(0), FALSE); |
| | | AKLOG("Macro Image File Copy End"); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | void CGlassRawDemo::SendMessageFTPUploadLinkFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_LINK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CGlassRawDemo::SendMessageFTPUploadRaw( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_RAW, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CGlassRawDemo::SendMessageFTPDownloadStack( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_STACK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawDemo::SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPDownloader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | //GetFormatDescription(FTPCMD_DATAFILE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | { |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | sprintf(strServerFolder, "%s", pGlassData->m_strCassetteSequenceNo); |
| | | sprintf(strServerFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | sprintf(strLocalFolder, "D:\\DIT_ResultData\\DownloadData"); |
| | | sprintf(pLocalFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CGlassRawDemo::SendMessageFTPUploadImage( _grmGlassData* pGlassData, emFTPCommand sort) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[32];// = "*.*"; |
| | | char strLocalFolder[256] = {}; |
| | | char strLocalFile[32];// = "*.*"; |
| | | |
| | | GetFormatDescription(sort, strServerFolder, strServerFile, strLocalFolder, strLocalFile, pGlassData); |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, strLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE; |
| | | upParam.m_nSendResultCode = FALSE; |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; //<--ìê±´ ëì¤ì êµ¬ë¶ |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawDemo::SendMessageFTPUploadIndexFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) |
| | | return FALSE; |
| | | |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return FALSE; |
| | | |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_INDEX, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // ServerFile = "ftptestfile.txt"; |
| | | // |
| | | // sprintf(strLocalFolder, "D:"); |
| | | // pLocalFile = "ftptestfile.txt"; |
| | | // } |
| | | |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CGlassRawDemo::GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData) |
| | | { |
| | | |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | CString strGlassIDLevel5th = strGlassID.Left(5); |
| | | CString strGlassIDLevel8th = strGlassID.Left(8); |
| | | |
| | | switch(sort) |
| | | { |
| | | case FTPCMD_AOI_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_AOI_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_REVIEW_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_REV_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_RAW: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_STACK: |
| | | { |
| | | // CTime time = pGlassData->m_tmGlassLoading; |
| | | // sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", m_StackResult.getStackEquipID(), time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | // strGlassIDLevel5th.GetBuffer(0), |
| | | // strGlassIDLevel8th.GetBuffer(0), |
| | | // strGlassID.GetBuffer(0)); |
| | | // |
| | | // //ê°ì¥ ìµê·¼ê±¸ ì°¾ìì¼ íë? [ê¹íí 2019/1/12] |
| | | // sprintf(pServerFile, "%s_%s_*.csv", |
| | | // m_StackResult.getStackOperID(), |
| | | // pGlassData->m_strGlassID); |
| | | // |
| | | // sprintf(pLocalPath, "%s", m_StackResult.getStackLocalPath()); |
| | | // sprintf(pLocalFile, "%s.txt", strGlassID.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_MURA_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_MURA_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_INDEX: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "INDEX\\%s", pGlassData->m_strEquipID); |
| | | sprintf(pServerFile, "%04d%02d%02d_%s.csv", time.GetYear(), time.GetMonth(), time.GetDay(), pGlassData->m_strStepID); |
| | | |
| | | sprintf(pLocalPath, "%s", LOCAL_INDEX_PATH); |
| | | sprintf(pLocalFile, "%s", pServerFile); |
| | | } |
| | | break; |
| | | |
| | | case FTPCMD_LINK: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%s\\%s\\%s\\%s", "LINK", pGlassData->m_strEquipID, |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | CString CGlassRawDemo::GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam) |
| | | { |
| | | CString sStr; |
| | | switch(nDefectInfoType) |
| | | { |
| | | case DMT_DefectJudge:// Judge |
| | | { |
| | | switch(nParam) |
| | | { |
| | | case 0: sStr.Format("O"); |
| | | break; |
| | | default: sStr.Format("O");//sStr.Format("Ets"); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case DMT_DefectSizeType: |
| | | { |
| | | sStr = "S"; |
| | | switch(nParam) |
| | | { |
| | | //case SizeType_Unknown: sStr.Format("U"); break; |
| | | case 1/*SizeType_Small*/: sStr.Format("S"); |
| | | break; |
| | | case 2/*SizeType_Mid*/: sStr.Format("M"); |
| | | break; |
| | | case 3/*SizeType_Large*/: sStr.Format("L"); |
| | | break; |
| | | case 4/*SizeType_Huge*/: sStr.Format("O"); |
| | | break; |
| | | //case SizeType_Ultra: sStr.Format("Ultra"); break; |
| | | //default: sStr.Format("Ets"); break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return sStr; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | #include "GlassRawRTMS.h" |
| | | //#include "StackResultCSOT.h" |
| | | #include "MacroResultFile.h" |
| | | #include "CustomizeReview.h" |
| | | #include "InterfaceFTP.h" |
| | | |
| | | class CGlassRawDemo : public CGlassRawBase, public CInterfaceFTP |
| | | { |
| | | public: |
| | | enum emDefectMemberType |
| | | { |
| | | DMT_DefectJudge = 0, |
| | | DMT_DefectSizeType |
| | | }; |
| | | |
| | | public: |
| | | CGlassRawDemo(void); |
| | | ~CGlassRawDemo(void); |
| | | |
| | | static char* GetClassName(){return "Demo#1";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | virtual BOOL SequenceFtpUpload(char* pRawFileName); |
| | | |
| | | virtual void NotifyUpdateOptionInfo(){/*m_StackResult.readOptionFile();*/}; |
| | | |
| | | |
| | | |
| | | virtual void SendMessageFTPUploadRaw(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadStack(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPUploadImage(_grmGlassData* pGlassData, emFTPCommand sort); |
| | | virtual BOOL SendMessageFTPUploadIndexFile(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPUploadLinkFile(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData); |
| | | virtual void GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData); |
| | | |
| | | |
| | | BOOL ReadMuraFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAOIFile(CgrmGlassRawData* pData); |
| | | BOOL MakeAnaFile(CgrmGlassRawData* pData); |
| | | BOOL WriteIndexFile(_grmGlassData* pGlassData); |
| | | |
| | | void makeDataHeader(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataGlass(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataBlock(CString& strLine, _grmBlockData* pBlockData); |
| | | void makeDataCell(CString& strLine, CgrmGlassRawData* pData, _grmCellData* pCellData); |
| | | BOOL makeDataDefect(CString& strLine, CgrmGlassRawData* pData, _grmDefectData* pDefectData); |
| | | |
| | | CString GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam); |
| | | |
| | | public: |
| | | void SetEquipType(int nType){m_nEquipType = nType;}; |
| | | |
| | | protected: |
| | | int m_nEquipType; // 0:Inline, 1:Offline |
| | | |
| | | CGlassRawRTMS m_GlassRawRTMS;//RTMSì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | CMacroResultFile m_MuraResultFile; //무ë¼ì© ê²°ê³¼íì¼ ìì±ê´ë¦¬ [ê¹íí 2018/12/5] |
| | | |
| | | CTime m_tmReviewStart; |
| | | CTime m_tmReviewEnd; |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "GlassRawRTMS.h" |
| | | #include "akLoggerExt.h" |
| | | #include "GlassRawCSOT.h" |
| | | #include "MacroResultFile.h" |
| | | |
| | | #define RTMSTEMPPATH _T("D:\\DitRtms\\Data\\TempFile\\") |
| | | #define RTMSRAWPATH _T("D:\\DitRtms\\Data\\RawFile\\") |
| | | #define DEFECTPATH _T("D:\\Image\\Defect") |
| | | #define RTMSIMAGEPATH _T("D:\\DitRtms\\Data\\ReviewImage\\") |
| | | |
| | | char* g_pCellCode2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; |
| | | |
| | | //enum Judgement { Judge_OK = 0, Judge_RP, Judge_NG, Judge_TR, Judge_PR, Judge_PT, Judge_Review, Judge_RC, Judge_Size, Judge_VI, Judge_Rework, Judge_Unknown };//2016.07.13 LHS Judge_Size ì¶ê° |
| | | //enum DefectLocation { DefectLoc_Pattern = 0, DefectLoc_Crack, DefectLoc_BM, DefectLoc_ASG, DefectLoc_PAD, DefectLoc_C2C, DefectLoc_EdgeLine, DefectLoc_Proj, DefectLoc_Chip, DefectLoc_Corner }; |
| | | //enum SERVER_DefectType { DefectType_TBlack = 0, DefectType_TWhite, DefectType_RBlack, DefectType_RWhite, DefectType_BBlack, DefectType_BWhite, DefectType_Unknown }; |
| | | //enum SERVER_DefectSubType { DefectSubType_Normal = 0, DefectSubType_MC, DefectSubType_Mask, DefectSubType_Common, DefectSubType_NoDefect }; |
| | | |
| | | CGlassRawRTMS::CGlassRawRTMS(void) |
| | | { |
| | | } |
| | | |
| | | CGlassRawRTMS::~CGlassRawRTMS(void) |
| | | { |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::SequenceGlassLoading( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::SequenceInspectEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | WriteAOIFile(pData); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::SequenceReviewStart( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::SequenceReviewEnd( CgrmGlassRawData* pData ) |
| | | { |
| | | WriteAOIFile(pData); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | BOOL CGlassRawRTMS::WriteAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | BOOL bResult = TRUE; |
| | | |
| | | bResult &= MakeAOIPreProcessing(pData); |
| | | bResult &= MakeAOIFile(pData); |
| | | bResult &= CopyRTMSFiles(pData); |
| | | |
| | | if(bResult)AKLOG("Write RTMS File Complete"); |
| | | else AKLOG("Write RTMS File Fail"); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::MakeAOIFile( CgrmGlassRawData* pData ) |
| | | { |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | |
| | | CString strFilePathName = m_strRTMSRAWFile; |
| | | |
| | | FILE* pf = fopen(strFilePathName.GetBuffer(0), "w"); |
| | | if(pf == NULL) return FALSE; |
| | | |
| | | |
| | | |
| | | CString strLine; |
| | | //Glass |
| | | { |
| | | CString strItems = "ITEM,GLASSITEM,LOTITEM,LOT_ID,LOT_TYPE,STEP_ID,EQUIPMENT_ID,EQUIPMENT_UNIT,GLS_ID,SLOT_ID,GLS_JUDGE,GLS_GRADE,PRODUCT_ID,CASSETTE_ID,OPERATOR_ID,RECIPE_NAME,AUTO_MODE,PNL_ORIGIN,PROCESSING_TIME,START_TIME,END_TIME,CAMERA_CNT,SCAN_CNT,INSP_TACT, REVIEW_TACT, CIM_ONOFF,PROCESS_ID,PROD_TYPE,BATCHID,H_PANELID,E_PANELID,P_PANELID,COMP_COUNT,PPID"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | makeDataGlass(strLine, pGlass); |
| | | |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | |
| | | //Cell |
| | | { |
| | | CString strItems = "ITEM,CELLITEM,PANEL_ID,PANEL_GRADE,COORD_X,COORD_Y,CELL_SIZE_X,CELL_SIZE_Y,GATE_LINE,DATA_LINE,LAMP_GRAY_01,LAMP_GRAY_02,LAMP_GRAY_03,LAMP_GRAY_04"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | for(int iCell = 0; iCell < pData->GetGlassData()->m_nCellNum; iCell++) |
| | | { |
| | | _grmCellData* pCell = pData->GetCellData(iCell); |
| | | makeDataCell(strLine, pGlass, pCell); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | |
| | | } |
| | | |
| | | //Defect |
| | | { // DEFECT_TYPE_3 ë¹ ì§ // RTMS Defect ì ë³´ ì¶ê° [ 21-03-08 KJG ] |
| | | CString strItems = "ITEM,DEFITEM,POINT_NO,PANEL_ID,PR_X,PR_Y,PR_DATA,PR_GATE,SE_X,SE_Y,SE_DATA,SE_GATE,DEFECT_LAYER,DETECTED_AREA,DEFECT_SIZE_TYPE,DEFECT_SIZE_X,DEFECT_SIZE_Y,DEFECT_LENGTH,DEFECT_AREA,DEFECT_TYPE_1,DEFECT_TYPE_2,REPEAT_DEFECT,MASK_DEFECT,IMAGE_FILE1,IMAGE_FILE2,SCAN_NO,CAMERA_NO,RSCALE,SIZE_AREA,PEAK,REV_RESOLUTION,REV_CAMNUM,REV_MAG,DEFECT_CODE,DEFECT_GRADE,STACK_FLAG,STACK_COUNT,STACK_STEP,ZONE_NO,GRAY_MIN,GRAY_MAX,GRAY_AVG,R_GRAY_MIN,R_GRAY_MAX,R_GRAY_AVG"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | for(int iDefect = 0; iDefect < pData->GetGlassData()->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | //210203 CJH - CutOff ëì ê²°ê³¼íì¼ ìì± ì ì¸ |
| | | if (pDefect->m_bDefectCutoff == TRUE) continue; |
| | | |
| | | makeDataDefect(strLine, pData->GetGlassData(), pData->GetCellData(pDefect->m_nCellIdx), pDefect); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | |
| | | //Camera |
| | | { |
| | | CString strItems = "ITEM,CAMERAITEM,SCAN_NO,CAMERA_NO,LAMP,MAX,AVG,MIN"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | for(int iScan=0; iScan < pGlass->m_nScanNum; iScan++) |
| | | { |
| | | for(int iCam=0; iCam < pGlass->m_nCameraNum; iCam++) |
| | | { |
| | | makeDataCamera(strLine, pGlass, iCam, iScan); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //WSI |
| | | { |
| | | CString strItems = "ITEM,WSIITEM,WSI_NO,TYPE,NAME,JUDGE,CELLID,COORD_X,COORD_Y,COORD_X2,COORD_Y2,IMG_FILE_2D,IMAGE_FILE_3D,WSI_RESOLUTION"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | for(int iDefect = 0; iDefect < pGlass->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(pDefect->m_ReviewDefect.m_nWsi_Type == 2) |
| | | { |
| | | makeDataWSI(strLine, &pDefect->m_ReviewDefect); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //Mura |
| | | if(m_pMuraResultFile && m_pMuraResultFile->IsRead()) |
| | | { |
| | | CString strItems = "ITEM,MURAITEM,DATE,TIME,DEFECTNO,RECIPE,GLASSID,CELLID,COORD_X1,COORD_Y1,COORD_PX1,COORD_PY1,NOMURA,SIZE_W,SIZE_L,SIZE_S,MAIN_TYPE,SUB_TYPE,PEAK,G_MIN,G_MAX,G_AVG,CAM,SCAN,PIXEL_PEAK,REGION,SIZE_T,PEAK_T,IMG_FILE_NAME"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | _MacroDefect* pMuraDefect; |
| | | int nSize = (int)m_pMuraResultFile->GetDefectNum(); |
| | | |
| | | for(int iMuraDefect=0; iMuraDefect < nSize; iMuraDefect++) |
| | | { |
| | | pMuraDefect = m_pMuraResultFile->GetDefect(iMuraDefect); |
| | | makeMuraDefect(strLine, pMuraDefect); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | |
| | | } |
| | | |
| | | // Measure |
| | | if(0) |
| | | { |
| | | CString strItems = "ITEM,LOCITEM,MEASURE_NO,MEASURE_TYPE,MEASURE_NAME,CELL_ID,X_COORDINATE_1,Y_COORDINATE_1,X_COORDINATE_2,Y_COORDINATE_2,X_SHIFT,Y_SHIFT,IMAGENAME,SHIFTDIST,ACTIVETOSEALANT,SEALSIZE"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | // ì¬ì© ìí¨ |
| | | } |
| | | |
| | | // User Review |
| | | { |
| | | CString strItems = "ITEM,USERREVITEM,USER_NO,PR_X,PR_Y,IMAGE_FILE_NAME,REV_RESOLUTION"; |
| | | fprintf(pf, "%s\n", strItems.GetBuffer(0)); |
| | | |
| | | for(int iDefect = 0; iDefect < pGlass->m_nDefectNum; iDefect++) |
| | | { |
| | | _grmDefectData* pDefect = pData->GetDefectData(iDefect); |
| | | if(pDefect->m_ReviewDefect.m_nPlanType == ditRaw::RPT_User) |
| | | { |
| | | makeUserReview(strLine, &pDefect->m_ReviewDefect); |
| | | fprintf(pf, "%s\n", strLine); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | fclose(pf); |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | void CGlassRawRTMS::makeDataGlass( CString& strLine, _grmGlassData* pGlassData ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("GLASSDATA"); // GLASSITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LOTDATA"); // LOTITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strLotID); // LOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LOTTYPE"); // LOT_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strStepID); // STEP_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strOperID); // EQUIPMENT_ID //210127 CJH - Equip ID <-> Oper ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strEquipID); // EQUIPMENT_UNIT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassID); // GLS_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strSLotID); // SLOT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassJudge); // GLAS_JUDGE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassCode); // GLS_GRADE or Glass Code //**GRADEê° ì½ë? |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProductID); // PRODUCDT_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strCSTID); // CASSETTE_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strEPPID); // OPERATOR_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pGlassData->m_strRecipeName); // RECIPE_NAME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "AUTO_MODE"); // AUTOMODE |
| | | strLine += strValue+strDiv; |
| | | |
| | | if(pGlassData->m_nOriginDirection == 0) strValue.Format("Left Top"); // PNL_ORIGIN |
| | | else if(pGlassData->m_nOriginDirection == 1) strValue.Format("Right Top"); |
| | | else if(pGlassData->m_nOriginDirection == 10) strValue.Format("Left Bottom"); |
| | | else strValue.Format("Right Bottom"); |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%s", "PROCESSING_TIME"); // PROCESSING_TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%04d%02d%02d_%02d%02d%02d" // START_TIME |
| | | ,pGlassData->m_tmGlassLoading.GetYear() |
| | | ,pGlassData->m_tmGlassLoading.GetMonth() |
| | | ,pGlassData->m_tmGlassLoading.GetDay() |
| | | ,pGlassData->m_tmGlassLoading.GetHour() |
| | | ,pGlassData->m_tmGlassLoading.GetMinute() |
| | | ,pGlassData->m_tmGlassLoading.GetSecond() ); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%04d%02d%02d_%02d%02d%02d" // END_TIME |
| | | ,pGlassData->m_tmInspectionEND.GetYear() |
| | | ,pGlassData->m_tmInspectionEND.GetMonth() |
| | | ,pGlassData->m_tmInspectionEND.GetDay() |
| | | ,pGlassData->m_tmInspectionEND.GetHour() |
| | | ,pGlassData->m_tmInspectionEND.GetMinute() |
| | | ,pGlassData->m_tmInspectionEND.GetSecond() ); |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pGlassData->m_nCameraNum); // CAMERA_CNT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nScanNum); // SCAN_CNT |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pGlassData->m_tmInspectionEND-pGlassData->m_tmGlassLoading); // INSP_TACT |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_tmReviewEnd - pGlassData->m_tmReviewLoading); // REVIEW_TACT |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%s", "CIM_ONOFF"); |
| | | strLine += strValue + strDiv; // CIM_ONOFF -SM |
| | | //210128 CJH - RTMS SDC 물ë¥ë°ì´í° ì¶ê° |
| | | strValue.Format("%s", pGlassData->m_strProcessID); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%s", pGlassData->m_strProdType); |
| | | strLine += strValue + strDiv; |
| | | CString strTemp; |
| | | strTemp = pGlassData->m_strGlassID; |
| | | strValue.Format("%s", strTemp.Left(6)); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%s", pGlassData->m_strGlassID); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%s", pGlassData->m_strEPPID); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPairHPanelID); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%d", pGlassData->m_nCellNum); |
| | | strLine += strValue + strDiv; |
| | | strValue.Format("%s", pGlassData->m_strPPID); |
| | | strLine += strValue; |
| | | |
| | | } |
| | | |
| | | |
| | | void CGlassRawRTMS::makeDataCell( CString& strLine, _grmGlassData* pGlassData, _grmCellData* pCellData ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("CELLDATA"); // CELLITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s",pCellData->m_strCellName); // PANEL_ID |
| | | strLine += strValue+strDiv; |
| | | { |
| | | if(pCellData->m_nJudgement == Judge_OK) strValue = "Judge_OK"; // PANEL_GRADE // PNL_GRADE |
| | | else if(pCellData->m_nJudgement == Judge_NG) strValue = "Judge_NG"; |
| | | else if(pCellData->m_nJudgement == Judge_Rework) strValue = "Judge_Rework"; |
| | | else if(pCellData->m_nJudgement == Judge_RP) strValue = "Judge_RP"; |
| | | else if(pCellData->m_nJudgement == Judge_Review) strValue = "Judge_Review"; |
| | | else if(pCellData->m_nJudgement == Judge_RC) strValue = "Judge_RC"; // 미ì²ë¦¬ |
| | | else if(pCellData->m_nJudgement == Judge_Size) strValue = "Judge_Size"; //skip |
| | | else if (pCellData->m_nJudgement == Judge_TR) strValue = "Judge_TR"; |
| | | else if (pCellData->m_nJudgement == Judge_PR) strValue = "Judge_PR"; |
| | | else strValue = "Judge_OK"; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pCellData->m_rectCellLeft); // COORD_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellTop); // COORD_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellRight - pCellData->m_rectCellLeft); // CELL_SIZE_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_rectCellBottom - pCellData->m_rectCellTop); // CELL_SIZE_Y |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pCellData->m_nGateNum); // LN_GATE : Gate line ê°¯ì |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pCellData->m_nDataNum); // LN_DATA : Data line ê°¯ì |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("LAMP_GRAY_01"); // LAMP_GRAY_01 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LAMP_GRAY_02"); // LAMP_GRAY_02 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LAMP_GRAY_03"); // LAMP_GRAY_03 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LAMP_GRAY_04"); // LAMP_GRAY_04 |
| | | strLine += strValue+strDiv; |
| | | |
| | | } |
| | | |
| | | void CGlassRawRTMS::makeDataDefect( CString& strLine, _grmGlassData* pGlassData, _grmCellData* pCellData, _grmDefectData* pDefectData ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("DEFDATA"); // DEFITEM |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nDefectID); // POINT_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%c%c", '0' + pDefectData->m_nCellIdx / 36, g_pCellCode2[pDefectData->m_nCellIdx % 36]); // PANEL_ID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMOriginX); // PR_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMOriginY); // PR_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellData); // PR_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGate); // PR_GATE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMCenterAlignX); // SE_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMCenterAlignY); // SE_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellData); // SE_DATA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCellGate); // SE_GATE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "DEFECT_LAYER"); // DEFECT_LAYER |
| | | strLine += strValue+strDiv; |
| | | { |
| | | int m_nDefectedArea = pDefectData->m_sDefectLoc; // DEFECTED_AREA // DETECTED_AREA |
| | | if(m_nDefectedArea == DefectLoc_Pattern) strValue = "PATTERN"; |
| | | else if(m_nDefectedArea == DefectLoc_Crack) strValue = "CRACK"; |
| | | else if(m_nDefectedArea == DefectLoc_BM) strValue = "BM"; |
| | | else if(m_nDefectedArea == DefectLoc_ASG) strValue = "ASG"; |
| | | else if(m_nDefectedArea == DefectLoc_PAD) strValue = "PAD"; |
| | | else if(m_nDefectedArea == DefectLoc_C2C) strValue = "C2C"; |
| | | else if(m_nDefectedArea == DefectLoc_EdgeLine) strValue = "EdgeLine"; |
| | | else if(m_nDefectedArea == DefectLoc_Proj) strValue = "Proj"; |
| | | else if(m_nDefectedArea == DefectLoc_Chip) strValue = "Chip"; |
| | | else if(m_nDefectedArea == DefectLoc_Corner) strValue = "Corner"; |
| | | else strValue = ""; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | { |
| | | int m_nDefectSizeType = pDefectData->m_DefectSizeType; // DEFECT_SIZE_TYPE // DEFECT_SIZE_TYPE |
| | | if(m_nDefectSizeType == 0) strValue = "S"; |
| | | else if(m_nDefectSizeType == 1) strValue = "M"; |
| | | else if(m_nDefectSizeType == 2) strValue = "L"; |
| | | else if(m_nDefectSizeType == 3) strValue = "H"; |
| | | else if(m_nDefectSizeType == 4) strValue = "U"; |
| | | else strValue = "S"; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMSizeX); // DEFECT_SZE_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMSizeY); // DEFECT_SIZE_Y |
| | | strLine += strValue+strDiv; |
| | | |
| | | //strValue.Format("%s", "DEFECT_LENGTH"); // DEFECT_LENGTH |
| | | double dUmRscale = pDefectData->m_nDefectRScale * pDefectData->m_dScanResolution; |
| | | strValue.Format("%.2lf", dUmRscale); // DEFECT_LENGTH |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nPixelSize); // DEFECT_AREA |
| | | strLine += strValue+strDiv; |
| | | { |
| | | int m_nDefectType1 = pDefectData->m_DefectBDType; // DEFECT_TYPE_1 (B, W, Unknown) |
| | | if(m_nDefectType1==DefectType_TBlack || m_nDefectType1==DefectType_RBlack) strValue = "B"; |
| | | else if(m_nDefectType1==DefectType_TWhite || m_nDefectType1==DefectType_RWhite) strValue = "W"; |
| | | else strValue = "Unknown"; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | { |
| | | // DEFECT_TYPE_2 (Normal / MC / Mask / Common / NoDefect) |
| | | int m_nDefectType2 = pDefectData->m_DefectSubType; |
| | | |
| | | if(m_nDefectType2 == DefectSubType_Normal) strValue = "Normal"; |
| | | else if(m_nDefectType2 == DefectSubType_MC) strValue = "MC"; |
| | | else if(m_nDefectType2 == DefectSubType_Mask) strValue = "Mask"; |
| | | else if(m_nDefectType2 == DefectSubType_Common) strValue = "Common"; |
| | | else if(m_nDefectType2 == DefectSubType_NoDefect) strValue = "NoDefect"; |
| | | else strValue = "UN"; |
| | | |
| | | } |
| | | strLine += strValue+strDiv; |
| | | |
| | | { |
| | | if(pDefectData->m_DefectSubType == DefectSubType_Common) strValue = "Y"; // REPEAT_DEFECT |
| | | else strValue = "N"; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | { |
| | | if(pDefectData->m_DefectSubType == DefectSubType_Mask) strValue = "Y"; // MASK_DEFECT |
| | | else strValue = "N"; |
| | | } |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%s", pDefectData->m_strAoiImageName); // IMAGE_FILE1 |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%s", pDefectData->m_ReviewDefect.m_strRevImageName); // IMAGE_FILE2 |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nScanIdx); // SCAN_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nCameraID); // CAMERA_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nDefectRScale); // RSCALE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_nUMSize); // SIZE_AREA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pDefectData->m_sDefectPeak); // PEAK |
| | | strLine += strValue+strDiv; |
| | | |
| | | float fReviewResol = 0.1725; //20ë°° ë¨ë°°ì¨ // 3.45/20 |
| | | strValue.Format("%.4lf", fReviewResol); // REV_RESOLUTION |
| | | strLine += strValue+strDiv; |
| | | |
| | | //210128 CJH - RTMS Review ì ë³´ ì¶ê° |
| | | if (strlen(pDefectData->m_ReviewDefect.m_strRevImageName)) |
| | | { |
| | | strValue.Format("%d", pDefectData->m_ReviewDefect.m_nModuleIndex); // REV_Cam Number |
| | | strLine += strValue + strDiv; |
| | | } |
| | | else |
| | | { |
| | | strValue.Format("-1"); |
| | | strLine += strValue + strDiv; |
| | | } |
| | | |
| | | strValue.Format("%d", 20); // REV_Magnification |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%s", pDefectData->m_strDefectCode); // DEFECT_CODE, DEFECT_GRADE, STACK_FLAG, STACK_COUNT, STACK_STEP, ZONE_NO, GRAY_MIN, ...,R_SRC_AVG ì¶ê° [ 21-03-08 KJG ] |
| | | strLine += strValue + strDiv; // DEFECT_CODE |
| | | |
| | | strValue.Format("%s", GetDefectInfoToString(DMT_DefectJudge, pDefectData->m_DefectJudgement)); |
| | | strLine += strValue + strDiv; // DEFECT_GRADE |
| | | |
| | | int nStackFlag = pDefectData->m_StackInfo; // STACK_FLAG |
| | | if (nStackFlag == Stack_Unknown) strValue = "UK"; |
| | | else if (nStackFlag == Stack_TD) strValue = "TD"; |
| | | else if (nStackFlag == Stack_SD) strValue = "SD"; |
| | | else if (nStackFlag == Stack_PD) strValue = "PD"; |
| | | else if (nStackFlag == Stack_SP) strValue = "SP"; |
| | | else strValue = "UK"; |
| | | |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%2d", pDefectData->m_nStackStepCount); // STACK_COUNT |
| | | strLine += strValue + strDiv; |
| | | |
| | | if (strlen(pDefectData->m_strStackFirst)) // STACK_STEP |
| | | { |
| | | strValue.Format("%s", pDefectData->m_strStackFirst); |
| | | strValue.Replace(',', '_'); // ì´ êµ¬ë¶ìê° ',' ì´ë¯ë¡ '_'ë¡ ë³ê²½ [ 21-03-15 KJG ] |
| | | strLine += strValue + strDiv; |
| | | } |
| | | else |
| | | { |
| | | strValue.Format(" "); |
| | | strLine += strValue + strDiv; |
| | | } |
| | | |
| | | int nValue = 0; // ZONE_NO |
| | | for (int i = 15; i >= 0; i--) |
| | | { |
| | | if (pDefectData->m_sZonePixelCount[i] > 0) |
| | | nValue += 1; |
| | | if (i > 0) |
| | | nValue = nValue << 1; |
| | | } |
| | | strValue.Format("%04X", nValue); |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMin); // GRAY_MIN |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcMax); // GRAY_MAX |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelSrcAvg); // GRAY_AVG |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelRefMin); // R_SRC_MIN |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelRefMax); // R_SRC_MAX |
| | | strLine += strValue + strDiv; |
| | | |
| | | strValue.Format("%d", pDefectData->m_nLevelRefAvg); // R_SRC_AVG |
| | | strLine += strValue + strDiv; |
| | | |
| | | } |
| | | |
| | | void CGlassRawRTMS::makeDataCamera( CString& strLine, _grmGlassData* pGlassData, int nCamIdx, int nScanIdx ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("CAMERADATA"); |
| | | strLine += strValue+strDiv; |
| | | |
| | | strValue.Format("%d", nScanIdx); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", nCamIdx); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("LAMP"); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nGrayLevelMax[pGlassData->m_nCameraNum*nScanIdx + nCamIdx]); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nGrayLevelAvg[pGlassData->m_nCameraNum*nScanIdx + nCamIdx]); |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pGlassData->m_nGrayLevelMin[pGlassData->m_nCameraNum*nScanIdx + nCamIdx]); |
| | | strLine += strValue+strDiv; |
| | | } |
| | | |
| | | void CGlassRawRTMS::makeDataWSI( CString& strLine, _grmDefectReviewData* pWSIData ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("WSIDATA"); // USERREVITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s","USER_NO"); // USER_NO |
| | | strLine += strValue+strDiv; |
| | | |
| | | // 주ì ì²ë¦¬ ë¶ë¶ ë°ì´í° ë¤ì´ì¤ë©´ ì¸ ê² |
| | | //CString strWSIType; |
| | | //if (pWSIData->m_fWsi_ResultData[0] == 1) |
| | | // strWSIType.Format("%s", "Positive"); // ë기 |
| | | //else if (pWSIData->m_fWsi_ResultData[0] == 0) |
| | | // strWSIType.Format("%s", "Negative"); // í¨ëª° |
| | | //else |
| | | // strWSIType.Format("%s", "Flat"); |
| | | //strValue.Format("%s",strWSIType); // TYPE |
| | | |
| | | strValue.Format("%s","TYPE"); // TYPE |
| | | |
| | | strLine += strValue+strDiv; |
| | | //strValue.Format("%d", pWSIData->m_nWsi_Type); // WSI_NAME |
| | | strValue.Format("%s", "WSI_NAME"); // WSI_NAME |
| | | |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "JUDGE"); // JUDGE |
| | | strLine += strValue+strDiv; |
| | | //strValue.Format("%d", pWSIData->m_fWsi_ResultData[2]); // COORD_X?? |
| | | strValue.Format("%s", "COORD_X"); // COORD_X?? |
| | | strLine += strValue+strDiv; |
| | | //strValue.Format("%d", pWSIData->m_fWsi_ResultData[1]); // COORD_Y?? |
| | | strValue.Format("%s", "COORD_Y"); // COORD_Y?? |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "COORD_X2"); // COORD_X2 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "COORD_Y2"); // COORD_Y2 |
| | | strLine += strValue+strDiv; |
| | | //strValue.Format("%s", pWSIData->m_strWsi_2DImageFilename); // IMAGE_FILE_2D |
| | | strValue.Format("%s", "IMAGE_FILE_2D"); // IMAGE_FILE_2D |
| | | strLine += strValue+strDiv; |
| | | //strValue.Format("%s", pWSIData->m_strWsi_3DImageFilename); // IMAGE_FILE_3D |
| | | strValue.Format("%s", "IMAGE_FILE_3D"); // IMAGE_FILE_3D |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "WSI_RESOLUTION"); // WSI_RESOLUTION |
| | | strLine += strValue+strDiv; |
| | | |
| | | } |
| | | |
| | | void CGlassRawRTMS::makeMuraDefect( CString& strLine, _MacroDefect* pMuraData ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("MURADATA"); // DEFITEM |
| | | strLine += strValue+strDiv; |
| | | |
| | | CTime time = CTime::GetCurrentTime(); |
| | | strValue.Format("%04d%02d%02d", time.GetYear(), time.GetMonth(), time.GetDay()); // DATE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%02d%02d%02d", time.GetHour(), time.GetMinute(), time.GetSecond()); // TIME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->DEFECTNO); // DEFECTNO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "RECIPE"); // RECIPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "GLASSID"); // GLASSID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->CELLID); // CELLID |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->COORD_X1); // COORD_X1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->COORD_Y1); // COORD_Y1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->COORD_PX1);// COORD_PX1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->COORD_PY1); // COORD_PY1 |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->NOMURA); // NOMURA |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->SIZE_W); // SIZE_W |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->SIZE_L); // SIZE_L |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->SIZE_S); // SIZE_S |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->MAIN_TYPE); // MAIN_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->SUB_TYPE); // SUB_TYPE |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->PEAK); // PEAK |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->G_MIN); // G_MIN |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->G_MAX); // G_MAX |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->G_AVG); // G_AVG |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->CAM); // CAM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->SCAN); // SCAN |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%d", pMuraData->PIXEL_PEAK); // PIXEL_PEAK |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->REGION); //REGION |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->SIZE_T); // SIZE_T |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->PEAK_T); // PEAK_T |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", pMuraData->IMG_FILE_NAME); // IMG_FILE_NAME |
| | | strLine += strValue+strDiv; |
| | | } |
| | | |
| | | void CGlassRawRTMS::makeUserReview( CString& strLine, _grmDefectReviewData* pUserReview ) |
| | | { |
| | | strLine.Empty(); |
| | | |
| | | CString strValue; |
| | | CString strDiv = ","; |
| | | |
| | | strValue.Format("DATA"); // ITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("USERREVDATA"); // USERREVITEM |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "USER_NO"); // USER_NO |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "PR_X"); // PR_X |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "PR_Y"); // PR_Y |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "IMAGE_FILE_NAME"); // IMAGE_FILE_NAME |
| | | strLine += strValue+strDiv; |
| | | strValue.Format("%s", "REV_RESOLUTION"); // REV_RESOLUTION |
| | | strLine += strValue+strDiv; |
| | | |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::MakeAOIPreProcessing(CgrmGlassRawData* pData) |
| | | { |
| | | _grmGlassData* pGlass = pData->GetGlassData(); |
| | | |
| | | // File Path |
| | | CTime CurrTime = CTime::GetCurrentTime(); |
| | | CString strTime=_T(""), strRTMSRAWFile=_T("");; |
| | | strTime.Format(_T("%04d%02d%02d%02d%02d%02d"), CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | char strTempPath2[100] = {0, }, strTempPath3[100] = {0, }; |
| | | |
| | | CString strLotID = pGlass->m_strGlassID; |
| | | CString strRtmsOperID = pGlass->m_strOperID; |
| | | CString strRtmsEqID = pGlass->m_strEquipID; |
| | | CString strHGlassid = pGlass->m_strGlassID; |
| | | CString strStepID = pGlass->m_strStepID; |
| | | strHGlassid.MakeUpper(); |
| | | strTime.MakeUpper(); |
| | | |
| | | strRTMSRAWFile.Format(_T("%s_%s.csv"), strHGlassid, strTime); |
| | | |
| | | //íì¼ ìì±ë ê³³ í´ë ìì± [ê¹íí 2018/12/5] |
| | | //210126 CJH - RTMS ê²½ë¡ ë³ê²½ (126.100.100.5\\RawFile/ReviewImage).RawFileì 루í¸ì ê²°ê³¼íì¼ì ì¬ë¦¬ê³ ReviewImageìë StepID\\GlassID ìì ë°ì´í° ì
ë¡ë |
| | | { |
| | | //210126 CJH - ê²½ë¡ í´ëìì± ìì¹ ë³ê²½ |
| | | CreateDirectory("D:\\DitRtms", NULL); |
| | | CreateDirectory("D:\\DitRtms\\Data", NULL); |
| | | |
| | | BOOL bCreateOK = TRUE; |
| | | sprintf(strTempPath2, "\\\\126.100.100.5\\RawFile"); |
| | | bCreateOK &= CreateDirectory(strTempPath2, NULL); |
| | | |
| | | sprintf(strTempPath2, "\\\\126.100.100.5\\RawFile\\%s", strRTMSRAWFile); |
| | | |
| | | |
| | | sprintf(strTempPath3, "\\\\126.100.100.5\\ReviewImage"); |
| | | bCreateOK &= CreateDirectory(strTempPath3, NULL); |
| | | |
| | | sprintf(strTempPath3, "\\\\126.100.100.5\\ReviewImage\\%s", strStepID); |
| | | bCreateOK &= CreateDirectory(strTempPath3, NULL); |
| | | |
| | | sprintf(strTempPath3, "\\\\126.100.100.5\\ReviewImage\\%s\\%s", strStepID,strHGlassid); |
| | | bCreateOK &= CreateDirectory(strTempPath3, NULL); |
| | | |
| | | AKLOG("RTMS Folder Raw File Path Make : %s", strTempPath2); |
| | | AKLOG("RTMS Folder Img Path Make : %s", strTempPath3); |
| | | //if(bCreateOK) AKLOG("RTMS Folder Create Success"); |
| | | //else AKLOG("RTMS Folder Create Fail"); |
| | | } |
| | | |
| | | DeleteFile((LPCTSTR)strTempPath2); |
| | | |
| | | m_strRTMSRAWFile = strTempPath2; |
| | | m_strRTMSImageFile = strTempPath3; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGlassRawRTMS::CopyRTMSFiles( CgrmGlassRawData* pData ) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | CString CGlassRawRTMS::GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam) |
| | | { |
| | | CString sStr; |
| | | switch (nDefectInfoType) |
| | | { |
| | | case DMT_DefectJudge:// Judge |
| | | { |
| | | switch (nParam) |
| | | { |
| | | case Judge_OK: sStr.Format("OK"); |
| | | break; |
| | | case Judge_RP: sStr.Format("RP"); |
| | | break; |
| | | case Judge_NG: sStr.Format("NG"); |
| | | break; |
| | | case Judge_TR: sStr.Format("TR"); |
| | | break; |
| | | case Judge_PR: sStr.Format("PR"); |
| | | break; |
| | | case Judge_PT: sStr.Format("PT"); |
| | | break; |
| | | case Judge_Review: sStr.Format("RV"); |
| | | break; |
| | | case Judge_RC: sStr.Format("RC"); |
| | | break; |
| | | case Judge_Size: sStr.Format("SZ"); |
| | | break; |
| | | case Judge_VI: sStr.Format("VI"); |
| | | break; |
| | | case Judge_Rework: sStr.Format("RW"); |
| | | break; |
| | | case Judge_Unknown: sStr.Format("OK");//sStr.Format("Unknown"); //Unknownë ì¼ë¨ OK |
| | | break; |
| | | default: sStr.Format("OK");//sStr.Format("Ets"); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case DMT_DefectSizeType: |
| | | { |
| | | sStr = "S"; |
| | | switch (nParam) |
| | | { |
| | | //case SizeType_Unknown: sStr.Format("U"); break; |
| | | case 1/*SizeType_Small*/: sStr.Format("S"); |
| | | break; |
| | | case 2/*SizeType_Mid*/: sStr.Format("M"); |
| | | break; |
| | | case 3/*SizeType_Large*/: sStr.Format("L"); |
| | | break; |
| | | case 4/*SizeType_Huge*/: sStr.Format("O"); |
| | | break; |
| | | //case SizeType_Ultra: sStr.Format("Ultra"); break; |
| | | //default: sStr.Format("Ets"); break; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | return sStr; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | #include "MacroResultFile.h" |
| | | |
| | | class CGlassRawRTMS : public CGlassRawBase |
| | | { |
| | | public: |
| | | enum emDefectMemberType |
| | | { |
| | | DMT_DefectJudge = 0, |
| | | DMT_DefectSizeType |
| | | }; |
| | | |
| | | CGlassRawRTMS(void); |
| | | ~CGlassRawRTMS(void); |
| | | |
| | | static char* GetClassName(){return "RTMS";}; |
| | | |
| | | virtual BOOL SequenceGlassLoading(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceInspectEnd(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewStart(CgrmGlassRawData* pData); |
| | | virtual BOOL SequenceReviewEnd(CgrmGlassRawData* pData); |
| | | |
| | | virtual BOOL WriteAOIFile(CgrmGlassRawData* pData); |
| | | virtual BOOL ReadAOIFile(CgrmGlassRawData* pData){return TRUE;}; |
| | | |
| | | BOOL MakeAOIFile(CgrmGlassRawData* pData); |
| | | BOOL CopyRTMSFiles(CgrmGlassRawData* pData); |
| | | BOOL MakeAOIPreProcessing(CgrmGlassRawData* pData); |
| | | |
| | | void SetMuraResult(CMacroResultFile* pMuraResult){m_pMuraResultFile = pMuraResult;}; |
| | | protected: |
| | | void makeDataGlass(CString& strLine, _grmGlassData* pGlassData); |
| | | void makeDataCell(CString& strLine, _grmGlassData* pGlassData, _grmCellData* pCellData); |
| | | void makeDataDefect(CString& strLine, _grmGlassData* pGlassData, _grmCellData* pCellData, _grmDefectData* pDefectData); |
| | | void makeDataCamera(CString& strLine, _grmGlassData* pGlassData, int nCamIdx, int nScanIdx); |
| | | void makeMuraDefect(CString& strLine, _MacroDefect* pMuraData); |
| | | void makeDataWSI(CString& strLine, _grmDefectReviewData* pWSIData); |
| | | void makeUserReview(CString& strLine, _grmDefectReviewData* pUserReviewData); |
| | | CString GetDefectInfoToString(emDefectMemberType nDefectInfoType, int nParam); |
| | | |
| | | protected: |
| | | CString m_strRTMSRAWFile; |
| | | CString m_strRTMSImageFile; |
| | | |
| | | CMacroResultFile* m_pMuraResultFile; |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "InterfaceFTP.h" |
| | | #include "akLoggerExt.h" |
| | | #include "akCore/akFileUtil.h" |
| | | |
| | | #define LOCAL_INDEX_PATH "D:\\DIT_ResultData\\Index\\" |
| | | #define LOCAL_REV_IMAGE_PATH "D:\\ResultData\\Upload\\Image\\" |
| | | #define LOCAL_AOI_IMAGE_PATH "D:\\Image\\Defect\\" |
| | | #define LOCAL_MURA_IMAGE_PATH "D:\\DIT_ResultData\\Mura\\IMG\\" |
| | | #define LOCAL_DEEP_PATH "D:\\DIT_ResultData\\Deeplearning\\" |
| | | |
| | | CInterfaceFTP::CInterfaceFTP(void) |
| | | { |
| | | |
| | | } |
| | | |
| | | CInterfaceFTP::~CInterfaceFTP(void) |
| | | { |
| | | } |
| | | |
| | | |
| | | void CInterfaceFTP::SendMessageFTPUploadLinkFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_LINK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CInterfaceFTP::SendMessageFTPUploadRaw( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_RAW, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | void CInterfaceFTP::SendMessageFTPDownloadStack( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | GetFormatDescription(FTPCMD_STACK, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CInterfaceFTP::SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPDownloader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | //GetFormatDescription(FTPCMD_DATAFILE, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | { |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | sprintf(strServerFolder, "%s", pGlassData->m_strCassetteSequenceNo); |
| | | sprintf(strServerFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | sprintf(strLocalFolder, "D:\\DIT_ResultData\\DownloadData"); |
| | | sprintf(pLocalFile, "%s.dat", strGlassID.GetBuffer(0)); |
| | | } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_DownFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawDownload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CInterfaceFTP::SendMessageFTPUploadImage( _grmGlassData* pGlassData, emFTPCommand sort) |
| | | { |
| | | if(pGlassData == NULL) return; |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return; |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[32];// = "*.*"; |
| | | char strLocalFolder[256] = {}; |
| | | char strLocalFile[32];// = "*.*"; |
| | | |
| | | GetFormatDescription(sort, strServerFolder, strServerFile, strLocalFolder, strLocalFile, pGlassData); |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // } |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, strLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE; |
| | | upParam.m_nSendResultCode = FALSE; |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; //<--ìê±´ ëì¤ì êµ¬ë¶ |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | } |
| | | |
| | | |
| | | BOOL CInterfaceFTP::SendMessageFTPUploadIndexFile( _grmGlassData* pGlassData ) |
| | | { |
| | | if(pGlassData == NULL) |
| | | return FALSE; |
| | | |
| | | HWND hWnd = ::FindWindow(NULL, "FTPUploader"); |
| | | if(hWnd == NULL) return FALSE; |
| | | |
| | | |
| | | char strServerFolder[256] = {}; |
| | | char strServerFile[256] = {}; |
| | | char strLocalFolder[256] = {}; |
| | | char pLocalFile[256] = {}; |
| | | |
| | | GetFormatDescription(FTPCMD_INDEX, strServerFolder, strServerFile, strLocalFolder, pLocalFile, pGlassData); |
| | | |
| | | |
| | | // if(0)//test |
| | | // { |
| | | // sprintf(strServerFolder, "HDD1/DIT/TestC"); |
| | | // ServerFile = "ftptestfile.txt"; |
| | | // |
| | | // sprintf(strLocalFolder, "D:"); |
| | | // pLocalFile = "ftptestfile.txt"; |
| | | // } |
| | | |
| | | |
| | | CFTPCopyDataParam upParam; |
| | | strcpy(upParam.m_strServer_FolderName, strServerFolder); |
| | | strcpy(upParam.m_strServer_FileName, strServerFile); |
| | | strcpy(upParam.m_strLocal_FolderName, strLocalFolder); |
| | | strcpy(upParam.m_strLocal_FileName, pLocalFile); |
| | | strcpy(upParam.m_strServer_SignalFolderName, ""); |
| | | strcpy(upParam.m_strServer_SignalFileName, ""); |
| | | upParam.m_nCreateSignalFile = FALSE;//m_ctrlCreateSignal.GetCheck(); |
| | | upParam.m_nSendResultCode = FALSE;//m_ctrlResultAck.GetCheck(); |
| | | upParam.m_nProcessType = CFTPCopyDataParam::FTPProcessType_UpFile; |
| | | |
| | | COPYDATASTRUCT cds; |
| | | cds.dwData = CFTPCopyDataParam::FTPCopyDataCmd_RawUpload; |
| | | cds.cbData = sizeof(CFTPCopyDataParam); |
| | | cds.lpData = &upParam; |
| | | |
| | | DWORD dwReturn = 0; |
| | | if(SendMessageTimeout(hWnd, WM_COPYDATA, NULL, (LPARAM)&cds, SMTO_NORMAL, 20000, (PDWORD_PTR)(dwReturn)) == FALSE) |
| | | { |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CInterfaceFTP::GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData) |
| | | { |
| | | |
| | | CString strGlassIDOrg = pGlassData->m_strGlassID; |
| | | CString strGlassID = strGlassIDOrg.Left(12); |
| | | CString strGlassIDLevel5th = strGlassID.Left(5); |
| | | CString strGlassIDLevel8th = strGlassID.Left(8); |
| | | |
| | | switch(sort) |
| | | { |
| | | case FTPCMD_AOI_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_AOI_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_REVIEW_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_REV_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_RAW: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_STACK: |
| | | { |
| | | // CTime time = pGlassData->m_tmGlassLoading; |
| | | // sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Data", m_StackResult.getStackEquipID(), time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | // strGlassIDLevel5th.GetBuffer(0), |
| | | // strGlassIDLevel8th.GetBuffer(0), |
| | | // strGlassID.GetBuffer(0)); |
| | | // |
| | | // //ê°ì¥ ìµê·¼ê±¸ ì°¾ìì¼ íë? [ê¹íí 2019/1/12] |
| | | // sprintf(pServerFile, "%s_%s_*.csv", |
| | | // m_StackResult.getStackOperID(), |
| | | // pGlassData->m_strGlassID); |
| | | // |
| | | // sprintf(pLocalPath, "%s", m_StackResult.getStackLocalPath()); |
| | | // sprintf(pLocalFile, "%s.txt", strGlassID.GetBuffer(0)); |
| | | } |
| | | break; |
| | | case FTPCMD_MURA_IMAGE: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "%s\\%04d%02d%02d\\%s\\%s\\%s\\Image", pGlassData->m_strEquipID, time.GetYear(), time.GetMonth(), time.GetDay(), |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s%s", LOCAL_MURA_IMAGE_PATH, strGlassID.GetBuffer(0)); |
| | | strcpy(pServerFile, "*.*"); |
| | | strcpy(pLocalFile, "*.*"); |
| | | } |
| | | break; |
| | | case FTPCMD_INDEX: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | sprintf(pServerPath, "INDEX\\%s", pGlassData->m_strEquipID); |
| | | sprintf(pServerFile, "%04d%02d%02d_%s.csv", time.GetYear(), time.GetMonth(), time.GetDay(), pGlassData->m_strStepID); |
| | | |
| | | sprintf(pLocalPath, "%s", LOCAL_INDEX_PATH); |
| | | sprintf(pLocalFile, "%s", pServerFile); |
| | | } |
| | | break; |
| | | |
| | | case FTPCMD_LINK: |
| | | { |
| | | CTime time = m_tmFileCreateTime; |
| | | CString strFileName;//íì¼ìì± ìê° ë문ì ì¬ê¸°ì ì ííê² íì¼ëª
ë¤ì ì ì |
| | | { |
| | | //Glass ì ë³´ |
| | | CTime CurrTime = m_tmFileCreateTime; |
| | | CString strTime; |
| | | strTime.Format(_T("%04d%02d%02d_%02d%02d%02d"), |
| | | CurrTime.GetYear(), CurrTime.GetMonth(), CurrTime.GetDay(), CurrTime.GetHour(), CurrTime.GetMinute(), CurrTime.GetSecond()); |
| | | strFileName.Format("%s_%s_%s.csv", pGlassData->m_strOperID, pGlassData->m_strGlassID, strTime.GetBuffer(0)); |
| | | } |
| | | sprintf(pServerPath, "%s\\%s\\%s\\%s\\%s", "LINK", pGlassData->m_strEquipID, |
| | | strGlassIDLevel5th.GetBuffer(0), |
| | | strGlassIDLevel8th.GetBuffer(0), |
| | | strGlassID.GetBuffer(0)); |
| | | |
| | | sprintf(pLocalPath, "%s", pGlassData->m_strPath); |
| | | |
| | | sprintf(pServerFile, "%s", strFileName.GetBuffer(0)); |
| | | sprintf(pLocalFile, "%s", strFileName.GetBuffer(0)); |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include "GlassRawBase.h" |
| | | |
| | | class CInterfaceFTP |
| | | { |
| | | public: |
| | | enum emFTPCommand |
| | | { |
| | | FTPCMD_REVIEW_IMAGE =0, |
| | | FTPCMD_RAW , |
| | | FTPCMD_INDEX , |
| | | FTPCMD_AOI_IMAGE , |
| | | FTPCMD_MURA_RAW , |
| | | FTPCMD_MURA_IMAGE , |
| | | FTPCMD_STACK , |
| | | FTPCMD_LINK , |
| | | FTPCMD_End |
| | | }; |
| | | |
| | | public: |
| | | CInterfaceFTP(void); |
| | | ~CInterfaceFTP(void); |
| | | |
| | | virtual void SendMessageFTPUploadRaw(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadStack(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPUploadImage(_grmGlassData* pGlassData, emFTPCommand sort); |
| | | virtual BOOL SendMessageFTPUploadIndexFile(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPUploadLinkFile(_grmGlassData* pGlassData); |
| | | virtual void SendMessageFTPDownloadDataFile( _grmGlassData* pGlassData); |
| | | |
| | | virtual void GetFormatDescription(emFTPCommand sort, char* pServerPath, char* pServerFile, char* pLocalPath, char* pLocalFile, _grmGlassData* pGlassData); |
| | | |
| | | public: |
| | | CTime m_tmFileCreateTime; |
| | | }; |
| | | |
| | | class CFTPCopyDataParam |
| | | { |
| | | public: |
| | | enum FTPProcessType { FTPProcessType_DownFile=0, FTPProcessType_UpFile, FTPProcessType_Count }; |
| | | enum FTPDataSize { FTPDataSize_MaxPathNum=255, FTPDataSize_MaxFileNum=100 }; |
| | | enum FTPCopyDataCmd { FTPCopyDataCmd_RawDownload=1, FTPCopyDataCmd_RawUpload, FTPCopyDataCmd_LotUpload, FTPCopyDataCmd_ImageUpload }; |
| | | enum FTPDataType { FTPDataType_Unknown = 0, FTPDataType_Raw, FTPDataType_Image, FTPDataType_Stack, FTPDataType_Index }; |
| | | |
| | | public: |
| | | CFTPCopyDataParam() { Reset(); } |
| | | virtual ~CFTPCopyDataParam() { Reset(); } |
| | | void Reset() |
| | | { |
| | | memset(this, 0, sizeof(CFTPCopyDataParam)); |
| | | m_hSenderWnd = GetCurrentProcessWndHandle(); |
| | | } |
| | | |
| | | const HWND GetSenderWnd() const { return m_hSenderWnd; } |
| | | void SetSenderWnd(HWND hWnd) { m_hSenderWnd = hWnd; } |
| | | |
| | | public: |
| | | int m_nProcessType; // íë¡ì¸ì¤ íì
|
| | | int m_nCreateSignalFile; // ìê·¸ë íì¼ ìì±ì 무 |
| | | int m_bFirstPriority; // ìµìì ì°ì ììì 무 |
| | | int m_nSendResultCode; // ë³´ë¸ ê²°ê³¼ ì½ë |
| | | // [C-PRJ] Image Upload Define - KHT (2020/11/19) |
| | | int m_nDataType; // ë°ì´í° íì
|
| | | |
| | | TCHAR m_strServer_FolderName[FTPDataSize_MaxPathNum]; // ìë² ê²½ë¡ëª
|
| | | TCHAR m_strServer_FileName[FTPDataSize_MaxFileNum]; // ìë² íì¼ëª
|
| | | |
| | | TCHAR m_strLocal_FolderName[FTPDataSize_MaxPathNum]; // ë¡ì»¬ ê²½ë¡ëª
|
| | | TCHAR m_strLocal_FileName[FTPDataSize_MaxFileNum]; // ë¡ì»¬ íì¼ëª
|
| | | |
| | | TCHAR m_strServer_SignalFolderName[FTPDataSize_MaxPathNum]; // ìë² ìê·¸ë ê²½ë¡ëª
|
| | | TCHAR m_strServer_SignalFileName[FTPDataSize_MaxFileNum]; // ìë² ìê·¸ë íì¼ëª
|
| | | |
| | | TCHAR m_strRTMS_FileName[FTPDataSize_MaxFileNum]; |
| | | |
| | | TCHAR m_strServer_SubFileName[FTPDataSize_MaxFileNum]; // ìë² ë¡ì»¬ ê²½ë¡ë´ì ì¶ê° Raw íì¼ ìì± ì´ë¦ |
| | | TCHAR m_strServer_SubFilePath[FTPDataSize_MaxFileNum]; // ìë² ë¡ì»¬ ê²½ë¡ë´ì ì¶ê° Raw íì¼ ìì± ê²½ë¡ |
| | | |
| | | protected: |
| | | HWND m_hSenderWnd; // ë³´ë¸ íë¡ê·¸ë¨ ìëì° |
| | | |
| | | static HWND GetCurrentProcessWndHandle() |
| | | { |
| | | DWORD dwPID = GetCurrentProcessId(); |
| | | HWND hWnd = FindWindow(NULL, NULL); |
| | | while (hWnd != NULL) |
| | | { |
| | | if (GetParent(hWnd) == NULL){ |
| | | DWORD dwProcId; |
| | | GetWindowThreadProcessId(hWnd, &dwProcId); |
| | | if (dwPID == dwProcId){ |
| | | return hWnd; |
| | | } |
| | | } |
| | | hWnd = GetWindow(hWnd, GW_HWNDNEXT); |
| | | } |
| | | return NULL; |
| | | } |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "MacroResultFile.h" |
| | | #include "akCore/akFileDB.h" |
| | | //0404nwh |
| | | #include "akGridData.h" |
| | | #include <process.h> |
| | | #include "DitGlassRawClient.h" |
| | | #include "GlassRawBase.h" |
| | | |
| | | #ifdef _DEBUG |
| | | #undef THIS_FILE |
| | | static char THIS_FILE[]=__FILE__; |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | CMacroResultFile::CMacroResultFile(void) |
| | | { |
| | | m_bReadSuccess = FALSE; |
| | | readOptionFile(); |
| | | } |
| | | |
| | | CMacroResultFile::~CMacroResultFile(void) |
| | | { |
| | | m_vecMacroDefect.clear(); |
| | | } |
| | | |
| | | BOOL CMacroResultFile::openFile( char* pFileName ) |
| | | { |
| | | m_bReadSuccess = FALSE; |
| | | FILE* pf = fopen(pFileName, "r"); |
| | | |
| | | if(pf == NULL) |
| | | return FALSE; |
| | | |
| | | std::vector<_MacroDefect> vecMacroDefect; |
| | | _MacroDefect MacroDefect; |
| | | char buffer[1024]; |
| | | |
| | | char* pReadPoint = NULL; |
| | | char *pStr; |
| | | |
| | | while(!feof(pf)) |
| | | { |
| | | pStr = fgets(buffer, 1024, pf); |
| | | |
| | | if(!strncmp(buffer, "ITEM,", 5)) continue; |
| | | |
| | | |
| | | if(strlen(buffer) <= 0 || pStr == NULL) |
| | | break; |
| | | |
| | | if(!strncmp(buffer, "DATA,CELLDATA", 13))//íì± íí[2017/3/29] |
| | | { |
| | | //ë¬´ë¼ ì
íì ë ë°ì í´ì¼ íë? |
| | | } |
| | | else if(!strncmp(buffer, "DATA,DEFECTDATA", 15))//íì± íí[2017/3/29] |
| | | { |
| | | pReadPoint = buffer; |
| | | |
| | | pReadPoint = getParsingData(pReadPoint, 15, &MacroDefect.ITEM ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.DEFECTNO ); |
| | | pReadPoint = getParsingData(pReadPoint, 20, &MacroDefect.CELLID ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.COORD_X1 ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.COORD_Y1 ); |
| | | pReadPoint = getParsingData(pReadPoint, 9, &MacroDefect.COORD_PX1 ); |
| | | pReadPoint = getParsingData(pReadPoint, 9, &MacroDefect.COORD_PY1 ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.NOMURA ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.JUDGE ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.SIZE_W ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.SIZE_L ); |
| | | pReadPoint = getParsingData(pReadPoint, 15, &MacroDefect.SIZE_S ); |
| | | pReadPoint = getParsingData(pReadPoint, 15, &MacroDefect.MAIN_TYPE ); |
| | | pReadPoint = getParsingData(pReadPoint, 15, &MacroDefect.SUB_TYPE ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.PEAK ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.G_MIN ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.G_MAX ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.G_AVG ); |
| | | pReadPoint = getParsingData(pReadPoint, 3, &MacroDefect.CAM ); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &MacroDefect.SCAN ); |
| | | pReadPoint = getParsingData(pReadPoint, 10, &MacroDefect.PIXEL_PEAK ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.REGION ); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &MacroDefect.MASK_T ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.SIZE_T ); |
| | | pReadPoint = getParsingData(pReadPoint, 6, &MacroDefect.PEAK_T ); |
| | | pReadPoint = getParsingData(pReadPoint, 69, &MacroDefect.IMG_FILE_NAME); |
| | | MacroDefect.IMG_FILE_NAME = MacroDefect.IMG_FILE_NAME.Left(70); |
| | | MacroDefect.IMG_FILE_NAME.Remove(' '); |
| | | |
| | | vecMacroDefect.push_back(MacroDefect); |
| | | } |
| | | } |
| | | |
| | | fclose(pf); |
| | | |
| | | m_vecMacroDefect = vecMacroDefect; |
| | | //ë¹ ë¥¸ ì°¾ê¸°ì© map ìì± |
| | | { |
| | | m_mapFind.clear(); |
| | | int nSize = m_vecMacroDefect.size(); |
| | | for(int i=0; i<nSize; i++) |
| | | { |
| | | m_mapFind.insert(std::make_pair(m_vecMacroDefect[i].COORD_X1, &m_vecMacroDefect[i])); |
| | | } |
| | | } |
| | | m_bReadSuccess = TRUE; |
| | | return TRUE; |
| | | } |
| | | |
| | | char* CMacroResultFile::getParsingData( char* pBuf, int nLen, CString* pOutData ) |
| | | { |
| | | for(int i=nLen-1; i>=0; i--) |
| | | { |
| | | if(pBuf[i] != ' ') |
| | | { |
| | | pBuf[i+1] = 0; |
| | | break; |
| | | } |
| | | } |
| | | *pOutData = pBuf; |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | char* CMacroResultFile::getParsingData( char* pBuf, int nLen, int* pOutData ) |
| | | { |
| | | pBuf[nLen] = 0; |
| | | |
| | | *pOutData = atoi(pBuf); |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | BOOL CMacroResultFile::readOptionFile( char* pFileName /*= "C:\\AOIServer\\ConfigFile\\MacroInfo.cfg"*/ ) |
| | | { |
| | | CakFileDB fileDB; |
| | | fileDB.openfile(pFileName); |
| | | char strTemp[256]={}; |
| | | fileDB.getItem("MACROPATH_ENABLE", &m_bMacroResultFile, 0); |
| | | fileDB.getItem("MACROPATH_RAW", strTemp, ""); m_strMacroResultRawPath= strTemp; |
| | | fileDB.getItem("MACROPATH_IMAGE", strTemp, ""); m_strMacroResultImagePath= strTemp; |
| | | fileDB.getItem("SERVERPATH_RAW", strTemp, ""); m_strServerResultRawPath= strTemp; |
| | | fileDB.getItem("SERVERPATH_IMAGE", strTemp, "");m_strServerResultImagePath = strTemp; |
| | | fileDB.getItem("MACRO_READ_TIME", (int*)&m_dwMacroReadTime, 3000); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | int CMacroResultFile::GetDefectNum( int iCell ) |
| | | { |
| | | int nSize = (int)m_vecMacroDefect.size(); |
| | | int nDefectNum = 0; |
| | | for(int i=0; i<nSize; i++) |
| | | { |
| | | if(m_vecMacroDefect[i].CELLID == iCell) |
| | | { |
| | | nDefectNum++; |
| | | } |
| | | } |
| | | |
| | | return nDefectNum; |
| | | } |
| | | |
| | | int CMacroResultFile::GetSubPanelNum(int iCell) //0404nwh |
| | | { |
| | | int nSize = (int)m_vecMacroSubPanel.size(); |
| | | int nSubPanelNum = 0; |
| | | for (int i = 0; i < nSize; i++) |
| | | { |
| | | if (m_vecMacroSubPanel[i].PRO_IMAGE == iCell) |
| | | { |
| | | nSubPanelNum++; |
| | | } |
| | | } |
| | | return nSubPanelNum; |
| | | } |
| | | |
| | | //KMS - 190125 MuraDefect 찾기 |
| | | _MacroDefect* CMacroResultFile::FindDefect( int nX, int nY ,int nFindRange) |
| | | { |
| | | _MacroDefect *pMDefect = NULL; |
| | | |
| | | std::multimap<int,_MacroDefect*>::iterator itLowerBound; |
| | | std::multimap<int,_MacroDefect*>::iterator itUpperBound; |
| | | |
| | | itLowerBound = m_mapFind.lower_bound(nX - nFindRange); |
| | | itUpperBound = m_mapFind.upper_bound(nX + nFindRange); |
| | | |
| | | _MacroDefect *pMDefectMin = NULL; |
| | | int nMinDistance = nFindRange*nFindRange; |
| | | int nDistance; |
| | | for (itLowerBound; itLowerBound != itUpperBound; itLowerBound++) |
| | | { |
| | | pMDefect = static_cast<_MacroDefect*>(itLowerBound->second); |
| | | if(!pMDefect) continue; |
| | | |
| | | if(abs(nY - pMDefect->COORD_Y1) < nFindRange) |
| | | { |
| | | nDistance = ((nX - pMDefect->COORD_X1) * (nX - pMDefect->COORD_X1)) + ((nY - pMDefect->COORD_Y1) * (nY - pMDefect->COORD_Y1)); |
| | | if(nDistance < nMinDistance) |
| | | { |
| | | nMinDistance = nDistance; |
| | | pMDefectMin = pMDefect; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return pMDefectMin; |
| | | } |
| | | |
| | | BOOL CMacroResultFile::openFile_Mura(char* pFileName)//0404nwh |
| | | { |
| | | m_bReadSuccess = FALSE; |
| | | FILE* pf = fopen(pFileName, "r"); |
| | | |
| | | if (pf == NULL) |
| | | return FALSE; |
| | | |
| | | CDitGlassRawClient GlassRawClient; |
| | | GlassRawClient.ConnectServer(); |
| | | CDitGlassRawClient* pShared = &GlassRawClient; |
| | | |
| | | _grmCellData* pGrmMura; |
| | | |
| | | std::vector<_MacroSubPanel> vecMacroSubPanel; |
| | | _MacroSubPanel MacroSubPanel; |
| | | char buffer[1024]; |
| | | char* pReadPoint = NULL; |
| | | char *pStr; |
| | | |
| | | CString stranelData = "DATA PANEL"; |
| | | CString strSubPanelData = "DATA SUBPANEL"; |
| | | CString strMaxAvgGray, strMaxPortion; |
| | | |
| | | while (!feof(pf)) |
| | | { |
| | | pStr = fgets(buffer, 1024, pf); |
| | | if (strlen(buffer) <= 0 || pStr == NULL) |
| | | break; |
| | | |
| | | if (!strncmp(buffer, stranelData, strlen(stranelData)))// ëì´ì°ê¸° íì± |
| | | { |
| | | CakParser paser; |
| | | if (strlen(buffer) <= 0) continue; |
| | | paser.process(buffer, " "); |
| | | int nTokNum = paser.getTokNum(); |
| | | if (nTokNum < 42) continue; |
| | | strMaxAvgGray = paser.getTokStr(41); |
| | | strMaxPortion = paser.getTokStr(42); |
| | | } |
| | | |
| | | if (!strncmp(buffer, strSubPanelData, strlen(strSubPanelData)))// ëì´ì°ê¸° íì± |
| | | { |
| | | CakParser paser; |
| | | if (strlen(buffer) <= 0) continue; |
| | | paser.process(buffer, " "); |
| | | int nTokNum = paser.getTokNum(); |
| | | if (nTokNum < 52) continue; //kyh 31->52 |
| | | MacroSubPanel.PRO_IMAGE = paser.getTokStr(20); |
| | | MacroSubPanel.AVG_GRAY_0 = paser.getTokStr(21); |
| | | MacroSubPanel.PORTION_0 = paser.getTokStr(22); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_0 = paser.getTokStr(23); |
| | | MacroSubPanel.AVG_AMP_0 = paser.getTokStr(24); |
| | | MacroSubPanel.FFT_VAR_0 = paser.getTokStr(25); |
| | | MacroSubPanel.FFT_VAH_0 = paser.getTokStr(26); |
| | | MacroSubPanel.FFT_VAQ_0 = paser.getTokStr(27); |
| | | MacroSubPanel.FFT_PK_0 = paser.getTokStr(28); |
| | | |
| | | MacroSubPanel.AVG_GRAY_1 = paser.getTokStr(29); |
| | | MacroSubPanel.PORTION_1 = paser.getTokStr(30); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_1 = paser.getTokStr(31); |
| | | MacroSubPanel.AVG_AMP_1 = paser.getTokStr(32); |
| | | MacroSubPanel.FFT_VAR_1 = paser.getTokStr(33); |
| | | MacroSubPanel.FFT_VAH_1 = paser.getTokStr(34); |
| | | MacroSubPanel.FFT_VAQ_1 = paser.getTokStr(35); |
| | | MacroSubPanel.FFT_PK_1 = paser.getTokStr(36); |
| | | |
| | | MacroSubPanel.AVG_GRAY_2 = paser.getTokStr(37); |
| | | MacroSubPanel.PORTION_2 = paser.getTokStr(38); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_2 = paser.getTokStr(39); |
| | | MacroSubPanel.AVG_AMP_2 = paser.getTokStr(40); |
| | | MacroSubPanel.FFT_VAR_2 = paser.getTokStr(41); |
| | | MacroSubPanel.FFT_VAH_2 = paser.getTokStr(42); |
| | | MacroSubPanel.FFT_VAQ_2 = paser.getTokStr(43); |
| | | MacroSubPanel.FFT_PK_2 = paser.getTokStr(44); |
| | | |
| | | MacroSubPanel.AVG_GRAY_3 = paser.getTokStr(45); |
| | | MacroSubPanel.PORTION_3 = paser.getTokStr(46); |
| | | //kyh ì¶ê° |
| | | MacroSubPanel.CORNER_GRAY_3 = paser.getTokStr(47); |
| | | MacroSubPanel.AVG_AMP_3 = paser.getTokStr(48); |
| | | MacroSubPanel.FFT_VAR_3 = paser.getTokStr(49); |
| | | MacroSubPanel.FFT_VAH_3 = paser.getTokStr(50); |
| | | MacroSubPanel.FFT_VAQ_3 = paser.getTokStr(51); |
| | | MacroSubPanel.FFT_PK_3 = paser.getTokStr(52); |
| | | |
| | | vecMacroSubPanel.push_back(MacroSubPanel); |
| | | } |
| | | } |
| | | |
| | | fclose(pf); |
| | | |
| | | m_vecMacroSubPanel = vecMacroSubPanel; |
| | | |
| | | for (int i = 0; i < m_vecMacroSubPanel.size(); i++) |
| | | { |
| | | pGrmMura= pShared->GetCellData(i); |
| | | |
| | | strcpy(pGrmMura->m_strProImage, m_vecMacroSubPanel[i].PRO_IMAGE.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgGray_0, m_vecMacroSubPanel[i].AVG_GRAY_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_0, m_vecMacroSubPanel[i].PORTION_0.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_0, m_vecMacroSubPanel[i].CORNER_GRAY_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_0, m_vecMacroSubPanel[i].AVG_AMP_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_0, m_vecMacroSubPanel[i].FFT_VAR_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_0, m_vecMacroSubPanel[i].FFT_VAH_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_0, m_vecMacroSubPanel[i].FFT_VAQ_0.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_0, m_vecMacroSubPanel[i].FFT_PK_0.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_1, m_vecMacroSubPanel[i].AVG_GRAY_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_1, m_vecMacroSubPanel[i].PORTION_1.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_1, m_vecMacroSubPanel[i].CORNER_GRAY_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_1, m_vecMacroSubPanel[i].AVG_AMP_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_1, m_vecMacroSubPanel[i].FFT_VAR_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_1, m_vecMacroSubPanel[i].FFT_VAH_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_1, m_vecMacroSubPanel[i].FFT_VAQ_1.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_1, m_vecMacroSubPanel[i].FFT_PK_1.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_2, m_vecMacroSubPanel[i].AVG_GRAY_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_2, m_vecMacroSubPanel[i].PORTION_2.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_2, m_vecMacroSubPanel[i].CORNER_GRAY_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_2, m_vecMacroSubPanel[i].AVG_AMP_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_2, m_vecMacroSubPanel[i].FFT_VAR_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_2, m_vecMacroSubPanel[i].FFT_VAH_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_2, m_vecMacroSubPanel[i].FFT_VAQ_2.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_2, m_vecMacroSubPanel[i].FFT_PK_2.GetBuffer(0)); |
| | | |
| | | strcpy(pGrmMura->m_strAvgGray_3, m_vecMacroSubPanel[i].AVG_GRAY_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strPortion_3, m_vecMacroSubPanel[i].PORTION_3.GetBuffer(0)); |
| | | //kyh 0622 |
| | | strcpy(pGrmMura->m_strCorner_Gray_3, m_vecMacroSubPanel[i].CORNER_GRAY_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strAvgAmp_3, m_vecMacroSubPanel[i].AVG_AMP_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVar_3, m_vecMacroSubPanel[i].FFT_VAR_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVah_3, m_vecMacroSubPanel[i].FFT_VAH_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTVaq_3, m_vecMacroSubPanel[i].FFT_VAQ_3.GetBuffer(0)); |
| | | strcpy(pGrmMura->m_strFFTPK_3, m_vecMacroSubPanel[i].FFT_PK_3.GetBuffer(0)); |
| | | } |
| | | strcpy(pShared->GetGlassData()->m_strMaxAvgGray, strMaxAvgGray.GetBuffer(0)); |
| | | strcpy(pShared->GetGlassData()->m_strMaxPortion, strMaxPortion.GetBuffer(0)); |
| | | |
| | | m_bReadSuccess = TRUE; |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include <map> |
| | | /* |
| | | ITEM NAME SIZE DESCRIPTION |
| | | DATE DATE 8 ê²ì¬ ì¢
ë£ ì¼ì |
| | | TIME TIME 6 ê²ì¬ ì¢
ë£ ìê° |
| | | DEFECT NO DEFECTNO 8 ê²°í¨ ë²í¸ |
| | | RECIPE NAME RECIPE 20 ê²ì¬ ë ìí¼ ì´ë¦ |
| | | GLASSID GLASSID 15 기í ID |
| | | CELLID CELLID 16 ê²°í¨ ìì¹ CELL ID |
| | | COORD X COORD_X1 8 Xì¢í(ê²°í¨ ì¤ì¬ ì¢í, ë¨ì : um) |
| | | COORD Y COORD_Y1 8 Yì¢í(ê²°í¨ ì¤ì¬ ì¢í, ë¨ì : um) |
| | | NOMURA NOMURA 6 ë¹ê²°í¨ ì¬ë¶(1 - ë¹ê²°í¨, 0 - ì í¨ê²°í¨) |
| | | WIDTH SIZE_W 8 ê²°í¨ ëë¹(X 길ì´, ë¨ì : um) |
| | | LENGTH SIZE_L 8 ê²°í¨ ëì´(Y 길ì´, ë¨ì : um) |
| | | SQUARE SIZE_S 15 ê²°í¨ í¬ê¸°(ë©´ì , ë¨ì : um²) |
| | | MAIN TYPE MAIN_TYPE 15 ê²°í¨ íì
(Area, VLineB, HLineB, SpotB, SpotW, NonFilling, NFGroup, OrangePeel, VLineW, HLineW, VLineF, HLineF, Depo) |
| | | SUB TYPE SUB_TYPE 15 ê²ì¶ íì
(Normal, Common, Mask, CommonMask) |
| | | PEAK PEAK 6 ê²°í¨ í¼í¬ ì ë³´(ë¨ì : DN) |
| | | MIN G_MIN 6 ê²°í¨ ìì ìµì ë°ê¸°(ë¨ì : DN) |
| | | MAX G_MAX 6 ê²°í¨ ìì ìµë ë°ê¸°(ë¨ì : DN) |
| | | AVERAGE G_AVG 6 ê²°í¨ ìì íê· ë°ê¸°(ë¨ì : DN) |
| | | CAM NO CAM 3 ê²ì¶ ì¹´ë©ë¼ Index |
| | | SCAN NO SCAN 4 ê²ì¶ ì¤ìº Index |
| | | PIXEL PEAK PIXEL_PEAK 10 ê²°í¨ í½ì
í¼í¬ ì ë³´(ë¨ì : DN) |
| | | REGION TYPE REGION 6 ê²ì¶ ìì(Active, Pad) |
| | | SIZE TYPE SIZE_T 6 í¬ê¸° íì
(Small, Medium, Large, Huge) |
| | | PEAK TYPE PEAK_T 6 í¼í¬ íì
(Pale, Medium, Deep, Over) |
| | | IMAGE FILE NAME IMG_FILE_NAME 50 ê²°í¨ë³ ì´ë¯¸ì§ íì¼ ì´ë¦(ì
ë²í¸.ê²°í¨ë²í¸_ì¼ì.jpg) |
| | | */ |
| | | /* CSOT T4 IJP Type |
| | | ITEM Start Length |
| | | ITEM,DEFECTDATA 0 15 |
| | | DEFECTNO 17 8 |
| | | CELLID 26 20 |
| | | COORD_X1 47 8 |
| | | COORD_Y1 56 8 |
| | | COORD_PX1 65 9 |
| | | COORD_PY1 75 9 |
| | | NOMURA 85 6 |
| | | JUDGE 92 8 |
| | | SIZE_W 101 8 |
| | | SIZE_L 110 8 |
| | | SIZE_S 119 15 |
| | | MAIN_TYPE 135 15 |
| | | SUB_TYPE 151 15 |
| | | PEAK 167 6 |
| | | G_MIN 174 6 |
| | | G_MAX 181 6 |
| | | G_AVG 188 6 |
| | | CAM 195 3 |
| | | SCAN 199 4 |
| | | PIXEL_PEAK 204 10 |
| | | REGION 215 6 |
| | | MASK_T 222 8 |
| | | SIZE_T 231 6 |
| | | PEAK_T 238 6 |
| | | IMG_FILE_NAME 245 69 |
| | | */ |
| | | struct _MacroDefect |
| | | { |
| | | CString ITEM ; |
| | | int DEFECTNO ; |
| | | CString CELLID ; |
| | | int COORD_X1 ; |
| | | int COORD_Y1 ; |
| | | int COORD_PX1 ; |
| | | int COORD_PY1 ; |
| | | int NOMURA ; |
| | | CString JUDGE ; |
| | | int SIZE_W ; |
| | | int SIZE_L ; |
| | | int SIZE_S ; |
| | | CString MAIN_TYPE ; |
| | | CString SUB_TYPE ; |
| | | int PEAK ; |
| | | int G_MIN ; |
| | | int G_MAX ; |
| | | int G_AVG ; |
| | | int CAM ; |
| | | int SCAN ; |
| | | int PIXEL_PEAK ; |
| | | CString REGION ; |
| | | CString MASK_T ; |
| | | CString SIZE_T ; |
| | | CString PEAK_T ; |
| | | CString IMG_FILE_NAME ; |
| | | |
| | | _MacroDefect() |
| | | { |
| | | ITEM = "0"; |
| | | DEFECTNO = 0; |
| | | CELLID = "0"; |
| | | COORD_X1 = 0; |
| | | COORD_Y1 = 0; |
| | | COORD_PX1 = 0; |
| | | COORD_PY1 = 0; |
| | | NOMURA = 0; |
| | | JUDGE = "0"; |
| | | SIZE_W = 0; |
| | | SIZE_L = 0; |
| | | SIZE_S = 0; |
| | | MAIN_TYPE = "0"; |
| | | SUB_TYPE = "0"; |
| | | PEAK = 0; |
| | | G_MIN = 0; |
| | | G_MAX = 0; |
| | | G_AVG = 0; |
| | | CAM = 0; |
| | | SCAN = 0; |
| | | PIXEL_PEAK = 0; |
| | | REGION = "0"; |
| | | MASK_T = "0"; |
| | | SIZE_T = "0"; |
| | | PEAK_T = "0"; |
| | | IMG_FILE_NAME = "0"; |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | ///0404nwh |
| | | struct _MacroSubPanel |
| | | { |
| | | CString PRO_IMAGE; |
| | | CString AVG_GRAY_0; // 0 Scan 0 Model |
| | | CString PORTION_0; |
| | | CString CORNER_GRAY_0; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_0; |
| | | CString FFT_VAR_0; |
| | | CString FFT_VAH_0; |
| | | CString FFT_VAQ_0; |
| | | CString FFT_PK_0; // kyh end |
| | | CString AVG_GRAY_1; // 0 Scan 1 Model |
| | | CString PORTION_1; |
| | | CString CORNER_GRAY_1; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_1; |
| | | CString FFT_VAR_1; |
| | | CString FFT_VAH_1; |
| | | CString FFT_VAQ_1; |
| | | CString FFT_PK_1; // kyh end |
| | | CString AVG_GRAY_2; // 1 Scan 0 Model |
| | | CString PORTION_2; |
| | | CString CORNER_GRAY_2; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_2; |
| | | CString FFT_VAR_2; |
| | | CString FFT_VAH_2; |
| | | CString FFT_VAQ_2; |
| | | CString FFT_PK_2; // kyh end |
| | | CString AVG_GRAY_3; // 1 Scan 1 Model |
| | | CString PORTION_3; |
| | | CString CORNER_GRAY_3; // kyh ê²°ê³¼íì¼ í¬ë§· ìì |
| | | CString AVG_AMP_3; |
| | | CString FFT_VAR_3; |
| | | CString FFT_VAH_3; |
| | | CString FFT_VAQ_3; |
| | | CString FFT_PK_3; // kyh end |
| | | }; |
| | | |
| | | class CMacroResultFile |
| | | { |
| | | public: |
| | | CMacroResultFile(void); |
| | | virtual ~CMacroResultFile(void); |
| | | |
| | | public: |
| | | BOOL openFile(char* pFileName); |
| | | BOOL openFile_Mura(char* pFileName);//nwh0404 |
| | | |
| | | BOOL IsRead() { return m_bReadSuccess; } |
| | | int GetDefectNum() { return (int)m_vecMacroDefect.size();} |
| | | int GetDefectNum(int iCell) ; |
| | | _MacroDefect* GetDefect(int i) { return &m_vecMacroDefect[i]; } |
| | | |
| | | /////////////////////////////////////0404nwh |
| | | int GetSubPanelNum() { return (int)m_vecMacroSubPanel.size(); } |
| | | int GetSubPanelNum(int iCell); |
| | | _MacroSubPanel* GetSubPanel(int i) { return &m_vecMacroSubPanel[i]; } |
| | | /////////////////////////////////////0404nwh |
| | | BOOL readOptionFile(char* pFileName = "C:\\AOIServer\\ConfigFile\\MacroInfo.cfg"); |
| | | |
| | | _MacroDefect* FindDefect(int nX, int nY, int nFindRange = 2000/*um*/); |
| | | public: |
| | | BOOL m_bMacroResultFile;//ë§í¬ë¡ ì¤ë¹ ê²°ê³¼íì¼ íµí© ì¬ë¶ íí[2017/3/29] |
| | | CString m_strMacroResultRawPath; |
| | | CString m_strMacroResultImagePath; |
| | | CString m_strServerResultRawPath; |
| | | CString m_strServerResultImagePath; |
| | | |
| | | DWORD m_dwMacroReadTime; |
| | | |
| | | protected: |
| | | char* getParsingData(char* pBuf, int nLen, CString* pOutData); |
| | | char* getParsingData(char* pBuf, int nLen, int* pOutData); |
| | | |
| | | protected: |
| | | BOOL m_bReadSuccess; |
| | | std::vector<_MacroDefect> m_vecMacroDefect; |
| | | std::vector<_MacroSubPanel> m_vecMacroSubPanel; //0404nwh |
| | | |
| | | std::multimap<int,_MacroDefect*> m_mapFind; |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | // PathSettingDlg.cpp: 구í íì¼ |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReveiwHistory.h" |
| | | #include "PathSettingDlg.h" |
| | | #include "afxdialogex.h" |
| | | |
| | | #define PathSettingFilePath ( _T("PathSetting.ini") ) |
| | | // CPathSettingDlg ëí ìì |
| | | |
| | | IMPLEMENT_DYNAMIC(CPathSettingDlg, CDialogEx) |
| | | |
| | | CPathSettingDlg::CPathSettingDlg(CWnd* pParent /*=nullptr*/) |
| | | : CDialogEx(IDD_DLG_PATH_SETTING, pParent) |
| | | { |
| | | m_strBinPath.Empty(); |
| | | m_strInspectorPath.Empty(); |
| | | m_strReviewPath.Empty(); |
| | | m_strAlignPath.Empty(); |
| | | } |
| | | |
| | | CPathSettingDlg::~CPathSettingDlg() |
| | | { |
| | | } |
| | | |
| | | void CPathSettingDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialogEx::DoDataExchange(pDX); |
| | | } |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CPathSettingDlg, CDialogEx) |
| | | ON_BN_CLICKED(IDC_BTN_BIN_PATH, &CPathSettingDlg::OnBnClickedBtnBinPath) |
| | | ON_BN_CLICKED(IDC_BTN_INSPECTOR_PATH, &CPathSettingDlg::OnBnClickedBtnInspectorPath) |
| | | ON_BN_CLICKED(IDC_BTN_REVIEW_PATH, &CPathSettingDlg::OnBnClickedBtnReviewPath) |
| | | ON_BN_CLICKED(IDC_BTN_ALIGN_PATH, &CPathSettingDlg::OnBnClickedBtnAlignPath) |
| | | ON_BN_CLICKED(IDC_BTN_SAVE, &CPathSettingDlg::OnBnClickedBtnSave) |
| | | ON_BN_CLICKED(IDCANCEL, &CPathSettingDlg::OnBnClickedCancel) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CPathSettingDlg ë©ìì§ ì²ë¦¬ê¸° |
| | | BOOL CPathSettingDlg::Create(CWnd* pParentWnd) |
| | | { |
| | | return CDialogEx::Create(IDD, pParentWnd); |
| | | } |
| | | |
| | | BOOL CPathSettingDlg::PreTranslateMessage(MSG* pMsg) |
| | | { |
| | | // TODO: ì¬ê¸°ì í¹ìíë ì½ë를 ì¶ê° ë°/ëë 기본 í´ëì¤ë¥¼ í¸ì¶í©ëë¤. |
| | | if (pMsg->message == WM_KEYDOWN) |
| | | { |
| | | if (pMsg->wParam == VK_ESCAPE) |
| | | { |
| | | ShowWindow(SW_HIDE); |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | | |
| | | return __super::PreTranslateMessage(pMsg); |
| | | } |
| | | |
| | | void CPathSettingDlg::OnDestroy() |
| | | { |
| | | CDialogEx::OnDestroy(); |
| | | } |
| | | |
| | | void CPathSettingDlg::OnShowWindow(BOOL bShow, UINT nStatus) |
| | | { |
| | | __super::OnShowWindow(bShow, nStatus); |
| | | |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (TRUE == bShow) |
| | | { |
| | | } |
| | | } |
| | | |
| | | void CPathSettingDlg::OnBnClickedBtnBinPath() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | ITEMIDLIST *pidlBrowse; |
| | | CString strPath; |
| | | |
| | | BROWSEINFO BrInfo; |
| | | |
| | | BrInfo.hwndOwner = GetSafeHwnd(); |
| | | BrInfo.pidlRoot = NULL; |
| | | |
| | | memset(&BrInfo, 0, sizeof(BrInfo)); |
| | | BrInfo.lpszTitle = _T("Please select a folder that contains Bin files"); |
| | | BrInfo.ulFlags = BIF_RETURNONLYFSDIRS; |
| | | pidlBrowse = SHBrowseForFolder(&BrInfo); |
| | | TCHAR szPathName[200]; |
| | | |
| | | ::SHGetPathFromIDList(pidlBrowse, szPathName); |
| | | |
| | | CString strTmpPath = (LPCTSTR)szPathName; |
| | | CFileFind finder; |
| | | BOOL bFindPath = finder.FindFile(strTmpPath); |
| | | |
| | | if (bFindPath) |
| | | { |
| | | SetDlgItemText(IDC_EDIT_BIN_PATH, strTmpPath); |
| | | } |
| | | |
| | | LOG(Dbg, _T("[PathSetting] Bin Path Setting")); |
| | | } |
| | | |
| | | |
| | | void CPathSettingDlg::OnBnClickedBtnInspectorPath() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | ITEMIDLIST *pidlBrowse; |
| | | CString strPath; |
| | | |
| | | BROWSEINFO BrInfo; |
| | | |
| | | BrInfo.hwndOwner = GetSafeHwnd(); |
| | | BrInfo.pidlRoot = NULL; |
| | | |
| | | memset(&BrInfo, 0, sizeof(BrInfo)); |
| | | BrInfo.lpszTitle = _T("Please select a folder that contains Inspector Image files"); |
| | | BrInfo.ulFlags = BIF_RETURNONLYFSDIRS; |
| | | pidlBrowse = SHBrowseForFolder(&BrInfo); |
| | | TCHAR szPathName[200]; |
| | | |
| | | ::SHGetPathFromIDList(pidlBrowse, szPathName); |
| | | |
| | | CString strTmpPath = (LPCTSTR)szPathName; |
| | | CFileFind finder; |
| | | BOOL bFindPath = finder.FindFile(strTmpPath); |
| | | |
| | | if (bFindPath) |
| | | { |
| | | SetDlgItemText(IDC_EDIT_INSPECTOR_PATH, strTmpPath); |
| | | } |
| | | |
| | | LOG(Dbg, _T("[PathSetting] Align Inspector Setting")); |
| | | } |
| | | |
| | | |
| | | void CPathSettingDlg::OnBnClickedBtnReviewPath() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | ITEMIDLIST *pidlBrowse; |
| | | CString strPath; |
| | | |
| | | BROWSEINFO BrInfo; |
| | | |
| | | BrInfo.hwndOwner = GetSafeHwnd(); |
| | | BrInfo.pidlRoot = NULL; |
| | | |
| | | memset(&BrInfo, 0, sizeof(BrInfo)); |
| | | BrInfo.lpszTitle = _T("Please select a folder that contains Review Image files"); |
| | | BrInfo.ulFlags = BIF_RETURNONLYFSDIRS; |
| | | pidlBrowse = SHBrowseForFolder(&BrInfo); |
| | | TCHAR szPathName[200]; |
| | | |
| | | ::SHGetPathFromIDList(pidlBrowse, szPathName); |
| | | |
| | | CString strTmpPath = (LPCTSTR)szPathName; |
| | | CFileFind finder; |
| | | BOOL bFindPath = finder.FindFile(strTmpPath); |
| | | |
| | | if (bFindPath) |
| | | { |
| | | SetDlgItemText(IDC_EDIT_REVIEW_PATH, strTmpPath); |
| | | } |
| | | LOG(Dbg, _T("[PathSetting] Review Path Setting")); |
| | | } |
| | | |
| | | |
| | | void CPathSettingDlg::OnBnClickedBtnAlignPath() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | ITEMIDLIST *pidlBrowse; |
| | | CString strPath; |
| | | |
| | | BROWSEINFO BrInfo; |
| | | |
| | | BrInfo.hwndOwner = GetSafeHwnd(); |
| | | BrInfo.pidlRoot = NULL; |
| | | |
| | | memset(&BrInfo, 0, sizeof(BrInfo)); |
| | | BrInfo.lpszTitle = _T("Please select a folder that contains Align Image files"); |
| | | BrInfo.ulFlags = BIF_RETURNONLYFSDIRS; |
| | | pidlBrowse = SHBrowseForFolder(&BrInfo); |
| | | TCHAR szPathName[200]; |
| | | |
| | | ::SHGetPathFromIDList(pidlBrowse, szPathName); |
| | | |
| | | CString strTmpPath = (LPCTSTR)szPathName; |
| | | CFileFind finder; |
| | | BOOL bFindPath = finder.FindFile(strTmpPath); |
| | | |
| | | if (bFindPath) |
| | | { |
| | | SetDlgItemText(IDC_EDIT_ALIGN_PATH, strTmpPath); |
| | | } |
| | | |
| | | LOG(Dbg, _T("[PathSetting] Align Path Setting")); |
| | | } |
| | | |
| | | |
| | | void CPathSettingDlg::OnBnClickedBtnSave() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CString strFilePath; |
| | | strFilePath.Format("%s\\Config\\%s", GetExePath(), PathSettingFilePath); |
| | | |
| | | GetDlgItemText(IDC_EDIT_ALIGN_PATH, m_strAlignPath); |
| | | INIWriteStr("Path", "Align", m_strAlignPath, strFilePath); |
| | | GetDlgItemText(IDC_EDIT_BIN_PATH, m_strBinPath); |
| | | INIWriteStr("Path", "Bin", m_strBinPath, strFilePath); |
| | | GetDlgItemText(IDC_EDIT_INSPECTOR_PATH, m_strInspectorPath); |
| | | INIWriteStr("Path", "Inspector", m_strInspectorPath, strFilePath); |
| | | GetDlgItemText(IDC_EDIT_REVIEW_PATH, m_strReviewPath); |
| | | INIWriteStr("Path", "Review", m_strReviewPath, strFilePath); |
| | | |
| | | AfxMessageBox(_T("ì ì¥ ëììµëë¤"), MB_OK | MB_ICONWARNING); |
| | | |
| | | LOG(Dbg, _T("[PathSetting] PathSetting Save")); |
| | | |
| | | ShowWindow(SW_HIDE); |
| | | } |
| | | |
| | | void CPathSettingDlg::OnBnClickedCancel() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CString strTemp; |
| | | strTemp.Format(_T("")); |
| | | |
| | | if (m_strAlignPath == "") |
| | | { |
| | | m_strAlignPath.Format(_T("D:\\ResultData\\Align\\")); |
| | | } |
| | | if (m_strBinPath == "") |
| | | { |
| | | m_strBinPath.Format(_T("D:\\DIT_ResultData\\RawBin\\")); |
| | | } |
| | | if (m_strInspectorPath == "") |
| | | { |
| | | m_strInspectorPath.Format(_T("\\\\126.100.100.1\\D\\Image\\Defect\\")); |
| | | } |
| | | if (m_strReviewPath == "") |
| | | { |
| | | m_strReviewPath.Format(_T("D:\\ResultData\\UploadImage\\")); |
| | | } |
| | | |
| | | SetDlgItemText(IDC_EDIT_ALIGN_PATH, m_strAlignPath); |
| | | SetDlgItemText(IDC_EDIT_BIN_PATH, m_strBinPath); |
| | | SetDlgItemText(IDC_EDIT_INSPECTOR_PATH, m_strInspectorPath); |
| | | SetDlgItemText(IDC_EDIT_REVIEW_PATH, m_strReviewPath); |
| | | |
| | | LOG(Dbg, _T("[PathSetting] PathSetting Cancel")); |
| | | |
| | | ShowWindow(SW_HIDE); |
| | | } |
| | | |
| | | void CPathSettingDlg::PathSettingLoad() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CString strFilePath; |
| | | strFilePath.Format(_T("%s\\Config\\%s"), GetExePath(), PathSettingFilePath); |
| | | |
| | | CString strAppName = _T("Path"); |
| | | m_strAlignPath = INIReadStr(strAppName, _T("Align"), strFilePath); |
| | | m_strBinPath = INIReadStr(strAppName, _T("Bin"), strFilePath); |
| | | m_strInspectorPath = INIReadStr(strAppName, _T("Inspector"), strFilePath); |
| | | m_strReviewPath = INIReadStr(strAppName, _T("Review"), strFilePath); |
| | | |
| | | if (m_strAlignPath == "") |
| | | { |
| | | m_strAlignPath.Format(_T("D:\\ResultData\\Align\\")); |
| | | } |
| | | if (m_strBinPath == "") |
| | | { |
| | | m_strBinPath.Format(_T("D:\\DIT_ResultData\\RawBin\\")); |
| | | } |
| | | if (m_strInspectorPath == "") |
| | | { |
| | | m_strInspectorPath.Format(_T("\\\\126.100.100.1\\D\\Image\\Defect\\")); |
| | | } |
| | | if (m_strReviewPath == "") |
| | | { |
| | | m_strReviewPath.Format(_T("D:\\ResultData\\UploadImage\\")); |
| | | } |
| | | |
| | | SetDlgItemText(IDC_EDIT_ALIGN_PATH, m_strAlignPath); |
| | | SetDlgItemText(IDC_EDIT_BIN_PATH, m_strBinPath); |
| | | SetDlgItemText(IDC_EDIT_INSPECTOR_PATH, m_strInspectorPath); |
| | | SetDlgItemText(IDC_EDIT_REVIEW_PATH, m_strReviewPath); |
| | | |
| | | LOG(Dbg, _T("[PathSetting] Start Review Path Setting Load")); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | #include "Singleton.h" |
| | | |
| | | // CPathSettingDlg ëí ìì |
| | | |
| | | class CPathSettingDlg : public CDialogEx, public CSingleton< CPathSettingDlg > |
| | | { |
| | | DECLARE_DYNAMIC(CPathSettingDlg) |
| | | |
| | | public: |
| | | CPathSettingDlg(CWnd* pParent = nullptr); // íì¤ ìì±ìì
ëë¤. |
| | | virtual ~CPathSettingDlg(); |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | |
| | | enum { IDD = IDD_DLG_PATH_SETTING }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | |
| | | CString m_strBinPath; |
| | | CString m_strInspectorPath; |
| | | CString m_strReviewPath; |
| | | CString m_strAlignPath; |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | public: |
| | | virtual BOOL Create(CWnd* pParentWnd = NULL); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | |
| | | afx_msg void OnDestroy(); |
| | | afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); |
| | | public: |
| | | afx_msg void OnBnClickedBtnBinPath(); |
| | | afx_msg void OnBnClickedBtnInspectorPath(); |
| | | afx_msg void OnBnClickedBtnReviewPath(); |
| | | afx_msg void OnBnClickedBtnAlignPath(); |
| | | afx_msg void OnBnClickedBtnSave(); |
| | | afx_msg void OnBnClickedCancel(); |
| | | |
| | | void PathSettingLoad(); |
| | | CString GetBinPath() { return m_strBinPath; } |
| | | CString GetInspectorPath() { return m_strInspectorPath; } |
| | | CString GetReviewPath() { return m_strReviewPath; } |
| | | CString GetAlignPath() { return m_strAlignPath; } |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | |  |
| | | // ReveiwHistory.cpp: ìì© íë¡ê·¸ë¨ì ëí í´ëì¤ ëìì ì ìí©ëë¤. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReveiwHistory.h" |
| | | #include "ReveiwHistoryDlg.h" |
| | | |
| | | #ifdef _DEBUG |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | |
| | | // CReveiwHistoryApp |
| | | |
| | | BEGIN_MESSAGE_MAP(CReveiwHistoryApp, CWinApp) |
| | | ON_COMMAND(ID_HELP, &CWinApp::OnHelp) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CReveiwHistoryApp ìì± |
| | | |
| | | CReveiwHistoryApp::CReveiwHistoryApp() |
| | | { |
| | | // ë¤ì ìì ê´ë¦¬ì ì§ì |
| | | m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; |
| | | |
| | | // TODO: ì¬ê¸°ì ìì± ì½ë를 ì¶ê°í©ëë¤. |
| | | // InitInstanceì 모ë ì¤ìí ì´ê¸°í ìì
ì ë°°ì¹í©ëë¤. |
| | | } |
| | | |
| | | |
| | | // ì ì¼í CReveiwHistoryApp ê°ì²´ì
ëë¤. |
| | | |
| | | CReveiwHistoryApp theApp; |
| | | |
| | | |
| | | // CReveiwHistoryApp ì´ê¸°í |
| | | |
| | | BOOL CReveiwHistoryApp::InitInstance() |
| | | { |
| | | // ìì© íë¡ê·¸ë¨ 매ëíì¤í¸ê° ComCtl32.dll ë²ì 6 ì´ìì ì¬ì©íì¬ ë¹ì£¼ì¼ ì¤íì¼ì |
| | | // ì¬ì©íëë¡ ì§ì íë ê²½ì°, Windows XP ììì ë°ëì InitCommonControlsEx()ê° íìí©ëë¤. |
| | | // InitCommonControlsEx()를 ì¬ì©íì§ ìì¼ë©´ ì°½ì ë§ë¤ ì ììµëë¤. |
| | | INITCOMMONCONTROLSEX InitCtrls; |
| | | InitCtrls.dwSize = sizeof(InitCtrls); |
| | | // ìì© íë¡ê·¸ë¨ìì ì¬ì©í 모ë ê³µì© ì»¨í¸ë¡¤ í´ëì¤ë¥¼ í¬í¨íëë¡ |
| | | // ì´ í목ì ì¤ì íììì¤. |
| | | InitCtrls.dwICC = ICC_WIN95_CLASSES; |
| | | InitCommonControlsEx(&InitCtrls); |
| | | |
| | | CWinApp::InitInstance(); |
| | | |
| | | |
| | | AfxEnableControlContainer(); |
| | | |
| | | // ëí ììì ì
¸ í¸ë¦¬ ë·° ëë |
| | | // ì
¸ ëª©ë¡ ë·° 컨í¸ë¡¤ì´ í¬í¨ëì´ ìë ê²½ì° ì
¸ ê´ë¦¬ì를 ë§ëëë¤. |
| | | CShellManager *pShellManager = new CShellManager; |
| | | |
| | | // MFC 컨í¸ë¡¤ì í
ë§ë¥¼ ì¬ì©í기 ìí´ "Windows ìí" ë¹ì£¼ì¼ ê´ë¦¬ì íì±í |
| | | CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); |
| | | |
| | | // íì¤ ì´ê¸°í |
| | | // ì´ë¤ 기ë¥ì ì¬ì©íì§ ìê³ ìµì¢
ì¤í íì¼ì í¬ê¸°ë¥¼ ì¤ì´ë ¤ë©´ |
| | | // ìëìì íì ìë í¹ì ì´ê¸°í |
| | | // 루í´ì ì ê±°í´ì¼ í©ëë¤. |
| | | // í´ë¹ ì¤ì ì´ ì ì¥ë ë ì§ì¤í¸ë¦¬ í¤ë¥¼ ë³ê²½íììì¤. |
| | | // TODO: ì´ ë¬¸ìì´ì íì¬ ëë ì¡°ì§ì ì´ë¦ê³¼ ê°ì |
| | | // ì ì í ë´ì©ì¼ë¡ ìì í´ì¼ í©ëë¤. |
| | | SetRegistryKey(_T("ë¡ì»¬ ìì© íë¡ê·¸ë¨ ë§ë²ì¬ìì ìì±ë ìì© íë¡ê·¸ë¨")); |
| | | |
| | | CReveiwHistoryDlg dlg; |
| | | m_pMainWnd = &dlg; |
| | | INT_PTR nResponse = dlg.DoModal(); |
| | | if (nResponse == IDOK) |
| | | { |
| | | // TODO: ì¬ê¸°ì [íì¸]ì í´ë¦íì¬ ëí ììê° ìì´ì§ ë ì²ë¦¬í |
| | | // ì½ë를 ë°°ì¹í©ëë¤. |
| | | } |
| | | else if (nResponse == IDCANCEL) |
| | | { |
| | | // TODO: ì¬ê¸°ì [ì·¨ì]를 í´ë¦íì¬ ëí ììê° ìì´ì§ ë ì²ë¦¬í |
| | | // ì½ë를 ë°°ì¹í©ëë¤. |
| | | } |
| | | else if (nResponse == -1) |
| | | { |
| | | TRACE(traceAppMsg, 0, "ê²½ê³ : ëí ìì를 ë§ë¤ì§ 못íì¼ë¯ë¡ ìì© íë¡ê·¸ë¨ì´ ìê¸°ì¹ ìê² ì¢
ë£ë©ëë¤.\n"); |
| | | TRACE(traceAppMsg, 0, "ê²½ê³ : ëí ìììì MFC 컨í¸ë¡¤ì ì¬ì©íë ê²½ì° #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS를 ìíí ì ììµëë¤.\n"); |
| | | } |
| | | |
| | | // ììì ë§ë ì
¸ ê´ë¦¬ì를 ìì í©ëë¤. |
| | | if (pShellManager != nullptr) |
| | | { |
| | | delete pShellManager; |
| | | } |
| | | |
| | | #if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS) |
| | | ControlBarCleanUp(); |
| | | #endif |
| | | |
| | | // ëí ììê° ë«íì¼ë¯ë¡ ìì© íë¡ê·¸ë¨ì ë©ìì§ íí를 ììíì§ ìê³ ìì© íë¡ê·¸ë¨ì ëë¼ ì ìëë¡ FALSE를 |
| | | // ë°íí©ëë¤. |
| | | return FALSE; |
| | | } |
| | | |
»õ ÆÄÀÏ |
| | |
| | |  |
| | | // ReveiwHistory.h: PROJECT_NAME ìì© íë¡ê·¸ë¨ì ëí 주 í¤ë íì¼ì
ëë¤. |
| | | // |
| | | |
| | | #pragma once |
| | | |
| | | #ifndef __AFXWIN_H__ |
| | | #error "PCHì ëí´ ì´ íì¼ì í¬í¨í기 ì ì 'stdafx.h'를 í¬í¨í©ëë¤." |
| | | #endif |
| | | |
| | | #include "resource.h" // 주 기í¸ì
ëë¤. |
| | | |
| | | |
| | | // CReveiwHistoryApp: |
| | | // ì´ í´ëì¤ì 구íì ëí´ìë ReveiwHistory.cppì(를) 참조íì¸ì. |
| | | // |
| | | |
| | | class CReveiwHistoryApp : public CWinApp |
| | | { |
| | | public: |
| | | CReveiwHistoryApp(); |
| | | |
| | | // ì¬ì ìì
ëë¤. |
| | | public: |
| | | virtual BOOL InitInstance(); |
| | | |
| | | // 구íì
ëë¤. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | }; |
| | | |
| | | extern CReveiwHistoryApp theApp; |
»õ ÆÄÀÏ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <ItemGroup Label="ProjectConfigurations"> |
| | | <ProjectConfiguration Include="Debug|Win32"> |
| | | <Configuration>Debug</Configuration> |
| | | <Platform>Win32</Platform> |
| | | </ProjectConfiguration> |
| | | <ProjectConfiguration Include="Release|Win32"> |
| | | <Configuration>Release</Configuration> |
| | | <Platform>Win32</Platform> |
| | | </ProjectConfiguration> |
| | | <ProjectConfiguration Include="Debug|x64"> |
| | | <Configuration>Debug</Configuration> |
| | | <Platform>x64</Platform> |
| | | </ProjectConfiguration> |
| | | <ProjectConfiguration Include="Release|x64"> |
| | | <Configuration>Release</Configuration> |
| | | <Platform>x64</Platform> |
| | | </ProjectConfiguration> |
| | | </ItemGroup> |
| | | <PropertyGroup Label="Globals"> |
| | | <VCProjectVersion>15.0</VCProjectVersion> |
| | | <ProjectGuid>{FDD89A84-12C4-4024-8101-0E719E2BD9F6}</ProjectGuid> |
| | | <Keyword>MFCProj</Keyword> |
| | | <RootNamespace>DefectFromation</RootNamespace> |
| | | <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion> |
| | | <ProjectName>ReviewHistroy</ProjectName> |
| | | </PropertyGroup> |
| | | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
| | | <ConfigurationType>Application</ConfigurationType> |
| | | <UseDebugLibraries>true</UseDebugLibraries> |
| | | <PlatformToolset>v141</PlatformToolset> |
| | | <CharacterSet>MultiByte</CharacterSet> |
| | | <UseOfMfc>Dynamic</UseOfMfc> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
| | | <ConfigurationType>Application</ConfigurationType> |
| | | <UseDebugLibraries>false</UseDebugLibraries> |
| | | <PlatformToolset>v141</PlatformToolset> |
| | | <WholeProgramOptimization>true</WholeProgramOptimization> |
| | | <CharacterSet>MultiByte</CharacterSet> |
| | | <UseOfMfc>Dynamic</UseOfMfc> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
| | | <ConfigurationType>Application</ConfigurationType> |
| | | <UseDebugLibraries>true</UseDebugLibraries> |
| | | <PlatformToolset>v141</PlatformToolset> |
| | | <CharacterSet>MultiByte</CharacterSet> |
| | | <UseOfMfc>Dynamic</UseOfMfc> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
| | | <ConfigurationType>Application</ConfigurationType> |
| | | <UseDebugLibraries>false</UseDebugLibraries> |
| | | <PlatformToolset>v141</PlatformToolset> |
| | | <WholeProgramOptimization>true</WholeProgramOptimization> |
| | | <CharacterSet>MultiByte</CharacterSet> |
| | | <UseOfMfc>Dynamic</UseOfMfc> |
| | | </PropertyGroup> |
| | | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
| | | <ImportGroup Label="ExtensionSettings"> |
| | | </ImportGroup> |
| | | <ImportGroup Label="Shared"> |
| | | </ImportGroup> |
| | | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
| | | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
| | | </ImportGroup> |
| | | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
| | | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
| | | </ImportGroup> |
| | | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
| | | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
| | | </ImportGroup> |
| | | <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
| | | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
| | | </ImportGroup> |
| | | <PropertyGroup Label="UserMacros" /> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
| | | <LinkIncremental>true</LinkIncremental> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
| | | <LinkIncremental>true</LinkIncremental> |
| | | <OutDir>$(SolutionDir)\bin\</OutDir> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
| | | <LinkIncremental>false</LinkIncremental> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
| | | <LinkIncremental>false</LinkIncremental> |
| | | <OutDir>$(SolutionDir)\bin\</OutDir> |
| | | </PropertyGroup> |
| | | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
| | | <ClCompile> |
| | | <PrecompiledHeader>Use</PrecompiledHeader> |
| | | <WarningLevel>Level3</WarningLevel> |
| | | <Optimization>Disabled</Optimization> |
| | | <SDLCheck>true</SDLCheck> |
| | | <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ClCompile> |
| | | <Link> |
| | | <SubSystem>Windows</SubSystem> |
| | | </Link> |
| | | <Midl> |
| | | <MkTypLibCompatible>false</MkTypLibCompatible> |
| | | <ValidateAllParameters>true</ValidateAllParameters> |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </Midl> |
| | | <ResourceCompile> |
| | | <Culture>0x0412</Culture> |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
| | | </ResourceCompile> |
| | | </ItemDefinitionGroup> |
| | | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
| | | <ClCompile> |
| | | <PrecompiledHeader>Use</PrecompiledHeader> |
| | | <WarningLevel>Level3</WarningLevel> |
| | | <Optimization>Disabled</Optimization> |
| | | <SDLCheck>false</SDLCheck> |
| | | <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories> |
| | | </ClCompile> |
| | | <Link> |
| | | <SubSystem>Windows</SubSystem> |
| | | <AdditionalLibraryDirectories>../lib</AdditionalLibraryDirectories> |
| | | <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> |
| | | </Link> |
| | | <Midl> |
| | | <MkTypLibCompatible>false</MkTypLibCompatible> |
| | | <ValidateAllParameters>true</ValidateAllParameters> |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </Midl> |
| | | <ResourceCompile> |
| | | <Culture>0x0412</Culture> |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
| | | </ResourceCompile> |
| | | </ItemDefinitionGroup> |
| | | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
| | | <ClCompile> |
| | | <PrecompiledHeader>Use</PrecompiledHeader> |
| | | <WarningLevel>Level3</WarningLevel> |
| | | <Optimization>MaxSpeed</Optimization> |
| | | <FunctionLevelLinking>true</FunctionLevelLinking> |
| | | <IntrinsicFunctions>true</IntrinsicFunctions> |
| | | <SDLCheck>true</SDLCheck> |
| | | <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ClCompile> |
| | | <Link> |
| | | <SubSystem>Windows</SubSystem> |
| | | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
| | | <OptimizeReferences>true</OptimizeReferences> |
| | | </Link> |
| | | <Midl> |
| | | <MkTypLibCompatible>false</MkTypLibCompatible> |
| | | <ValidateAllParameters>true</ValidateAllParameters> |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </Midl> |
| | | <ResourceCompile> |
| | | <Culture>0x0412</Culture> |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
| | | </ResourceCompile> |
| | | </ItemDefinitionGroup> |
| | | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
| | | <ClCompile> |
| | | <PrecompiledHeader>Use</PrecompiledHeader> |
| | | <WarningLevel>Level3</WarningLevel> |
| | | <Optimization>Disabled</Optimization> |
| | | <FunctionLevelLinking>true</FunctionLevelLinking> |
| | | <IntrinsicFunctions>true</IntrinsicFunctions> |
| | | <SDLCheck>false</SDLCheck> |
| | | <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories> |
| | | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
| | | <WholeProgramOptimization>false</WholeProgramOptimization> |
| | | </ClCompile> |
| | | <Link> |
| | | <SubSystem>Windows</SubSystem> |
| | | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
| | | <OptimizeReferences>true</OptimizeReferences> |
| | | <AdditionalLibraryDirectories>../lib</AdditionalLibraryDirectories> |
| | | <GenerateDebugInformation>true</GenerateDebugInformation> |
| | | </Link> |
| | | <Midl> |
| | | <MkTypLibCompatible>false</MkTypLibCompatible> |
| | | <ValidateAllParameters>true</ValidateAllParameters> |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </Midl> |
| | | <ResourceCompile> |
| | | <Culture>0x0412</Culture> |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
| | | </ResourceCompile> |
| | | </ItemDefinitionGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="akDefectFormation.h" /> |
| | | <ClInclude Include="akFormationMap.h" /> |
| | | <ClInclude Include="akGridData.h" /> |
| | | <ClInclude Include="akImageView.h" /> |
| | | <ClInclude Include="akLoggerExt.h" /> |
| | | <ClInclude Include="akWndArrange.h" /> |
| | | <ClInclude Include="AnaResultFile.h" /> |
| | | <ClInclude Include="CustomizeReview.h" /> |
| | | <ClInclude Include="ReveiwHistory.h" /> |
| | | <ClInclude Include="ReveiwHistoryDlg.h" /> |
| | | <ClInclude Include="DitGlassRawClient.h" /> |
| | | <ClInclude Include="DitGlassRawServer.h" /> |
| | | <ClInclude Include="DitGlassRawStruct.h" /> |
| | | <ClInclude Include="AlignDlg.h" /> |
| | | <ClInclude Include="GlassRawBase.h" /> |
| | | <ClInclude Include="GlassRawCPJT.h" /> |
| | | <ClInclude Include="GlassRawCSOT.h" /> |
| | | <ClInclude Include="GlassRawRTMS.h" /> |
| | | <ClInclude Include="InterfaceFTP.h" /> |
| | | <ClInclude Include="MacroResultFile.h" /> |
| | | <ClInclude Include="PathSettingDlg.h" /> |
| | | <ClInclude Include="Resource.h" /> |
| | | <ClInclude Include="Singleton.h" /> |
| | | <ClInclude Include="StackResultCPJT.h" /> |
| | | <ClInclude Include="StackResultCSOT.h" /> |
| | | <ClInclude Include="stdafx.h" /> |
| | | <ClInclude Include="targetver.h" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClCompile Include="akDefectFormation.cpp" /> |
| | | <ClCompile Include="akFormationMap.cpp" /> |
| | | <ClCompile Include="akGridData.cpp" /> |
| | | <ClCompile Include="akImageView.cpp" /> |
| | | <ClCompile Include="akLoggerExt.cpp" /> |
| | | <ClCompile Include="akWndArrange.cpp" /> |
| | | <ClCompile Include="AnaResultFile.cpp" /> |
| | | <ClCompile Include="CustomizeReview.cpp" /> |
| | | <ClCompile Include="ReveiwHistory.cpp" /> |
| | | <ClCompile Include="ReveiwHistoryDlg.cpp" /> |
| | | <ClCompile Include="DitGlassRawClient.cpp" /> |
| | | <ClCompile Include="DitGlassRawServer.cpp" /> |
| | | <ClCompile Include="AlignDlg.cpp" /> |
| | | <ClCompile Include="GlassRawBase.cpp" /> |
| | | <ClCompile Include="GlassRawCPJT.cpp" /> |
| | | <ClCompile Include="GlassRawCSOT.cpp" /> |
| | | <ClCompile Include="GlassRawRTMS.cpp" /> |
| | | <ClCompile Include="InterfaceFTP.cpp" /> |
| | | <ClCompile Include="MacroResultFile.cpp" /> |
| | | <ClCompile Include="PathSettingDlg.cpp" /> |
| | | <ClCompile Include="StackResultCPJT.cpp" /> |
| | | <ClCompile Include="StackResultCSOT.cpp" /> |
| | | <ClCompile Include="stdafx.cpp"> |
| | | <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> |
| | | <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> |
| | | <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> |
| | | <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> |
| | | </ClCompile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="ReveiwHistory.rc" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="res\ReveiwHistory.rc2" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Image Include="res\History.ico" /> |
| | | <Image Include="res\ReveiwHistory.ico" /> |
| | | </ItemGroup> |
| | | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
| | | <ImportGroup Label="ExtensionTargets"> |
| | | </ImportGroup> |
| | | </Project> |
»õ ÆÄÀÏ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <ItemGroup> |
| | | <Filter Include="ìì¤ íì¼"> |
| | | <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
| | | <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
| | | </Filter> |
| | | <Filter Include="í¤ë íì¼"> |
| | | <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
| | | <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> |
| | | </Filter> |
| | | <Filter Include="리ìì¤ íì¼"> |
| | | <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
| | | <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
| | | </Filter> |
| | | <Filter Include="akSouce"> |
| | | <UniqueIdentifier>{8497f531-1d33-464c-96c0-9008295743c2}</UniqueIdentifier> |
| | | </Filter> |
| | | <Filter Include="Extern"> |
| | | <UniqueIdentifier>{412cecfa-9d77-42eb-b853-f276c16e9e82}</UniqueIdentifier> |
| | | </Filter> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="stdafx.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="targetver.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="Resource.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="PathSettingDlg.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="Singleton.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akDefectFormation.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akFormationMap.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akGridData.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akLoggerExt.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akWndArrange.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="DitGlassRawServer.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="DitGlassRawStruct.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="GlassRawBase.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="GlassRawCPJT.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="MacroResultFile.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CustomizeReview.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="GlassRawRTMS.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="InterfaceFTP.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="StackResultCPJT.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="AnaResultFile.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="DitGlassRawClient.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="GlassRawCSOT.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="StackResultCSOT.h"> |
| | | <Filter>Extern</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="ReveiwHistory.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="ReveiwHistoryDlg.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="AlignDlg.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="akImageView.h"> |
| | | <Filter>akSouce</Filter> |
| | | </ClInclude> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClCompile Include="stdafx.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="PathSettingDlg.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akDefectFormation.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akFormationMap.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akGridData.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akLoggerExt.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akWndArrange.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="DitGlassRawServer.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="GlassRawBase.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="GlassRawCPJT.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="MacroResultFile.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CustomizeReview.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="GlassRawRTMS.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="InterfaceFTP.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="StackResultCPJT.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="AnaResultFile.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="DitGlassRawClient.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="GlassRawCSOT.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="StackResultCSOT.cpp"> |
| | | <Filter>Extern</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="ReveiwHistory.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="ReveiwHistoryDlg.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="AlignDlg.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="akImageView.cpp"> |
| | | <Filter>akSouce</Filter> |
| | | </ClCompile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Image Include="res\ReveiwHistory.ico"> |
| | | <Filter>리ìì¤ íì¼</Filter> |
| | | </Image> |
| | | <Image Include="res\History.ico"> |
| | | <Filter>리ìì¤ íì¼</Filter> |
| | | </Image> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="ReveiwHistory.rc"> |
| | | <Filter>리ìì¤ íì¼</Filter> |
| | | </ResourceCompile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="res\ReveiwHistory.rc2"> |
| | | <Filter>리ìì¤ íì¼</Filter> |
| | | </None> |
| | | </ItemGroup> |
| | | </Project> |
»õ ÆÄÀÏ |
| | |
| | |  |
| | | // ReveiwHistoryDlg.cpp: 구í íì¼ |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReveiwHistory.h" |
| | | #include "ReveiwHistoryDlg.h" |
| | | #include "PathSettingDlg.h" |
| | | #include "DitGlassRawStruct.h" |
| | | #include "afxdialogex.h" |
| | | #include "GlassRawCPJT.h" |
| | | #include "akGridCtrl/GridCellCheck.h" |
| | | #include "akImageView.h" |
| | | #include <algorithm> |
| | | |
| | | #ifdef _DEBUG |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | // ìì© íë¡ê·¸ë¨ ì ë³´ì ì¬ì©ëë CAboutDlg ëí ììì
ëë¤. |
| | | |
| | | class CAboutDlg : public CDialogEx |
| | | { |
| | | public: |
| | | CAboutDlg(); |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_ABOUTBOX }; |
| | | #endif |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | |
| | | // 구íì
ëë¤. |
| | | protected: |
| | | DECLARE_MESSAGE_MAP() |
| | | }; |
| | | |
| | | CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX) |
| | | { |
| | | } |
| | | |
| | | void CAboutDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialogEx::DoDataExchange(pDX); |
| | | } |
| | | |
| | | BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) |
| | | END_MESSAGE_MAP() |
| | | |
| | | // CReveiwHistoryDlg ëí ìì |
| | | |
| | | CReveiwHistoryDlg::CReveiwHistoryDlg(CWnd* pParent /*=nullptr*/) |
| | | : CDialogEx(IDD_DLG_REVIEWHISTORY, pParent) |
| | | , m_nFileCount(0) |
| | | { |
| | | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); |
| | | |
| | | AddVecFileHeader(); |
| | | AddVecGlassHeader(); |
| | | AddVecDefectHeader(); |
| | | |
| | | m_nSelectedRow = 0; |
| | | m_nSelectedCol = 0; |
| | | m_nCount = 0; |
| | | m_nGlassSelect = 0; |
| | | m_bDefectAll = false; |
| | | m_bFirst = false; |
| | | m_nSizeDefect = 0; |
| | | m_nSizeImage = 0; |
| | | m_nDefectCount = 0; |
| | | m_nImageCount = 0; |
| | | m_nCellCount = 0; |
| | | m_bAsending = FALSE; |
| | | |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | m_nImageSize[i] = 0; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialogEx::DoDataExchange(pDX); |
| | | DDX_Control(pDX, IDC_SLIDER_IMG, m_sldImg); |
| | | DDX_Control(pDX, IDC_EDIT_COUNT, m_ctrCount); |
| | | DDX_Control(pDX, IDC_CHK_All_DEFECT, m_chkAllDefect); |
| | | DDX_Control(pDX, IDC_CHK_REVIEW_DEFECT, m_chkReviewDefect); |
| | | DDX_Control(pDX, IDC_CHK_MUTI, m_chkMuti); |
| | | DDX_Control(pDX, IDC_CHK_SINGLE, m_chkSingle); |
| | | DDX_Control(pDX, IDC_STATIC_IMG_REVIEW, m_ctrReviewImage); |
| | | DDX_Text(pDX, IDC_EDIT_FILE_COUNT, m_nFileCount); |
| | | DDX_Control(pDX, IDC_EDIT_FILE_COUNT, m_ctlFileCount); |
| | | DDX_Control(pDX, IDC_PROGRESS_LOAD, m_ctlProgress); |
| | | } |
| | | |
| | | BEGIN_MESSAGE_MAP(CReveiwHistoryDlg, CDialogEx) |
| | | ON_WM_SYSCOMMAND() |
| | | ON_WM_PAINT() |
| | | ON_WM_QUERYDRAGICON() |
| | | ON_WM_DESTROY() |
| | | ON_WM_SIZE() |
| | | ON_WM_HSCROLL() |
| | | ON_BN_CLICKED(IDC_BUTTON_MAPVIEW_FIT, &CReveiwHistoryDlg::OnBnClickedButtonMapviewFit) |
| | | ON_MESSAGE(UM_FORMMAP_DEFECTSELECT, OnMapDefectSelected) |
| | | ON_MESSAGE(UM_FORMMAP_DEFECTMOUSEOVER, OnMapDefectMouseOver) |
| | | ON_COMMAND(ID_OPTION_PATHSETTING, &CReveiwHistoryDlg::OnOptionPathsetting) |
| | | ON_COMMAND(ID_VIEW_ALLDEFECT, &CReveiwHistoryDlg::OnViewAlldefect) |
| | | ON_COMMAND(ID_VIEW_REVIEWDEFECT, &CReveiwHistoryDlg::OnViewReviewdefect) |
| | | ON_COMMAND(ID_ALIGN_VIEW, &CReveiwHistoryDlg::OnAlignView) |
| | | ON_BN_CLICKED(IDC_BTN_FIND_BIN, &CReveiwHistoryDlg::OnBnClickedBtnFindBin) |
| | | ON_EN_CHANGE(IDC_EDIT_COUNT, &CReveiwHistoryDlg::OnChangeEditCount) |
| | | ON_BN_CLICKED(IDC_BUTTON3, &CReveiwHistoryDlg::OnBnClickedButton3) |
| | | ON_BN_CLICKED(IDC_CHK_All_DEFECT, &CReveiwHistoryDlg::OnClickedChkAllDefect) |
| | | ON_BN_CLICKED(IDC_CHK_MUTI, &CReveiwHistoryDlg::OnClickedChkMuti) |
| | | ON_BN_CLICKED(IDC_CHK_REVIEW_DEFECT, &CReveiwHistoryDlg::OnClickedChkReviewDefect) |
| | | ON_BN_CLICKED(IDC_CHK_SINGLE, &CReveiwHistoryDlg::OnClickedChkSingle) |
| | | ON_EN_CHANGE(IDC_EDIT_FILE_COUNT, &CReveiwHistoryDlg::OnChangeEditFileCount) |
| | | END_MESSAGE_MAP() |
| | | |
| | | // CReveiwHistoryDlg ë©ìì§ ì²ë¦¬ê¸° |
| | | |
| | | BOOL CReveiwHistoryDlg::OnInitDialog() |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | |
| | | // ìì¤í
ë©ë´ì "ì ë³´..." ë©ë´ í목ì ì¶ê°í©ëë¤. |
| | | |
| | | // IDM_ABOUTBOXë ìì¤í
ëª
ë ¹ ë²ìì ìì´ì¼ í©ëë¤. |
| | | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); |
| | | ASSERT(IDM_ABOUTBOX < 0xF000); |
| | | |
| | | CMenu* pSysMenu = GetSystemMenu(FALSE); |
| | | if (pSysMenu != nullptr) |
| | | { |
| | | BOOL bNameValid; |
| | | CString strAboutMenu; |
| | | bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); |
| | | ASSERT(bNameValid); |
| | | if (!strAboutMenu.IsEmpty()) |
| | | { |
| | | pSysMenu->AppendMenu(MF_SEPARATOR); |
| | | pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); |
| | | } |
| | | } |
| | | |
| | | // ì´ ëí ììì ìì´ì½ì ì¤ì í©ëë¤. ìì© íë¡ê·¸ë¨ì 주 ì°½ì´ ëí ììê° ìë ê²½ì°ìë |
| | | // íë ììí¬ê° ì´ ìì
ì ìëì¼ë¡ ìíí©ëë¤. |
| | | SetIcon(m_hIcon, TRUE); // í° ìì´ì½ì ì¤ì í©ëë¤. |
| | | SetIcon(m_hIcon, FALSE); // ìì ìì´ì½ì ì¤ì í©ëë¤. |
| | | |
| | | GetDlgItem(IDC_STATIC_FORMATIONMAP2)->GetWindowRect(m_picture_rect); |
| | | GetDlgItem(IDC_STATIC_IMG_INSPECTOR)->GetWindowRect(m_picture_rect2); |
| | | |
| | | ScreenToClient(m_picture_rect); |
| | | ScreenToClient(m_picture_rect2); |
| | | |
| | | GetDlgItem(IDC_STATIC_IMG_ALIGN1)->GetWindowRect(m_Align_rect); |
| | | GetDlgItem(IDC_STATIC_IMG_ALIGN2)->GetWindowRect(m_Align_rect2); |
| | | |
| | | ScreenToClient(m_Align_rect); |
| | | ScreenToClient(m_Align_rect2); |
| | | |
| | | m_ImageView.CreateGraph(this, m_picture_rect); |
| | | m_ImageView.SetAutoScale(); |
| | | |
| | | |
| | | // TODO: ì¬ê¸°ì ì¶ê° ì´ê¸°í ìì
ì ì¶ê°í©ëë¤. |
| | | if (1) |
| | | { |
| | | CRect rectTemp; |
| | | GetDlgItem(IDC_STATIC_FORMATIONMAP)->GetWindowRect(rectTemp); |
| | | ScreenToClient(rectTemp); |
| | | |
| | | m_FormationMap.CreateGraph(this, rectTemp); |
| | | } |
| | | |
| | | m_WndArrange.setParentWnd(this); |
| | | m_WndArrange.addChildWnd(&m_FormationMap, WA_RESIZE_WIDTH | WA_RESIZE_HEIGHT); |
| | | |
| | | GetDlgItem(IDC_STATIC_FORMATIONMAP)->BringWindowToTop(); |
| | | |
| | | LOG(Dbg, _T("[Processe] Review History Start")); |
| | | |
| | | CreateUserDirectory(); |
| | | CreateUserClass(); |
| | | |
| | | InitGridReviewLIst(&m_gridReviewList, IDC_STATIC_GRID_GLASS); |
| | | InitGridDefectLIst(&m_gridDefectInfo, IDC_STATIC_GRID_DEFECT); |
| | | InitGridGlassLIst(&m_gridGlassInfo, IDC_STATIC_GRID_GLASS_INFO); |
| | | |
| | | OnViewReviewdefect(); |
| | | |
| | | m_chkReviewDefect.SetCheck(TRUE); |
| | | m_chkSingle.SetCheck(TRUE); |
| | | |
| | | //////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | m_ConfigOption.m_nMaxDataNumCell = 200; |
| | | m_ConfigOption.m_nMaxDataNumDefect = 50000; |
| | | |
| | | if (m_Server.CreateServer(m_ConfigOption.m_nMaxDataNumCell, m_ConfigOption.m_nMaxDataNumDefect) == FALSE) |
| | | { |
| | | LOG(Dbg, _T("[Processe]ìë² ìì± ì¤í¨ ì¢
ë£ í©ëë¤.")); |
| | | exit(0); |
| | | } |
| | | |
| | | m_pGlassRawMaker = NULL; |
| | | m_ConfigOption.m_nSelectRawType = 3; |
| | | OnCbnSelchangeComboRawtype(); |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | SlideInit(); |
| | | Imagenoload(); |
| | | |
| | | m_ctlProgress.SetRange(0, 100); |
| | | m_ctlProgress.ShowWindow(FALSE); |
| | | |
| | | return TRUE; // í¬ì»¤ì¤ë¥¼ 컨í¸ë¡¤ì ì¤ì íì§ ìì¼ë©´ TRUE를 ë°íí©ëë¤. |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnDestroy() |
| | | { |
| | | CDialogEx::OnDestroy(); |
| | | |
| | | DestroyUserClass(); |
| | | |
| | | m_Filelistfont.DeleteObject(); |
| | | m_Defectfont.DeleteObject(); |
| | | |
| | | LOG(Dbg, _T("[Processe] Review History End")); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnSysCommand(UINT nID, LPARAM lParam) |
| | | { |
| | | if ((nID & 0xFFF0) == IDM_ABOUTBOX) |
| | | { |
| | | CAboutDlg dlgAbout; |
| | | dlgAbout.DoModal(); |
| | | } |
| | | else |
| | | { |
| | | CDialogEx::OnSysCommand(nID, lParam); |
| | | } |
| | | } |
| | | |
| | | // ëí ììì ìµìí ë¨ì¶ë¥¼ ì¶ê°í ê²½ì° ìì´ì½ì ê·¸ë¦¬ë ¤ë©´ |
| | | // ìë ì½ëê° íìí©ëë¤. 문ì/ë·° 모ë¸ì ì¬ì©íë MFC ìì© íë¡ê·¸ë¨ì ê²½ì°ìë |
| | | // íë ììí¬ìì ì´ ìì
ì ìëì¼ë¡ ìíí©ëë¤. |
| | | |
| | | void CReveiwHistoryDlg::OnPaint() |
| | | { |
| | | CPaintDC dc(this); // 그리기를 ìí ëë°ì´ì¤ 컨í
ì¤í¸ì
ëë¤. |
| | | |
| | | if (IsIconic()) |
| | | { |
| | | SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); |
| | | |
| | | // í´ë¼ì´ì¸í¸ ì¬ê°íìì ìì´ì½ì ê°ì´ë°ì ë§ì¶¥ëë¤. |
| | | int cxIcon = GetSystemMetrics(SM_CXICON); |
| | | int cyIcon = GetSystemMetrics(SM_CYICON); |
| | | CRect rect; |
| | | GetClientRect(&rect); |
| | | int x = (rect.Width() - cxIcon + 1) / 2; |
| | | int y = (rect.Height() - cyIcon + 1) / 2; |
| | | |
| | | // ìì´ì½ì 그립ëë¤. |
| | | dc.DrawIcon(x, y, m_hIcon); |
| | | } |
| | | else |
| | | { |
| | | // if (!m_ReviewImage.IsNull()) |
| | | // { |
| | | // dc.SetStretchBltMode(COLORONCOLOR); |
| | | // // 그림ì Picture Control í¬ê¸°ë¡ íë©´ì ì¶ë ¥íë¤. |
| | | // m_ReviewImage.Draw(dc, m_picture_rect); |
| | | // } |
| | | if (!m_DefectImage.IsNull()) |
| | | { |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | // 그림ì Picture Control í¬ê¸°ë¡ íë©´ì ì¶ë ¥íë¤. |
| | | m_DefectImage.Draw(dc, m_picture_rect2); |
| | | } |
| | | |
| | | if (!m_AlignFirst.IsNull()) |
| | | { |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignFirst.Draw(dc, m_Align_rect); |
| | | } |
| | | if (!m_AlignSecend.IsNull()) |
| | | { |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignSecend.Draw(dc, m_Align_rect2); |
| | | } |
| | | CDialogEx::OnPaint(); |
| | | } |
| | | } |
| | | |
| | | // ì¬ì©ìê° ìµìíë ì°½ì ëë ëìì 커ìê° íìëëë¡ ìì¤í
ìì |
| | | // ì´ í¨ì를 í¸ì¶í©ëë¤. |
| | | HCURSOR CReveiwHistoryDlg::OnQueryDragIcon() |
| | | { |
| | | return static_cast<HCURSOR>(m_hIcon); |
| | | } |
| | | |
| | | BOOL CReveiwHistoryDlg::PreTranslateMessage(MSG * pMsg) |
| | | { |
| | | POINT pt; |
| | | |
| | | pt.x = GET_X_LPARAM(pMsg->lParam); |
| | | pt.y = GET_Y_LPARAM(pMsg->lParam); |
| | | |
| | | switch (pMsg->message) |
| | | { |
| | | case WM_MOUSEHWHEEL: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | case WM_MOUSEMOVE: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | case WM_LBUTTONDOWN: |
| | | { |
| | | |
| | | // if (m_picture_rect.left < pt.x && m_picture_rect.right > pt.x && m_picture_rect.top < pt.y && m_picture_rect.bottom > pt.y) |
| | | // { |
| | | // if (m_pParentWnd == NULL || !GetImageExist()) return; |
| | | // |
| | | // if (pt.x > -1 && pt.x < GetScaleWidth() && |
| | | // pt.y > -1 && pt.y < GetScaleHeight()) |
| | | // { |
| | | // if (m_rectTracker.HitTest(pt) < 0) |
| | | // { |
| | | // // just to demonstrate CRectTracker::TrackRubberBand |
| | | // if (m_rectTracker.TrackRubberBand(this, pt, TRUE)) |
| | | // { |
| | | // Invalidate(); |
| | | // } |
| | | // } |
| | | // else if (m_rectTracker.Track(this, pt, TRUE)) |
| | | // { |
| | | // Invalidate(); |
| | | // } |
| | | // } |
| | | // |
| | | // CRect rect; |
| | | // this->GetClientRect(rect); |
| | | // |
| | | // pt.x += m_nHScroll; |
| | | // pt.y += m_nVScroll; |
| | | // m_pParentWnd->SendMessage(WM_LBUTTONDOWN, static_cast<WPARAM>(nFlags), MAKELPARAM(pt.x, pt.y)); |
| | | // } |
| | | } |
| | | break; |
| | | case WM_LBUTTONUP: |
| | | { |
| | | // int a = 1; |
| | | // return 0; |
| | | // if (m_picture_rect.left < pt.x && m_picture_rect.right > pt.x && m_picture_rect.top < pt.y && m_picture_rect.bottom > pt.y) |
| | | // { |
| | | // if (m_pParentWnd == NULL) return; |
| | | // |
| | | // CRect rect; |
| | | // this->GetClientRect(rect); |
| | | // |
| | | // pt.x += m_nHScroll; |
| | | // pt.y += m_nVScroll; |
| | | // m_pParentWnd->SendMessage(WM_LBUTTONUP, static_cast<WPARAM>(nFlags), MAKELPARAM(pt.x, pt.y)); |
| | | // |
| | | // if (GetTrackerRect(m_rtROIRect)) |
| | | // { |
| | | // m_sROIInfo.nWidthPixel = m_rtROIRect.Width(); |
| | | // m_sROIInfo.nHeightPixel = m_rtROIRect.Height(); |
| | | // m_sROIInfo.dDiagonalPixel = sqrt(double(m_sROIInfo.nWidthPixel*m_sROIInfo.nWidthPixel + m_sROIInfo.nHeightPixel*m_sROIInfo.nHeightPixel)); |
| | | // |
| | | // m_sROIInfo.dWidthRealUM = m_sROIInfo.nWidthPixel * (m_dResolution / m_dWidthScale); |
| | | // m_sROIInfo.dHeightRealUM = m_sROIInfo.nHeightPixel * (m_dResolution / m_dHeightScale); |
| | | // m_sROIInfo.dDiagonalRealUM = sqrt((m_sROIInfo.dWidthRealUM*m_sROIInfo.dWidthRealUM) + (m_sROIInfo.dHeightRealUM*m_sROIInfo.dHeightRealUM)); |
| | | // |
| | | // Invalidate(TRUE); |
| | | // } |
| | | // } |
| | | //Drow ì 보를 ë³´ë¸ë¤. |
| | | } |
| | | break; |
| | | case WM_KEYDOWN: |
| | | { |
| | | if (pMsg->wParam == VK_RETURN) |
| | | return TRUE; |
| | | else if (pMsg->wParam == VK_ESCAPE) |
| | | return TRUE; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | return __super::PreTranslateMessage(pMsg); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::CreateUserDirectory() |
| | | { |
| | | CString str; |
| | | |
| | | str.Format(_T("%s\\Config\\"), GetExePath()); |
| | | CreateDirectory(str, NULL); |
| | | |
| | | str.Format(_T("%s\\Log\\"), GetExePath()); |
| | | CreateDirectory(str, NULL); |
| | | |
| | | LOG(Dbg, _T("[Processe] CreateUserDirectory")); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::CreateUserClass() |
| | | { |
| | | CPathSettingDlg::CreateClass(); |
| | | CPathSettingDlg::GetMgr()->Create(this); |
| | | CPathSettingDlg::GetMgr()->PathSettingLoad(); |
| | | |
| | | CAlignDlg::CreateClass(); |
| | | CAlignDlg::GetMgr()->Create(this); |
| | | |
| | | akDefectFormation::CreateClass(); |
| | | |
| | | LOG(Dbg, _T("[Processe] CreateUserClass")); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::DestroyUserClass() |
| | | { |
| | | CPathSettingDlg::GetMgr()->DestroyWindow(); |
| | | CPathSettingDlg::DestroyClass(); |
| | | |
| | | CAlignDlg::GetMgr()->DestroyWindow(); |
| | | CAlignDlg::DestroyClass(); |
| | | |
| | | akDefectFormation::DestroyClass(); |
| | | |
| | | LOG(Dbg, _T("[Processe] DestroyUserClass")); |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::AddVecFileHeader() |
| | | { |
| | | m_vecStrGridReviewHeader.push_back(" NO "); |
| | | m_vecStrGridReviewHeader.push_back(" Time "); |
| | | m_vecStrGridReviewHeader.push_back("ì´ê¸°"); |
| | | m_vecStrGridReviewHeader.push_back("PPID"); |
| | | m_vecStrGridReviewHeader.push_back("GLASS ID"); |
| | | m_vecStrGridReviewHeader.push_back("ì´ ê²°í¨ ê°¯ì"); |
| | | m_vecStrGridReviewHeader.push_back("리뷰 ê°¯ì"); |
| | | m_vecStrGridReviewHeader.push_back("Judge"); |
| | | m_vecStrGridReviewHeader.push_back("File Name"); |
| | | } |
| | | void CReveiwHistoryDlg::AddVecGlassHeader() |
| | | { |
| | | m_vecStrGridGlassHeader.push_back("No"); |
| | | m_vecStrGridGlassHeader.push_back("PPID"); |
| | | m_vecStrGridGlassHeader.push_back("Glass ID"); |
| | | m_vecStrGridGlassHeader.push_back("ì´ ê²°í¨ ê°¯ì"); |
| | | m_vecStrGridGlassHeader.push_back("리뷰 ê²°í¨ ê°¯ì"); |
| | | m_vecStrGridGlassHeader.push_back("Glass Judge"); |
| | | m_vecStrGridGlassHeader.push_back("Lot ID"); |
| | | m_vecStrGridGlassHeader.push_back("Slot ID"); |
| | | m_vecStrGridGlassHeader.push_back("Slot Number"); |
| | | m_vecStrGridGlassHeader.push_back("Cell Number"); |
| | | m_vecStrGridGlassHeader.push_back("Glass Height"); |
| | | m_vecStrGridGlassHeader.push_back("Glass Width"); |
| | | } |
| | | void CReveiwHistoryDlg::AddVecDefectHeader() |
| | | { |
| | | m_vecStrGridDefectHeader.push_back("No"); |
| | | m_vecStrGridDefectHeader.push_back("Idx"); |
| | | m_vecStrGridDefectHeader.push_back("Loc"); |
| | | m_vecStrGridDefectHeader.push_back("Classification"); |
| | | m_vecStrGridDefectHeader.push_back("Code"); |
| | | m_vecStrGridDefectHeader.push_back("Type"); |
| | | m_vecStrGridDefectHeader.push_back("SubType"); |
| | | m_vecStrGridDefectHeader.push_back("Length"); |
| | | m_vecStrGridDefectHeader.push_back("XSize(um)"); |
| | | m_vecStrGridDefectHeader.push_back("YSize(um)"); |
| | | m_vecStrGridDefectHeader.push_back("Area(um)"); |
| | | m_vecStrGridDefectHeader.push_back("Zone"); |
| | | m_vecStrGridDefectHeader.push_back("DMax"); |
| | | m_vecStrGridDefectHeader.push_back("DMin"); |
| | | m_vecStrGridDefectHeader.push_back("DAvg"); |
| | | m_vecStrGridDefectHeader.push_back("Peak"); |
| | | m_vecStrGridDefectHeader.push_back("Step"); |
| | | m_vecStrGridDefectHeader.push_back("Cam"); |
| | | m_vecStrGridDefectHeader.push_back("Scan"); |
| | | m_vecStrGridDefectHeader.push_back("RMax"); |
| | | m_vecStrGridDefectHeader.push_back("RMin"); |
| | | m_vecStrGridDefectHeader.push_back("RAvg"); |
| | | m_vecStrGridDefectHeader.push_back("Xpos(mm)"); |
| | | m_vecStrGridDefectHeader.push_back("Ypos(mm)"); |
| | | m_vecStrGridDefectHeader.push_back("CellX(mm)"); |
| | | m_vecStrGridDefectHeader.push_back("CellY(mm)"); |
| | | m_vecStrGridDefectHeader.push_back("ScrtRatio"); |
| | | m_vecStrGridDefectHeader.push_back("Density"); |
| | | m_vecStrGridDefectHeader.push_back("MergeState"); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SlideInit() |
| | | { |
| | | m_sldImg.SetRange(-1, -1); |
| | | m_sldImg.SetPos(-1); |
| | | m_sldImg.SetLineSize(3); |
| | | m_sldImg.SetPageSize(10); |
| | | |
| | | int nPos = m_sldImg.GetPos(); |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nPos); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | |
| | | CString strCount; |
| | | m_ctlFileCount.SetWindowText("100"); |
| | | m_ctlFileCount.GetWindowText(strCount); |
| | | |
| | | m_nFileCount = _ttoi(strCount); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::InitGridReviewLIst(CakGridCtrl* pGrid, UINT nRectCtrlID) |
| | | { |
| | | std::vector<CString>* pVecHeader = &m_vecStrGridReviewHeader; |
| | | |
| | | CRect rectGrid; |
| | | GetDlgItem(nRectCtrlID)->GetWindowRect(&rectGrid); |
| | | ScreenToClient(&rectGrid); |
| | | pGrid->Create(rectGrid, this, nRectCtrlID); |
| | | pGrid->GetDefaultCell(TRUE, FALSE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, TRUE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, FALSE)->SetBackClr(GRID_COLOR); |
| | | pGrid->SetFixedBkColor(GRID_FIX_COLOR); |
| | | pGrid->SetGridLines(GVL_BOTH); |
| | | |
| | | pGrid->SetVirtualMode(FALSE); |
| | | pGrid->SetCallbackFunc(NULL, 0); |
| | | pGrid->AllowReorderColumn(FALSE); |
| | | pGrid->EnableDragRowMode(FALSE); |
| | | |
| | | pGrid->SetColumnCount((int)pVecHeader->size()); |
| | | pGrid->SetDoubleBuffering(TRUE); |
| | | pGrid->SetRowCount(2); |
| | | pGrid->SetFixedRowCount(1); |
| | | pGrid->SetFixedColumnCount(0); |
| | | |
| | | pGrid->SetEditable(FALSE); |
| | | pGrid->EnableSelection(TRUE); |
| | | pGrid->SetFixedRowSelection(TRUE); |
| | | pGrid->SetHeaderSort(FALSE); |
| | | |
| | | // fill it up with stuff |
| | | pGrid->SetEditable(TRUE); |
| | | pGrid->EnableDragAndDrop(TRUE); |
| | | |
| | | int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols; |
| | | CString strTemp; |
| | | |
| | | GV_ITEM Item; |
| | | nRowIdx = 0; |
| | | nColIdx = 0; |
| | | Item.mask = GVIF_TEXT; |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T(" No ")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T(" Time ")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("ì´ê¸°")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("PPID")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("GLASS ID")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("ì´ ê²°í¨ ê°¯ì")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("리뷰 ê°¯ì")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("Judge")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = nRowIdx++; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("File Name")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | Item.row = 1; |
| | | Item.col = 0; |
| | | strTemp.Format(_T(" ")); |
| | | Item.strText = strTemp; |
| | | pGrid->SetItem(&Item); |
| | | |
| | | pGrid->SetCellType(1, 0, RUNTIME_CLASS(CGridCellCheck)); |
| | | |
| | | pGrid->AutoSize(); |
| | | pGrid->Invalidate(); |
| | | |
| | | m_WndArrange.setParentWnd(this); |
| | | m_WndArrange.addChildWnd(&m_gridReviewList, WA_RESIZE_WIDTH | WA_RESIZE_HEIGHT); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::InitGridGlassLIst(CakGridCtrl* pGrid, UINT nRectCtrlID) |
| | | { |
| | | std::vector<CString>* pVecHeader = &m_vecStrGridGlassHeader; |
| | | |
| | | CRect rectGrid; |
| | | GetDlgItem(nRectCtrlID)->GetWindowRect(&rectGrid); |
| | | ScreenToClient(&rectGrid); |
| | | pGrid->Create(rectGrid, this, nRectCtrlID); |
| | | |
| | | pGrid->GetDefaultCell(TRUE, FALSE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, TRUE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, FALSE)->SetBackClr(GRID_COLOR); |
| | | pGrid->SetFixedBkColor(GRID_FIX_COLOR); |
| | | pGrid->SetGridLines(GVL_BOTH); |
| | | |
| | | pGrid->SetVirtualMode(TRUE); |
| | | pGrid->SetCallbackFunc(NULL, 0); |
| | | pGrid->AllowReorderColumn(FALSE); |
| | | pGrid->EnableDragRowMode(FALSE); |
| | | |
| | | pGrid->SetColumnCount((int)pVecHeader->size()); |
| | | pGrid->SetDoubleBuffering(TRUE); |
| | | pGrid->SetRowCount(2); |
| | | pGrid->SetFixedRowCount(1); |
| | | pGrid->SetFixedColumnCount(0); |
| | | |
| | | pGrid->SetEditable(FALSE); |
| | | pGrid->EnableSelection(TRUE); |
| | | pGrid->SetFixedRowSelection(TRUE); |
| | | pGrid->SetHeaderSort(FALSE); |
| | | |
| | | // fill it up with stuff |
| | | pGrid->SetEditable(TRUE); |
| | | pGrid->EnableDragAndDrop(TRUE); |
| | | |
| | | pGrid->AutoSize(); |
| | | pGrid->Invalidate(); |
| | | |
| | | m_WndArrange.setParentWnd(this); |
| | | m_WndArrange.addChildWnd(&m_gridGlassInfo, WA_RESIZE_WIDTH | WA_RESIZE_HEIGHT); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::InitGridDefectLIst(CakGridCtrl* pGrid, UINT nRectCtrlID) |
| | | { |
| | | std::vector<CString>* pVecHeader = &m_vecStrGridDefectHeader; |
| | | |
| | | CRect rectGrid; |
| | | GetDlgItem(nRectCtrlID)->GetWindowRect(&rectGrid); |
| | | ScreenToClient(&rectGrid); |
| | | pGrid->Create(rectGrid, this, nRectCtrlID); |
| | | |
| | | pGrid->GetDefaultCell(TRUE, FALSE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, TRUE)->SetBackClr(GRID_FIX_COLOR); |
| | | pGrid->GetDefaultCell(FALSE, FALSE)->SetBackClr(GRID_COLOR); |
| | | pGrid->SetFixedBkColor(GRID_FIX_COLOR); |
| | | pGrid->SetGridLines(GVL_BOTH); |
| | | |
| | | pGrid->SetVirtualMode(TRUE); |
| | | pGrid->SetCallbackFunc(NULL, 0); |
| | | pGrid->AllowReorderColumn(FALSE); |
| | | pGrid->EnableDragRowMode(FALSE); |
| | | |
| | | pGrid->SetColumnCount((int)pVecHeader->size()); |
| | | pGrid->SetDoubleBuffering(TRUE); |
| | | pGrid->SetRowCount(2); |
| | | pGrid->SetFixedRowCount(1); |
| | | pGrid->SetFixedColumnCount(0); |
| | | |
| | | pGrid->SetEditable(FALSE); |
| | | pGrid->EnableSelection(TRUE); |
| | | pGrid->SetFixedRowSelection(TRUE); |
| | | pGrid->SetHeaderSort(FALSE); |
| | | |
| | | // fill it up with stuff |
| | | pGrid->SetEditable(TRUE); |
| | | pGrid->EnableDragAndDrop(TRUE); |
| | | |
| | | pGrid->AutoSize(); |
| | | pGrid->Invalidate(); |
| | | |
| | | m_WndArrange.setParentWnd(this); |
| | | m_WndArrange.addChildWnd(&m_gridDefectInfo, WA_RESIZE_WIDTH | WA_RESIZE_HEIGHT); |
| | | } |
| | | |
| | | BOOL CReveiwHistoryDlg::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) |
| | | { |
| | | if (m_gridReviewList.GetSafeHwnd() && wParam == (WPARAM)m_gridReviewList.GetDlgCtrlID()) |
| | | { |
| | | *pResult = 1; |
| | | GV_DISPINFO *pDispInfo = (GV_DISPINFO*)lParam; |
| | | if (GVN_GETDISPINFO == pDispInfo->hdr.code) |
| | | { |
| | | getDispInfoGlass(pDispInfo->item.col, pDispInfo->item.row, &pDispInfo->item.strText); |
| | | |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row == 0) |
| | | { |
| | | m_gridReviewList.Refresh(); |
| | | } |
| | | else if (pDispInfo->item.row > 0) |
| | | { |
| | | CGridCellCheck* pCellCheck = NULL; |
| | | pCellCheck = (CGridCellCheck*)m_gridReviewList.GetCell(pDispInfo->item.row, 0); |
| | | BOOL bMultiCheck = pCellCheck->GetCheck(); |
| | | |
| | | if (m_nCount == pDispInfo->item.row) |
| | | { |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | if (pCellCheck != NULL) |
| | | { |
| | | pCellCheck->SetCheck(FALSE); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (pCellCheck != NULL) |
| | | { |
| | | pCellCheck->SetCheck(!bMultiCheck); |
| | | } |
| | | } |
| | | return TRUE; |
| | | } |
| | | m_nCount = pDispInfo->item.row; |
| | | m_nGlassSelect = pDispInfo->item.row; |
| | | |
| | | CGridCellCheck* pCellCheck2 = NULL; |
| | | pCellCheck2 = (CGridCellCheck*)m_gridReviewList.GetCell(m_nGlassSelect, 0); |
| | | BOOL bMultiCheck2 = pCellCheck->GetCheck(); |
| | | |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | if (pCellCheck != NULL) |
| | | { |
| | | pCellCheck->SetCheck(FALSE); |
| | | } |
| | | GlassInfoRest(); |
| | | BinFileOpen(pDispInfo->item.row); |
| | | } |
| | | else if(m_chkMuti.GetCheck()) |
| | | { |
| | | if (bMultiCheck2 == TRUE) |
| | | { |
| | | // if (MultiSelectCheck(pDispInfo->item.row)) |
| | | // { |
| | | //if(pDispInfo->item.row) |
| | | bool bCheck = false; |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | if (m_nSelectFile[i] == pDispInfo->item.row) |
| | | { |
| | | bCheck = true; |
| | | } |
| | | } |
| | | if (!bCheck) |
| | | { |
| | | InitSelectGlass(pDispInfo->item.row); |
| | | BinFileOpen(pDispInfo->item.row); |
| | | } |
| | | /* }*/ |
| | | } |
| | | else if(bMultiCheck == FALSE) |
| | | { |
| | | MultiSelectCheck(pDispInfo->item.row); |
| | | SetScrollSetting(); |
| | | } |
| | | } |
| | | } |
| | | // if (!m_chkSingle.GetCheck()) |
| | | // { |
| | | // for (int i = 0; i < MAX_COUNT + 1; i++) |
| | | // { |
| | | // for (int iCol = 0; iCol < m_gridReviewList.GetColumnCount(); iCol++) |
| | | // { |
| | | // m_gridReviewList.SetItemState(m_nSelectFile[i], iCol, LVIS_SELECTED); |
| | | // } |
| | | // } |
| | | // m_gridReviewList.Invalidate(); |
| | | // } |
| | | m_nSelectedCol = pDispInfo->item.col; |
| | | } |
| | | else if (GVN_ODCACHEHINT == pDispInfo->hdr.code) |
| | | { |
| | | GV_CACHEHINT *pCacheHint = (GV_CACHEHINT*)pDispInfo; |
| | | } |
| | | } |
| | | else if (m_gridGlassInfo.GetSafeHwnd() && wParam == (WPARAM)m_gridGlassInfo.GetDlgCtrlID()) |
| | | { |
| | | *pResult = 1; |
| | | GV_DISPINFO *pDispInfo = (GV_DISPINFO*)lParam; |
| | | if (GVN_GETDISPINFO == pDispInfo->hdr.code) |
| | | { |
| | | getDispInfoGlassInfo(pDispInfo->item.col, pDispInfo->item.row, &pDispInfo->item.strText); |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | { |
| | | //ë©í° 모ë ì¼ë ì íí ëì cell ê°ì ë³´ì¬ ì¤ë¤ |
| | | if (!m_chkSingle.GetCheck()) |
| | | { |
| | | SelectCell(pDispInfo->item.row); |
| | | } |
| | | } |
| | | |
| | | else if (GVN_ODCACHEHINT == pDispInfo->hdr.code) |
| | | { |
| | | GV_CACHEHINT *pCacheHint = (GV_CACHEHINT*)pDispInfo; |
| | | } |
| | | } |
| | | else if (m_gridDefectInfo.GetSafeHwnd() && wParam == (WPARAM)m_gridDefectInfo.GetDlgCtrlID()) |
| | | { |
| | | *pResult = 1; |
| | | GV_DISPINFO *pDispInfo = (GV_DISPINFO*)lParam; |
| | | if (GVN_GETDISPINFO == pDispInfo->hdr.code) |
| | | { |
| | | getDispInfoDefect(pDispInfo->item.col, pDispInfo->item.row, &pDispInfo->item.strText); |
| | | |
| | | return TRUE; |
| | | } |
| | | else if (NM_CLICK == pDispInfo->hdr.code) |
| | | { |
| | | if (pDispInfo->item.row == 0) |
| | | { |
| | | SortListDefect(pDispInfo->item.col); |
| | | m_gridDefectInfo.Refresh(); |
| | | } |
| | | else if (pDispInfo->item.row > 0) |
| | | { |
| | | if (pDispInfo->item.row <= m_Formation.m_vecDefects.size()) |
| | | { |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecDefects[pDispInfo->item.row - 1]; |
| | | |
| | | m_FormationMap.setSelectDefect(pDefectInfo->m_nDefectID); |
| | | //ImageShow(pDefectInfo->m_nDefectID); |
| | | if (!m_bDefectAll) |
| | | { |
| | | ImageShow(pDispInfo->item.row - 1); |
| | | } |
| | | else |
| | | { |
| | | ImageShow(pDefectInfo->m_nDefectID); |
| | | } |
| | | //ë©í° 모ë¸ì¼ ëì ìë ë 구ë¶ì íì |
| | | //ì ë ¬ ìì를 ì¬ì©ìê° ìíë ìì¼ë¡ íì |
| | | if (!m_bDefectAll) |
| | | { |
| | | m_sldImg.SetPos(pDispInfo->item.row - 1); |
| | | |
| | | int nPos = m_sldImg.GetPos(); |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nPos); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | } |
| | | } |
| | | } |
| | | m_nSelectedCol = pDispInfo->item.col; |
| | | } |
| | | |
| | | else if (GVN_ODCACHEHINT == pDispInfo->hdr.code) |
| | | { |
| | | GV_CACHEHINT *pCacheHint = (GV_CACHEHINT*)pDispInfo; |
| | | } |
| | | } |
| | | |
| | | return CDialog::OnNotify(wParam, lParam, pResult); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::getDispInfoGlass(int nCol, int nRow, CString* pStrData) |
| | | { |
| | | if (nRow < 0) return; |
| | | |
| | | if (nRow == 0) |
| | | { |
| | | *pStrData = m_vecStrGridReviewHeader[nCol]; |
| | | } |
| | | else |
| | | { |
| | | CString strItem; |
| | | int nDataIndex = nRow - 1; |
| | | |
| | | if (nDataIndex >= m_vecStrGridReviewList.size()) return; |
| | | |
| | | _akReviewHeader* pDefectInfo = &m_Formation.m_vecHeader[nRow - 1]; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 0: strItem.Format("%d", nRow); break; |
| | | case 1: strItem.Format("%s", pDefectInfo->m_strFileTime); break; |
| | | case 2: strItem.Format("%s", pDefectInfo->m_strLoading); break; |
| | | case 3: strItem.Format("%s", pDefectInfo->m_strPPID); break; |
| | | case 4: strItem.Format("%s", pDefectInfo->m_strGlassID); break; |
| | | case 5: strItem.Format("%d", pDefectInfo->m_nDefectIdx); break; |
| | | case 6: strItem.Format("%d", pDefectInfo->m_nReviewIdx); break; |
| | | case 7: strItem.Format("%s", pDefectInfo->m_strJudge); break; |
| | | case 8: strItem.Format("%s", pDefectInfo->m_strFileName); break; |
| | | } |
| | | *pStrData = strItem; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::getDispInfoGlassInfo(int nCol, int nRow, CString* pStrData) |
| | | { |
| | | if (nRow < 0) return; |
| | | |
| | | if (nRow == 0) //header |
| | | { |
| | | *pStrData = m_vecStrGridGlassHeader[nCol]; |
| | | } |
| | | else |
| | | { |
| | | CString strItem; |
| | | int nDataIndex = nRow - 1; |
| | | |
| | | if (nDataIndex >= m_Formation.m_vecGlassInfo.size()) return; |
| | | |
| | | _akGlassInfo* pGlassInfo = &m_Formation.m_vecGlassInfo[nRow - 1]; |
| | | |
| | | if (pGlassInfo == NULL) return; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 0: strItem.Format("%d", pGlassInfo->m_nGlassSelect); break; //"No"); |
| | | case 1: strItem.Format("%s", pGlassInfo->m_strPPID); break; //"GlassID"); |
| | | case 2: strItem.Format("%s", pGlassInfo->m_strGlassID); break; //PPID |
| | | case 3: strItem.Format("%d", pGlassInfo->m_nDefectNum); break; //LOT ID |
| | | case 4: strItem.Format("%d", pGlassInfo->m_nReviewNum); break; //SLOT ID |
| | | case 5: strItem.Format("%s", pGlassInfo->m_strGlassJudge); break; //Glass Judge |
| | | case 6: strItem.Format("%s", pGlassInfo->m_strLotID); break; //SLOT NUMBER |
| | | case 7: strItem.Format("%s", pGlassInfo->m_strSLotID); break; //Cell NUmber |
| | | case 8: strItem.Format("%d", pGlassInfo->m_nSlot_No); break; //Defect Count |
| | | case 9: strItem.Format("%d", pGlassInfo->m_nCellNum); break; //Glass size H |
| | | case 10: strItem.Format("%d", pGlassInfo->m_nGlassSizeHeight); break; //Glass Judge |
| | | case 11: strItem.Format("%d", pGlassInfo->m_nGlassSizeWidth); break; //Glass size W |
| | | } |
| | | *pStrData = strItem; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::getDispInfoDefect(int nCol, int nRow, CString* pStrData) |
| | | { |
| | | if (nRow < 0) return; |
| | | |
| | | if (nRow == 0) //header |
| | | { |
| | | *pStrData = m_vecStrGridDefectHeader[nCol]; |
| | | } |
| | | else |
| | | { |
| | | int nDataIndex = nRow - 1; |
| | | int iRow = m_nSelectedRow; |
| | | |
| | | if (nDataIndex >= m_Formation.m_vecDefects.size()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecDefects[nRow - 1]; |
| | | |
| | | if (pDefectInfo == NULL) |
| | | return; |
| | | |
| | | CString strItem; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 0: strItem.Format("%d", nRow); break; |
| | | case 1: strItem.Format("%d", pDefectInfo->m_nDefectID); break; |
| | | case 2: |
| | | { |
| | | strItem = _T(""); |
| | | if (pDefectInfo->m_sDefectLoc == DefectLoc_Pattern) |
| | | strItem = "Pat"; |
| | | else if (pDefectInfo->m_sDefectLoc == DefectLoc_PAD) |
| | | strItem = "PAD"; |
| | | else if (pDefectInfo->m_sDefectLoc == DefectLoc_C2C) |
| | | strItem = "C2C"; |
| | | else if (pDefectInfo->m_sDefectLoc == DefectLoc_Crack) |
| | | strItem = "Crk"; |
| | | else if (pDefectInfo->m_sDefectLoc == DefectLoc_ASG) |
| | | strItem = "ASG"; |
| | | else if (pDefectInfo->m_sDefectLoc == DefectLoc_BM) |
| | | strItem = "BM"; |
| | | else |
| | | strItem = "Pat"; |
| | | } |
| | | break; |
| | | case 3: strItem = pDefectInfo->m_strDefectType; break; |
| | | case 4: strItem.Format("%s", pDefectInfo->m_strDefectCode); break; |
| | | case 5: |
| | | { |
| | | if (pDefectInfo->m_DefectType == DefectType_RBlack) |
| | | strItem.Format("RB"); |
| | | else if (pDefectInfo->m_DefectType == DefectType_RWhite) |
| | | strItem.Format("RW"); |
| | | else if (pDefectInfo->m_DefectType == DefectType_TBlack) |
| | | strItem.Format("TB"); |
| | | else if (pDefectInfo->m_DefectType == DefectType_TWhite) |
| | | strItem.Format("TW"); |
| | | else |
| | | strItem = "UN"; |
| | | } |
| | | break; |
| | | case 6: |
| | | { |
| | | strItem = _T(""); |
| | | |
| | | if (pDefectInfo->m_DefectSubType == DefectSubType_MC) // Common 05 M/N/C/S/K/* |
| | | strItem = "MC"; |
| | | else if (pDefectInfo->m_DefectSubType == DefectSubType_Mask) |
| | | strItem = "MD"; |
| | | else if (pDefectInfo->m_DefectSubType == DefectSubType_Common) |
| | | strItem = "CD"; |
| | | else if (pDefectInfo->m_DefectSubType == DefectSubType_NoDefect) |
| | | strItem = "NO"; |
| | | else |
| | | strItem = "N"; |
| | | } |
| | | break; |
| | | case 7: strItem.Format("%d", pDefectInfo->m_nDefectRScale); break; |
| | | case 8: |
| | | { |
| | | strItem = _T(""); |
| | | strItem.Format("% 7d", pDefectInfo->m_nUMSizeX); |
| | | } |
| | | break; |
| | | case 9: |
| | | { |
| | | strItem = _T(""); |
| | | strItem.Format("% 7d", pDefectInfo->m_nUMSizeY); |
| | | } |
| | | break; |
| | | case 10: |
| | | strItem.Format("%d", pDefectInfo->m_nUMSize); |
| | | break; |
| | | case 11: |
| | | { |
| | | int nValue = 0; |
| | | for (int i = 105; i >= 0; i--) |
| | | { |
| | | if (pDefectInfo->m_sZonePixelCount[i] > 0) |
| | | nValue += 1; |
| | | if (i > 0) |
| | | nValue = nValue << 1; |
| | | } |
| | | |
| | | strItem.Format("%04X", nValue); |
| | | } |
| | | break; |
| | | case 12: strItem.Format("%d", pDefectInfo->m_nLevelSrcMax); break; |
| | | case 13: strItem.Format("%d", pDefectInfo->m_nLevelSrcMin); break; |
| | | case 14: strItem.Format("%d", pDefectInfo->m_nLevelSrcAvg); break; |
| | | case 15: strItem.Format("%d", pDefectInfo->m_sDefectPeak); break; |
| | | case 16: |
| | | { |
| | | strItem.Format("%s", pDefectInfo->m_strStackFirst); |
| | | } |
| | | break; |
| | | case 17: |
| | | { |
| | | strItem = _T(""); |
| | | strItem.Format("% 4d", pDefectInfo->m_nCameraID); |
| | | } |
| | | break; |
| | | case 18: strItem.Format("%d", pDefectInfo->m_nScanIdx); break; |
| | | case 19: strItem.Format("%d", pDefectInfo->m_nLevelRefMax); break; |
| | | case 20: strItem.Format("%d", pDefectInfo->m_nLevelRefMin); break; |
| | | case 21: strItem.Format("%d", pDefectInfo->m_nLevelRefAvg); break; |
| | | case 22: |
| | | { |
| | | CString str; |
| | | strItem = _T(" "); |
| | | str.Format("%5.3f", (double)pDefectInfo->m_nUMCenterAlignX / 1000.0); |
| | | strItem.Insert(9 - str.GetLength(), str); |
| | | strItem.TrimRight(" "); |
| | | } |
| | | break; |
| | | case 23: |
| | | { |
| | | CString str; |
| | | strItem = _T(" "); |
| | | str.Format("% 5.3f", (double)pDefectInfo->m_nUMCenterAlignY / 1000.0); |
| | | strItem.Insert(9 - str.GetLength(), str); |
| | | strItem.TrimRight(" "); |
| | | } |
| | | break; |
| | | case 24: |
| | | { |
| | | CString str; |
| | | strItem = _T(" "); |
| | | |
| | | // Panel xì¶, yì¶ì ê¸ë¼ì¤ì ë°ë [6/9/2017 bhs] |
| | | if (1)//g_pBasic->GetScanCoordination() == SC_XCoord) |
| | | str.Format("% 5.3f", (double)pDefectInfo->m_nUMCellX / 1000.0); |
| | | else |
| | | str.Format("% 5.3f", (double)pDefectInfo->m_nUMCellY / 1000.0); |
| | | |
| | | strItem.Insert(9 - str.GetLength(), str); |
| | | strItem.TrimRight(" "); |
| | | } |
| | | break; |
| | | case 25: |
| | | { |
| | | CString str; |
| | | strItem = _T(" "); |
| | | |
| | | // Panel xì¶, yì¶ì ê¸ë¼ì¤ì ë°ë [6/9/2017 bhs] |
| | | if (1)//g_pBasic->GetScanCoordination() == SC_XCoord) |
| | | str.Format("% 5.3f", (double)pDefectInfo->m_nUMCellY / 1000.0); |
| | | else |
| | | str.Format("% 5.3f", (double)pDefectInfo->m_nUMCellX / 1000.0); |
| | | |
| | | strItem.Insert(9 - str.GetLength(), str); |
| | | strItem.TrimRight(" "); |
| | | } |
| | | break; |
| | | case 26: strItem.Format("%d", pDefectInfo->m_nScratchRatio); break; |
| | | case 27: strItem.Format("%d", pDefectInfo->m_nDensity); break; |
| | | case 28: strItem.Format("%d", pDefectInfo->m_bMergeState); break; |
| | | } |
| | | |
| | | *pStrData = strItem; |
| | | } |
| | | } |
| | | |
| | | LRESULT CReveiwHistoryDlg::OnMapDefectSelected(WPARAM wParam, LPARAM lParam) |
| | | { |
| | | int nSelectMode = static_cast<int>(lParam); |
| | | int nSelectDefect = static_cast<int>(wParam); |
| | | |
| | | if (nSelectMode == 0) |
| | | { |
| | | setDefectShow(nSelectDefect, 1); |
| | | //ImageShow(nSelectDefect); |
| | | |
| | | if (m_Formation.m_vecImage.size() < 0) return 0; |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecImage.size(); i++) |
| | | { |
| | | if (m_Formation.m_vecImage[i].m_nDefectID == nSelectDefect) |
| | | { |
| | | ImageShow(i); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!m_bDefectAll) |
| | | { |
| | | m_sldImg.SetPos(m_nSelectedRow - 1); |
| | | |
| | | int nPos = m_sldImg.GetPos(); |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nPos); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | } |
| | | } |
| | | else if (nSelectMode == 1) |
| | | { |
| | | CAlignDlg* lpDlg = CAlignDlg::GetMgr(); |
| | | m_pDlgAlign->setFormShow(nSelectDefect, 1); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | LRESULT CReveiwHistoryDlg::OnListDefectSelected(WPARAM wParam, LPARAM lParam) |
| | | { |
| | | int nSelectDefect = static_cast<int>(wParam); |
| | | int nMode = static_cast<int>(lParam); |
| | | |
| | | m_FormationMap.setSelectDefect(nSelectDefect); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | LRESULT CReveiwHistoryDlg::OnMapDefectMouseOver(WPARAM wParam, LPARAM lParam) |
| | | { |
| | | int nSelectDefect = static_cast<int>(wParam); |
| | | int nMode = static_cast<int>(lParam); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnBnClickedButtonMapviewFit() |
| | | { |
| | | m_FormationMap.SetAutoScale(); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnSize(UINT nType, int cx, int cy) |
| | | { |
| | | CDialogEx::OnSize(nType, cx, cy); |
| | | |
| | | m_WndArrange.process(cx, cy); |
| | | m_FormationMap.SetAutoScale(); |
| | | m_ImageView.SetResize(); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnOptionPathsetting() |
| | | { |
| | | // TODO: ì¬ê¸°ì ëª
ë ¹ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CPathSettingDlg::GetMgr()->PathSettingLoad(); |
| | | CPathSettingDlg* lpDlg = CPathSettingDlg::GetMgr(); |
| | | lpDlg->ShowWindow(SW_SHOW); |
| | | |
| | | LOG(Dbg, _T("[Processe] PathSetting Click")); |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::OnViewAlldefect() |
| | | { |
| | | // TODO: ì¬ê¸°ì ëª
ë ¹ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CMenu *hMenu = GetMenu(); |
| | | if (hMenu->GetMenuState(ID_VIEW_ALLDEFECT, MF_BYCOMMAND) != MF_CHECKED) |
| | | { |
| | | hMenu->CheckMenuItem(ID_VIEW_ALLDEFECT, MF_CHECKED); |
| | | hMenu->CheckMenuItem(ID_VIEW_REVIEWDEFECT, MF_UNCHECKED); |
| | | m_bDefectAll = true; |
| | | } |
| | | else |
| | | { |
| | | hMenu->CheckMenuItem(ID_VIEW_REVIEWDEFECT, MF_CHECKED); |
| | | hMenu->CheckMenuItem(ID_VIEW_ALLDEFECT, MF_UNCHECKED); |
| | | m_bDefectAll = false; |
| | | } |
| | | |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | GlassInfoRest(); |
| | | BinFileOpen(m_nCount); |
| | | } |
| | | else |
| | | { |
| | | for(int i=0; i< 105; i++) |
| | | { |
| | | int nSelect = m_nSelectFile[i]; |
| | | BinFileOpen(nSelect); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::OnViewReviewdefect() |
| | | { |
| | | // TODO: ì¬ê¸°ì ëª
ë ¹ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CMenu *hMenu = GetMenu(); |
| | | if (hMenu->GetMenuState(ID_VIEW_REVIEWDEFECT, MF_BYCOMMAND) != MF_CHECKED) |
| | | { |
| | | hMenu->CheckMenuItem(ID_VIEW_REVIEWDEFECT, MF_CHECKED); |
| | | hMenu->CheckMenuItem(ID_VIEW_ALLDEFECT, MF_UNCHECKED); |
| | | m_bDefectAll = false; |
| | | } |
| | | else |
| | | { |
| | | hMenu->CheckMenuItem(ID_VIEW_REVIEWDEFECT, MF_UNCHECKED); |
| | | hMenu->CheckMenuItem(ID_VIEW_ALLDEFECT, MF_CHECKED); |
| | | m_bDefectAll = true; |
| | | } |
| | | |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | GlassInfoRest(); |
| | | BinFileOpen(m_nCount); |
| | | } |
| | | else |
| | | { |
| | | BinFileOpen(m_nCount); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnAlignView() |
| | | { |
| | | // TODO: ì¬ê¸°ì ëª
ë ¹ ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CRect rectWindow; |
| | | GetClientRect(&rectWindow); |
| | | ClientToScreen(&rectWindow); |
| | | |
| | | CAlignDlg* lpDlg = CAlignDlg::GetMgr(); |
| | | |
| | | lpDlg->SetWindowPos(NULL, rectWindow.right + 5, rectWindow.top - 50, 0, 0, SWP_NOZORDER | SWP_NOSIZE); |
| | | lpDlg->ShowWindow(SW_SHOW); |
| | | lpDlg->DrawnoImage(); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::FileTime(CString strPath) |
| | | { |
| | | HANDLE h_File = CreateFile(_T(strPath), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); |
| | | |
| | | if (h_File != INVALID_HANDLE_VALUE) |
| | | { |
| | | //** create_time : ìì± ë ì§, access_time : ë§ì§ë§ ì ê·¼ë ì§, write_time : ë§ì§ë§ ìì ë ì§ |
| | | FILETIME create_time, access_time, write_time; |
| | | //** System Time ì·¨ë |
| | | GetFileTime(h_File, &create_time, &access_time, &write_time); |
| | | |
| | | //** SystemTimeì UTCíì(Universal Time Coordinated)ì´ê¸° ë문ì ê·¸ë¥ ì¬ì© ë¶ê°ë¥ |
| | | //** ì§ììê°ì¼ë¡ ë³ê²½(ì¼ë°ì ì¸ ìê° ê³ì°ë² 2015/11/09 21:18:35) |
| | | SYSTEMTIME write_system_time, write_local_time; |
| | | FileTimeToSystemTime(&write_time, &write_system_time); |
| | | |
| | | //** write_local_timeë³ìì ë³íëì´ ì ì¥ë¨ |
| | | //** ì ì¥ë ííë WORDí(short) |
| | | //** wYear, wMonth, wDay, wHour, wMinute, wSecond를 íì©íì¬ ì¬ì©íë©´ ë¨ |
| | | SystemTimeToTzSpecificLocalTime(NULL, &write_system_time, &write_local_time); |
| | | |
| | | int nYear, nMonth, nDay, nHour, nMinute, nSecond; |
| | | nYear = write_local_time.wYear; |
| | | nMonth = write_local_time.wMonth; |
| | | nDay = write_local_time.wDay; |
| | | nHour = write_local_time.wHour; |
| | | nMinute = write_local_time.wMinute; |
| | | nSecond = write_local_time.wSecond; |
| | | CString strTime; |
| | | strTime.Format("%04d-%02d-%02d-%02d-%02d-%02d", nYear, nMonth, nDay, nHour, nMinute, nSecond); |
| | | |
| | | m_vecStrGridTimeList.push_back(strTime); |
| | | } |
| | | } |
| | | |
| | | CgrmGlassRawData g_RawData; |
| | | void CReveiwHistoryDlg::OpenFileHeader(CString strPath, CString strFullPath) |
| | | { |
| | | if (strPath == "") return; |
| | | |
| | | CgrmGlassRawData* pRawData = &g_RawData; |
| | | |
| | | if (m_vecStrGridReviewList.size() < 1) return; |
| | | |
| | | CPathSettingDlg* pReivewSetting = CPathSettingDlg::GetMgr(); |
| | | CString strBinPath; |
| | | strBinPath = pReivewSetting->GetBinPath(); |
| | | |
| | | pRawData->ImportGlassRaw(m_Server.GetGlassRawInfo(), NULL); |
| | | |
| | | strcpy_s(pRawData->GetGlassData()->m_strFileName,64, strPath.GetBuffer()); |
| | | strcpy_s(pRawData->GetGlassData()->m_strPath,256, strBinPath.GetBuffer()); |
| | | |
| | | BOOL bRetReadBin = m_pGlassRawMaker->ReadBinFile(pRawData); |
| | | |
| | | m_Formation.AddDefectHeaderTemp(); |
| | | _akReviewHeader* pDefectInfo = &m_Formation.m_vecHeaderTemp[m_Formation.m_vecHeaderTemp.size() - 1]; |
| | | |
| | | pDefectInfo->m_nReviewIdx = 0; |
| | | pDefectInfo->m_strFileTime = m_vecStrGridTimeList[m_Formation.m_vecHeaderTemp.size() - 1]; |
| | | pDefectInfo->m_strFileName = m_vecStrGridReviewList[m_Formation.m_vecHeaderTemp.size() - 1]; |
| | | pDefectInfo->m_strFilePath = strFullPath; |
| | | |
| | | if (bRetReadBin == FALSE) |
| | | { |
| | | pDefectInfo->m_nDefectIdx = 0; |
| | | pDefectInfo->m_strGlassID = ""; |
| | | pDefectInfo->m_strPPID = ""; |
| | | pDefectInfo->m_nReviewIdx = 0; |
| | | pDefectInfo->m_strJudge = ""; |
| | | pDefectInfo->m_strLoading = "X"; |
| | | |
| | | return; |
| | | } |
| | | |
| | | pDefectInfo->m_strLoading = "O"; |
| | | |
| | | //pRawData->ExportGlassRaw(m_Server.GetGlassRawInfo(), (char*)m_Server.GetGlassData()); |
| | | |
| | | int nDataCount = pRawData->GetGlassData()->m_nDefectNum; |
| | | |
| | | _grmDefectData* pDefect; |
| | | _grmGlassData* pGlass; |
| | | |
| | | CString strTemp; |
| | | CString strReviewImageName; |
| | | for (int i = 0; i < pRawData->GetGlassData()->m_nDefectNum; i++) |
| | | { |
| | | pDefect = pRawData->GetDefectData(i);//m_Server.GetDefectData(i); |
| | | pGlass = pRawData->GetGlassData(); //m_Server.GetGlassData(); |
| | | |
| | | pDefectInfo->m_nDefectIdx = pGlass->m_nDefectNum; |
| | | pDefectInfo->m_strGlassID = pGlass->m_strGlassID; |
| | | pDefectInfo->m_strPPID = pGlass->m_strPPID; |
| | | pDefectInfo->m_strJudge = pGlass->m_strGlassJudge; |
| | | |
| | | |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | if (strReviewImageName == "" || strReviewImageName == "*") |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | pDefectInfo->m_nReviewIdx = pDefectInfo->m_nReviewIdx + 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::BinFileOpen(int nCount) |
| | | { |
| | | BOOL bNewFile = TRUE; |
| | | if (nCount < 1) return; |
| | | |
| | | if (m_vecStrGridReviewPath.size() <= 0) return; |
| | | |
| | | if (m_vecStrGridReviewPath[nCount-1] == m_strRawFilePath) bNewFile = FALSE; |
| | | |
| | | if (m_Formation.m_vecHeader.size() < 1) return; |
| | | |
| | | CString strFileName = m_vecStrGridReviewList[nCount-1]; |
| | | CPathSettingDlg* pReivewSetting = CPathSettingDlg::GetMgr(); |
| | | CString strBinPath; |
| | | strBinPath = pReivewSetting->GetBinPath(); |
| | | |
| | | CgrmGlassRawData RawData; |
| | | |
| | | RawData.ImportGlassRaw(m_Server.GetGlassRawInfo(), NULL); |
| | | |
| | | strcpy(RawData.GetGlassData()->m_strFileName, strFileName.GetBuffer()); |
| | | strcpy(RawData.GetGlassData()->m_strPath, strBinPath.GetBuffer()); |
| | | |
| | | BOOL bRetReadBin = m_pGlassRawMaker->ReadBinFile(&RawData); |
| | | |
| | | CGridCellCheck* pCellCheck = NULL; |
| | | pCellCheck = (CGridCellCheck*)m_gridReviewList.GetCell(nCount, 0); |
| | | |
| | | if (bRetReadBin == FALSE) |
| | | { |
| | | AfxMessageBox(_T("ë¡ë ì¤í¨ íììµëë¤."), MB_OK | MB_ICONERROR); |
| | | m_FormationMap.SetAutoScale(); |
| | | LOG(Dbg, _T("[Processe] File Open False")); |
| | | pCellCheck->SetCheck(FALSE); |
| | | Imagenoload(); |
| | | return; |
| | | } |
| | | |
| | | if (bNewFile && m_chkSingle.GetCheck()) |
| | | { |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | m_FormationMap.m_vecTempCellRect.clear(); |
| | | m_FormationMap.clear(); |
| | | m_Formation.Clear(); |
| | | m_Formation.m_vecTempDefects.clear(); |
| | | m_Formation.m_vecTempImage.clear(); |
| | | SetScrollRest(); |
| | | } |
| | | else if (bNewFile && !m_chkSingle.GetCheck()) |
| | | { |
| | | if (m_bFirst) |
| | | { |
| | | m_bFirst = false; |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | } |
| | | m_FormationMap.clear(); |
| | | m_Formation.m_vecFormation.clear(); |
| | | SetScrollRest(); |
| | | } |
| | | else if (!bNewFile && !m_chkSingle.GetCheck()) |
| | | { |
| | | m_FormationMap.clear(); |
| | | m_Formation.m_vecFormation.clear(); |
| | | SetScrollRest(); |
| | | } |
| | | else |
| | | { |
| | | m_FormationMap.clear(); |
| | | m_Formation.m_vecDefects.clear(); |
| | | m_Formation.m_vecFormation.clear(); |
| | | m_Formation.m_vecImage.clear(); |
| | | SetScrollRest(); |
| | | } |
| | | |
| | | RawData.ExportGlassRaw(m_Server.GetGlassRawInfo(), (char*)m_Server.GetGlassData()); |
| | | |
| | | int nDataCount = RawData.GetGlassData()->m_nDefectNum; |
| | | int nCellCount = RawData.GetGlassData()->m_nCellNum; |
| | | |
| | | m_strRawFilePath = m_vecStrGridReviewPath[nCount-1]; |
| | | |
| | | _grmGlassData* pGlass = m_Server.GetGlassData(); |
| | | |
| | | m_FormationMap.m_dGlassSizeWidth = pGlass->m_nGlassSizeWidth / 1000; |
| | | m_FormationMap.m_dGlassSizeHeight = pGlass->m_nGlassSizeHeight / 1000; |
| | | |
| | | if (m_bDefectAll == false && m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefct(nDataCount); |
| | | } |
| | | else if (m_bDefectAll == false && !m_chkSingle.GetCheck()) |
| | | { |
| | | if(m_Formation.m_vecTempDefects.size() > 0) |
| | | { |
| | | int nCount2; |
| | | nCount2 = MultiInsert(nCount, nDataCount); |
| | | if (nCount2 == -1) |
| | | { |
| | | AddVecDataDefct2(nDataCount); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | AddVecDataDefct2(nDataCount); |
| | | } |
| | | /*AddVecDataDefct2(nDataCount, nCount);*/ |
| | | } |
| | | else if (m_bDefectAll == true && !m_chkSingle.GetCheck()) |
| | | { |
| | | if (m_Formation.m_vecTempDefects.size() > 0) |
| | | { |
| | | int nCount2; |
| | | nCount2 = MultiInsert(nCount, nDataCount); |
| | | if (nCount2 == -1) |
| | | { |
| | | AddVecDataDefectAll2(nDataCount); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | AddVecDataDefectAll2(nDataCount); |
| | | } |
| | | /*AddVecDataDefectAll2(nDataCount, nCount);*/ |
| | | } |
| | | else |
| | | { |
| | | AddVecDataDefectAll(nDataCount); |
| | | } |
| | | |
| | | AddVecDataImage(nDataCount); |
| | | AddVecCellData(nCellCount); |
| | | AddVecGlassData(nCount); |
| | | |
| | | AddVecDateSorting(nDataCount); |
| | | AddVecImageSorting(nDataCount); |
| | | AddVecCellSorting(nCellCount); |
| | | |
| | | m_gridDefectInfo.SetRowCount(m_Formation.m_vecDefects.size() + 1); |
| | | m_gridDefectInfo.Invalidate(); |
| | | |
| | | m_gridGlassInfo.SetRowCount(m_Formation.m_vecGlassInfo.size() + 1); |
| | | m_gridGlassInfo.Invalidate(); |
| | | |
| | | int nDefectSize = 0; |
| | | int nImageSize = 0; |
| | | int nCellSize = 0; |
| | | int nNext = MAX_COUNT; |
| | | |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | m_nDefectSize[0] = GetDefectCount();//m_Formation.m_vecDefects.size(); |
| | | m_nImageSize[0] = GetImageCount();//m_Formation.m_vecImage.size(); |
| | | m_nCellSize[0] = GetCellCount(); |
| | | |
| | | m_nCellSizeTemp[0] = m_nCellSize[0]; |
| | | |
| | | m_nImageCount = 0; |
| | | m_nDefectCount = 0; |
| | | m_nCellCount = 0; |
| | | } |
| | | else |
| | | { |
| | | |
| | | for (int i = 0; i <= MAX_COUNT; i++) |
| | | { |
| | | nDefectSize = GetDefectCount(); |
| | | nImageSize = GetImageCount(); |
| | | nCellSize = GetCellCount(); |
| | | |
| | | //1.ê°ì ììëë¡ ë£ëë¤ |
| | | if (nDefectSize > 0 || nImageSize > 0 || nCellSize > 0) |
| | | { |
| | | if (m_nDefectSize[i] == 0 && m_nImageSize[i] == 0 && m_nCellSize[i] == 0) |
| | | { |
| | | m_nDefectSize[i] = GetDefectCount();//m_Formation.m_vecDefects.size(); |
| | | m_nImageSize[i] = GetImageCount();//m_Formation.m_vecImage.size(); |
| | | m_nCellSize[i] = GetCellCount(); |
| | | |
| | | m_nImageCount = 0; |
| | | m_nDefectCount = 0; |
| | | m_nCellCount = 0; |
| | | break; |
| | | } |
| | | } |
| | | //2.ë§ì§ë§ ê°ì´ë©´ 2ë²ì§¸ê° 첫ë²ì§¸ë¡ ì¬ë¦° í ë£ëë¤. |
| | | if (nNext == i) |
| | | { |
| | | for (int j = 0; j < MAX_COUNT; j++) |
| | | { |
| | | m_nDefectSize[j] = m_nDefectSize[j + 1]; |
| | | m_nImageSize[j] = m_nImageSize[j + 1]; |
| | | m_nCellSize[j] = m_nCellSize[j + 1]; |
| | | m_nCellSizeTemp[j] = m_nCellSize[j]; |
| | | } |
| | | m_nDefectSize[i] = GetDefectCount();//m_Formation.m_vecDefects.size(); |
| | | m_nImageSize[i] = GetImageCount();//m_Formation.m_vecImage.size(); |
| | | m_nCellSize[i] = GetCellCount(); |
| | | |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | |
| | | m_nImageCount = 0; |
| | | m_nDefectCount = 0; |
| | | m_nCellCount = 0; |
| | | } |
| | | //3.ì¤ê°ì ê°ì´ ë¹ ì§ë©´ ì¤ê° ë²ì§¸ ê°ì ì¬ë¦° í ë£ëë¤. |
| | | |
| | | |
| | | // if (i != 0) //iê° 0 ì´ ìëë©´ count를 ëì¸ë¤. |
| | | // { |
| | | // nDefectSize += m_nDefectSize[i]; |
| | | // nImageSize += m_nImageSize[i]; |
| | | // nCellSize += m_nCellSize[i]; |
| | | // } |
| | | // else if (i == 0 && m_nDefectSize[0] > 0) //iê° 0ì¸ë° ëíì´ ìì¼ë©´ ì¹´ì´í°ë¥¼ ëì¸ë¤. |
| | | // { |
| | | // nDefectSize += m_nDefectSize[i]; |
| | | // nImageSize += m_nImageSize[i]; |
| | | // nCellSize += m_nCellSize[i]; |
| | | // } |
| | | |
| | | // if (m_nDefectSize[0] == 0) |
| | | // { |
| | | // m_nDefectSize[i] = GetDefectCount();//m_Formation.m_vecDefects.size(); |
| | | // m_nImageSize[i] = GetImageCount();//m_Formation.m_vecImage.size(); |
| | | // m_nCellSize[i] = GetCellCount(); |
| | | // |
| | | // m_nImageCount = 0; |
| | | // m_nDefectCount = 0; |
| | | // m_nCellCount = 0; |
| | | // break; |
| | | // } |
| | | // else if(i != 0 && m_nDefectSize[i] == 0) |
| | | // { |
| | | // m_nDefectSize[i] = GetDefectCount(); //m_Formation.m_vecDefects.size() - nDefectSize; |
| | | // m_nImageSize[i] = GetImageCount(); //m_Formation.m_vecImage.size() - nImageSize; |
| | | // m_nCellSize[i] = GetCellCount(); |
| | | // |
| | | // m_nImageCount = 0; |
| | | // m_nDefectCount = 0; |
| | | // m_nCellCount = 0; |
| | | // break; |
| | | // } |
| | | } |
| | | } |
| | | |
| | | m_FormationMap.m_pDefectFormation = &m_Formation; |
| | | m_DefectDisplayOption.m_nShowLabel = -1; |
| | | m_FormationMap.m_pDefectDisplayOption = &m_DefectDisplayOption; |
| | | |
| | | CAlignDlg* lpDlg = CAlignDlg::GetMgr(); |
| | | lpDlg->m_pDefectFormation = &m_Formation; |
| | | lpDlg->m_pDefectDisplayOption = &m_DefectDisplayOption; |
| | | |
| | | if(bNewFile) m_FormationMap.SetAutoScale(); |
| | | else m_FormationMap.ReDraw(TRUE); |
| | | |
| | | int nDefectNum = m_Server.GetGlassData()->m_nDefectNum; |
| | | int nNoneGroupDefect = m_Formation.m_vecImage.size(); |
| | | |
| | | if (m_Formation.m_vecImage.size() > 0) |
| | | { |
| | | SetScrollSetting(); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnCbnSelchangeComboRawtype() |
| | | { |
| | | CGlassRawBase* pNewRawMaker = NULL; |
| | | |
| | | pNewRawMaker = new CGlassRawCPJT; |
| | | |
| | | if (m_pGlassRawMaker) delete m_pGlassRawMaker; |
| | | |
| | | m_pGlassRawMaker = pNewRawMaker; |
| | | |
| | | m_ConfigOption.m_nSelectRawType = 3; |
| | | |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnBnClickedBtnFindBin() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | |
| | | |
| | | m_vecStrGridReviewList.clear(); |
| | | m_vecStrGridTimeList.clear(); |
| | | m_vecStrGridReviewPath.clear(); |
| | | m_Formation.m_vecHeader.clear(); |
| | | m_FormationMap.clear(); |
| | | m_Formation.Clear(); |
| | | GlassInfoRest(); |
| | | |
| | | // m_ProgressFile.ModifyStyle(0, PBS_MARQUEE); |
| | | // m_ProgressFile.ShowWindow(TRUE); |
| | | // pProgressBar->SetMarquee(TRUE, 30); |
| | | |
| | | |
| | | CPathSettingDlg* pReivewSetting = CPathSettingDlg::GetMgr(); |
| | | CString strBinPath; |
| | | strBinPath = pReivewSetting->GetBinPath(); |
| | | |
| | | if (strBinPath == "") |
| | | { |
| | | return; |
| | | } |
| | | strBinPath += _T("\\*.*"); |
| | | |
| | | CFileFind finder; |
| | | BOOL bWorking = finder.FindFile(strBinPath); |
| | | |
| | | // CakFileUtil akFile; |
| | | // akFile.FindFile(strBinPath.GetBuffer()); |
| | | // VECFINDDATA* pVecFindData = akFile.getFindData(); |
| | | // |
| | | // for (int i = 0; i < pVecFindData->size(); i++) |
| | | // { |
| | | // _DefectList akDefect; |
| | | // m_vecStrDefectList.push_back(akDefect); |
| | | // _DefectList* pDefectList = &m_vecStrDefectList[i]; |
| | | // |
| | | // |
| | | // TRACE("Craete Time : %d, %s \n", (*pVecFindData)[i].time_create, (*pVecFindData)[i].name); |
| | | // pDefectList->m_nFileTime = (*pVecFindData)[i].time_create; |
| | | // pDefectList->m_strFileName = (*pVecFindData)[i].name; |
| | | // // m_vecStrGridReviewList.push_back((*pVecFindData)[i].name); |
| | | // // m_vecStrGridTimeList.push_back((*pVecFindData)[i].time_create; |
| | | // OpenFileHeader((*pVecFindData)[i].name); |
| | | // } |
| | | |
| | | |
| | | |
| | | CString fileName; |
| | | CString DirName; |
| | | int nCount = 1; |
| | | m_ctlProgress.ShowWindow(TRUE); |
| | | int nPersent = 0; |
| | | |
| | | while (bWorking) |
| | | { |
| | | m_ctlProgress.SetPos(nPersent); |
| | | nPersent++; |
| | | |
| | | if (nPersent >= 100) |
| | | { |
| | | nPersent = 0; |
| | | } |
| | | |
| | | //ë¤ì íì¼ / í´ë ê° ì¡´ì¬íë©´ë¤ë©´ TRUE ë°í |
| | | bWorking = finder.FindNextFile(); |
| | | //íì¼ ì¼ë |
| | | if (finder.IsArchived()) |
| | | { |
| | | //íì¼ì ì´ë¦ |
| | | CString _fileName = finder.GetFileName(); |
| | | |
| | | // íì¬í´ë ììí´ë ì¸ë¤ì¼íì¼ì ì ì¸ |
| | | if (_fileName == _T(".") || |
| | | _fileName == _T("..") || |
| | | _fileName == _T("Thumbs.db")) continue; |
| | | |
| | | CString strFindName = ".bin"; |
| | | CString strFileName, strFileName2; |
| | | strFileName = _fileName.Right(4); //bin íì¼ë§ |
| | | |
| | | if (strFileName.Compare(strFindName) == 0) |
| | | { |
| | | /*if(nCount > m_nFileCount) break; //count ì¬ê¸°ì ë§ê³ ì ì²´ íì¼ì ë¤ ì½ì íì ë¤ì ìí
íì*/ |
| | | m_vecStrGridReviewList.push_back(_fileName); |
| | | strFileName2 = strBinPath.Left(strBinPath.GetLength() - 3); |
| | | strFileName2 += _fileName; |
| | | m_vecStrGridReviewPath.push_back(strFileName2); |
| | | FileTime(strFileName2); |
| | | OpenFileHeader(_fileName, strFileName2); |
| | | /*nCount++;*/ |
| | | } |
| | | } |
| | | } |
| | | |
| | | //ì¬ê¸°ìì ì¬ ìí
íì íìí ë§í¼ë§ ë£ì |
| | | { |
| | | //vec를 ì ë ¬ íë¤. |
| | | SortFileList(1); |
| | | //ê°¯ìë§í¼ë§ ë³µì¬ë¥¼ íë¤ |
| | | //ë³µì¬í ê²ì ë£ëë¤. |
| | | |
| | | } |
| | | CGridCellCheck* pCellCheck = NULL; |
| | | // |
| | | // m_gridReviewList.SetCellType(1, 0, RUNTIME_CLASS(CGridCellCheck)); |
| | | // |
| | | m_gridReviewList.SetRowCount(m_Formation.m_vecHeader.size() + 1); |
| | | |
| | | { |
| | | GV_ITEM Item; |
| | | int nRowIdx = 0; |
| | | int nColIdx = 0; |
| | | CString strTemp; |
| | | Item.mask = GVIF_TEXT; |
| | | |
| | | _akReviewHeader *pReview = NULL; |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecHeader.size(); i++) |
| | | { |
| | | m_gridReviewList.SetCellType(i + 1, 0, RUNTIME_CLASS(CGridCellCheck)); |
| | | |
| | | // pCellCheck = (CGridCellCheck*)m_ctrlGridGlassList.GetCell(nRowIdx, nColIdx); |
| | | // |
| | | // pCellCheck->SetCheck(); |
| | | |
| | | nColIdx = 0; |
| | | pReview = &m_Formation.m_vecHeader[i]; |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%d"), i + 1); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strFileTime); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strLoading); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strPPID); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strGlassID); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%d"), pReview->m_nDefectIdx); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%d"), pReview->m_nReviewIdx); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strJudge); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | |
| | | Item.row = i + 1; |
| | | Item.col = nColIdx++; |
| | | strTemp.Format(_T("%s"), pReview->m_strFileName); |
| | | Item.strText = strTemp; |
| | | m_gridReviewList.SetItem(&Item); |
| | | } |
| | | |
| | | } |
| | | m_gridReviewList.Invalidate(); |
| | | |
| | | m_ctlProgress.ShowWindow(FALSE); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::ShowProgressBar() |
| | | { |
| | | |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::setDefectShow(int nDefectID, BOOL bEnsureVisible) |
| | | { |
| | | const int nDefectCol = 1; |
| | | |
| | | if (nDefectID >= 0) |
| | | { |
| | | int sajfklwe; |
| | | sajfklwe = m_gridDefectInfo.GetColumnCount(); |
| | | if (m_nSelectedRow > m_gridDefectInfo.GetColumnCount()) |
| | | { |
| | | m_nSelectedRow = 0; |
| | | } |
| | | |
| | | if(!m_bDefectAll) |
| | | { |
| | | if (m_nSelectedRow > m_Formation.m_vecImage.size()) |
| | | { |
| | | m_nSelectedRow = 0; |
| | | } |
| | | } |
| | | int iRow = m_nSelectedRow; |
| | | |
| | | for (int iCol = 0; iCol < m_gridDefectInfo.GetColumnCount(); iCol++) |
| | | { |
| | | m_gridDefectInfo.SetItemState(iRow, iCol, m_gridDefectInfo.GetItemState(iRow, iCol) & ~GVIS_SELECTED); |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecDefects.size(); i++) |
| | | { |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecDefects[i]; |
| | | |
| | | if (pDefectInfo == NULL) |
| | | return; |
| | | |
| | | if (pDefectInfo->m_nDefectID == nDefectID) |
| | | { |
| | | int iRow = i + 1; |
| | | for (int iCol = 0; iCol < m_gridDefectInfo.GetColumnCount(); iCol++) |
| | | { |
| | | m_gridDefectInfo.SetItemState(iRow, iCol, LVIS_SELECTED); |
| | | } |
| | | m_nSelectedRow = iRow; |
| | | if (bEnsureVisible) |
| | | { |
| | | m_gridDefectInfo.EnsureVisible(iRow, m_nSelectedCol); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | m_gridDefectInfo.Invalidate(); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::ImageShow(int nDefectID) |
| | | { |
| | | CPaintDC dc(this); |
| | | |
| | | if (nDefectID < 0) return; |
| | | |
| | | m_DefectImage.Destroy(); |
| | | m_ReviewImage.Destroy(); |
| | | |
| | | m_AlignFirst.Destroy(); |
| | | m_AlignSecend.Destroy(); |
| | | |
| | | CString DeftectPath, DeftectPath2, AlignPath, AlignPath2; |
| | | CFileStatus FileOn; |
| | | TCHAR chFilePath[256] = { 0, }; |
| | | GetModuleFileName(NULL, chFilePath, 256); |
| | | if (chFilePath == NULL || chFilePath == "") return; |
| | | |
| | | CString strFolderPath(chFilePath); |
| | | strFolderPath = strFolderPath.Left(strFolderPath.ReverseFind('\\')); |
| | | |
| | | strFolderPath = strFolderPath + "\\no-image.png"; |
| | | |
| | | |
| | | //DefectDataê° ì§ê¸ ì íë DefectData를 ê°ì ¸ ì¨ë¤. ì´ê±° ìì ... |
| | | |
| | | // _grmDefectData* pDefect = m_Server.GetDefectData(nDefectID); |
| | | // _grmGlassData* pGlass = m_Server.GetGlassData(); |
| | | int nIndex = 0; |
| | | //ëí ì¸ë±ì¤ì ê°ì ëì ì°¾ìë¼ |
| | | for (int i = 0; i < m_Formation.m_vecImage.size(); i++) |
| | | { |
| | | _akReviewList* pImage = NULL; |
| | | pImage = &m_Formation.m_vecImage[i]; |
| | | |
| | | if (!m_bDefectAll) |
| | | { |
| | | nIndex = nDefectID; |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | if (pImage->m_nDefectID == nDefectID) |
| | | { |
| | | nIndex = i; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecImage[nIndex]; |
| | | //ëª ë²ì§¸ ì¸ì§ ëì§ë¤. |
| | | |
| | | CString wekfjlwe = pImageInfo->m_strReviewImageName; |
| | | CString wjkflwe = pImageInfo->m_strAoiImageName; |
| | | CString jkefawlj = pImageInfo->m_strReviewImagePath; |
| | | //í´ë¹ count를 í¸ì¶ íë¤. |
| | | //íì¼ ì´ë¯¸ì§ë¥¼ ë¶ë¬ ì¨ë¤ |
| | | //íííë¤. |
| | | |
| | | |
| | | /* if (pGlass == NULL) return;*/ |
| | | |
| | | //_akReviewList* pDfect2 = &m_Formation.m_vecImage[nDefectID]; |
| | | |
| | | // CString wefjklwef; |
| | | // wefjklwef = pDfect2->m_strRevewImageName; |
| | | |
| | | CString strReviewImageName, strInspectorName, strReviewImagePath, strAlignName, strAlignName2; |
| | | // strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | // strInspectorName = pDefect->m_strAoiImageName; |
| | | // strReviewImagePath = pDefect->m_ReviewDefect.m_strRevImagePath; |
| | | |
| | | /* pDefect->m_ReviewDefect.m_strRevImagePath*/ |
| | | |
| | | strReviewImageName = wekfjlwe; |
| | | strInspectorName = wjkflwe; |
| | | strReviewImagePath = jkefawlj; |
| | | strAlignName = pImageInfo->m_strAlignFirst; //Glass ê° ê°ì ¸ìë¼ |
| | | strAlignName2 = pImageInfo->m_strAlignSecond; |
| | | |
| | | // strAlignName.Format(_T("1.jpg")); |
| | | // strAlignName2.Format(_T("2.jpg")); |
| | | |
| | | CString strReviewPath; |
| | | CString strInspectorPath; |
| | | CString strAlignPath; |
| | | |
| | | CPathSettingDlg* lpDlg = CPathSettingDlg::GetMgr(); |
| | | strInspectorPath = lpDlg->GetInspectorPath(); |
| | | strReviewPath = lpDlg->GetReviewPath(); |
| | | strAlignPath = lpDlg->GetAlignPath(); |
| | | |
| | | DeftectPath.Format(_T("%s\\%s\\%s"), strReviewPath, strReviewImagePath, strReviewImageName); |
| | | //DeftectPath2.Format(_T("%s\\%s"), strInspectorPath, strInspectorName); |
| | | if (strInspectorName == "*" || strInspectorName == "**" || strInspectorName == "***") strInspectorName = ""; |
| | | DeftectPath2.Format(_T("%s\\%s\\%s"), strInspectorPath, pImageInfo->m_strGlassID, strReviewImageName); |
| | | |
| | | AlignPath.Format(_T("%s\\%s\\%s"), strAlignPath, pImageInfo->m_strGlassID, strAlignName); |
| | | AlignPath2.Format(_T("%s\\%s\\%s"), strAlignPath, pImageInfo->m_strGlassID, strAlignName2); |
| | | |
| | | if (CFile::GetStatus(DeftectPath, FileOn) && strReviewImageName != "") //íì¼ì´ ìì ë |
| | | { |
| | | CString strTest; |
| | | strTest = DeftectPath; |
| | | strcpy(m_strConfigFile, strTest.GetBuffer(0)); |
| | | m_ImageView.SetImageData(m_strConfigFile); |
| | | m_ImageView.ReDraw(); |
| | | // m_ReviewImage.Load(DeftectPath); |
| | | // HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), DeftectPath, |
| | | // IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | // |
| | | // |
| | | // InvalidateRect(m_picture_rect, FALSE); |
| | | // dc.SetStretchBltMode(COLORONCOLOR); |
| | | // m_ReviewImage.Draw(dc, m_picture_rect); |
| | | } |
| | | else |
| | | { |
| | | CString strTest; |
| | | strTest = strFolderPath; |
| | | strcpy(m_strConfigFile, strTest.GetBuffer(0)); |
| | | m_ImageView.SetImageData(m_strConfigFile); |
| | | m_ImageView.ReDraw(); |
| | | |
| | | // m_ReviewImage.Load(strFolderPath); |
| | | // HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | // IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | // |
| | | // InvalidateRect(m_picture_rect, FALSE); |
| | | // dc.SetStretchBltMode(COLORONCOLOR); |
| | | // m_ReviewImage.Draw(dc, m_picture_rect); |
| | | } |
| | | |
| | | if (CFile::GetStatus(DeftectPath2, FileOn) && strInspectorName != "") //íì¼ì´ ìì ë |
| | | { |
| | | m_DefectImage.Load(DeftectPath2); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), DeftectPath2, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | |
| | | InvalidateRect(m_picture_rect2, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_DefectImage.Draw(dc, m_picture_rect2); |
| | | } |
| | | else |
| | | { |
| | | m_DefectImage.Load(strFolderPath); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | InvalidateRect(m_picture_rect2, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_DefectImage.Draw(dc, m_picture_rect2); |
| | | } |
| | | |
| | | if (CFile::GetStatus(AlignPath, FileOn) && strAlignName != "") //íì¼ì´ ìì ë |
| | | { |
| | | m_AlignFirst.Load(AlignPath); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), AlignPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | |
| | | InvalidateRect(m_Align_rect, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignFirst.Draw(dc, m_Align_rect); |
| | | } |
| | | else |
| | | { |
| | | m_AlignFirst.Load(strFolderPath); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | InvalidateRect(m_Align_rect, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignFirst.Draw(dc, m_Align_rect); |
| | | } |
| | | |
| | | if (CFile::GetStatus(AlignPath2, FileOn) && strAlignName2 != "") //íì¼ì´ ìì ë |
| | | { |
| | | m_AlignSecend.Load(AlignPath2); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), AlignPath2, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | |
| | | InvalidateRect(m_Align_rect2, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignSecend.Draw(dc, m_Align_rect2); |
| | | } |
| | | else |
| | | { |
| | | m_AlignSecend.Load(strFolderPath); |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | InvalidateRect(m_Align_rect2, FALSE); |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | m_AlignSecend.Draw(dc, m_Align_rect2); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: ì¬ê¸°ì ë©ìì§ ì²ë¦¬ê¸° ì½ë를 ì¶ê° ë°/ëë 기본ê°ì í¸ì¶í©ëë¤. |
| | | if (IDC_SLIDER_IMG == pScrollBar->GetDlgCtrlID()) |
| | | { |
| | | int nCount = m_sldImg.GetPos(); |
| | | |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nCount); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | |
| | | if (nCount > -1) |
| | | { |
| | | if (m_Formation.m_vecImage.size() <= 0) |
| | | { |
| | | SetScrollRest(); |
| | | return; |
| | | } |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecImage[nCount]; |
| | | |
| | | m_FormationMap.setSelectDefect(pImageInfo->m_nDefectID); |
| | | //ImageShow(pImageInfo->m_nDefectID); |
| | | setDefectShow(pImageInfo->m_nDefectID, 1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::OnChangeEditCount() |
| | | { |
| | | // TODO: RICHEDIT 컨í¸ë¡¤ì¸ ê²½ì°, ì´ ì»¨í¸ë¡¤ì |
| | | // CDialogEx::OnInitDialog() í¨ì를 ì¬ì§ì |
| | | //íê³ ë§ì¤í¬ì OR ì°ì°íì¬ ì¤ì ë ENM_CHANGE íë그를 ì§ì íì¬ CRichEditCtrl().SetEventMask()를 í¸ì¶íì§ ìì¼ë©´ |
| | | // ì´ ì림 ë©ìì§ë¥¼ ë³´ë´ì§ ììµëë¤. |
| | | |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | |
| | | CString strPos; |
| | | m_ctrCount.GetWindowText(strPos); |
| | | |
| | | if (strPos == "") return; |
| | | |
| | | int nPos = _ttoi(strPos); |
| | | |
| | | if (nPos < -1) |
| | | { |
| | | m_ctrCount.SetWindowText(0); |
| | | nPos = 0; |
| | | } |
| | | else if (nPos > m_Formation.m_vecImage.size()-1) |
| | | { |
| | | nPos = m_Formation.m_vecImage.size() - 1; |
| | | CString strCount; |
| | | strCount.Format(_T("%d"),nPos); |
| | | m_ctrCount.SetWindowText(strCount); |
| | | } |
| | | |
| | | m_sldImg.SetPos(nPos); |
| | | |
| | | if (nPos > -1) |
| | | { |
| | | if (m_Formation.m_vecImage.size() <= 0) |
| | | { |
| | | SetScrollRest(); |
| | | return; |
| | | } |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecImage[nPos]; |
| | | |
| | | m_FormationMap.setSelectDefect(pImageInfo->m_nDefectID); |
| | | //ImageShow(pImageInfo->m_nDefectID/*nPos*/); |
| | | ImageShow(nPos); |
| | | setDefectShow(pImageInfo->m_nDefectID, 1); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SetScrollSetting() |
| | | { |
| | | if (m_Formation.m_vecImage.size() <= 0) return; |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecImage[m_Formation.m_vecImage.size() - 1]; |
| | | |
| | | int nMinRange = m_Formation.m_vecImage.size()*0.03, nMaxRange = m_Formation.m_vecImage.size()*0.1; |
| | | |
| | | if (nMinRange <= 0) nMinRange = 1; |
| | | if (nMaxRange <= 0) nMaxRange = 1; |
| | | |
| | | m_sldImg.SetRange(0, m_Formation.m_vecImage.size()-1); //ë²ì ì¤ì ìµë ì´ë¯¸ì§ ê°¯ì |
| | | m_sldImg.SetPos(0); //íì¬ í¬ì§ì
|
| | | m_sldImg.SetLineSize(nMinRange); //ì´ëí ë²ì 3% |
| | | m_sldImg.SetPageSize(nMaxRange); //íì´ì§ ì
ë¤ì´ ì´ë ë²ì ë²ì 10% |
| | | |
| | | int nPos = m_sldImg.GetPos(); |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nPos); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SetScrollRest() |
| | | { |
| | | m_sldImg.SetRange(-1, -1); |
| | | m_sldImg.SetPos(-1); |
| | | m_sldImg.SetLineSize(3); |
| | | m_sldImg.SetPageSize(10); |
| | | |
| | | int nPos = m_sldImg.GetPos(); |
| | | CString strPos; |
| | | strPos.Format(_T("%d"), nPos); |
| | | m_ctrCount.SetWindowText(strPos); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnBnClickedButton3() |
| | | { |
| | | // // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | // CPaintDC dc(this); |
| | | // HDC hMemDC; |
| | | // |
| | | // hMemDC = CreateCompatibleDC(dc); |
| | | // |
| | | // m_DefectImage.Destroy(); |
| | | // |
| | | // CString DeftectPath; |
| | | // CFileStatus FileOn; |
| | | // TCHAR chFilePath[256] = { 0, }; |
| | | // GetModuleFileName(NULL, chFilePath, 256); |
| | | // CString strFolderPath(chFilePath); |
| | | // strFolderPath = strFolderPath.Left(strFolderPath.ReverseFind('\\')); |
| | | // |
| | | // strFolderPath = strFolderPath + "\\no-image.png"; |
| | | // m_DefectImage.Load(strFolderPath); |
| | | // |
| | | // HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | // IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | // |
| | | // InvalidateRect(m_picture_rect, FALSE); |
| | | // |
| | | // dc.SetStretchBltMode(COLORONCOLOR); |
| | | // //StretchBlt(dc, 500, 400, 300, 200, hMemDC, 105, 105, 120, 123, SRCCOPY); |
| | | // //m_DefectImage.StretchBlt(dc, 0, 0, 100, 100, SRCCOPY); |
| | | // m_DefectImage.StretchBlt(dc, 0, 0, 500, 200, SRCCOPY); |
| | | // m_DefectImage.Draw(dc, m_picture_rect); |
| | | } |
| | | |
| | | |
| | | void CReveiwHistoryDlg::OnClickedChkAllDefect() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (m_chkAllDefect.GetCheck()) |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì ë ¬í ê°ì´ 모ë ì´ê¸°í ë©ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkAllDefect.SetCheck(TRUE); |
| | | m_chkReviewDefect.SetCheck(FALSE); |
| | | OnViewAlldefect(); |
| | | } |
| | | else |
| | | { |
| | | m_chkAllDefect.SetCheck(FALSE); |
| | | m_chkReviewDefect.SetCheck(TRUE); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì ë ¬í ê°ì´ 모ë ì´ê¸°í ë©ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkAllDefect.SetCheck(FALSE); |
| | | m_chkReviewDefect.SetCheck(TRUE); |
| | | OnViewReviewdefect(); |
| | | } |
| | | else |
| | | { |
| | | m_chkAllDefect.SetCheck(TRUE); |
| | | m_chkReviewDefect.SetCheck(FALSE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnClickedChkReviewDefect() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (m_chkReviewDefect.GetCheck()) |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì ë ¬í ê°ì´ 모ë ì´ê¸°í ë©ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkAllDefect.SetCheck(FALSE); |
| | | m_chkReviewDefect.SetCheck(TRUE); |
| | | OnViewAlldefect(); |
| | | } |
| | | else |
| | | { |
| | | m_chkAllDefect.SetCheck(TRUE); |
| | | m_chkReviewDefect.SetCheck(FALSE); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì ë ¬í ê°ì´ 모ë ì´ê¸°í ë©ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkAllDefect.SetCheck(TRUE); |
| | | m_chkReviewDefect.SetCheck(FALSE); |
| | | OnViewReviewdefect(); |
| | | } |
| | | else |
| | | { |
| | | m_chkAllDefect.SetCheck(FALSE); |
| | | m_chkReviewDefect.SetCheck(TRUE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnClickedChkMuti() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (m_chkMuti.GetCheck()) |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì íí í목 모ëê° ì§ì ì§ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkSingle.SetCheck(FALSE); |
| | | m_chkMuti.SetCheck(TRUE); |
| | | |
| | | GlassInfoRest(); |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | } |
| | | m_Formation.Clear(); |
| | | m_bFirst = true; |
| | | } |
| | | else |
| | | { |
| | | m_chkSingle.SetCheck(TRUE); |
| | | m_chkMuti.SetCheck(FALSE); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì íí í목 모ëê° ì§ì ì§ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkSingle.SetCheck(TRUE); |
| | | m_chkMuti.SetCheck(FALSE); |
| | | GlassInfoRest(); |
| | | } |
| | | else |
| | | { |
| | | m_chkSingle.SetCheck(FALSE); |
| | | m_chkMuti.SetCheck(TRUE); |
| | | GlassInfoRest(); |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | } |
| | | m_Formation.Clear(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnClickedChkSingle() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | if (m_chkSingle.GetCheck()) |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì íí í목 모ëê° ì§ì ì§ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkMuti.SetCheck(FALSE); |
| | | m_chkSingle.SetCheck(TRUE); |
| | | GlassInfoRest(); |
| | | |
| | | int nRow = 0; |
| | | nRow = m_gridReviewList.GetRowCount(); |
| | | for (int i = 1; i < nRow; i++) |
| | | { |
| | | CGridCellCheck* pCellCheck = NULL; |
| | | pCellCheck = (CGridCellCheck*)m_gridReviewList.GetCell(i, 0); |
| | | pCellCheck->SetCheck(FALSE); |
| | | } |
| | | m_gridReviewList.Refresh(); |
| | | } |
| | | else |
| | | { |
| | | m_chkSingle.SetCheck(FALSE); |
| | | m_chkMuti.SetCheck(TRUE); |
| | | GlassInfoRest(); |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (IDYES == AfxMessageBox(_T("ì íí í목 모ëê° ì§ì ì§ëë¤"), MB_YESNO | MB_ICONWARNING)) |
| | | { |
| | | m_chkMuti.SetCheck(TRUE); |
| | | m_chkSingle.SetCheck(FALSE); |
| | | GlassInfoRest(); |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | m_nCellSizeTemp[i] = m_nCellSize[i]; |
| | | } |
| | | m_bFirst = true; |
| | | } |
| | | else |
| | | { |
| | | m_chkMuti.SetCheck(FALSE); |
| | | m_chkSingle.SetCheck(TRUE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::Imagenoload() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CPaintDC dc(this); |
| | | |
| | | // m_ReviewImage.Destroy(); |
| | | m_DefectImage.Destroy(); |
| | | m_AlignFirst.Destroy(); |
| | | m_AlignSecend.Destroy(); |
| | | |
| | | CString DeftectPath; |
| | | CFileStatus FileOn; |
| | | TCHAR chFilePath[256] = { 0, }; |
| | | GetModuleFileName(NULL, chFilePath, 256); |
| | | CString strFolderPath(chFilePath); |
| | | strFolderPath = strFolderPath.Left(strFolderPath.ReverseFind('\\')); |
| | | |
| | | strFolderPath = strFolderPath + "\\no-image.png"; |
| | | |
| | | strcpy(m_strConfigFile, strFolderPath.GetBuffer(0)); |
| | | |
| | | m_ImageView.SetImageData(m_strConfigFile); |
| | | // m_ReviewImage.Load(strFolderPath); |
| | | m_DefectImage.Load(strFolderPath); |
| | | m_AlignFirst.Load(strFolderPath); |
| | | m_AlignSecend.Load(strFolderPath); |
| | | |
| | | HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), strFolderPath, |
| | | IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); |
| | | |
| | | // InvalidateRect(m_picture_rect, FALSE); |
| | | InvalidateRect(m_picture_rect2, FALSE); |
| | | InvalidateRect(m_Align_rect, FALSE); |
| | | InvalidateRect(m_Align_rect2, FALSE); |
| | | |
| | | dc.SetStretchBltMode(COLORONCOLOR); |
| | | |
| | | m_ImageView.ReDraw(); |
| | | // m_ReviewImage.Draw(dc, m_picture_rect); |
| | | m_DefectImage.Draw(dc, m_picture_rect2); |
| | | m_AlignFirst.Draw(dc, m_Align_rect); |
| | | m_AlignSecend.Draw(dc, m_Align_rect2); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::OnChangeEditFileCount() |
| | | { |
| | | // TODO: RICHEDIT 컨í¸ë¡¤ì¸ ê²½ì°, ì´ ì»¨í¸ë¡¤ì |
| | | // CDialogEx::OnInitDialog() í¨ì를 ì¬ì§ì |
| | | //íê³ ë§ì¤í¬ì OR ì°ì°íì¬ ì¤ì ë ENM_CHANGE íë그를 ì§ì íì¬ CRichEditCtrl().SetEventMask()를 í¸ì¶íì§ ìì¼ë©´ |
| | | // ì´ ì림 ë©ìì§ë¥¼ ë³´ë´ì§ ììµëë¤. |
| | | |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CString strCount; |
| | | m_ctlFileCount.GetWindowText(strCount); |
| | | m_nFileCount = _ttoi(strCount); |
| | | } |
| | | |
| | | BOOL CReveiwHistoryDlg::GetCheckFileLoad(int nCount) |
| | | { |
| | | BOOL bNewFile = TRUE; |
| | | if (nCount == 0) return FALSE; |
| | | |
| | | if (m_vecStrGridReviewPath.size() <= 0) return FALSE; |
| | | |
| | | if (m_vecStrGridReviewPath[nCount - 1] == m_strRawFilePath) bNewFile = FALSE; |
| | | |
| | | if (m_vecStrGridReviewList.size() < 1) return FALSE; |
| | | |
| | | CString strFileName = m_vecStrGridReviewList[nCount - 1]; |
| | | CPathSettingDlg* pReivewSetting = CPathSettingDlg::GetMgr(); |
| | | CString strBinPath; |
| | | strBinPath = pReivewSetting->GetBinPath(); |
| | | |
| | | CgrmGlassRawData RawData; |
| | | |
| | | RawData.ImportGlassRaw(m_Server.GetGlassRawInfo(), NULL); |
| | | |
| | | strcpy(RawData.GetGlassData()->m_strFileName, strFileName.GetBuffer()); |
| | | strcpy(RawData.GetGlassData()->m_strPath, strBinPath.GetBuffer()); |
| | | |
| | | BOOL bRetReadBin = m_pGlassRawMaker->ReadBinFile(&RawData); |
| | | |
| | | if (bRetReadBin == FALSE) |
| | | { |
| | | m_FormationMap.SetAutoScale(); |
| | | LOG(Dbg, _T("[Processe] File Open False")); |
| | | Imagenoload(); |
| | | return FALSE; |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::GlassInfoRest() |
| | | { |
| | | m_Formation.m_vecGlassInfo.clear(); |
| | | |
| | | for (int i = 0; i < 105; i++) |
| | | { |
| | | m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | } |
| | | m_gridGlassInfo.SetRowCount(2); |
| | | m_gridGlassInfo.Invalidate(); |
| | | } |
| | | |
| | | BOOL CReveiwHistoryDlg::MultiSelectCheck(int nSelectCount) |
| | | { |
| | | if (nSelectCount <= 0) return FALSE; |
| | | |
| | | //if (m_Formation.m_vecGlassInfo.size() > MAX_COUNT) return FALSE; |
| | | |
| | | int nDefectSize = 0; |
| | | int nImageSize = 0; |
| | | int nCellSize = 0; |
| | | |
| | | for (int i = 0; i < MAX_COUNT+1; i++) |
| | | { |
| | | nDefectSize += m_nDefectSize[i]; |
| | | nImageSize += m_nImageSize[i]; |
| | | nCellSize += m_nCellSize[i]; |
| | | |
| | | if (nSelectCount == m_nSelectFile[i]) |
| | | { |
| | | for (int j = 0; j < m_Formation.m_vecGlassInfo.size(); j++) |
| | | { |
| | | _akGlassInfo* pGlassInfo = &m_Formation.m_vecGlassInfo[j]; |
| | | |
| | | if (pGlassInfo->m_nGlassSelect == m_nSelectFile[i]) |
| | | { |
| | | m_Formation.m_vecGlassInfo.erase(m_Formation.m_vecGlassInfo.begin() + j); |
| | | |
| | | if (i == 0) |
| | | { |
| | | m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[i]); |
| | | m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[i]); |
| | | m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin(), m_FormationMap.m_vecCellRect.begin() + m_nCellSize[i]); |
| | | m_nCellSize[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | } |
| | | else if (i != 0 && m_nDefectSize[i] == 0) |
| | | { |
| | | |
| | | } |
| | | else if (i != 0 && m_nDefectSize[i] > 0) |
| | | { |
| | | if (m_Formation.m_vecDefects.size() == nDefectSize) |
| | | { |
| | | m_Formation.m_vecDefects.clear(); |
| | | //m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[i]); |
| | | } |
| | | // else |
| | | // { |
| | | // m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin() + nDefectSize-1, m_Formation.m_vecDefects.begin() + nDefectSize-1 + m_nDefectSize[i]); |
| | | // } |
| | | if (m_Formation.m_vecImage.size() == nImageSize) |
| | | { |
| | | m_Formation.m_vecImage.clear(); |
| | | //m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[i]); |
| | | } |
| | | // else |
| | | // { |
| | | // m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin() + nImageSize-1, m_Formation.m_vecImage.begin() + nImageSize-1 + m_nImageSize[i]); |
| | | // } |
| | | if (m_FormationMap.m_vecCellRect.size() == nCellSize) |
| | | { |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | //m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin(), m_FormationMap.m_vecCellRect.begin() + m_nCellSize[i]); |
| | | } |
| | | // else |
| | | // { |
| | | // m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin() + nCellSize, m_FormationMap.m_vecCellRect.begin() + nCellSize + m_nCellSize[i]); |
| | | // } |
| | | |
| | | int nCellCount = 0; |
| | | int nDefectCount = 0; |
| | | int nImageCount = 0; |
| | | |
| | | /* int nCount = 0;*/ |
| | | int nCellCount2 = m_nCellSize[i]; |
| | | int nDefectCount2 = m_nDefectSize[i]; |
| | | int nImageCount2 = m_nImageSize[i]; |
| | | |
| | | int nCellCount3 = 0; |
| | | int nDefectCount3 = 0; |
| | | int nImageCount3 = 0; |
| | | |
| | | |
| | | m_nCellSize[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | |
| | | |
| | | |
| | | for (int k = 0; k < MAX_COUNT; k++) |
| | | { |
| | | // if (m_nCellSize[k] != 0) |
| | | // { |
| | | // nCount++; |
| | | // } |
| | | nCellCount = m_nCellSize[k]; |
| | | nDefectCount = m_nDefectSize[k]; |
| | | nImageCount = m_nImageSize[k]; |
| | | |
| | | if (k == 0) |
| | | { |
| | | nCellCount3 = 0; |
| | | nDefectCount3 = 0; |
| | | nImageCount3 = 0; |
| | | } |
| | | else |
| | | { |
| | | nCellCount3 += m_nCellSize[k]; |
| | | nDefectCount3 += m_nDefectSize[k]; |
| | | nImageCount3 += m_nImageSize[k]; |
| | | } |
| | | } |
| | | |
| | | m_Formation.m_vecDefects.clear(); |
| | | for (int j = 0; j < nDefectSize - nDefectCount2; j++) |
| | | { |
| | | _akDefect *pDefectInfo = &m_Formation.m_vecTempDefects[j]; |
| | | double dDefectPosX = pDefectInfo->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefectInfo->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | m_Formation.m_vecDefects[j] = m_Formation.m_vecTempDefects[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | if (m_nDefectSize[i + 1] != 0) |
| | | { |
| | | int nCount = m_Formation.m_vecDefects.size(); |
| | | for (int j = 0; j < m_Formation.m_vecTempDefects.size() - nDefectSize; j++) |
| | | { |
| | | _akDefect *pDefectInfo = &m_Formation.m_vecTempDefects[nDefectSize + j]; |
| | | double dDefectPosX = pDefectInfo->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefectInfo->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | m_Formation.m_vecDefects[nCount + j] = m_Formation.m_vecTempDefects[nDefectSize +j]; |
| | | } |
| | | } |
| | | |
| | | m_Formation.m_vecImage.clear(); |
| | | for (int j = 0; j < nImageSize - nImageCount2; j++) |
| | | { |
| | | m_Formation.AddDefectImage(); |
| | | m_Formation.m_vecImage[j] = m_Formation.m_vecTempImage[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | if (m_nImageSize[i + 1] != 0) |
| | | { |
| | | int nCount = m_Formation.m_vecImage.size(); |
| | | for (int j = 0; j < m_Formation.m_vecTempImage.size() - nImageSize; j++) |
| | | { |
| | | m_Formation.AddDefectImage(); |
| | | m_Formation.m_vecImage[nCount + j] = m_Formation.m_vecTempImage[nImageSize + j]; |
| | | } |
| | | } |
| | | |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | for (int j = 0; j < nCellSize - nCellCount2; j++) |
| | | { |
| | | m_FormationMap.AddCell(); |
| | | m_FormationMap.m_vecCellRect[j] = m_FormationMap.m_vecTempCellRect[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | |
| | | if (m_nCellSize[i + 1] != 0) |
| | | { |
| | | int nCount = m_FormationMap.m_vecCellRect.size(); |
| | | for (int j = 0; j < m_FormationMap.m_vecTempCellRect.size() - nCellSize; j++) |
| | | { |
| | | m_FormationMap.AddCell(); |
| | | m_FormationMap.m_vecCellRect[nCount + j] = m_FormationMap.m_vecTempCellRect[nCellSize + j]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | m_nSelectFile[i] = 0; |
| | | |
| | | // for (int i = 0; i < MAX_COUNT + 1; i++) |
| | | // { |
| | | // for (int iCol = 0; iCol < m_gridReviewList.GetColumnCount(); iCol++) |
| | | // { |
| | | // m_gridReviewList.SetItemState(m_nSelectFile[i], iCol, LVIS_SELECTED); |
| | | // } |
| | | // } |
| | | // |
| | | // m_gridReviewList.Invalidate(); |
| | | |
| | | // int nSelect = i; |
| | | // bool bMax = false; |
| | | // for (nSelect; nSelect < MAX_COUNT; nSelect++) |
| | | // { |
| | | // m_nSelectFile[nSelect] = m_nSelectFile[nSelect + 1]; |
| | | // bMax = true; |
| | | // } |
| | | // if (bMax) |
| | | // { |
| | | // m_nSelectFile[nSelect] = 0; |
| | | // } |
| | | // m_nDefectSize[i] = 0; |
| | | // m_nImageSize[i] = 0; |
| | | /* m_nCellSize[i] = 0;*/ |
| | | // for (j = 0; j < MAX_COUNT; j++) |
| | | // { |
| | | // if (i <= j) |
| | | // { |
| | | // m_nCellSize[j] = m_nCellSize[j + 1]; |
| | | // } |
| | | // } |
| | | AddVecCellSorting(0); |
| | | AddVecDateSorting(0); |
| | | m_gridGlassInfo.SetRowCount(m_Formation.m_vecGlassInfo.size() + 1); |
| | | m_gridDefectInfo.SetRowCount(m_Formation.m_vecDefects.size() + 1); |
| | | m_FormationMap.ReDraw(TRUE); |
| | | return FALSE; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (m_Formation.m_vecGlassInfo.size() >= MAX_COUNT + 1) // 1 base |
| | | { |
| | | m_Formation.m_vecGlassInfo.erase(m_Formation.m_vecGlassInfo.begin()); |
| | | |
| | | if (m_nDefectSize[0] != 0) |
| | | { |
| | | m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[0]); |
| | | } |
| | | if (m_nImageSize[0] != 0) |
| | | { |
| | | m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[0]); |
| | | } |
| | | if (m_nCellSize[0] != 0) |
| | | { |
| | | m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin(), m_FormationMap.m_vecCellRect.begin() + m_nCellSize[0]); |
| | | } |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | int CReveiwHistoryDlg::MultiInsert(int nSelectCount, int nDataCount) |
| | | { |
| | | if (nSelectCount <= 0) return FALSE; |
| | | |
| | | //if (m_Formation.m_vecGlassInfo.size() > MAX_COUNT) return FALSE; |
| | | |
| | | if (m_Formation.m_vecGlassInfo.size() >= MAX_COUNT+1) //1base |
| | | { |
| | | m_Formation.m_vecGlassInfo.erase(m_Formation.m_vecGlassInfo.begin()); |
| | | |
| | | if (m_nDefectSize[0] != 0) |
| | | { |
| | | m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[0]); |
| | | } |
| | | if (m_nImageSize[0] != 0) |
| | | { |
| | | m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[0]); |
| | | } |
| | | if (m_nCellSize[0] != 0) |
| | | { |
| | | m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin(), m_FormationMap.m_vecCellRect.begin() + m_nCellSize[0]); |
| | | } |
| | | } |
| | | |
| | | int nDefectSize = 0; |
| | | int nImageSize = 0; |
| | | int nCellSize = 0; |
| | | |
| | | for (int i = 0; i < MAX_COUNT; i++) |
| | | { |
| | | nDefectSize += m_nDefectSize[i]; |
| | | nImageSize += m_nImageSize[i]; |
| | | nCellSize += m_nCellSize[i]; |
| | | |
| | | if (nSelectCount == m_nSelectFile[i]) |
| | | { |
| | | for (int j = 0; j < m_Formation.m_vecGlassInfo.size(); j++) |
| | | { |
| | | _akGlassInfo* pGlassInfo = &m_Formation.m_vecGlassInfo[j]; |
| | | |
| | | if (pGlassInfo->m_nGlassSelect == m_nSelectFile[i]) |
| | | { |
| | | m_Formation.m_vecGlassInfo.erase(m_Formation.m_vecGlassInfo.begin() + j); |
| | | |
| | | if (i == 0) |
| | | { |
| | | m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[i]); |
| | | m_Formation.m_vecDefects.clear(); |
| | | m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[i]); |
| | | m_Formation.m_vecImage.clear(); |
| | | m_FormationMap.m_vecCellRect.erase(m_FormationMap.m_vecCellRect.begin(), m_FormationMap.m_vecCellRect.begin() + m_nCellSize[i]); |
| | | |
| | | if (m_bDefectAll == false && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefct2(nDataCount/*, nCount*/); |
| | | } |
| | | else if (m_bDefectAll == true && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefectAll2(nDataCount/*, nCount*/); |
| | | } |
| | | } |
| | | else if (i != 0 && m_nDefectSize[i] == 0) |
| | | { |
| | | if (m_bDefectAll == false && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefct2(nDataCount/*, nCount*/); |
| | | } |
| | | else if (m_bDefectAll == true && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefectAll2(nDataCount/*, nCount*/); |
| | | } |
| | | } |
| | | else if (i != 0 && m_nDefectSize[i] > 0) |
| | | { |
| | | if (m_Formation.m_vecDefects.size() == nDefectSize) |
| | | { |
| | | m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin(), m_Formation.m_vecDefects.begin() + m_nDefectSize[i]); |
| | | } |
| | | // else |
| | | // { |
| | | Sleep(1); |
| | | //nê° ê¹ì§ë§ ë³µì¬ íë¤. í´ë¦¬ì´ í ì |
| | | m_Formation.m_vecDefects.clear(); |
| | | for (int j = 0; j < nDefectSize-m_nDefectSize[i]; j++) |
| | | { |
| | | _akDefect *pDefectInfo = &m_Formation.m_vecTempDefects[j]; |
| | | double dDefectPosX = pDefectInfo->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefectInfo->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | m_Formation.m_vecDefects[j] = m_Formation.m_vecTempDefects[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | //ìì±ë ëíì ì¶ê° íë¤ |
| | | if (m_bDefectAll == false && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefct2(nDataCount/*, nCount*/); |
| | | } |
| | | else if (m_bDefectAll == true && !m_chkSingle.GetCheck()) |
| | | { |
| | | AddVecDataDefectAll2(nDataCount/*, nCount*/); |
| | | } |
| | | |
| | | // Sleep(1); |
| | | // |
| | | // //ì¶ê°í ëí ë¤ì ë¶ì¬ ë£ëë¤ |
| | | // if (m_nDefectSize[i + 1] != 0) |
| | | // { |
| | | // for (int j = 0; j < m_nDefectSize[i + 1]; j++) |
| | | // { |
| | | // int nCount = m_nDefectSize[i - 1]; |
| | | // _akDefect *pDefectInfo = &m_Formation.m_vecTempDefects[nDefectSize + j]; |
| | | // double dDefectPosX = pDefectInfo->m_nUMCenterAlignX / 1000.0; |
| | | // double dDefectPosY = pDefectInfo->m_nUMCenterAlignY / 1000.0; |
| | | // |
| | | // m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | // m_Formation.m_vecDefects[nCount + j] = m_Formation.m_vecTempDefects[nDefectSize + j]; |
| | | // } |
| | | // } |
| | | |
| | | Sleep(1); |
| | | m_Formation.m_vecImage.clear(); |
| | | for (int j = 0; j < nImageSize - m_nImageSize[i]; j++) |
| | | { |
| | | m_Formation.AddDefectImage(); |
| | | m_Formation.m_vecImage[j] = m_Formation.m_vecTempImage[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | if (m_nImageSize[i + 1] != 0) |
| | | { |
| | | int nSize = m_Formation.m_vecTempImage.size() - m_Formation.m_vecImage.size(); |
| | | //ìì ë¶í° ëê¹ì§ ë³µì¬ë¥¼ íë¤ |
| | | for (int j = 0; j < nSize; j++) |
| | | { |
| | | int nCount = m_nImageSize[i - 1]; |
| | | |
| | | m_Formation.AddDefectImage(); |
| | | m_Formation.m_vecImage[nCount + j] = m_Formation.m_vecTempImage[nCount + j]; |
| | | } |
| | | } |
| | | |
| | | Sleep(1); |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | for (int j = 0; j < nCellSize - m_nCellSize[i]; j++) |
| | | { |
| | | m_FormationMap.AddCell(); |
| | | m_FormationMap.m_vecCellRect[j] = m_FormationMap.m_vecTempCellRect[j]; |
| | | //ëí ìì í¬ê¸° ë§í¼ë§ ë³µì¬ íë¤ |
| | | } |
| | | if (m_nCellSize[i + 1] != 0) |
| | | { |
| | | int nSize = m_FormationMap.m_vecTempCellRect.size() - m_FormationMap.m_vecCellRect.size(); |
| | | for (int j = 0; j < nSize; j++) |
| | | { |
| | | int nCount = m_nCellSize[i - 1]; |
| | | |
| | | m_FormationMap.AddCell(); |
| | | m_FormationMap.m_vecCellRect[nCount + j] = m_FormationMap.m_vecTempCellRect[nCount + j]; |
| | | //m_FormationMap.m_vecCellRect[nCount + j] = m_FormationMap.m_vecTempCellRect[nCellSize + j]; |
| | | } |
| | | } |
| | | |
| | | //m_Formation.m_vecDefects.erase(m_Formation.m_vecDefects.begin() + nDefectSize, m_Formation.m_vecDefects.begin() + nDefectSize + m_nDefectSize[i]); |
| | | |
| | | // if (m_Formation.m_vecImage.size() == nImageSize) |
| | | // { |
| | | // m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin(), m_Formation.m_vecImage.begin() + m_nImageSize[i]); |
| | | // } |
| | | // else |
| | | // { |
| | | // m_Formation.m_vecImage.erase(m_Formation.m_vecImage.begin() + nImageSize, m_Formation.m_vecImage.begin() + nImageSize + m_nImageSize[i]); |
| | | // } |
| | | } |
| | | |
| | | //m_nSelectFile[i] = 0; |
| | | m_nDefectSize[i] = 0; |
| | | m_nImageSize[i] = 0; |
| | | m_nCellSize[i] = 0; |
| | | // for (j = 0; j < MAX_COUNT; j++) |
| | | // { |
| | | // if (i <= j) |
| | | // { |
| | | // m_nCellSize[j] = m_nCellSize[j + 1]; |
| | | // } |
| | | // } |
| | | |
| | | if (m_Formation.m_vecGlassInfo.size() > 0) |
| | | { |
| | | m_gridGlassInfo.SetRowCount(m_Formation.m_vecGlassInfo.size() + 1); |
| | | m_gridDefectInfo.SetRowCount(m_Formation.m_vecDefects.size() + 1); |
| | | return i; |
| | | } |
| | | else |
| | | { |
| | | m_gridGlassInfo.SetRowCount(2); |
| | | m_gridDefectInfo.SetRowCount(2); |
| | | return i; |
| | | } |
| | | return i; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // if (m_bDefectAll == false && !m_chkSingle.GetCheck()) |
| | | // { |
| | | // AddVecDataDefct2(nDataCount/*, nCount*/); |
| | | // } |
| | | // else if (m_bDefectAll == true && !m_chkSingle.GetCheck()) |
| | | // { |
| | | // AddVecDataDefectAll2(nDataCount/*, nCount*/); |
| | | // } |
| | | return -1; |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::InitSelectGlass(int nSelectCount) |
| | | { |
| | | int nCountMax = MAX_COUNT+1; |
| | | bool bMax = false; |
| | | for (int i = 0; i < MAX_COUNT+1; i++) |
| | | { |
| | | if (nSelectCount != m_nSelectFile[i] && m_nSelectFile[i] == 0) |
| | | { |
| | | if (!GetCheckFileLoad(nSelectCount)) return; |
| | | m_nSelectFile[i] = nSelectCount; |
| | | bMax = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!bMax) |
| | | { |
| | | for (int j = 0; j < MAX_COUNT; j++) |
| | | { |
| | | if (!GetCheckFileLoad(nSelectCount)) return; |
| | | m_nSelectFile[j] = m_nSelectFile[j + 1]; |
| | | } |
| | | m_nSelectFile[MAX_COUNT] = nSelectCount; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDataImage(int nDataCount) |
| | | { |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | _grmGlassData* pGlass = m_Server.GetGlassData(); |
| | | |
| | | CString strTemp; |
| | | int nInfoCount = 0; |
| | | |
| | | CString strReviewImageName; |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | if (strReviewImageName == "" || strReviewImageName == "*") |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | m_Formation.AddDefectImage(); |
| | | SetImageCount(); |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecImage[m_Formation.m_vecImage.size() - 1]; |
| | | |
| | | pImageInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | strcpy(pImageInfo->m_strAoiImageName, pDefect->m_strAoiImageName); |
| | | pImageInfo->m_nDefectIdx = pDefect->m_nDefectIdx; |
| | | pImageInfo->m_strReviewImageName = strReviewImageName; |
| | | |
| | | strcpy(pImageInfo->m_strAoiImagePath, pDefect->m_strAoiImagePath); |
| | | strcpy(pImageInfo->m_strReviewImagePath, pDefect->m_ReviewDefect.m_strRevImagePath); |
| | | strcpy(pImageInfo->m_strAlignFirst, pGlass->m_strAlignFirst); |
| | | strcpy(pImageInfo->m_strAlignSecond, pGlass->m_strAlignSecond); |
| | | pImageInfo->m_strGlassID = pGlass->m_strGlassID; |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDataDefct(int nDataCount) |
| | | { |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | |
| | | int nInfoCount = 0; |
| | | |
| | | CString strReviewImageName; |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | if (strReviewImageName == "" || strReviewImageName == "*") |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | SetDefectCount(); |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | |
| | | pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | pDefectInfo->m_nShotIdx = pDefect->m_ReviewDefect.m_nShotIndex; |
| | | pDefectInfo->m_nModelIdx = pDefect->m_ReviewDefect.m_nModuleIndex; |
| | | |
| | | for (int j = 0; j < nInfoCount; j++) pDefectInfo->m_strInfos[j].Trim(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDataDefectAll(int nDataCount) |
| | | { |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | int nInfoCount = 0; |
| | | |
| | | double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | SetDefectCount(); |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | |
| | | pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | |
| | | CString strReviewImageName; |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | if (strReviewImageName == "" || strReviewImageName == "*") |
| | | { |
| | | pDefectInfo->m_nShotIdx = -1; |
| | | pDefectInfo->m_nModelIdx = -1; |
| | | } |
| | | else |
| | | { |
| | | pDefectInfo->m_nShotIdx = pDefect->m_ReviewDefect.m_nShotIndex; |
| | | pDefectInfo->m_nModelIdx = pDefect->m_ReviewDefect.m_nModuleIndex; |
| | | } |
| | | |
| | | |
| | | for (int j = 0; j < nInfoCount; j++) pDefectInfo->m_strInfos[j].Trim(); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDataDefct2(int nDataCount/*, int nRawCount*/) |
| | | { |
| | | // int nCount = MultiInsert(m_nCount, nDataCount); |
| | | |
| | | // if(nCount < 0) return; |
| | | // |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | |
| | | int nInfoCount = 0; |
| | | |
| | | CString strReviewImageName; |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | if (strReviewImageName == "" || strReviewImageName == "*") |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | SetDefectCount(); |
| | | |
| | | _akDefect* pDefectInfo = NULL; |
| | | |
| | | // if (nCount == 0) |
| | | // { |
| | | pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | // } |
| | | // else |
| | | // { |
| | | // //ì¤ê°ì ê° ì½ì
|
| | | // pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | // //pDefectInfo = &m_Formation.m_vecDefects[nCount + i]; |
| | | // } |
| | | |
| | | pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | |
| | | for (int j = 0; j < nInfoCount; j++) pDefectInfo->m_strInfos[j].Trim(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDataDefectAll2(int nDataCount/*, int nRawCount*/) |
| | | { |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | |
| | | int nInfoCount = 0; |
| | | |
| | | CString strReviewImageName; |
| | | strReviewImageName = pDefect->m_ReviewDefect.m_strRevImageName; |
| | | |
| | | double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | SetDefectCount(); |
| | | |
| | | _akDefect* pDefectInfo = NULL; |
| | | |
| | | pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | |
| | | pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | |
| | | for (int j = 0; j < nInfoCount; j++) pDefectInfo->m_strInfos[j].Trim(); |
| | | } |
| | | |
| | | // for (int i = 0; i < nDataCount; i++) |
| | | // { |
| | | // _grmDefectData* pDefect = m_Server.GetDefectData(i); |
| | | // int nInfoCount = 0; |
| | | // |
| | | // double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | // double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | // |
| | | // m_Formation.AddDefect(dDefectPosX, dDefectPosY); |
| | | // SetDefectCount(); |
| | | // |
| | | // _akDefect* pDefectInfo = NULL; |
| | | // |
| | | // // if (nCount == 0) |
| | | // // { |
| | | // pDefectInfo = &m_Formation.m_vecDefects[m_Formation.m_vecDefects.size() - 1]; |
| | | // // } |
| | | // // else |
| | | // // { |
| | | // // pDefectInfo = &m_Formation.m_vecDefects[nCount + i]; |
| | | // // } |
| | | // |
| | | // //m_Formation.m_vecDefects.insert(m_Formation.m_vecDefects.begin() + 1400, pDefect->m_nDefectID); |
| | | // |
| | | // pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | // pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | // strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | // strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | // pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | // pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | // pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | // pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | // pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | // pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | // memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | // pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | // pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | // pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | // pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | // strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | // pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | // pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | // pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | // pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | // pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | // pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | // pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | // pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | // pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | // pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | // pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | // pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | // |
| | | // for (int j = 0; j < nInfoCount; j++) pDefectInfo->m_strInfos[j].Trim(); |
| | | // } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecGlassData(int nCount) |
| | | { |
| | | m_Formation.AddGlassInfo(); |
| | | |
| | | _grmGlassData* pGlass = m_Server.GetGlassData(); |
| | | _akGlassInfo* pGlassInfo = &m_Formation.m_vecGlassInfo[m_Formation.m_vecGlassInfo.size() - 1]; |
| | | |
| | | pGlassInfo->m_nGlassSelect = nCount; |
| | | pGlassInfo->m_strPPID = pGlass->m_strPPID; |
| | | pGlassInfo->m_strGlassID = pGlass->m_strGlassID; |
| | | pGlassInfo->m_nDefectNum = pGlass->m_nDefectNum; |
| | | pGlassInfo->m_nReviewNum = GetImageCount(); |
| | | pGlassInfo->m_strGlassJudge = pGlass->m_strGlassJudge; |
| | | pGlassInfo->m_strLotID = pGlass->m_strLotID; |
| | | pGlassInfo->m_strSLotID = pGlass->m_strSLotID; |
| | | pGlassInfo->m_nSlot_No = pGlass->m_nSlot_No; |
| | | pGlassInfo->m_nCellNum = pGlass->m_nCellNum; |
| | | pGlassInfo->m_nGlassSizeHeight = pGlass->m_nGlassSizeHeight; |
| | | pGlassInfo->m_nGlassSizeWidth = pGlass->m_nGlassSizeWidth; |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecCellData(int nCellCount) |
| | | { |
| | | for (int i = 0; i < nCellCount; i++) |
| | | { |
| | | SetCellCount(); |
| | | CakRectd rectCell; |
| | | _grmCellData* pCellData = m_Server.GetCellData(i); |
| | | rectCell.left = pCellData->m_rectCellLeft / 1000.0; |
| | | rectCell.top = pCellData->m_rectCellTop / 1000.0; |
| | | rectCell.right = pCellData->m_rectCellRight / 1000.0; |
| | | rectCell.bottom = pCellData->m_rectCellBottom / 1000.0; |
| | | m_FormationMap.m_vecCellRect.push_back(rectCell); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SortListDefect(int nCol) |
| | | { |
| | | if (nCol == 0) |
| | | return; |
| | | |
| | | /* if (m_pDefectFormation == NULL) return;*/ |
| | | |
| | | m_bAsending = !m_bAsending; |
| | | |
| | | _akDefect *pDefect; |
| | | std::vector< std::pair<CString, _akDefect*> > vecString; |
| | | std::vector< std::pair<double, _akDefect*> > vecValue; |
| | | CString strValue; |
| | | double dValue; |
| | | short sValue[16]; |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecTempDefects.size(); i++) |
| | | { |
| | | pDefect = &m_Formation.m_vecTempDefects[i]; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 1: dValue = pDefect->m_nDefectID; break; |
| | | case 2: dValue = pDefect->m_sDefectLoc; break; |
| | | case 3: strValue = pDefect->m_strDefectType; break; |
| | | case 4: strValue = pDefect->m_strDefectCode; break; |
| | | case 5: dValue = pDefect->m_DefectType; break; |
| | | case 6: dValue = pDefect->m_DefectSubType; break; |
| | | case 7: dValue = pDefect->m_nDefectRScale; break; |
| | | case 8: dValue = pDefect->m_nUMSizeX; break; |
| | | case 9: dValue = pDefect->m_nUMSizeY; break; |
| | | case 10: dValue = pDefect->m_nUMSize; break; |
| | | //case 11: memcpy(sValue, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); break; |
| | | case 12: dValue = pDefect->m_nLevelSrcMax; break; |
| | | case 13: dValue = pDefect->m_nLevelSrcMin; break; |
| | | case 14: dValue = pDefect->m_nLevelSrcAvg; break; |
| | | case 15: dValue = pDefect->m_sDefectPeak; break; |
| | | case 16: strValue = pDefect->m_strStackFirst; break; |
| | | case 17: dValue = pDefect->m_nCameraID; break; |
| | | case 18: dValue = pDefect->m_nScanIdx; break; |
| | | case 19: dValue = pDefect->m_nLevelRefMax; break; |
| | | case 20: dValue = pDefect->m_nLevelRefMin; break; |
| | | case 21: dValue = pDefect->m_nLevelRefAvg; break; |
| | | case 22: dValue = pDefect->m_nUMCenterAlignX; break; |
| | | case 23: dValue = pDefect->m_nUMCenterAlignY; break; |
| | | case 24: dValue = pDefect->m_nUMCellX; break; |
| | | case 25: dValue = pDefect->m_nUMCellY; break; |
| | | case 26: dValue = pDefect->m_nScratchRatio; break; |
| | | case 27: dValue = pDefect->m_nDensity; break; |
| | | case 28: dValue = pDefect->m_bMergeState; break; |
| | | } |
| | | |
| | | if (strValue.IsEmpty() == FALSE) vecString.push_back(std::make_pair(strValue, pDefect)); |
| | | else vecValue.push_back(std::make_pair(dValue, pDefect)); |
| | | } |
| | | |
| | | if (!vecString.empty()) |
| | | { |
| | | if (m_bAsending == TRUE) //ì¤ë¦ ì°¨ì |
| | | std::sort(vecString.begin(), vecString.end(), std::greater< std::pair<CString, _akDefect*> >()); |
| | | else //ë´ë¦¼ ì°¨ì |
| | | std::sort(vecString.begin(), vecString.end(), std::less< std::pair<CString, _akDefect*> >()); |
| | | |
| | | m_Formation.m_vecDefects.clear(); |
| | | std::vector< std::pair<CString, _akDefect*> >::iterator itVec; |
| | | |
| | | for (itVec = vecString.begin(); itVec != vecString.end(); ++itVec) |
| | | { |
| | | m_Formation.m_vecDefects.push_back(*itVec->second); |
| | | } |
| | | } |
| | | else//if (!vecString.empty()) |
| | | { |
| | | if (m_bAsending == TRUE) |
| | | std::sort(vecValue.begin(), vecValue.end(), std::greater< std::pair<double, _akDefect*> >()); |
| | | else |
| | | std::sort(vecValue.begin(), vecValue.end(), std::less< std::pair<double, _akDefect*> >()); |
| | | |
| | | m_Formation.m_vecDefects.clear(); |
| | | std::vector< std::pair<double, _akDefect*> >::iterator itVec; |
| | | |
| | | for (itVec = vecValue.begin(); itVec != vecValue.end(); ++itVec) |
| | | { |
| | | m_Formation.m_vecDefects.push_back(*itVec->second); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecDateSorting(int nDataCount) |
| | | { |
| | | m_Formation.m_vecTempDefects.clear(); |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecDefects.size(); i++) |
| | | { |
| | | _akDefect* pDefect = &m_Formation.m_vecDefects[i]; |
| | | |
| | | double dDefectPosX = pDefect->m_nUMCenterAlignX / 1000.0; |
| | | double dDefectPosY = pDefect->m_nUMCenterAlignY / 1000.0; |
| | | |
| | | m_Formation.AddDefectTemp(dDefectPosX, dDefectPosY); |
| | | _akDefect* pDefectInfo = &m_Formation.m_vecTempDefects[i]; |
| | | |
| | | pDefectInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | pDefectInfo->m_sDefectLoc = pDefect->m_sDefectLoc; |
| | | strcpy(pDefectInfo->m_strDefectType, pDefect->m_strDefectType); |
| | | strcpy(pDefectInfo->m_strDefectCode, pDefect->m_strDefectCode); |
| | | pDefectInfo->m_DefectType = pDefect->m_DefectType; |
| | | pDefectInfo->m_DefectSubType = pDefect->m_DefectSubType; |
| | | pDefectInfo->m_nDefectRScale = pDefect->m_nDefectRScale; |
| | | pDefectInfo->m_nUMSizeX = pDefect->m_nUMSizeX; |
| | | pDefectInfo->m_nUMSizeY = pDefect->m_nUMSizeY; |
| | | pDefectInfo->m_nUMSize = pDefect->m_nUMSize; |
| | | memcpy(pDefectInfo->m_sZonePixelCount, pDefect->m_sZonePixelCount, sizeof(pDefect->m_sZonePixelCount)); |
| | | pDefectInfo->m_nLevelSrcMax = pDefect->m_nLevelSrcMax; |
| | | pDefectInfo->m_nLevelSrcMin = pDefect->m_nLevelSrcMin; |
| | | pDefectInfo->m_nLevelSrcAvg = pDefect->m_nLevelSrcAvg; |
| | | pDefectInfo->m_sDefectPeak = pDefect->m_sDefectPeak; |
| | | strcpy(pDefectInfo->m_strStackFirst, pDefect->m_strStackFirst); |
| | | pDefectInfo->m_nCameraID = pDefect->m_nCameraID; |
| | | pDefectInfo->m_nScanIdx = pDefect->m_nScanIdx; |
| | | pDefectInfo->m_nLevelRefMax = pDefect->m_nLevelRefMax; |
| | | pDefectInfo->m_nLevelRefMin = pDefect->m_nLevelRefMin; |
| | | pDefectInfo->m_nLevelRefAvg = pDefect->m_nLevelRefAvg; |
| | | pDefectInfo->m_nUMCenterAlignX = pDefect->m_nUMCenterAlignX; |
| | | pDefectInfo->m_nUMCenterAlignY = pDefect->m_nUMCenterAlignY; |
| | | pDefectInfo->m_nUMCellX = pDefect->m_nUMCellX; |
| | | pDefectInfo->m_nUMCellY = pDefect->m_nUMCellY; |
| | | pDefectInfo->m_nScratchRatio = pDefect->m_nScratchRatio; |
| | | pDefectInfo->m_nDensity = pDefect->m_nDensity; |
| | | pDefectInfo->m_bMergeState = pDefect->m_bMergeState; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecImageSorting(int nDataCount) |
| | | { |
| | | m_Formation.m_vecTempImage.clear(); |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecImage.size(); i++) |
| | | { |
| | | _akReviewList* pDefect = &m_Formation.m_vecImage[i]; |
| | | |
| | | m_Formation.AddDefectImageTemp(); |
| | | |
| | | _akReviewList* pImageInfo = &m_Formation.m_vecTempImage[i]; |
| | | |
| | | pImageInfo->m_nDefectID = pDefect->m_nDefectID; |
| | | strcpy(pImageInfo->m_strAoiImageName, pDefect->m_strAoiImageName); |
| | | pImageInfo->m_nDefectIdx = pDefect->m_nDefectIdx; |
| | | pImageInfo->m_strReviewImageName = pDefect->m_strReviewImageName; |
| | | |
| | | strcpy(pImageInfo->m_strAoiImagePath, pDefect->m_strAoiImagePath); |
| | | strcpy(pImageInfo->m_strReviewImagePath, pDefect->m_strReviewImagePath); |
| | | |
| | | strcpy(pImageInfo->m_strAlignFirst, pDefect->m_strAlignFirst); |
| | | strcpy(pImageInfo->m_strAlignSecond, pDefect->m_strAlignSecond); |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::AddVecCellSorting(int nCellCount) |
| | | { |
| | | m_FormationMap.m_vecTempCellRect.clear(); |
| | | |
| | | for (int i = 0; i < m_FormationMap.m_vecCellRect.size(); i++) |
| | | { |
| | | m_FormationMap.AddCellData(); |
| | | m_FormationMap.m_vecTempCellRect[i] = m_FormationMap.m_vecCellRect[i]; |
| | | } |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SelectCell(int nDataCount) |
| | | { |
| | | m_FormationMap.m_vecCellRect.clear(); |
| | | |
| | | if (nDataCount < 1) return; |
| | | |
| | | int nCellCount = 0; |
| | | int nCount = 0; |
| | | int nCount2 = 0; |
| | | int nCount3 = 0; |
| | | |
| | | if (nCount == nDataCount) return; |
| | | |
| | | if (m_Formation.m_vecGlassInfo.size() == 0) return; |
| | | |
| | | _akGlassInfo* pGlass2 = &m_Formation.m_vecGlassInfo[nDataCount-1]; |
| | | |
| | | nCount2 = pGlass2->m_nCellNum; |
| | | |
| | | for (int i = 0; i < nDataCount; i++) |
| | | { |
| | | if (i == 0) |
| | | { |
| | | nCount3 = 0; |
| | | } |
| | | else |
| | | { |
| | | _akGlassInfo* pGlass = &m_Formation.m_vecGlassInfo[i-1]; |
| | | nCount3 += pGlass->m_nCellNum; |
| | | } |
| | | } |
| | | |
| | | CakRectd rectCell; |
| | | |
| | | if (m_FormationMap.m_vecTempCellRect.size() - 1 < nCount3) return; |
| | | |
| | | for (int i = 0; i < nCount2; i++) |
| | | { |
| | | CakRectd* pCellData = &m_FormationMap.m_vecTempCellRect[nCount3 + i]; |
| | | rectCell.left = pCellData->left; |
| | | rectCell.top = pCellData->top; |
| | | rectCell.right = pCellData->right; |
| | | rectCell.bottom = pCellData->bottom; |
| | | m_FormationMap.m_vecCellRect.push_back(rectCell); |
| | | } |
| | | |
| | | // for (int i = 0; i < MAX_COUNT+1; i++) |
| | | // { |
| | | // if (nCount == nDataCount) break; |
| | | // |
| | | // if (m_nCellSize[i] != 0) |
| | | // { |
| | | // nCount++; |
| | | // } |
| | | // nCellCount = m_nCellSize[i]; |
| | | // nCount2 = i; |
| | | // |
| | | // if (i == 0) |
| | | // { |
| | | // nCount3 = 0; |
| | | // } |
| | | // else |
| | | // { |
| | | // nCount3 += m_nCellSize[i-1]; |
| | | // } |
| | | // } |
| | | m_FormationMap.ReDraw(TRUE); |
| | | } |
| | | |
| | | void CReveiwHistoryDlg::SortFileList(int nCol) |
| | | { |
| | | if (nCol == 0) |
| | | return; |
| | | |
| | | _akReviewHeader *pReviewHeader; |
| | | std::vector< std::pair<CString, _akReviewHeader*> > vecString; |
| | | std::vector< std::pair<double, _akReviewHeader*> > vecValue; |
| | | CString strValue; |
| | | double dValue; |
| | | short sValue[16]; |
| | | |
| | | for (int i = 0; i < m_Formation.m_vecHeaderTemp.size(); i++) |
| | | { |
| | | pReviewHeader = &m_Formation.m_vecHeaderTemp[i]; |
| | | |
| | | switch (nCol) |
| | | { |
| | | case 1: strValue = pReviewHeader->m_strFileTime; break; |
| | | case 2: strValue = pReviewHeader->m_strLoading; break; |
| | | case 3: strValue = pReviewHeader->m_strPPID; break; |
| | | case 4: strValue = pReviewHeader->m_strGlassID; break; |
| | | case 5: dValue = pReviewHeader->m_nDefectIdx; break; |
| | | case 6: dValue = pReviewHeader->m_nReviewIdx; break; |
| | | case 7: strValue = pReviewHeader->m_strJudge; break; |
| | | case 8: strValue = pReviewHeader->m_strFileName; break; |
| | | } |
| | | |
| | | if (strValue.IsEmpty() == FALSE) vecString.push_back(std::make_pair(strValue, pReviewHeader)); |
| | | else vecValue.push_back(std::make_pair(dValue, pReviewHeader)); |
| | | } |
| | | |
| | | if (!vecString.empty()) |
| | | { |
| | | std::sort(vecString.begin(), vecString.end(), std::greater< std::pair<CString, _akReviewHeader*> >()); |
| | | |
| | | m_Formation.m_vecHeader.clear(); |
| | | std::vector< std::pair<CString, _akReviewHeader*> >::iterator itVec; |
| | | // /*if(nCount > m_nFileCount) break; //count ì¬ê¸°ì ë§ê³ ì ì²´ íì¼ì ë¤ ì½ì íì ë¤ì ìí
íì*/ |
| | | int nCount = 1; |
| | | for (itVec = vecString.begin(); itVec != vecString.end(); ++itVec) |
| | | { |
| | | if(nCount > m_nFileCount) break; |
| | | m_Formation.m_vecHeader.push_back(*itVec->second); |
| | | nCount++; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | std::sort(vecValue.begin(), vecValue.end(), std::greater< std::pair<double, _akReviewHeader*> >()); |
| | | |
| | | m_Formation.m_vecHeader.clear(); |
| | | std::vector< std::pair<double, _akReviewHeader*> >::iterator itVec; |
| | | int nCount = 1; |
| | | for (itVec = vecValue.begin(); itVec != vecValue.end(); ++itVec) |
| | | { |
| | | if (nCount > m_nFileCount) break; |
| | | m_Formation.m_vecHeader.push_back(*itVec->second); |
| | | nCount++; |
| | | } |
| | | } |
| | | |
| | | _akReviewHeader *pReview; |
| | | m_vecStrGridReviewPath.clear(); |
| | | m_vecStrGridReviewList.clear(); |
| | | |
| | | GV_ITEM Item; |
| | | int nRowIdx = 0; |
| | | int nColIdx = 0; |
| | | CString strTemp; |
| | | Item.mask = GVIF_TEXT; |
| | | |
| | | for(int i=0; i< m_Formation.m_vecHeader.size(); i++) |
| | | { |
| | | pReview = &m_Formation.m_vecHeader[i]; |
| | | m_vecStrGridReviewPath.push_back(pReview->m_strFilePath); |
| | | m_vecStrGridReviewList.push_back(pReview->m_strFileName); |
| | | } |
| | | m_Formation.m_vecHeaderTemp.clear(); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | |  |
| | | // ReveiwHistoryDlg.h: í¤ë íì¼ |
| | | // |
| | | |
| | | #pragma once |
| | | |
| | | #include "akFormationMap.h" |
| | | #include "akGridData.h" |
| | | #include "AlignDlg.h" |
| | | #include "akWndArrange.h" |
| | | #include "DitGlassRawServer.h" |
| | | #include "GlassRawBase.h" |
| | | #include "akCore/akFileDB.h" |
| | | #include "afxcmn.h" |
| | | #include "akGridCtrl/akGridCtrl.h" |
| | | #include "akImageView.h" |
| | | //#include "CameraImageView.h" |
| | | //#include "CHImageControls/CHRectTracker.h" |
| | | |
| | | |
| | | #define MAX_COUNT 100 |
| | | |
| | | struct _DefectList |
| | | { |
| | | int m_nFileTime; |
| | | CString m_strFileName; |
| | | CString m_strLoading; |
| | | CString m_strGlassID; |
| | | CString m_strPPID; |
| | | int m_nReviewCount; |
| | | int m_nAllCount; |
| | | CString m_strJudge; |
| | | }; |
| | | |
| | | // CReveiwHistoryDlg ëí ìì |
| | | class CReveiwHistoryDlg : public CDialogEx |
| | | { |
| | | // ìì±ì
ëë¤. |
| | | public: |
| | | CReveiwHistoryDlg(CWnd* pParent = nullptr); // íì¤ ìì±ìì
ëë¤. |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DLG_REVIEWHISTORY }; |
| | | #endif |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | |
| | | public: |
| | | CFont m_Filelistfont; |
| | | CFont m_Defectfont; |
| | | |
| | | _DefectDisplayOption m_DefectDisplayOption; |
| | | CakFormationMap m_FormationMap; |
| | | akDefectFormation m_Formation; |
| | | CString m_strRawFilePath; |
| | | CakWndArrange m_WndArrange; |
| | | |
| | | CakImageView m_ImageView; |
| | | |
| | | CAlignDlg* m_pDlgAlign; |
| | | |
| | | CakGridCtrl m_gridMultiLIst; |
| | | std::vector<CString> m_vecStrGridMultiHeader; |
| | | |
| | | CakGridCtrl m_gridReviewList; |
| | | std::vector<CString> m_vecStrGridReviewHeader; |
| | | std::vector<CString> m_vecStrGridReviewList; |
| | | std::vector<CString> m_vecStrGridReviewPath; |
| | | std::vector<CString> m_vecStrGridTimeList; |
| | | std::vector<_DefectList> m_vecStrDefectList; |
| | | |
| | | CakGridCtrl m_gridDefectInfo; |
| | | std::vector<CString> m_vecStrGridDefectHeader; |
| | | |
| | | CakGridCtrl m_gridGlassInfo; |
| | | std::vector<CString> m_vecStrGridGlassHeader; |
| | | |
| | | std::vector<CString> m_vecStrReviewTemp; |
| | | std::vector<_akFormation*> m_vecSortForm; |
| | | |
| | | std::vector<_akDefect> m_vectest; |
| | | |
| | | CImage m_DefectImage; |
| | | CImage m_ReviewImage; |
| | | |
| | | CRect m_picture_rect; |
| | | CRect m_picture_rect2; |
| | | |
| | | CImage m_AlignFirst; |
| | | CImage m_AlignSecend; |
| | | |
| | | CRect m_Align_rect; |
| | | CRect m_Align_rect2; |
| | | |
| | | CButton m_chkAllDefect; |
| | | CButton m_chkReviewDefect; |
| | | CButton m_chkMuti; |
| | | CButton m_chkSingle; |
| | | |
| | | CSliderCtrl m_sldImg; |
| | | CEdit m_ctrCount; |
| | | |
| | | CStatic m_ctrReviewImage; |
| | | |
| | | CEdit m_ctlFileCount; |
| | | |
| | | CProgressCtrl m_ctlProgress; |
| | | |
| | | CakGridCtrl m_ctrlGridGlassList; |
| | | |
| | | // tracker |
| | | BOOL m_bDrawTracker; |
| | | CPoint m_ptTrackerStart; |
| | | //CCHRectTracker m_rectTracker; |
| | | |
| | | // Scroll Pos |
| | | int m_nVScroll; |
| | | int m_nHScroll; |
| | | // Max Scroll Pos |
| | | int m_nMaxVScroll; |
| | | int m_nMaxHScroll; |
| | | |
| | | /////////////////////////////////////////////////////// |
| | | CDitGlassRawServer m_Server; |
| | | CGlassRawBase* m_pGlassRawMaker; |
| | | CgrmGlassRawData m_GlassRawDataBuffer; |
| | | /////////////////////////////////////////////////////// |
| | | |
| | | int m_nSelectedCol; |
| | | int m_nSelectedRow; |
| | | |
| | | char m_strConfigFile[MAX_PATH]; |
| | | |
| | | bool m_bDefectAll; |
| | | bool m_bFirst; |
| | | int m_nCount; |
| | | |
| | | int m_nGlassSelect; |
| | | int m_nFileCount; |
| | | int m_nSelectFile[105]; |
| | | int m_nDefectSize[105]; |
| | | int m_nCellSize[105]; |
| | | int m_nCellSizeTemp[105]; |
| | | int m_nImageSize[105]; |
| | | int m_nSizeDefect; |
| | | int m_nSizeImage; |
| | | int m_nDefectCount; |
| | | int m_nImageCount; |
| | | int m_nCellCount; |
| | | |
| | | BOOL m_bAsending; |
| | | |
| | | struct _InitOption |
| | | { |
| | | int m_nMaxDataNumCell; |
| | | int m_nMaxDataNumDefect; |
| | | |
| | | int m_nSelectRawType; |
| | | |
| | | char m_strLogFilePath[256]; |
| | | |
| | | int m_bUseStack; |
| | | char m_strStackLocalPath[256]; |
| | | char m_strStackEquipID[32]; |
| | | char m_strStackParam1[32]; |
| | | char m_strStackParam2[32]; |
| | | }m_ConfigOption; |
| | | |
| | | // 구íì
ëë¤. |
| | | protected: |
| | | HICON m_hIcon; |
| | | |
| | | // ìì±ë ë©ìì§ ë§µ í¨ì |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); |
| | | afx_msg void OnPaint(); |
| | | afx_msg HCURSOR OnQueryDragIcon(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | void AddVecFileHeader(); |
| | | void AddVecGlassHeader(); |
| | | void AddVecDefectHeader(); |
| | | |
| | | void SlideInit(); |
| | | |
| | | void InitGridReviewLIst(CakGridCtrl* pGrid, UINT nRectCtrlID); |
| | | void InitGridGlassLIst(CakGridCtrl * pGrid, UINT nRectCtrlID); |
| | | void InitGridDefectLIst(CakGridCtrl* pGrid, UINT nRectCtrlID); |
| | | |
| | | void CreateUserDirectory(); |
| | | void CreateUserClass(); |
| | | void DestroyUserClass(); |
| | | |
| | | void getDispInfoGlass(int nCol, int nRow, CString* pStrData); |
| | | void getDispInfoGlassInfo(int nCol, int nRow, CString * pStrData); |
| | | void getDispInfoDefect(int nCol, int nRow, CString* pStrData); |
| | | |
| | | public: |
| | | afx_msg void OnBnClickedButtonMapviewFit(); |
| | | afx_msg void OnDestroy(); |
| | | afx_msg LRESULT OnMapDefectSelected(WPARAM wParam, LPARAM lParam); |
| | | afx_msg LRESULT OnMapDefectMouseOver(WPARAM wParam, LPARAM lParam); |
| | | afx_msg LRESULT OnListDefectSelected(WPARAM wParam, LPARAM lParam); |
| | | afx_msg void OnSize(UINT nType, int cx, int cy); |
| | | |
| | | afx_msg void OnOptionPathsetting(); |
| | | afx_msg void OnViewAlldefect(); |
| | | afx_msg void OnViewReviewdefect(); |
| | | afx_msg void OnAlignView(); |
| | | afx_msg void OnBnClickedBtnFindBin(); |
| | | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); |
| | | afx_msg void OnChangeEditCount(); |
| | | |
| | | afx_msg void OnClickedChkAllDefect(); |
| | | afx_msg void OnClickedChkMuti(); |
| | | afx_msg void OnClickedChkReviewDefect(); |
| | | afx_msg void OnClickedChkSingle(); |
| | | afx_msg void OnChangeEditFileCount(); |
| | | |
| | | afx_msg void OnBnClickedButton3(); |
| | | |
| | | virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); |
| | | |
| | | void FileTime(CString strPath); |
| | | void OpenFileHeader(CString strPath, CString strFullPath); |
| | | void BinFileOpen(int nCount); |
| | | void OnCbnSelchangeComboRawtype(); |
| | | |
| | | |
| | | void ShowProgressBar(); |
| | | void setDefectShow(int nDefectID, BOOL bEnsureVisible); |
| | | void ImageShow(int nDefectID); |
| | | |
| | | void SetScrollSetting(); |
| | | void SetScrollRest(); |
| | | |
| | | void Imagenoload(); |
| | | |
| | | BOOL GetCheckFileLoad(int nCount); |
| | | |
| | | void GlassInfoRest(); |
| | | BOOL MultiSelectCheck(int nSelectCount); |
| | | int MultiInsert(int nSelectCount, int nDataCount); |
| | | void InitSelectGlass(int nSelectCount); |
| | | |
| | | void AddVecDataImage(int nDataCount); |
| | | void AddVecDataDefct(int nDataCount); |
| | | void AddVecDataDefectAll(int nDataCount); |
| | | void AddVecDataDefct2(int nDataCount/*, int nRawCount*/); |
| | | void AddVecDataDefectAll2(int nDataCount/*, int nRawCount*/); |
| | | void AddVecGlassData(int nCount); |
| | | void AddVecCellData(int nCellCount); |
| | | void AddVecDateSorting(int nDataCount); |
| | | void AddVecImageSorting(int nDataCount); |
| | | void AddVecCellSorting(int nCellCount); |
| | | |
| | | void SelectCell(int nDataCount); |
| | | |
| | | void SortFileList(int nCol); |
| | | void SortListDefect(int nCol); |
| | | |
| | | void SetDefectCount() { m_nDefectCount = m_nDefectCount + 1; } |
| | | int GetDefectCount() { return m_nDefectCount; } |
| | | |
| | | void SetImageCount() { m_nImageCount = m_nImageCount + 1; } |
| | | int GetImageCount() { return m_nImageCount; } |
| | | |
| | | void SetCellCount() { m_nCellCount = m_nCellCount + 1; } |
| | | int GetCellCount() { return m_nCellCount; } |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | template <typename T> |
| | | class CSingleton |
| | | { |
| | | public: |
| | | CSingleton() {} |
| | | virtual ~CSingleton() {} |
| | | |
| | | static void CreateClass() |
| | | { |
| | | if ( !m_pMgr ) |
| | | m_pMgr = new T; |
| | | } |
| | | |
| | | static void DestroyClass() |
| | | { |
| | | if ( m_pMgr ) |
| | | { |
| | | delete m_pMgr; |
| | | |
| | | m_pMgr = NULL; |
| | | } |
| | | } |
| | | |
| | | static T* GetMgr() |
| | | { |
| | | return m_pMgr; |
| | | } |
| | | |
| | | private: |
| | | static T* m_pMgr; |
| | | }; |
| | | |
| | | template<typename T> T* CSingleton<T>::m_pMgr = NULL; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "StackResultCPJT.h" |
| | | #include "akLoggerExt.h" |
| | | #include "akCore/akFileDB.h" |
| | | #include <process.h> |
| | | #include "DitGlassRawClient.h" |
| | | #include "GlassRawBase.h" |
| | | |
| | | #ifdef _DEBUG |
| | | #undef THIS_FILE |
| | | static char THIS_FILE[]=__FILE__; |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | CStackResultCPJT::CStackResultCPJT(void) |
| | | { |
| | | m_nThreadStackFileReadFlag = 0; |
| | | m_strConfigFile; |
| | | { |
| | | GetModuleFileName(NULL, m_strConfigFile, MAX_PATH); |
| | | char* ext = CakFileUtil::getFileExt(m_strConfigFile); |
| | | strcpy(ext, "ini"); |
| | | } |
| | | |
| | | m_nProcessState = SPS_StateIdle; |
| | | readOptionFile(); |
| | | } |
| | | |
| | | CStackResultCPJT::~CStackResultCPJT(void) |
| | | { |
| | | if(m_nThreadStackFileReadFlag == 1) |
| | | { |
| | | m_nThreadStackFileReadFlag = 2; |
| | | while(m_nThreadStackFileReadFlag != 0) |
| | | { |
| | | Sleep(1); |
| | | } |
| | | } |
| | | |
| | | m_vecStackDefect.clear(); |
| | | } |
| | | |
| | | //201218 CJH - Stack File open |
| | | BOOL CStackResultCPJT::openFile( char* pGlassID ) |
| | | { |
| | | CString strFileName; |
| | | |
| | | CDitGlassRawClient GlassRawClient; |
| | | GlassRawClient.ConnectServer(); |
| | | CDitGlassRawClient* pShared = &GlassRawClient; |
| | | |
| | | _grmDefectData* pGrmStack; |
| | | |
| | | strFileName.Format("%s\\%s", m_strLocalPath, pGlassID); |
| | | |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "r"); |
| | | |
| | | if(pf == NULL) |
| | | return FALSE; |
| | | |
| | | std::vector<_StackDefectCPJT> vecStackDefect; |
| | | _StackDefectCPJT StackDefect; |
| | | char buffer[2048]; |
| | | |
| | | char* pReadPoint = NULL; |
| | | char *pStr; |
| | | CString tempStr, strRight; |
| | | |
| | | while(!feof(pf)) //Data ìì |
| | | { |
| | | pStr = fgets(buffer, 2048, pf); |
| | | |
| | | if(strncmp(buffer, "DATA", 4)) continue; //Data ìì |
| | | |
| | | if(strlen(buffer) <= 0 || pStr == NULL) |
| | | break; |
| | | |
| | | if(strncmp(buffer, "DATA DEFECT", 10)) continue; //Defect ì°¾ì |
| | | |
| | | //Defect Stack Start |
| | | { |
| | | pReadPoint = buffer; |
| | | int temp; |
| | | |
| | | pReadPoint = getParsingData(pReadPoint, 11, &temp); |
| | | pReadPoint = getParsingData(pReadPoint, 12, &StackDefect.m_strCellName); |
| | | pReadPoint = getParsingData(pReadPoint, 5, &StackDefect.m_nDefectID); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &StackDefect.m_nPosX); |
| | | pReadPoint = getParsingData(pReadPoint, 8, &StackDefect.m_nPosY); |
| | | |
| | | pReadPoint = getParsingData(pReadPoint, 13, &temp); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_nSize); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_nUmSizeX); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_nUmSizeY); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_nDefectRScale); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_strDefectGrade); |
| | | pReadPoint = getParsingData(pReadPoint, 4, &StackDefect.m_strDefectType); |
| | | |
| | | //pReadPoint = getParsingData(pReadPoint, 47, &temp); |
| | | pReadPoint = getParsingData(pReadPoint, 2, &temp); |
| | | pReadPoint = getParsingData(pReadPoint, 2, &StackDefect.m_nStackCnt); |
| | | pReadPoint = getParsingData(pReadPoint, 60, &StackDefect.m_strStackStep); |
| | | |
| | | vecStackDefect.push_back(StackDefect); |
| | | } |
| | | } |
| | | |
| | | //For Test |
| | | AKLOG("Read Stack Size : %d", vecStackDefect.size()); |
| | | |
| | | fclose(pf); |
| | | |
| | | m_vecStackDefect = vecStackDefect; |
| | | |
| | | for (int i = 0; i < m_vecStackDefect.size(); i++) |
| | | { |
| | | pGrmStack = pShared->GetStackData(i); |
| | | pGrmStack->clear(); |
| | | |
| | | //Cell IDë¡ idx 찾기 |
| | | { |
| | | //char* g_pCellCode = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; |
| | | //'0' + pCellData->m_nCellID / 36, g_pCellCode[pCellData->m_nCellID % 36] |
| | | tempStr = m_vecStackDefect[i].m_strCellName.Right(2); |
| | | int nUpper = atoi(tempStr.Left(1)); |
| | | nUpper *= 36; |
| | | |
| | | char ctemp[2]; |
| | | strRight = tempStr.Right(1); |
| | | strcpy(ctemp, strRight); |
| | | int nLower = static_cast<int>(ctemp[0]); |
| | | if (48 <= nLower && nLower <= 57) |
| | | nLower = 43 /* 65+26+17 */ + nLower; |
| | | nLower -= 65; |
| | | |
| | | pGrmStack->m_nCellIdx = nUpper + nLower; |
| | | } |
| | | |
| | | pGrmStack->m_nDefectID = m_vecStackDefect[i].m_nDefectID; |
| | | pGrmStack->m_nUMCenterAlignX = m_vecStackDefect[i].m_nPosX; |
| | | pGrmStack->m_nUMCenterAlignY = (-1)*m_vecStackDefect[i].m_nPosY; |
| | | pGrmStack->m_nPixelSize = m_vecStackDefect[i].m_nSize; |
| | | pGrmStack->m_nUMSizeX = m_vecStackDefect[i].m_nUmSizeX; |
| | | pGrmStack->m_nUMSizeY = m_vecStackDefect[i].m_nUmSizeY; |
| | | pGrmStack->m_nDefectRScale = m_vecStackDefect[i].m_nDefectRScale; |
| | | //Judgement |
| | | { |
| | | m_vecStackDefect[i].m_strDefectGrade.TrimLeft(" "); |
| | | m_vecStackDefect[i].m_strDefectGrade.TrimRight(" "); |
| | | if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "OK")) pGrmStack->m_DefectJudgement = Judge_OK; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "RP")) pGrmStack->m_DefectJudgement = Judge_RP; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "NG")) pGrmStack->m_DefectJudgement = Judge_NG; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "TR")) pGrmStack->m_DefectJudgement = Judge_TR; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "PR")) pGrmStack->m_DefectJudgement = Judge_PR; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "PT")) pGrmStack->m_DefectJudgement = Judge_PT; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "RV")) pGrmStack->m_DefectJudgement = Judge_Review; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "RC")) pGrmStack->m_DefectJudgement = Judge_RC; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "SZ")) pGrmStack->m_DefectJudgement = Judge_Size; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "VI")) pGrmStack->m_DefectJudgement = Judge_VI; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "RW")) pGrmStack->m_DefectJudgement = Judge_Rework; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "UK")) pGrmStack->m_DefectJudgement = Judge_Unknown; |
| | | else /*if (!strcmp(m_vecStackDefect[i].m_strDefectGrade, "ê·¸ì¸"))*/ pGrmStack->m_DefectJudgement = Judge_OK; |
| | | } |
| | | m_vecStackDefect[i].m_strDefectType.TrimLeft(" "); |
| | | m_vecStackDefect[i].m_strDefectType.TrimRight(" "); |
| | | //Defect Type |
| | | { |
| | | if (!strcmp(m_vecStackDefect[i].m_strDefectType, "RB")) pGrmStack->m_DefectType = DefectType_RBlack; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectType, "RW")) pGrmStack->m_DefectType = DefectType_RWhite; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectType, "TB")) pGrmStack->m_DefectType = DefectType_TBlack; |
| | | else if (!strcmp(m_vecStackDefect[i].m_strDefectType, "TW")) pGrmStack->m_DefectType = DefectType_TWhite; |
| | | else pGrmStack->m_DefectType = DefectType_Unknown; |
| | | } |
| | | pGrmStack->m_nStackStepCount = m_vecStackDefect[i].m_nStackCnt; |
| | | m_vecStackDefect[i].m_strStackStep.TrimLeft(" "); |
| | | m_vecStackDefect[i].m_strStackStep.TrimRight(" "); |
| | | strcpy(pGrmStack->m_strStackFirst, m_vecStackDefect[i].m_strStackStep.GetBuffer(0)); |
| | | } |
| | | |
| | | pShared->GetGlassData()->m_nStackNum = m_vecStackDefect.size(); |
| | | pShared->GetGlassData()->m_bStackRead = TRUE; |
| | | |
| | | AKLOG("Import Vector Size : %d", m_vecStackDefect.size()); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | char* CStackResultCPJT::getParsingData( char* pBuf, int nLen, CString* pOutData ) |
| | | { |
| | | for(int i=nLen-1; i>=0; i--) |
| | | { |
| | | if(pBuf[i] != ' ') |
| | | { |
| | | pBuf[i+1] = 0; |
| | | break; |
| | | } |
| | | } |
| | | *pOutData = pBuf; |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | char* CStackResultCPJT::getParsingData( char* pBuf, int nLen, int* pOutData ) |
| | | { |
| | | pBuf[nLen] = 0; |
| | | |
| | | *pOutData = atoi(pBuf); |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | BOOL CStackResultCPJT::readOptionFile( char* pFileName /*= "C:\\AOIServer\\ConfigFile\\MacroInfo.cfg"*/ ) |
| | | { |
| | | if(pFileName == NULL) pFileName = m_strConfigFile; |
| | | |
| | | CakFileDB akFileDB; |
| | | akFileDB.openfile(pFileName); |
| | | |
| | | akFileDB.getItem("Stack_Use", &m_bStackUse, 0); |
| | | akFileDB.getItem("Stack_LocalPath", m_strLocalPath, "D:\\DIT_ResultData\\Stack"); |
| | | akFileDB.getItem("Stack_EquipID", m_strEquipID, "qa6500f0r03"); |
| | | akFileDB.getItem("Stack_Param1", m_strParam1, ""); |
| | | |
| | | |
| | | if(m_bStackUse && m_nThreadStackFileReadFlag == 0)//ì°ë ë ìì± [ê¹íí 2019/1/12] |
| | | { |
| | | _beginthread(threadStackFileRead, NULL, this); |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CStackResultCPJT::threadStackFileRead( void* pArg ) |
| | | { |
| | | CStackResultCPJT* pThis = (CStackResultCPJT*)pArg; |
| | | |
| | | pThis->m_nThreadStackFileReadFlag = 1; |
| | | int nSleepTime = 1000; |
| | | int nReadFailCount = 0; |
| | | int nThreadCount=0; |
| | | CString strGlassID; |
| | | |
| | | // CDitGlassRawClient GlassRawClient; |
| | | // if(!GlassRawClient.ConnectServer()) return; |
| | | // CDitGlassRawClient* pShared = &GlassRawClient; |
| | | |
| | | // pShared->GetGlassData()->m_bStackRead = FALSE; |
| | | // pShared->GetGlassData()->m_nStackNum = 0; |
| | | |
| | | while(pThis->m_nThreadStackFileReadFlag==1) |
| | | { |
| | | if(pThis->m_nProcessState == SPS_CmdFileRead) //ì¤ííì¼ ì½ê¸° ìí [ê¹íí 2019/1/12] |
| | | { |
| | | strGlassID = pThis->m_strGlassID; |
| | | //For test |
| | | //strGlassID = "HPANELID"; |
| | | pThis->m_nProcessState = SPS_StateFileRead; |
| | | nThreadCount = 0; |
| | | nReadFailCount = 0; |
| | | |
| | | AKLOG("Stack File Read Start : %s\\%s", pThis->m_strLocalPath, strGlassID); |
| | | |
| | | //210111 CJH - Stack Read Sleep |
| | | Sleep(3000); |
| | | |
| | | while(pThis->m_nProcessState == SPS_StateFileRead && pThis->m_nThreadStackFileReadFlag==1) |
| | | { |
| | | if((nThreadCount++ % 20) != 0) //ëª
ë ¹ ìíì ë¹ ë¥´ê² ê°ì§ ìí ì¡°ì¹ [ê¹íí 2019/1/12] |
| | | { |
| | | Sleep(50); |
| | | continue; |
| | | } |
| | | |
| | | if(pThis->openFile(strGlassID.GetBuffer(0)) == TRUE) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadOK; |
| | | AKLOG("Stack File Read Complete "); |
| | | break; |
| | | } |
| | | |
| | | nReadFailCount++; |
| | | AKLOG("Stack File Read Try : %d", nReadFailCount); |
| | | |
| | | if(nReadFailCount>100) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadFail; |
| | | AKLOG("Stack File Read Fail "); |
| | | break; |
| | | } |
| | | |
| | | Sleep(50); |
| | | } |
| | | if(pThis->m_nProcessState != SPS_ResultReadOK) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadFail; |
| | | AKLOG("Stack File Read Stop "); |
| | | } |
| | | |
| | | |
| | | } |
| | | if(nReadFailCount) |
| | | |
| | | |
| | | Sleep(500); |
| | | } |
| | | |
| | | pThis->m_nThreadStackFileReadFlag = 0; |
| | | } |
| | | |
| | | BOOL CStackResultCPJT::StackFileReadStart( char* pGlassID ) |
| | | { |
| | | if(m_nThreadStackFileReadFlag == 0)//ì°ë ë ìì± [ê¹íí 2019/1/12] |
| | | { |
| | | _beginthread(threadStackFileRead, NULL, this); |
| | | } |
| | | |
| | | if(m_nProcessState == SPS_StateFileRead) |
| | | { |
| | | m_nProcessState = SPS_CmdFileStop; |
| | | while(m_nProcessState == SPS_CmdFileStop) Sleep(0); |
| | | } |
| | | |
| | | m_strGlassID = pGlassID; |
| | | m_nProcessState = SPS_CmdFileRead; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CStackResultCPJT::StackFileReadStop( BOOL bWait/*=TRUE*/ ) |
| | | { |
| | | if(bWait == TRUE && m_nProcessState == SPS_StateFileRead) |
| | | { |
| | | m_nProcessState = SPS_CmdFileStop; |
| | | while(m_nProcessState == SPS_CmdFileStop) Sleep(0); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include "akCore/akFileUtil.h" |
| | | |
| | | |
| | | //enum Judgement { Judge_OK = 0, Judge_RP, Judge_NG, Judge_TR, Judge_PR, Judge_PT, Judge_Review, Judge_RC, Judge_Size, Judge_VI, Judge_Rework, Judge_Unknown };//2016.07.13 LHS Judge_Size ì¶ê° |
| | | |
| | | struct _StackDefectCPJT |
| | | { |
| | | int m_nDefectID ; |
| | | //char m_strCellID[32] ; |
| | | CString m_strCellName ; |
| | | int m_nPosX ; |
| | | int m_nPosY ; |
| | | int m_nSize ; |
| | | int m_nUmSizeX ; |
| | | int m_nUmSizeY ; |
| | | int m_nDefectRScale ; |
| | | CString m_strDefectGrade; |
| | | CString m_strDefectType ; |
| | | int m_nStackCnt ; |
| | | CString m_strStackStep ; |
| | | //char m_strJudge[16] ; |
| | | //char m_strCode[16] ; |
| | | }; |
| | | |
| | | class CStackResultCPJT |
| | | { |
| | | public: |
| | | CStackResultCPJT(void); |
| | | virtual ~CStackResultCPJT(void); |
| | | protected: |
| | | enum emStackProcessState |
| | | { |
| | | SPS_StateIdle = 0, |
| | | SPS_StateFileRead, //ì½ê¸° ìí ì¤ |
| | | SPS_ResultReadOK, |
| | | SPS_ResultReadFail, |
| | | SPS_CmdFileRead, //ì½ê¸° ëª
ë ¹ ìí |
| | | SPS_CmdFileStop, //ì½ê¸° ëª
ë ¹ ìí ì¤ì§ |
| | | |
| | | SPS_Num |
| | | }; |
| | | public: |
| | | void clear() |
| | | { |
| | | m_vecStackDefect.clear(); |
| | | } |
| | | |
| | | BOOL StackFileReadStart(char* pGlassID); |
| | | BOOL StackFileReadStop(BOOL bWait=TRUE); |
| | | BOOL IsRead() { return m_nProcessState == SPS_ResultReadOK?TRUE:FALSE; } |
| | | |
| | | int GetDefectNum() { return (int)m_vecStackDefect.size();} |
| | | _StackDefectCPJT* GetDefect(int i) { return &m_vecStackDefect[i]; } |
| | | |
| | | BOOL readOptionFile(char* pFileName = NULL); |
| | | |
| | | BOOL getStackUse(){return m_bStackUse;}; |
| | | char* getStackEquipID(){return m_strEquipID;}; |
| | | char* getStackOperID(){return m_strParam1;}; |
| | | char* getStackLocalPath(){return m_strLocalPath;}; |
| | | protected: |
| | | BOOL openFile( char* pGlassID ); |
| | | |
| | | static void threadStackFileRead(void* pArg); |
| | | int m_nThreadStackFileReadFlag; |
| | | |
| | | protected: |
| | | char m_strConfigFile[MAX_PATH]; |
| | | BOOL m_bStackUse; |
| | | char m_strLocalPath[MAX_PATH]; |
| | | char m_strEquipID[32]; |
| | | char m_strParam1[32]; //operid |
| | | |
| | | emStackProcessState m_nProcessState;//-1:ì½ê¸°ì¤í¨,0:Idle, 1:ì½ê¸°ì±ê³µ, 2:ì½ê¸°ìë(ì½ê¸°ì¤) |
| | | std::vector<_StackDefectCPJT> m_vecStackDefect; |
| | | |
| | | CString m_strGlassID; |
| | | protected: |
| | | char* getParsingData(char* pBuf, int nLen, CString* pOutData); |
| | | char* getParsingData(char* pBuf, int nLen, int* pOutData); |
| | | |
| | | |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "StdAfx.h" |
| | | #include "StackResultCSOT.h" |
| | | #include "akLoggerExt.h" |
| | | #include "akCore/akFileDB.h" |
| | | #include <process.h> |
| | | |
| | | #ifdef _DEBUG |
| | | #undef THIS_FILE |
| | | static char THIS_FILE[]=__FILE__; |
| | | #define new DEBUG_NEW |
| | | #endif |
| | | |
| | | CStackResultCSOT::CStackResultCSOT(void) |
| | | { |
| | | m_nThreadStackFileReadFlag = 0; |
| | | m_strConfigFile; |
| | | { |
| | | GetModuleFileName(NULL, m_strConfigFile, MAX_PATH); |
| | | char* ext = CakFileUtil::getFileExt(m_strConfigFile); |
| | | strcpy(ext, "ini"); |
| | | } |
| | | |
| | | m_nProcessState = SPS_StateIdle; |
| | | readOptionFile(); |
| | | } |
| | | |
| | | CStackResultCSOT::~CStackResultCSOT(void) |
| | | { |
| | | if(m_nThreadStackFileReadFlag == 1) |
| | | { |
| | | m_nThreadStackFileReadFlag = 2; |
| | | while(m_nThreadStackFileReadFlag != 0) |
| | | { |
| | | Sleep(1); |
| | | } |
| | | } |
| | | |
| | | m_vecMacroDefect.clear(); |
| | | } |
| | | |
| | | BOOL CStackResultCSOT::openFile( char* pGlassID ) |
| | | { |
| | | CString strFileName; |
| | | |
| | | strFileName.Format("%s\\%s.txt", m_strLocalPath, pGlassID); |
| | | |
| | | FILE* pf = fopen(strFileName.GetBuffer(0), "r"); |
| | | |
| | | if(pf == NULL) |
| | | return FALSE; |
| | | |
| | | std::vector<_StackDefect> vecMacroDefect; |
| | | _StackDefect MacroDefect; |
| | | char buffer[1024]; |
| | | |
| | | char* pReadPoint = NULL; |
| | | char *pStr; |
| | | |
| | | while(!feof(pf)) |
| | | { |
| | | pStr = fgets(buffer, 1024, pf); |
| | | |
| | | if(!strncmp(buffer, "ITEM,", 5)) continue; |
| | | |
| | | |
| | | if(strlen(buffer) <= 0 || pStr == NULL) |
| | | break; |
| | | |
| | | if(!strncmp(buffer, "DATA,CELLDATA", 13))//íì± íí[2017/3/29] |
| | | { |
| | | //ë¬´ë¼ ì
íì ë ë°ì í´ì¼ íë? |
| | | } |
| | | else if(!strncmp(buffer, "DATA,DEFECTDATA", 15))//íì± íí[2017/3/29] |
| | | { |
| | | pReadPoint = buffer; |
| | | |
| | | |
| | | |
| | | vecMacroDefect.push_back(MacroDefect); |
| | | } |
| | | } |
| | | |
| | | fclose(pf); |
| | | |
| | | m_vecMacroDefect = vecMacroDefect; |
| | | return TRUE; |
| | | } |
| | | |
| | | char* CStackResultCSOT::getParsingData( char* pBuf, int nLen, CString* pOutData ) |
| | | { |
| | | for(int i=nLen-1; i>=0; i--) |
| | | { |
| | | if(pBuf[i] != ' ') |
| | | { |
| | | pBuf[i+1] = 0; |
| | | break; |
| | | } |
| | | } |
| | | *pOutData = pBuf; |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | char* CStackResultCSOT::getParsingData( char* pBuf, int nLen, int* pOutData ) |
| | | { |
| | | pBuf[nLen] = 0; |
| | | |
| | | *pOutData = atoi(pBuf); |
| | | |
| | | return &pBuf[nLen+1]; //구ë¶ì ê±´ë ë°ì´ì ë¤ì ì½ì í¬ì¸í¸ ë겨ì¤ë¤ íí[2017/3/29] |
| | | } |
| | | |
| | | BOOL CStackResultCSOT::readOptionFile( char* pFileName /*= "C:\\AOIServer\\ConfigFile\\MacroInfo.cfg"*/ ) |
| | | { |
| | | if(pFileName == NULL) pFileName = m_strConfigFile; |
| | | |
| | | CakFileDB akFileDB; |
| | | akFileDB.openfile(pFileName); |
| | | |
| | | akFileDB.getItem("Stack_Use", &m_bStackUse, 0); |
| | | akFileDB.getItem("Stack_LocalPath", m_strLocalPath, "D:\\DIT_ResultData\\Stack"); |
| | | akFileDB.getItem("Stack_EquipID", m_strEquipID, "AAAAA"); |
| | | akFileDB.getItem("Stack_Param1", m_strParam1, ""); |
| | | |
| | | |
| | | if(m_bStackUse && m_nThreadStackFileReadFlag == 0)//ì°ë ë ìì± [ê¹íí 2019/1/12] |
| | | { |
| | | _beginthread(threadStackFileRead, NULL, this); |
| | | } |
| | | return TRUE; |
| | | } |
| | | |
| | | void CStackResultCSOT::threadStackFileRead( void* pArg ) |
| | | { |
| | | CStackResultCSOT* pThis = (CStackResultCSOT*)pArg; |
| | | |
| | | pThis->m_nThreadStackFileReadFlag = 1; |
| | | int nSleepTime = 1000; |
| | | int nReadFailCount = 0; |
| | | int nThreadCount=0; |
| | | CString strGlassID; |
| | | |
| | | while(pThis->m_nThreadStackFileReadFlag==1) |
| | | { |
| | | if(pThis->m_nProcessState == SPS_CmdFileRead) //ì¤ííì¼ ì½ê¸° ìí [ê¹íí 2019/1/12] |
| | | { |
| | | strGlassID = pThis->m_strGlassID; |
| | | pThis->m_nProcessState = SPS_StateFileRead; |
| | | nThreadCount = 0; |
| | | nReadFailCount = 0; |
| | | |
| | | AKLOG("Stack File Read Start : %s\\%s.txt", pThis->m_strLocalPath, strGlassID); |
| | | |
| | | while(pThis->m_nProcessState == SPS_StateFileRead && pThis->m_nThreadStackFileReadFlag==1) |
| | | { |
| | | if((nThreadCount++ % 20) != 0) //ëª
ë ¹ ìíì ë¹ ë¥´ê² ê°ì§ ìí ì¡°ì¹ [ê¹íí 2019/1/12] |
| | | { |
| | | Sleep(50); |
| | | continue; |
| | | } |
| | | |
| | | if(pThis->openFile(strGlassID.GetBuffer(0)) == TRUE) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadOK; |
| | | AKLOG("Stack File Read Complete "); |
| | | break; |
| | | } |
| | | |
| | | nReadFailCount++; |
| | | AKLOG("Stack File Read Try : %d", nReadFailCount); |
| | | |
| | | if(nReadFailCount>100) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadFail; |
| | | AKLOG("Stack File Read Fail "); |
| | | break; |
| | | } |
| | | |
| | | Sleep(50); |
| | | } |
| | | if(pThis->m_nProcessState != SPS_ResultReadOK) |
| | | { |
| | | pThis->m_nProcessState = SPS_ResultReadFail; |
| | | AKLOG("Stack File Read Stop "); |
| | | } |
| | | |
| | | |
| | | } |
| | | if(nReadFailCount) |
| | | |
| | | |
| | | Sleep(500); |
| | | } |
| | | |
| | | pThis->m_nThreadStackFileReadFlag = 0; |
| | | } |
| | | |
| | | BOOL CStackResultCSOT::StackFileReadStart( char* pGlassID ) |
| | | { |
| | | if(m_nThreadStackFileReadFlag == 0)//ì°ë ë ìì± [ê¹íí 2019/1/12] |
| | | { |
| | | _beginthread(threadStackFileRead, NULL, this); |
| | | } |
| | | |
| | | if(m_nProcessState == SPS_StateFileRead) |
| | | { |
| | | m_nProcessState = SPS_CmdFileStop; |
| | | while(m_nProcessState == SPS_CmdFileStop) Sleep(0); |
| | | } |
| | | |
| | | m_strGlassID = pGlassID; |
| | | m_nProcessState = SPS_CmdFileRead; |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CStackResultCSOT::StackFileReadStop( BOOL bWait/*=TRUE*/ ) |
| | | { |
| | | if(bWait == TRUE && m_nProcessState == SPS_StateFileRead) |
| | | { |
| | | m_nProcessState = SPS_CmdFileStop; |
| | | while(m_nProcessState == SPS_CmdFileStop) Sleep(0); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include "akCore/akFileUtil.h" |
| | | |
| | | struct _StackDefect |
| | | { |
| | | int m_nDefectID ; |
| | | char m_strCellID[32] ; |
| | | int m_nPosX ; |
| | | int m_nPosY ; |
| | | int m_nSize ; |
| | | char m_strJudge[16] ; |
| | | char m_strCode[16] ; |
| | | }; |
| | | |
| | | class CStackResultCSOT |
| | | { |
| | | public: |
| | | CStackResultCSOT(void); |
| | | virtual ~CStackResultCSOT(void); |
| | | protected: |
| | | enum emStackProcessState |
| | | { |
| | | SPS_StateIdle = 0, |
| | | SPS_StateFileRead, //ì½ê¸° ìí ì¤ |
| | | SPS_ResultReadOK, |
| | | SPS_ResultReadFail, |
| | | SPS_CmdFileRead, //ì½ê¸° ëª
ë ¹ ìí |
| | | SPS_CmdFileStop, //ì½ê¸° ëª
ë ¹ ìí ì¤ì§ |
| | | |
| | | SPS_Num |
| | | }; |
| | | public: |
| | | void clear() |
| | | { |
| | | m_vecMacroDefect.clear(); |
| | | } |
| | | |
| | | BOOL StackFileReadStart(char* pGlassID); |
| | | BOOL StackFileReadStop(BOOL bWait=TRUE); |
| | | BOOL IsRead() { return m_nProcessState == SPS_ResultReadOK?TRUE:FALSE; } |
| | | |
| | | int GetDefectNum() { return (int)m_vecMacroDefect.size();} |
| | | _StackDefect* GetDefect(int i) { return &m_vecMacroDefect[i]; } |
| | | |
| | | BOOL readOptionFile(char* pFileName = NULL); |
| | | |
| | | BOOL getStackUse(){return m_bStackUse;}; |
| | | char* getStackEquipID(){return m_strEquipID;}; |
| | | char* getStackOperID(){return m_strParam1;}; |
| | | char* getStackLocalPath(){return m_strLocalPath;}; |
| | | protected: |
| | | BOOL openFile( char* pGlassID ); |
| | | |
| | | static void threadStackFileRead(void* pArg); |
| | | int m_nThreadStackFileReadFlag; |
| | | |
| | | protected: |
| | | char m_strConfigFile[MAX_PATH]; |
| | | BOOL m_bStackUse; |
| | | char m_strLocalPath[MAX_PATH]; |
| | | char m_strEquipID[32]; |
| | | char m_strParam1[32]; //operid |
| | | |
| | | emStackProcessState m_nProcessState;//-1:ì½ê¸°ì¤í¨,0:Idle, 1:ì½ê¸°ì±ê³µ, 2:ì½ê¸°ìë(ì½ê¸°ì¤) |
| | | std::vector<_StackDefect> m_vecMacroDefect; |
| | | |
| | | CString m_strGlassID; |
| | | protected: |
| | | char* getParsingData(char* pBuf, int nLen, CString* pOutData); |
| | | char* getParsingData(char* pBuf, int nLen, int* pOutData); |
| | | |
| | | |
| | | |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | #include "stdafx.h" |
| | | #include "akDefectFormation.h" |
| | | #include "akSTL/akStruct.h" |
| | | |
| | | akDefectFormation::akDefectFormation() |
| | | { |
| | | } |
| | | |
| | | akDefectFormation::~akDefectFormation() |
| | | { |
| | | } |
| | | |
| | | void akDefectFormation::Clear() |
| | | { |
| | | m_vecDefects.clear(); |
| | | m_vecFormation.clear(); |
| | | m_vecImage.clear(); |
| | | m_vecGlassInfo.clear(); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefect(double dPosX, double dPosY) |
| | | { |
| | | _akDefect akDefect; |
| | | akDefect.dPositionX = dPosX; |
| | | akDefect.dPositionY = dPosY; |
| | | akDefect.nLabel = -1; |
| | | akDefect.nDefectID = -1; |
| | | akDefect.nFilter = 0; |
| | | akDefect.nSize = 0; |
| | | |
| | | m_vecDefects.push_back(akDefect); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefectTemp(double dPosX, double dPosY) |
| | | { |
| | | _akDefect akDefect; |
| | | akDefect.dPositionX = dPosX; |
| | | akDefect.dPositionY = dPosY; |
| | | akDefect.nLabel = -1; |
| | | akDefect.nDefectID = -1; |
| | | akDefect.nFilter = 0; |
| | | akDefect.nSize = 0; |
| | | |
| | | m_vecTempDefects.push_back(akDefect); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefect2() |
| | | { |
| | | _akDefect akDefect; |
| | | |
| | | m_vecPath1.push_back(akDefect); |
| | | m_vecPath2.push_back(akDefect); |
| | | m_vecPath3.push_back(akDefect); |
| | | m_vecPath4.push_back(akDefect); |
| | | m_vecPath5.push_back(akDefect); |
| | | m_vecPath6.push_back(akDefect); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefectImageTemp() |
| | | { |
| | | _akReviewList akReviewList; |
| | | akReviewList.m_strReviewImageName = ""; |
| | | m_vecTempImage.push_back(akReviewList); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefectImage() |
| | | { |
| | | _akReviewList akReviewList; |
| | | akReviewList.m_strReviewImageName = ""; |
| | | m_vecImage.push_back(akReviewList); |
| | | } |
| | | |
| | | void akDefectFormation::AddGlassInfo() |
| | | { |
| | | _akGlassInfo akGlassInfo; |
| | | akGlassInfo.m_nGlassSelect = -1; |
| | | akGlassInfo.m_strPPID = ""; |
| | | akGlassInfo.m_strGlassID = ""; |
| | | akGlassInfo.m_nDefectNum = -1; |
| | | akGlassInfo.m_nReviewNum = -1; |
| | | akGlassInfo.m_strGlassJudge = ""; |
| | | akGlassInfo.m_strLotID = ""; |
| | | akGlassInfo.m_strSLotID = ""; |
| | | akGlassInfo.m_nSlot_No = -1; |
| | | akGlassInfo.m_nCellNum = -1; |
| | | akGlassInfo.m_nGlassSizeHeight = -1; |
| | | akGlassInfo.m_nGlassSizeWidth = -1; |
| | | |
| | | m_vecGlassInfo.push_back(akGlassInfo); |
| | | } |
| | | |
| | | void akDefectFormation::AddDefectHeaderTemp() |
| | | { |
| | | _akReviewHeader akReviewHeader; |
| | | akReviewHeader.m_nDefectID = 0; |
| | | |
| | | m_vecHeaderTemp.push_back(akReviewHeader); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include "Singleton.h" |
| | | |
| | | struct _DefectDisplayOption //ê·¸ë¥ ì¬ê¸°ì ë§ë¤ì..;; í´ë íëë í기 ê·ì°¬.. |
| | | { |
| | | _DefectDisplayOption() |
| | | { |
| | | m_bShowDefectNormal = TRUE; |
| | | m_bShowDefectGroupRound = TRUE; |
| | | m_bShowDefectGroupLine = TRUE; |
| | | m_bShowNoFilteredDefect = FALSE; |
| | | |
| | | m_nShowLabel = -1; |
| | | m_nShowSize = 0; |
| | | } |
| | | BOOL m_bShowDefectNormal; |
| | | BOOL m_bShowDefectGroupRound; |
| | | BOOL m_bShowDefectGroupLine; |
| | | BOOL m_bShowNoFilteredDefect; |
| | | |
| | | int m_nShowLabel; // 0ë³´ë¤ ìì¼ë©´ 모ë 보기 |
| | | int m_nShowSize; //í´ë¹ê°ë³´ë¤ ìê±°ë ê°ì¼ë©´ ì ê±° |
| | | }; |
| | | |
| | | struct _akDefect |
| | | { |
| | | int nDefectID; |
| | | double dPositionX; |
| | | double dPositionY; |
| | | |
| | | int nLabel; |
| | | |
| | | int nSize; // |
| | | int nType;//0:black defect, 1:white defect |
| | | |
| | | int nGraySrc; |
| | | int nGrayTar; |
| | | int nGrayDiff; |
| | | |
| | | int nFilter;//1ì´ë©´ ì ì¸ |
| | | //("SIZE_S"); |
| | | //("SIZE_W"); |
| | | //("SIZE_L"); |
| | | //("SIZE_H"); |
| | | //("DEFECT_CODE"); |
| | | //("DEF_AVG_1"); |
| | | //("REF_AVG_1"); |
| | | //("REF_GRAY_1"); |
| | | //("MASK_DEFECT"); |
| | | //("COMMON_DEFECT"); |
| | | //("XY_RATIO"); |
| | | //("CAM_NUM"); |
| | | //("LAMP_VALUE"); |
| | | CString m_strInfos[16]; |
| | | |
| | | short m_nDefectID; |
| | | short m_nCameraID; |
| | | short m_nScanIdx; |
| | | //short m_nDefectIdx; // ì¹´ë©ë¼ììì ê²°í¨ ì¸ë±ì¤ |
| | | int m_nDefectIdx; // ì¹´ë©ë¼ììì ê²°í¨ ì¸ë±ì¤ 201207 CJH - ì릿 ì ë침. intíì¼ë¡ ë³ê²½ |
| | | |
| | | int m_nPixelConv; // pixel ë¨ì ì¢í |
| | | int m_nPixelScan; // pixel ë¨ì ì¢í |
| | | |
| | | short m_nPixelSize; // ê²°í¨í¬ê¸° ---------------------------------PS |
| | | short/*SERVER_DefectType*/ m_DefectType; // ê²°í¨ íì
---------------------------------DT |
| | | short/*SERVER_DefectSubType*/ m_DefectSubType; // ê²°í¨ì íì ìí. |
| | | short/*SERVER_DefectBDType*/ m_DefectBDType; // ê²°í¨ íì
- Bright, Dark, Both |
| | | |
| | | short m_sPixelWidth; // í½ì
ë¨ì ê²°í¨ ëë¹ |
| | | short m_sPixelHeight; // í½ì
ë¨ì ê²°í¨ ëì´ |
| | | short m_nLevelSrcMin; // ê²°í¨ ë°ê¸° Min -----------------------------SN |
| | | short m_nLevelSrcMax; // ê²°í¨ ë°ê¸° Max -----------------------------SX |
| | | short m_nLevelSrcAvg; // ê²°í¨ ë°ê¸° Avg -----------------------------SA |
| | | short m_nLevelRefMin; // ë¹êµëì ë°ê¸° Min -------------------------RN |
| | | short m_nLevelRefMax; // ë¹êµëì ë°ê¸° Max -------------------------RX |
| | | short m_nLevelRefAvg; // ë¹êµëì ë°ê¸° Avg -------------------------RA |
| | | short m_nLevelDiffMin; // ë¹êµì°¨ Min ---------------------------------DN |
| | | short m_nLevelDiffMax; // ë¹êµì°¨ Max ---------------------------------DX |
| | | short m_nLevelDiffAvg; // ë¹êµì°¨ Avg ---------------------------------DA |
| | | |
| | | int m_nDefectRScale; // í½ì
ë¨ì ê²°í¨ ëì´ -------------------------RS |
| | | short m_sThreshold; // ê²°í¨ì ê²ì¶í ëì Threshold |
| | | short m_sThresholdAvg; // ê²°í¨ì ê²ì¶í ëì Threshold AVG |
| | | short m_sDefectPeak; // ê²°í¨ì Peak. |
| | | short m_sDefectLevel; // (DiffAvg - Th) BOE 8G ìì²ì¬í |
| | | |
| | | int m_nPixelGlassStart; // Glass ìì í½ì
|
| | | short m_sDefectLoc; |
| | | |
| | | short m_sZonePixelCount[16]; // Zoneë³ ê²°í¨ Pixel ì |
| | | short m_sZoneValueMin[16]; // Zoneë³ ê²°í¨ Min |
| | | short m_sZoneValueMax[16]; // Zoneë³ ê²°í¨ Max |
| | | short m_sZoneValueAvg[16]; // Zoneë³ ê²°í¨ Avg |
| | | short m_sZonePixelPercent[16]; // --------------------------------------Z0~ZF |
| | | |
| | | //210127 CJH - Zoneë³ Source Gray ì
ë ¥ |
| | | short m_sZoneValueSrcMin[16]; // Zoneë³ Source Min |
| | | short m_sZoneValueSrcMax[16]; // Zoneë³ Source Max |
| | | short m_sZoneValueSrcAvg[16]; // Zoneë³ Source Avg |
| | | |
| | | int m_nUMOriginX; // umë¨ì xì¢í (ìì 기ì¤) |
| | | int m_nUMOriginY; // umë¨ì yì¡°í (ìì 기ì¤) |
| | | int m_nUMCenterAlignX; // umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | int m_nUMCenterAlignY; // umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì í) |
| | | int m_nUMCenterX; // umë¨ì Xì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì ì ) |
| | | int m_nUMCenterY; // umë¨ì Yì¢í (Glass Center 기ì¤, ì¼ë¼ì¸ë³´ì ì ) |
| | | int m_nUMSizeX; // umë¨ì X í¬ê¸° -----------------------------UX |
| | | int m_nUMSizeY; // umë¨ì Y í¬ê¸° -----------------------------UY |
| | | int m_nUMSize; // umë¨ì í¬ê¸°. |
| | | CRect m_RectUM; // ëí ì¼í° ê¸°ì¤ ì¬ê°í. |
| | | |
| | | short/*SERVER_DefectSizeType*/ m_DefectSizeType; // ê²°í¨ í¬ê¸° ì¢
ë¥enum SERVER_DefectSizeType { SizeType_Unknown = 0, SizeType_Small, SizeType_Mid, SizeType_Large, SizeType_Huge, SizeType_Ultra }; |
| | | short/*SERVER_DefectPeakType*/ m_DefectPeakType; // Peakì ì¢
ë¥. |
| | | short/*Judgement*/ m_DefectJudgement; // ê²°í¨ íì . |
| | | BOOL m_bDefectCutoff; // ì»· ì¤í ëí(TRUE= Cutoff, FALSE) |
| | | short/*MAP16_DefectClass*/ m_DefectClass; // BOE Defect Class 16ë±ë¶ êµ¬ë¶ |
| | | int m_nPadRegionIdx; // PAD ìì ì¸ë±ì¤ |
| | | |
| | | int m_nUMCellX; // ì
ìì ê¸°ì¤ x ì¢í |
| | | int m_nUMCellY; // ì
ìì ê¸°ì¤ y ì¢í |
| | | short m_nModelIdx; // ëª ë²ì§¸ 모ë¸ì¸ê°? |
| | | short m_nCellIdx; // ëªë²ì§¸ ì
ì¸ê°? |
| | | short m_nCellGate; // ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | short m_nCellData; // ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì ì ) |
| | | short m_nCellGateAlign; // ì
ë³ Gateë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | short m_nCellDataAlign; // ì
ë³ Dataë¼ì¸(ì¼ë¼ì¸ ë³´ì í) |
| | | |
| | | int m_nUMShotX; // ì· ê¸°ì¤ Xì¢í |
| | | int m_nUMShotY; // ì· ê¸°ì¤ Yì¢í |
| | | short m_nMaskDefectIdx; // í Glassìì ë°ê²¬ë ë§ì¤í¬ê²°í¨ 묶ìì ì¸ë±ì¤. |
| | | short m_nShotIdx; // ë
¸ê´ì· ë²í¸ |
| | | short m_nMatchShotCount; // ëì¼í ë§ì¤í¬ ê²°í¨ì ì. |
| | | short m_nMatchMaxSize; // ëì¼í ë§ì¤í¬ ì¤ ê°ì¥ í° ê²°í¨ì í¬ê¸°. |
| | | |
| | | short m_nRepeatCount; // ì°ìê²°í¨ë°ê²¬ìí ëì¼ì¢í ë°ë³µì |
| | | short m_nMaskRepeatCount; |
| | | int m_StackInfo; // Stack Flag |
| | | BOOL m_bRealStack; // Stack 머ì§ì ìí TD(TRUE) ì¸ì§, íí°ë§ì ìí TD(FALSE)구ë¶í ì ìë¤. |
| | | short m_nStackStepCount; // Stack ì |
| | | short m_nStackColorIdx; // Color를 ì ííë ì¸ë±ì¤. |
| | | //CString m_strStackStep[CFDEFECT_STACKCOUNT]; // Stack Step. |
| | | char m_strStackFirst[60]; // Stack Step. //201221 CJH - ìµë ì¬ì´ì¦ 60bytes |
| | | char m_strUnitID[16]; // ì ëìì´ë |
| | | |
| | | int m_ClassificationType; // enum ClassificationType { ClassType_None= 0, ClassType_PI_Over= 1, ClassType_PI_Under= 2, ClassType_TFE_Circle= 3, ClassType_Bubble, ClassType_Scratch, ClassType_Particle}; Classification Type, PIë TFEë± ì¶ê° ë¶ë¥ ìê³ ë¦¬ì¦ ì ì© ê²°ê³¼. |
| | | int m_nAtomWidth; // TFE íµ ëë¹ |
| | | int m_nAtomHeight; // TFE íµ ëì´ |
| | | short/*ReKind*/ m_DefectKind; // ê²°í¨ ì¢
ë¥ |
| | | |
| | | char m_strDefectCode[32]; // Defect Code |
| | | BOOL m_bMergeState; // Merge Status |
| | | char m_strAoiImageName[256]; // Defect Image Name(CCD Image) |
| | | CString m_strReviewImageName; |
| | | int m_nDefectMerge; // íì¬ ëíì ë¨¸ì§ ì¬ë¶ |
| | | |
| | | int m_nPixelSizeOrigin; |
| | | int m_nScratchRatio; |
| | | int m_nDensity; // ìí ê²°í¨ êµ¬ë¶ì ìí ë°ë [2017.8.2 bhs] |
| | | |
| | | char m_strDefectName[16]; |
| | | char m_strDefectType[16]; |
| | | |
| | | double m_dScanResolution; |
| | | double m_dConvResolution; |
| | | |
| | | int m_nAngle; // ê°ë |
| | | int m_nMajor; // ì¥ì¶ 길ì´(Long) |
| | | int m_nMinor; // ë¨ì¶ 길ì´(Short) |
| | | int m_nCompact; // Blob ì¥ì¶ì ì§ë¦ì¼ë¡ íë ìì ëì´ì Blob ëì´ì ë¹ì¨ |
| | | int m_nThickness; // Blob ëì´ì ì¥ì¶ì ë¹ì¨ (Area / Major) |
| | | |
| | | short m_nHliLevelIdx; // ëª ë²ì§¸ ë 벨(ì±ë)ì¸ê°? |
| | | int m_nHliLayers; // í´ë¹ê²°í¨ì í¬í¨ë ë ì´ì´ bitì²ë¦¬ |
| | | |
| | | BOOL m_bShrinked; //210323 CJH - Frame Shrink ì ë³´ ì¶ê° |
| | | }; |
| | | |
| | | struct _akModule |
| | | { |
| | | int m_nModuleIndex; |
| | | int m_nUMShotX; // ì· ê¸°ì¤ Xì¢í |
| | | int m_nUMShotY; // ì· ê¸°ì¤ Yì¢í |
| | | int m_nShotIndex; |
| | | }; |
| | | |
| | | struct _akShort |
| | | { |
| | | int m_nUMShotX; // ì· ê¸°ì¤ Xì¢í |
| | | int m_nUMShotY; // ì· ê¸°ì¤ Yì¢í |
| | | int m_nShotIndex; |
| | | }; |
| | | |
| | | struct _akReviewList |
| | | { |
| | | short m_nDefectID; |
| | | int m_nDefectIdx; // ì¹´ë©ë¼ììì ê²°í¨ ì¸ë±ì¤ 201207 CJH - ì릿 ì ë침. intíì¼ë¡ ë³ê²½ |
| | | int m_nReviewIdx; |
| | | char m_strAoiImageName[256]; // Defect Image Name(CCD Image) |
| | | CString m_strReviewImageName; |
| | | CString m_strGlassID; |
| | | char m_strAoiImagePath[256]; |
| | | char m_strReviewImagePath[256]; |
| | | char m_strAlignFirst[64]; |
| | | char m_strAlignSecond[64]; |
| | | |
| | | CString m_strInfos[16]; |
| | | }; |
| | | |
| | | struct _akGlassInfo |
| | | { |
| | | int m_nGlassSelect; |
| | | CString m_strPPID; |
| | | CString m_strGlassID; |
| | | int m_nDefectNum; |
| | | int m_nReviewNum; |
| | | CString m_strGlassJudge; |
| | | CString m_strLotID; |
| | | CString m_strSLotID; |
| | | int m_nSlot_No; |
| | | int m_nCellNum; |
| | | int m_nGlassSizeHeight; |
| | | int m_nGlassSizeWidth; |
| | | |
| | | CString m_strInfos[16]; |
| | | }; |
| | | |
| | | struct _akReviewHeader |
| | | { |
| | | short m_nDefectID; |
| | | int m_nDefectIdx; |
| | | CString m_strGlassID; |
| | | CString m_strPPID; |
| | | int m_nReviewIdx; |
| | | CString m_strJudge; |
| | | CString m_strFileTime; |
| | | CString m_strFileName; |
| | | CString m_strLoading; |
| | | CString m_strFilePath; |
| | | |
| | | CString m_strInfos[16]; |
| | | }; |
| | | |
| | | struct _akFormation |
| | | { |
| | | _akFormation() |
| | | { |
| | | m_nFormLabel = -1; |
| | | m_nFormType = 0; |
| | | m_dRectLeft = 0; |
| | | m_dRectTop = 0; |
| | | m_dRectRight = 0; |
| | | m_dRectBottom = 0; |
| | | } |
| | | void MergeDefect(_akDefect* pDefect) |
| | | { |
| | | if (!m_vecForms.empty()) |
| | | { |
| | | if(m_dRectLeft > pDefect->dPositionX) m_dRectLeft = pDefect->dPositionX; |
| | | if(m_dRectRight < pDefect->dPositionX) m_dRectRight = pDefect->dPositionX; |
| | | |
| | | if (m_dRectTop > pDefect->dPositionY) m_dRectTop = pDefect->dPositionY; |
| | | if (m_dRectBottom < pDefect->dPositionY) m_dRectBottom = pDefect->dPositionY; |
| | | } |
| | | else |
| | | { |
| | | m_dRectRight = m_dRectLeft = pDefect->dPositionX; |
| | | m_dRectTop = m_dRectBottom = pDefect->dPositionY; |
| | | } |
| | | m_vecForms.push_back(pDefect); |
| | | } |
| | | void AnalysisDefectInfo() |
| | | { |
| | | m_nDefectNumS=0; |
| | | m_nDefectNumM=0; |
| | | m_nDefectNumL=0; |
| | | m_nDefectNum1Px=0; |
| | | m_nDefectNumWhite=0; |
| | | m_nDefectNumBlack=0; |
| | | m_nDefectNum1PxWhite = 0; |
| | | m_dSizeAvg = 0; |
| | | m_dSizeStdDev = 0; |
| | | m_dDiffStdDev = 0; |
| | | m_dDiffStdDevAbs = 0; |
| | | |
| | | double dDiffAvg=0; |
| | | double dDiffAvgAbs=0; |
| | | |
| | | _akDefect* pDefect; |
| | | for (int i = 0; i < m_vecForms.size(); i++) |
| | | { |
| | | pDefect = m_vecForms[i]; |
| | | |
| | | if (pDefect->nSize >= 5) m_nDefectNumL++; |
| | | else if (pDefect->nSize >= 2) m_nDefectNumM++; |
| | | else if (pDefect->nSize >= 0) m_nDefectNumS++; |
| | | |
| | | if (pDefect->nSize == 1) m_nDefectNum1Px++; |
| | | |
| | | if (pDefect->nType == 1) m_nDefectNumWhite++; |
| | | else m_nDefectNumBlack++; |
| | | |
| | | if (pDefect->nType == 1 && pDefect->nSize == 1) m_nDefectNum1PxWhite++; |
| | | |
| | | m_dSizeAvg += (double)pDefect->nSize; |
| | | dDiffAvg += (double)pDefect->nGrayDiff; |
| | | dDiffAvgAbs += abs((double)pDefect->nGrayDiff); |
| | | } |
| | | m_dSizeAvg /= m_vecForms.size(); |
| | | dDiffAvg /= m_vecForms.size(); |
| | | dDiffAvgAbs /= m_vecForms.size(); |
| | | |
| | | for (int i = 0; i < m_vecForms.size(); i++) |
| | | { |
| | | pDefect = m_vecForms[i]; |
| | | double dDiff = m_dSizeAvg - m_vecForms[i]->nSize; |
| | | m_dSizeStdDev += dDiff * dDiff; |
| | | |
| | | dDiff = dDiffAvg - m_vecForms[i]->nGrayDiff; |
| | | m_dDiffStdDev += dDiff * dDiff; |
| | | |
| | | dDiff = dDiffAvgAbs - abs((double)pDefect->nGrayDiff); |
| | | m_dDiffStdDevAbs += dDiff * dDiff; |
| | | } |
| | | m_dSizeStdDev = sqrt(m_dSizeStdDev / (double)m_vecForms.size()); |
| | | m_dDiffStdDev = sqrt(m_dDiffStdDev / (double)m_vecForms.size()); |
| | | m_dDiffStdDevAbs = sqrt(m_dDiffStdDevAbs / (double)m_vecForms.size()); |
| | | |
| | | int nFilter = FALSE; |
| | | { |
| | | double d1PxRate = 100.0*((double)m_nDefectNum1Px / (double)m_vecForms.size()); |
| | | double d1PxWhiteRate = 100.0*((double)m_nDefectNum1PxWhite/(double)m_vecForms.size()); |
| | | |
| | | |
| | | if (m_nFormType == 0 && d1PxWhiteRate > 50) |
| | | { |
| | | nFilter = TRUE; |
| | | } |
| | | if (m_nFormType == 1 && d1PxWhiteRate > 30) |
| | | { |
| | | nFilter = TRUE; |
| | | } |
| | | if (m_dSizeStdDev == 0) |
| | | { |
| | | nFilter = TRUE; |
| | | } |
| | | if(d1PxRate>50) |
| | | { |
| | | nFilter = TRUE; |
| | | } |
| | | |
| | | } |
| | | |
| | | if (nFilter) |
| | | { |
| | | for (int i = 0; i < m_vecForms.size(); i++) |
| | | { |
| | | pDefect = m_vecForms[i]; |
| | | pDefect->nFilter = 1; |
| | | } |
| | | } |
| | | |
| | | m_nFormJudge = nFilter; |
| | | } |
| | | |
| | | std::vector<_akDefect*> m_vecForms; |
| | | |
| | | int m_nFormJudge; //0:Normal, 1:Nodefect |
| | | int m_nFormLabel; |
| | | int m_nFormType; //-1:none, 0:round, 1:line |
| | | double m_dRectLeft; |
| | | double m_dRectTop; |
| | | double m_dRectRight; |
| | | double m_dRectBottom; |
| | | |
| | | //ë¶ì ë°ì´í°ë¤ [ê¹íí2021/2/22] |
| | | double m_dSizeAvg; |
| | | double m_dSizeStdDev; |
| | | int m_nDefectNumS; |
| | | int m_nDefectNumM; |
| | | int m_nDefectNumL; |
| | | int m_nDefectNum1Px; |
| | | int m_nDefectNumWhite; |
| | | int m_nDefectNumBlack; |
| | | int m_nDefectNum1PxWhite; |
| | | |
| | | double m_dDiffStdDev; //ê·¸ë ì´ ì°¨ì´ íì¤í¸ì°¨ |
| | | double m_dDiffStdDevAbs; //ê·¸ë ì´ ì°¨ì´ ì ëê° íì¤í¸ì°¨ |
| | | }; |
| | | |
| | | |
| | | class akDefectFormation : public CSingleton< akDefectFormation > |
| | | { |
| | | public: |
| | | akDefectFormation(); |
| | | virtual ~akDefectFormation(); |
| | | |
| | | public: |
| | | void Clear(); |
| | | void AddDefect(double dPosX, double dPosY); |
| | | void AddDefectTemp(double dPosX, double dPosY); |
| | | void AddDefect2(); |
| | | void AddDefectImageTemp(); |
| | | void AddDefectImage(); |
| | | void AddGlassInfo(); |
| | | void AddDefectHeaderTemp(); |
| | | |
| | | public: |
| | | std::vector<_akDefect> m_vecDefects; |
| | | std::vector<_akDefect> m_vecTempDefects; |
| | | std::vector<_akFormation> m_vecFormation; |
| | | std::vector<_akReviewList> m_vecImage; |
| | | std::vector<_akReviewList> m_vecTempImage; |
| | | std::vector<_akReviewHeader> m_vecHeader; |
| | | std::vector<_akReviewHeader> m_vecHeaderTemp; |
| | | std::vector<_akGlassInfo> m_vecGlassInfo; |
| | | |
| | | std::vector<_akDefect> m_vecPath1; |
| | | std::vector<_akDefect> m_vecPath2; |
| | | std::vector<_akDefect> m_vecPath3; |
| | | std::vector<_akDefect> m_vecPath4; |
| | | std::vector<_akDefect> m_vecPath5; |
| | | std::vector<_akDefect> m_vecPath6; |
| | | |
| | | public: |
| | | std::vector< std::vector<_akDefect > > m_vecMoudle; |
| | | }; |
| | | |
| | | |
»õ ÆÄÀÏ |
| | |
| | | #include "stdafx.h" |
| | | #include "akFormationMap.h" |
| | | |
| | | |
| | | CakFormationMap::CakFormationMap() |
| | | { |
| | | { |
| | | CakGraphBase::setAK(); |
| | | m_AxisX.m_Size = 80; |
| | | m_AxisX.m_TickGabStep = 1; |
| | | m_AxisX.m_MinorTickNum = 4; |
| | | m_AxisY.m_MinorTickNum = 4; |
| | | //m_AxisX.m_TickGabPixel = 30; |
| | | //m_AxisX.m_FontTick.DeleteObject(); |
| | | //m_AxisX.m_FontTick.CreatePointFont(120, _T("Tahoma")); |
| | | //m_AxisX.SetRotateFont(&m_AxisX.m_FontTick, 270); |
| | | m_AxisY.SetRotateFont(&m_AxisY.m_FontTick, 90); |
| | | m_AxisY2.SetRotateFont(&m_AxisY2.m_FontTick, 270); |
| | | SetClossLine(false); |
| | | SetDragStyle(DS_All_HOR); |
| | | m_bGrid = false; |
| | | |
| | | m_AxisY.m_TickGabPixel = 70; |
| | | m_AxisX.m_Size = 20; |
| | | m_AxisY.m_Size = 20; |
| | | m_AxisY2.m_Size = 20; |
| | | m_Title.m_Size = 20; |
| | | |
| | | m_AxisX.m_strTitle = ""; |
| | | m_AxisY.m_strTitle = ""; |
| | | m_Title.m_strTitle = " "; |
| | | |
| | | m_MouseMoveInfo.m_nType = 0; |
| | | } |
| | | |
| | | m_bShowCell = TRUE; |
| | | |
| | | |
| | | m_bShowGroupIndex = FALSE; |
| | | m_bShowGroupLine = TRUE; |
| | | |
| | | m_pDefectFormation = NULL; |
| | | m_dGlassSizeWidth = 2500; |
| | | m_dGlassSizeHeight = 2300; |
| | | |
| | | m_bShowDefectOutLine = TRUE; |
| | | m_bShowDefectColorType = FALSE; |
| | | |
| | | m_pSelectedFormation = NULL; |
| | | m_pMouseOveredDefect = NULL; |
| | | m_pSelectedDefect = NULL; |
| | | m_pMouseOveredFormation = NULL; |
| | | } |
| | | |
| | | |
| | | CakFormationMap::~CakFormationMap() |
| | | { |
| | | } |
| | | |
| | | void CakFormationMap::RenderSeries(Graphics* grfx, CDC* pDC) |
| | | { |
| | | renderGlass(pDC); |
| | | renderCell(pDC); |
| | | |
| | | renderDefects(pDC); |
| | | renderDefectsPath(pDC); |
| | | |
| | | renderFormations(pDC); |
| | | } |
| | | |
| | | void CakFormationMap::SetAutoScale() |
| | | { |
| | | CakGraphBasic3::SetAutoScale(); |
| | | |
| | | if (1)//ê¸ë¼ì¤ í¬ê¸° ë° ê·¸ë¦¬ê¸° ë°©í¥ ê²°ì íí[2016/3/23] |
| | | { |
| | | double nGlassSizeX = m_dGlassSizeWidth; |
| | | double nGlassSizeY = m_dGlassSizeHeight; |
| | | |
| | | double dWindowRate = (double)m_rectData.Width() / (double)m_rectData.Height(); |
| | | double dValueRate = (double)nGlassSizeX / (double)nGlassSizeY; |
| | | |
| | | if (dWindowRate < dValueRate)//ê°ë¡í ê¸°ì¤ íí[2016/3/25] |
| | | { |
| | | m_AxisX.m_RangeValueMin = 0; |
| | | m_AxisX.m_RangeValueMax = nGlassSizeX; |
| | | m_AxisY.m_RangeValueMin = 0; |
| | | m_AxisY.m_RangeValueMax = (float)nGlassSizeX*((float)m_rectData.Height() / (float)m_rectData.Width()); |
| | | m_AxisY.SetRangePos(nGlassSizeY / 2); |
| | | |
| | | |
| | | } |
| | | else //ì¸ë¡íê¸°ì¤ íí[2016/3/25] |
| | | { |
| | | |
| | | m_AxisX.m_RangeValueMin = 0; |
| | | m_AxisX.m_RangeValueMax = (float)nGlassSizeY*((float)m_rectData.Width() / (float)m_rectData.Height()); |
| | | m_AxisY.m_RangeValueMin = 0; |
| | | m_AxisY.m_RangeValueMax = nGlassSizeY; |
| | | |
| | | m_AxisX.SetRangePos(nGlassSizeX / 2); |
| | | } |
| | | |
| | | //0,0ì´ ì¤ìì ì¤ëë¡ [ê¹íí2021/2/16] |
| | | m_AxisX.SetRangePos(0); |
| | | m_AxisY.SetRangePos(0); |
| | | } |
| | | } |
| | | |
| | | void CakFormationMap::SetResize() |
| | | { |
| | | CakGraphBasic3::SetAutoScale(); |
| | | |
| | | if (1)//ê¸ë¼ì¤ í¬ê¸° ë° ê·¸ë¦¬ê¸° ë°©í¥ ê²°ì íí[2016/3/23] |
| | | { |
| | | double nGlassSizeX = m_dGlassSizeWidth; |
| | | double nGlassSizeY = m_dGlassSizeHeight; |
| | | |
| | | double dWindowRate = (double)m_rectData.Width() / (double)m_rectData.Height(); |
| | | double dValueRate = (double)nGlassSizeX / (double)nGlassSizeY; |
| | | |
| | | double dPosOldX = m_AxisX.m_RangeValueMin + m_AxisX.GetRangeValue()/2.0; |
| | | double dPosOldY = m_AxisY.m_RangeValueMin + m_AxisY.GetRangeValue() / 2.0; |
| | | if (dWindowRate < dValueRate)//ê°ë¡í ê¸°ì¤ íí[2016/3/25] |
| | | { |
| | | m_AxisX.m_RangeValueMin = 0; |
| | | m_AxisX.m_RangeValueMax = nGlassSizeX; |
| | | m_AxisY.m_RangeValueMin = 0; |
| | | m_AxisY.m_RangeValueMax = (float)nGlassSizeX*((float)m_rectData.Height() / (float)m_rectData.Width()); |
| | | m_AxisY.SetRangePos(nGlassSizeY / 2); |
| | | |
| | | |
| | | } |
| | | else //ì¸ë¡íê¸°ì¤ íí[2016/3/25] |
| | | { |
| | | |
| | | m_AxisX.m_RangeValueMin = 0; |
| | | m_AxisX.m_RangeValueMax = (float)nGlassSizeY*((float)m_rectData.Width() / (float)m_rectData.Height()); |
| | | m_AxisY.m_RangeValueMin = 0; |
| | | m_AxisY.m_RangeValueMax = nGlassSizeY; |
| | | |
| | | m_AxisX.SetRangePos(nGlassSizeX / 2); |
| | | } |
| | | |
| | | m_AxisX.SetRangePos(dPosOldX); |
| | | m_AxisY.SetRangePos(dPosOldY); |
| | | } |
| | | } |
| | | |
| | | void CakFormationMap::OnMouseInput(akMouseEvent mouseevent, CPoint point) |
| | | { |
| | | CakGraphBasic3::OnMouseInput(mouseevent, point); |
| | | |
| | | switch (mouseevent) |
| | | { |
| | | case MouseMove: |
| | | { |
| | | m_pMouseOveredDefect = findDefect(GetValuePosDataX(point.x), GetValuePosDataY(point.y)); |
| | | if(m_pMouseOveredDefect) GetParent()->PostMessage(UM_FORMMAP_DEFECTMOUSEOVER, m_pMouseOveredDefect->m_nDefectID); |
| | | //else GetParent()->PostMessage(UM_FORMMAP_DEFECTMOUSEOVER, m_pMouseOveredDefect->nDefectID); |
| | | |
| | | m_pMouseOveredFormation = findFormation(GetValuePosDataX(point.x), GetValuePosDataY(point.y)); |
| | | //if (m_pMouseOveredFormation) GetParent()->PostMessage(UM_FORMMAP_FORMMOUSEOVER, m_pMouseOveredFormation->m_nFormLabel); |
| | | break; |
| | | } |
| | | case MouseLeftButtonDown: |
| | | { |
| | | m_pSelectedDefect = findDefect(GetValuePosDataX(point.x), GetValuePosDataY(point.y)); |
| | | if (m_pSelectedDefect) GetParent()->PostMessage(UM_FORMMAP_DEFECTSELECT, m_pSelectedDefect->m_nDefectID, 0); |
| | | |
| | | m_pSelectedFormation = findFormation(GetValuePosDataX(point.x), GetValuePosDataY(point.y)); |
| | | if (m_pMouseOveredFormation) GetParent()->PostMessage(UM_FORMMAP_DEFECTSELECT, m_pMouseOveredFormation->m_nFormLabel, 1); |
| | | |
| | | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | void CakFormationMap::OnKeyInput(int key, int mode) |
| | | { |
| | | CakGraphBasic3::OnKeyInput(key, mode); |
| | | |
| | | if (mode == 0) return; |
| | | |
| | | switch (key) |
| | | { |
| | | case 'G': |
| | | { |
| | | m_bGrid = !m_bGrid; |
| | | ReDraw(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | _akDefect* CakFormationMap::findDefect(double nPosX, double nPosY) |
| | | { |
| | | if (!m_pDefectFormation) |
| | | return NULL; |
| | | |
| | | _akDefect* pDefect; |
| | | |
| | | double nInPosRage = 1; |
| | | nInPosRage =(abs(GetValuePosDataX(nInPosRage) - GetValuePosDataX(0))); |
| | | CakRectd rectMousePos; |
| | | rectMousePos.set(nPosX, nPosY, nPosX, nPosY); |
| | | rectMousePos.InflateRect(nInPosRage*3, nInPosRage*5, nInPosRage*5, nInPosRage*3); |
| | | |
| | | int nFormType; |
| | | int nFormLabel; |
| | | |
| | | double dMinDistance; |
| | | _akDefect* pDefectMin = NULL; |
| | | //ìë ì ê²½ìì°ê³ 구í;;기ë¥ì´ ì°ì ì´ë¤~ [ê¹íí2021/2/16] |
| | | for (int i = 0; i < m_pDefectFormation->m_vecDefects.size(); i++) |
| | | { |
| | | { |
| | | pDefect = &m_pDefectFormation->m_vecDefects[i]; |
| | | |
| | | nFormType = -1; |
| | | nFormLabel = m_pDefectFormation->m_vecDefects[i].nLabel; |
| | | |
| | | if (nFormLabel >= 0) |
| | | { |
| | | nFormType = m_pDefectFormation->m_vecFormation[nFormLabel].m_nFormType; |
| | | } |
| | | |
| | | if (m_pDefectDisplayOption->m_nShowSize) |
| | | { |
| | | if (pDefect->nSize <= m_pDefectDisplayOption->m_nShowSize) continue; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectNormal == FALSE) |
| | | { |
| | | if (nFormType < 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupRound == FALSE) |
| | | { |
| | | if (nFormType == 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupLine == FALSE) |
| | | { |
| | | if (nFormType == 1) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_nShowLabel >= 0) |
| | | { |
| | | if (nFormLabel != m_pDefectDisplayOption->m_nShowLabel) continue;; |
| | | } |
| | | } |
| | | if (rectMousePos.getCheckAreaIn(m_pDefectFormation->m_vecDefects[i].dPositionX, m_pDefectFormation->m_vecDefects[i].dPositionY)) |
| | | { |
| | | double dMinDistanceNew = |
| | | (m_pDefectFormation->m_vecDefects[i].dPositionX - rectMousePos.getCenter()) * (m_pDefectFormation->m_vecDefects[i].dPositionX - rectMousePos.getCenter()) |
| | | + (m_pDefectFormation->m_vecDefects[i].dPositionY - rectMousePos.getVCenter()) * (m_pDefectFormation->m_vecDefects[i].dPositionY - rectMousePos.getVCenter()) ; |
| | | if (pDefectMin) |
| | | { |
| | | if (dMinDistance < dMinDistanceNew) |
| | | { |
| | | pDefectMin = &m_pDefectFormation->m_vecDefects[i]; |
| | | dMinDistance = dMinDistanceNew; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | pDefectMin = &m_pDefectFormation->m_vecDefects[i]; |
| | | dMinDistance = dMinDistanceNew; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | return pDefectMin; |
| | | } |
| | | |
| | | _akFormation* CakFormationMap::findFormation(double nPosX, double nPosY) |
| | | { |
| | | if (!m_pDefectFormation) |
| | | return NULL; |
| | | |
| | | _akFormation* pFormation = NULL; |
| | | _akFormation* pFormationRetrun = NULL; |
| | | |
| | | CakRectd rectForm; |
| | | |
| | | int nFormType; |
| | | int nFormLabel; |
| | | |
| | | double dMinDistance; |
| | | //ìë ì ê²½ìì°ê³ 구í;;기ë¥ì´ ì°ì ì´ë¤~ [ê¹íí2021/2/16] |
| | | for (int i = 0; i < m_pDefectFormation->m_vecFormation.size(); i++) |
| | | { |
| | | { |
| | | pFormation = &m_pDefectFormation->m_vecFormation[i]; |
| | | |
| | | nFormType = pFormation->m_nFormType; |
| | | nFormLabel = i; |
| | | |
| | | if (nFormLabel >= 0) |
| | | { |
| | | nFormType = m_pDefectFormation->m_vecFormation[nFormLabel].m_nFormType; |
| | | } |
| | | |
| | | // if (m_pDefectDisplayOption->m_nShowSize) |
| | | // { |
| | | // if (pFormation->nSize <= m_pDefectDisplayOption->m_nShowSize) continue; |
| | | // } |
| | | if (m_pDefectDisplayOption->m_bShowDefectNormal == FALSE) |
| | | { |
| | | if (nFormType < 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupRound == FALSE) |
| | | { |
| | | if (nFormType == 0) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupLine == FALSE) |
| | | { |
| | | if (nFormType == 1) continue;; |
| | | } |
| | | if (m_pDefectDisplayOption->m_nShowLabel >= 0) |
| | | { |
| | | if (nFormLabel != m_pDefectDisplayOption->m_nShowLabel) continue;; |
| | | } |
| | | } |
| | | |
| | | rectForm.set( |
| | | GetWindowPosX(pFormation->m_dRectLeft), |
| | | GetWindowPosY(pFormation->m_dRectTop), |
| | | GetWindowPosX(pFormation->m_dRectRight), |
| | | GetWindowPosY(pFormation->m_dRectBottom) |
| | | ); |
| | | |
| | | rectForm.NormalizeRect(); |
| | | rectForm.InflateRect(4, 4, 5, 5); |
| | | |
| | | if (rectForm.getCheckAreaIn(GetWindowPosX(nPosX), GetWindowPosY(nPosY))) |
| | | { |
| | | double dMinDistanceNew = min(abs(GetWindowPosX(nPosX) - rectForm.getCenter()), abs(GetWindowPosY(nPosY) - rectForm.getVCenter())); |
| | | |
| | | if (pFormationRetrun) |
| | | { |
| | | if (dMinDistanceNew < dMinDistance) |
| | | { |
| | | pFormationRetrun = pFormation; |
| | | dMinDistance = dMinDistanceNew; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | pFormationRetrun = pFormation; |
| | | dMinDistance = dMinDistanceNew; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | return pFormationRetrun; |
| | | } |
| | | |
| | | void CakFormationMap::setSelectDefect(int nDefectID) |
| | | { |
| | | for (int i = 0; i < m_pDefectFormation->m_vecDefects.size(); i++) |
| | | { |
| | | if (m_pDefectFormation->m_vecDefects[i].m_nDefectID == nDefectID) |
| | | { |
| | | m_pSelectedDefect = &m_pDefectFormation->m_vecDefects[i]; |
| | | break; |
| | | } |
| | | } |
| | | ReDraw(false); |
| | | } |
| | | |
| | | void CakFormationMap::setSelectForm(int nFormID) |
| | | { |
| | | for (int i = 0; i < m_pDefectFormation->m_vecFormation.size(); i++) |
| | | { |
| | | if (m_pDefectFormation->m_vecFormation[i].m_nFormLabel == nFormID) |
| | | { |
| | | m_pSelectedFormation = &m_pDefectFormation->m_vecFormation[i]; |
| | | break; |
| | | } |
| | | } |
| | | ReDraw(false); |
| | | } |
| | | void CakFormationMap::renderGlass(CDC* pDC) |
| | | { |
| | | double nGlassSizeX = m_dGlassSizeWidth; |
| | | double nGlassSizeY = m_dGlassSizeHeight; |
| | | |
| | | |
| | | CBrush BrushGlass, *pOldBrush; |
| | | BrushGlass.CreateSolidBrush(RGB(255,255,255)); |
| | | |
| | | |
| | | CakRectd rectGlass; |
| | | rectGlass.set(0, 0, nGlassSizeX, nGlassSizeY); |
| | | rectGlass.MoveToXY(-nGlassSizeX / 2, -nGlassSizeY / 2); |
| | | |
| | | //ê¸ë¼ì¤ ì¸ê°ì 그리기 íí[2016/3/23] |
| | | { |
| | | pOldBrush = (CBrush*)pDC->SelectObject(&BrushGlass); |
| | | CPen pen; |
| | | pen.CreatePen(PS_SOLID, 1, RGB(64, 191, 79)); |
| | | pDC->SelectObject(&pen); |
| | | |
| | | pDC->MoveTo(GetWindowPosX(rectGlass.left), GetWindowPosY(rectGlass.top)); |
| | | pDC->LineTo(GetWindowPosX(rectGlass.right), GetWindowPosY(rectGlass.top)); |
| | | pDC->LineTo(GetWindowPosX(rectGlass.right), GetWindowPosY(rectGlass.bottom)); |
| | | pDC->LineTo(GetWindowPosX(rectGlass.left), GetWindowPosY(rectGlass.bottom)); |
| | | pDC->LineTo(GetWindowPosX(rectGlass.left), GetWindowPosY(rectGlass.top)); |
| | | |
| | | pDC->SelectObject(&pOldBrush); |
| | | } |
| | | } |
| | | |
| | | void CakFormationMap::renderCell(CDC* pDC) |
| | | { |
| | | if (m_vecCellRect.empty() || m_bShowCell == FALSE) return; |
| | | |
| | | CBrush BrushGlass, *pOldBrush; |
| | | BrushGlass.CreateSolidBrush(RGB(225, 225, 225)); |
| | | |
| | | pOldBrush = (CBrush*)pDC->SelectObject(&BrushGlass); |
| | | CPen pen; |
| | | pen.CreatePen(PS_SOLID, 1, RGB(242, 104, 13)); |
| | | pDC->SelectObject(&pen); |
| | | |
| | | CakRectd rectCell; |
| | | // |
| | | for(int i=0; i<m_vecCellRect.size(); i++) |
| | | { |
| | | rectCell = m_vecCellRect[i]; |
| | | |
| | | |
| | | pDC->MoveTo(GetWindowPosX(rectCell.left), GetWindowPosY(rectCell.top)); |
| | | pDC->LineTo(GetWindowPosX(rectCell.right), GetWindowPosY(rectCell.top)); |
| | | pDC->LineTo(GetWindowPosX(rectCell.right), GetWindowPosY(rectCell.bottom)); |
| | | pDC->LineTo(GetWindowPosX(rectCell.left), GetWindowPosY(rectCell.bottom)); |
| | | pDC->LineTo(GetWindowPosX(rectCell.left), GetWindowPosY(rectCell.top)); |
| | | |
| | | |
| | | } |
| | | |
| | | pDC->SelectObject(&pOldBrush); |
| | | } |
| | | |
| | | void CakFormationMap::renderDefects(CDC* pDC) |
| | | { |
| | | if (m_pDefectFormation == NULL) return; |
| | | |
| | | CBrush BrushDefect, *pOldBrush; |
| | | CPen PenDefect, *pOldPen; |
| | | CBrush BrushRoundForm; |
| | | CBrush BrushLineForm; |
| | | CBrush BrushFiltered; |
| | | PenDefect.CreatePen(PS_SOLID, 1, RGB(50, 50, 50)); |
| | | BrushDefect.CreateSolidBrush(RGB(96, 159, 255)); |
| | | |
| | | BrushRoundForm.CreateSolidBrush(RGB(234, 43, 36)); |
| | | BrushLineForm.CreateSolidBrush(RGB(70, 161, 70)); |
| | | BrushFiltered.CreateSolidBrush(RGB(200,200,200)); |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | pOldBrush = pDC->SelectObject(&BrushDefect); |
| | | |
| | | if(m_bShowDefectOutLine == FALSE) pDC->SelectStockObject(NULL_PEN); |
| | | |
| | | CakRectd rectDefect; |
| | | rectDefect.set(0, 0, 5, 5); |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecDefects.size(); i++) |
| | | { |
| | | _akDefect* pDefect = &m_pDefectFormation->m_vecDefects[i]; |
| | | |
| | | rectDefect.set(GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY), |
| | | GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY)); |
| | | rectDefect.InflateRect(3, 3, 3, 3); |
| | | |
| | | if (m_pDefectDisplayOption->m_nShowSize) |
| | | { |
| | | if(pDefect->nSize <= m_pDefectDisplayOption->m_nShowSize) continue; |
| | | } |
| | | if (m_pDefectDisplayOption->m_nShowLabel >= 0) |
| | | { |
| | | if(pDefect->nLabel != m_pDefectDisplayOption->m_nShowLabel) continue; |
| | | } |
| | | if (m_pDefectDisplayOption->m_bShowNoFilteredDefect == TRUE) |
| | | { |
| | | if (pDefect->nFilter == 1) continue; |
| | | } |
| | | if (pDefect->nLabel < 0) |
| | | { |
| | | if (m_pDefectDisplayOption->m_bShowDefectNormal) |
| | | { |
| | | pDC->SelectObject(&BrushDefect); |
| | | if (pDefect->nFilter == 1) pDC->SelectObject(&BrushFiltered); |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | pDC->SelectObject(&BrushDefect); |
| | | int nFormType = 0; |
| | | nFormType = m_pDefectFormation->m_vecFormation[pDefect->nLabel].m_nFormType; |
| | | if (nFormType == 0) //ì¼ë°êµ°ì§ [ê¹íí2021/2/16] |
| | | { |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupRound) |
| | | { |
| | | pDC->SelectObject(&BrushRoundForm); |
| | | if(m_bShowDefectColorType) pDC->SelectObject(&BrushDefect); |
| | | if(pDefect->nFilter==1) pDC->SelectObject(&BrushFiltered); |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | } |
| | | |
| | | } |
| | | else if (nFormType == 1) //ë¼ì¸êµ°ì
[ê¹íí2021/2/16] |
| | | { |
| | | if (m_pDefectDisplayOption->m_bShowDefectGroupLine) |
| | | { |
| | | pDC->SelectObject(&BrushLineForm); |
| | | if (m_bShowDefectColorType) pDC->SelectObject(&BrushDefect); |
| | | if (pDefect->nFilter == 1) pDC->SelectObject(&BrushFiltered); |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (m_bShowGroupIndex) |
| | | { |
| | | CString strLabel; |
| | | pDC->SetTextColor(RGB(111, 0, 138)); |
| | | pDC->SetTextAlign(TA_BASELINE | TA_CENTER); |
| | | |
| | | for (int k = 0; k < m_pDefectFormation->m_vecFormation.size(); k++) |
| | | { |
| | | _akFormation* pFormation = &m_pDefectFormation->m_vecFormation[k]; |
| | | |
| | | for (int i = 0; i < pFormation->m_vecForms.size(); i++) |
| | | { |
| | | _akDefect* pDefect = pFormation->m_vecForms[i]; |
| | | if (pDefect->nLabel >= 0) |
| | | { |
| | | strLabel.Format("%d", pDefect->nLabel); |
| | | pDC->TextOut(GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY), strLabel); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | pDC->SelectObject(pOldBrush); |
| | | |
| | | } |
| | | |
| | | void CakFormationMap::renderDefectsPath(CDC* pDC) |
| | | { |
| | | if (!m_pDefectFormation) return; |
| | | |
| | | if (m_pDefectFormation->m_vecDefects.size() == 0) return; |
| | | |
| | | int nStartPosX, nStartPosY, nEndPosX, nEndPosY; |
| | | |
| | | CPen pathPen; |
| | | CPen *pOldPen = NULL; |
| | | |
| | | pathPen.CreatePen(PS_DOT, 1, RGB(0, 0, 255)); |
| | | |
| | | CakRectd rectDefectPath; |
| | | |
| | | //ì ì²´ìì 모ë ìì íì¸ í´ì ì ë ¬ |
| | | //모ë ìììì short ììì ë°ë¼ ì ë ¬ |
| | | //ììëë¡ ë£ì´ ì¤ë¤. |
| | | m_pDefectFormation->m_vecPath1.clear(); |
| | | m_pDefectFormation->m_vecPath2.clear(); |
| | | m_pDefectFormation->m_vecPath3.clear(); |
| | | m_pDefectFormation->m_vecPath4.clear(); |
| | | m_pDefectFormation->m_vecPath5.clear(); |
| | | m_pDefectFormation->m_vecPath6.clear(); |
| | | |
| | | //short index ìì ëë¡ ê°ì ¸ ì¤ë©´ ëë ê±° ìëê°? |
| | | //ë¶ë¥ ìì
ì í´ì¼ íë¤ |
| | | for (int i = 0; i < m_pDefectFormation->m_vecDefects.size(); i++) |
| | | { |
| | | //1, 모ë ììì ë°ë¼ì ì ë ¬ í´ ë³´ì |
| | | _akDefect* pDefect = &m_pDefectFormation->m_vecDefects[i]; |
| | | //_akDefect* pDefect1 = &m_pDefectFormation->m_vecPath1[i]; |
| | | |
| | | if (pDefect->m_nModelIdx == 0) |
| | | { |
| | | m_pDefectFormation->m_vecPath1.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | else if (pDefect->m_nModelIdx == 1) |
| | | { |
| | | m_pDefectFormation->m_vecPath2.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | else if (pDefect->m_nModelIdx == 2) |
| | | { |
| | | m_pDefectFormation->m_vecPath3.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | else if (pDefect->m_nModelIdx == 3) |
| | | { |
| | | m_pDefectFormation->m_vecPath4.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | else if (pDefect->m_nModelIdx == 4) |
| | | { |
| | | m_pDefectFormation->m_vecPath5.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | else if (pDefect->m_nModelIdx == 5) |
| | | { |
| | | m_pDefectFormation->m_vecPath6.push_back(m_pDefectFormation->m_vecDefects[i]); |
| | | } |
| | | } |
| | | |
| | | //ë¶ë¥ ìì
ì´ ìë£ ëë©´ 모ë ê°¯ì ë§í¼ ë¤ì sort í ììëë¡ ê·¸ë¦°ë¤ |
| | | int nS = 0, nS2 = 0, nS3 = 0, nS4 = 0, nS5=0, nS6 = 0; |
| | | |
| | | bool bNext = false, bNext2 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath1.size(); i++) |
| | | { |
| | | //모ëì ë¤ì´ ìë ê°ì sort íì |
| | | //sortí ê²ì 그린ë¤. |
| | | bNext = false, bNext2 = false; |
| | | int nStart = -1, nEnd = -1; |
| | | |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath1.size(); j++) |
| | | { |
| | | _akDefect* pDefect1 = &m_pDefectFormation->m_vecPath1[j]; |
| | | |
| | | if (pDefect1->m_nShotIdx == nS) |
| | | { |
| | | nStart = j; |
| | | bNext = true; |
| | | } |
| | | else if (pDefect1->m_nShotIdx == nS + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext2 = true; |
| | | } |
| | | else if (bNext == true && bNext2 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (bNext == true && bNext2 == true) |
| | | { |
| | | nS++; |
| | | } |
| | | |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath1[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath1[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | bool bNext3 = false, bNext4 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath2.size(); i++) |
| | | { |
| | | int nStart = -1, nEnd = -1; |
| | | bNext3 = false, bNext4 = false; |
| | | |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath2.size(); j++) |
| | | { |
| | | _akDefect* pDefect2 = &m_pDefectFormation->m_vecPath2[j]; |
| | | |
| | | if (pDefect2->m_nShotIdx == nS2) |
| | | { |
| | | nStart = j; |
| | | bNext3 = true; |
| | | } |
| | | else if (pDefect2->m_nShotIdx == nS2 + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext4 = true; |
| | | } |
| | | else if (bNext3 == true && bNext4 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (bNext3 == true && bNext4 == true) |
| | | { |
| | | nS2++; |
| | | } |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath2[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath2[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | bool bNext5 = false, bNext6 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath3.size(); i++) |
| | | { |
| | | int nStart = -1, nEnd = -1; |
| | | bNext5 = false, bNext6 = false; |
| | | |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath3.size(); j++) |
| | | { |
| | | _akDefect* pDefect3 = &m_pDefectFormation->m_vecPath3[j]; |
| | | |
| | | if (pDefect3->m_nShotIdx == nS3) |
| | | { |
| | | nStart = j; |
| | | bNext5 = true; |
| | | } |
| | | else if (pDefect3->m_nShotIdx == nS3 + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext6 = true; |
| | | } |
| | | else if (bNext5 == true && bNext6 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | |
| | | //sortí ê²ì 그린ë¤. |
| | | if (bNext5 == true && bNext6 == true) |
| | | { |
| | | nS3++; |
| | | } |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath3[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath3[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | bool bNext7 = false, bNext8 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath4.size(); i++) |
| | | { |
| | | int nStart = -1, nEnd = -1; |
| | | bNext7 = false, bNext8 = false; |
| | | |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath4.size(); j++) |
| | | { |
| | | _akDefect* pDefect4 = &m_pDefectFormation->m_vecPath4[j]; |
| | | |
| | | if (pDefect4->m_nShotIdx == nS4) |
| | | { |
| | | nStart = j; |
| | | bNext7 = true; |
| | | } |
| | | else if (pDefect4->m_nShotIdx == nS4 + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext8 = true; |
| | | } |
| | | else if (bNext7 == true && bNext8 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (bNext7 == true && bNext8 == true) |
| | | { |
| | | nS4++; |
| | | } |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath4[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath4[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | bool bNext9 = false, bNext10 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath5.size(); i++) |
| | | { |
| | | int nStart = -1, nEnd = -1; |
| | | bNext9 = false, bNext10 = false; |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath5.size(); j++) |
| | | { |
| | | _akDefect* pDefect5 = &m_pDefectFormation->m_vecPath5[j]; |
| | | |
| | | if (pDefect5->m_nShotIdx == nS5) |
| | | { |
| | | nStart = j; |
| | | bNext9 = true; |
| | | } |
| | | else if (pDefect5->m_nShotIdx == nS5 + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext10 = true; |
| | | } |
| | | else if (bNext9 == true && bNext10 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (bNext9 == true && bNext10 == true) |
| | | { |
| | | nS5++; |
| | | } |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath5[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath5[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | bool bNext11 = false, bNext12 = false; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecPath6.size(); i++) |
| | | { |
| | | int nStart = -1, nEnd = -1; |
| | | bNext11 = false, bNext12 = false; |
| | | |
| | | for (int j = 0; j < m_pDefectFormation->m_vecPath6.size(); j++) |
| | | { |
| | | _akDefect* pDefect6 = &m_pDefectFormation->m_vecPath6[j]; |
| | | |
| | | if (pDefect6->m_nShotIdx == nS6) |
| | | { |
| | | nStart = j; |
| | | bNext11 = true; |
| | | } |
| | | else if (pDefect6->m_nShotIdx == nS6 + 1) |
| | | { |
| | | nEnd = j; |
| | | bNext12 = true; |
| | | } |
| | | else if (bNext11 == true && bNext12 == true) |
| | | { |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (bNext11 == true && bNext12 == true) |
| | | { |
| | | nS6++; |
| | | } |
| | | if (nStart == -1) return; |
| | | if (nEnd == -1) nEnd = nStart; |
| | | |
| | | _akDefect* pDefectStart = &m_pDefectFormation->m_vecPath6[nStart]; |
| | | _akDefect* pDefectEnd = &m_pDefectFormation->m_vecPath6[nEnd]; |
| | | |
| | | pDC->MoveTo(GetWindowPosX(pDefectStart->dPositionX), GetWindowPosY(pDefectStart->dPositionY)); |
| | | pDC->LineTo(GetWindowPosX(pDefectEnd->dPositionX), GetWindowPosY(pDefectEnd->dPositionY)); |
| | | } |
| | | |
| | | /* SortingtoMoudle();*/ |
| | | |
| | | /* _akDefect* pDefect = &m_pDefectFormation->m_vecDefects[i];*/ |
| | | |
| | | //pDefect->m_nShotIdx 1 ì¸ê²ê³¼ 2ì¸ ê²ì ì°¾ìì 1ì¸ ê²ì start 2ì¸ê²ì end ë¤? |
| | | |
| | | //m_nshortidx ì 모ëì´ ë¨¼ì§ë¥¼ ììì¼ ê² ë¤? pDefect->m_nModelIdx ì´ê±¸ë¡ ì ì ìë¤? |
| | | //m_nShortidx ì ììì ìê³ ëì´ ìë¤ë©´ ì¢
ë£ |
| | | |
| | | // if (pDefect->m_nShotIdx == i) |
| | | // { |
| | | // pDC->MoveTo(GetWindowPosX(rectDefectPath.left), GetWindowPosY(rectDefectPath.top)); |
| | | // pDC->LineTo(GetWindowPosX(rectDefectPath.right), GetWindowPosY(rectDefectPath.top)); |
| | | // |
| | | // //pDC->MoveTo(nStartPosX, nStartPosY); |
| | | // //pDC->LineTo(nEndPosX, nEndPosY); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | // for (constVectorReviewResultIt it = pVecReviewResult->begin(); it != pVecReviewResult->end(); it++) |
| | | // { |
| | | // const CReviewResult *pReviewResult = static_cast<const CReviewResult*>(&(*it)); |
| | | // |
| | | // constVectorSReviewResultIt itt; |
| | | // constVectorSReviewResultIt ittEnd; |
| | | // if (pReviewResult->GetSReviewResultCount() > 0) |
| | | // { |
| | | // itt = pReviewResult->m_vecSReviewResult.begin(); |
| | | // ittEnd = pReviewResult->m_vecSReviewResult.end(); |
| | | // } |
| | | // else |
| | | // { |
| | | // continue; |
| | | // } |
| | | // const SReviewResult *pSReviewResult = static_cast<const SReviewResult*>(&(*itt)); |
| | | // int nDraw = FilterDefectPos(m_pDefectFilter, pSReviewResult); |
| | | // if (nDraw < 0) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // |
| | | // // select path pen |
| | | // pOldPen = pDC->SelectObject(&pathPen); |
| | | // for (constVectorSReviewResultIt its = pReviewResult->m_vecSReviewResult.begin(); its != pReviewResult->m_vecSReviewResult.end(); its++) |
| | | // { |
| | | // if (itt + 1 != ittEnd) |
| | | // { |
| | | // itt++; |
| | | // nStartPosX = its->nUMOriginX; |
| | | // nStartPosY = its->nUMOriginY; |
| | | // nEndPosX = itt->nUMOriginX; |
| | | // nEndPosY = itt->nUMOriginY; |
| | | // TransformGlass2Map(nStartPosX, nStartPosY); |
| | | // TransformGlass2Map(nEndPosX, nEndPosY); |
| | | // //ëª¨í° ì¢í를 ê¸ë¼ì¤ ì¢íë¡ ë³í í´ì¼ í¨ |
| | | // pDC->MoveTo(nStartPosX, nStartPosY); |
| | | // pDC->LineTo(nEndPosX, nEndPosY); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | } |
| | | |
| | | void CakFormationMap::renderFormations(CDC* pDC) |
| | | { |
| | | if (m_pDefectFormation == NULL) return; |
| | | if (m_bShowGroupLine == FALSE) return; |
| | | |
| | | CPen PenDefect, *pOldPen; |
| | | |
| | | CPen PenDefectLine; |
| | | PenDefect.CreatePen(PS_SOLID, 1, RGB(234, 43, 36)); |
| | | PenDefectLine.CreatePen(PS_SOLID, 1, RGB(50, 153, 50)); |
| | | |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | pDC->SelectStockObject(NULL_BRUSH); |
| | | |
| | | CakRectd rectForm; |
| | | |
| | | for (int i = 0; i < m_pDefectFormation->m_vecFormation.size(); i++) |
| | | { |
| | | _akFormation* pForm = &m_pDefectFormation->m_vecFormation[i]; |
| | | |
| | | if (m_pDefectDisplayOption->m_nShowLabel >= 0) |
| | | { |
| | | if (i != m_pDefectDisplayOption->m_nShowLabel) continue; |
| | | } |
| | | |
| | | rectForm.set( |
| | | GetWindowPosX(pForm->m_dRectLeft), |
| | | GetWindowPosY(pForm->m_dRectTop), |
| | | GetWindowPosX(pForm->m_dRectRight), |
| | | GetWindowPosY(pForm->m_dRectBottom) |
| | | ); |
| | | |
| | | rectForm.NormalizeRect(); |
| | | rectForm.InflateRect(4, 4, 5, 5); |
| | | |
| | | if (pForm->m_nFormType == 1) pDC->SelectObject(&PenDefectLine); |
| | | else pDC->SelectObject(&PenDefect); |
| | | |
| | | pDC->Rectangle(rectForm.left, rectForm.top, rectForm.right, rectForm.bottom); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | } |
| | | |
| | | void CakFormationMap::renderMouseoverInfos(CDC* pDC) |
| | | { |
| | | |
| | | pDC->SelectObject(m_AxisX.m_Font); |
| | | |
| | | if(m_pSelectedDefect) |
| | | { |
| | | _akDefect* pDefect = m_pSelectedDefect; |
| | | |
| | | CakRectd rectDefect; |
| | | rectDefect.set(GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY), |
| | | GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY)); |
| | | if(m_bShowDefectOutLine) rectDefect.InflateRect(5, 5, 5, 5); |
| | | else rectDefect.InflateRect(5, 5, 5-1, 5-1); |
| | | |
| | | CPen PenDefect, *pOldPen; |
| | | PenDefect.CreatePen(PS_SOLID, 1, RGB(24, 24, 192)); |
| | | pDC->SelectStockObject(NULL_BRUSH); |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | rectDefect.InflateRect(-1,-1,-1,-1); |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | |
| | | |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | } |
| | | |
| | | if (m_pMouseOveredDefect) |
| | | { |
| | | _akDefect* pDefect = m_pMouseOveredDefect; |
| | | |
| | | CakRectd rectDefect; |
| | | rectDefect.set(GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY), |
| | | GetWindowPosX(pDefect->dPositionX), GetWindowPosY(pDefect->dPositionY)); |
| | | if (m_bShowDefectOutLine) rectDefect.InflateRect(5, 5, 5, 5); |
| | | else rectDefect.InflateRect(5, 5, 5 - 1, 5 - 1); |
| | | |
| | | CPen PenDefect, *pOldPen; |
| | | PenDefect.CreatePen(PS_SOLID, 1, RGB(192, 24, 24)); |
| | | pDC->SelectStockObject(NULL_BRUSH); |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | |
| | | pDC->Rectangle(rectDefect.left, rectDefect.top, rectDefect.right, rectDefect.bottom); |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | |
| | | CString strDefectInfo; |
| | | COLORREF cl; |
| | | cl = RGB(39, 255, 39); |
| | | |
| | | pDC->SetTextAlign(TA_LEFT | TA_BASELINE); |
| | | pDC->SetTextColor(cl); |
| | | strDefectInfo.Format("%d : %.3lf, %.3lf Cam: %d, SCan : %d", m_pMouseOveredDefect->m_nDefectID, m_pMouseOveredDefect->dPositionX, m_pMouseOveredDefect->dPositionY, m_pMouseOveredDefect->m_nCameraID, m_pMouseOveredDefect->m_nScanIdx); |
| | | pDC->TextOut(GetWindowPosX(m_pMouseOveredDefect->dPositionX)+5, GetWindowPosY(m_pMouseOveredDefect->dPositionY) - 7, strDefectInfo); |
| | | |
| | | } |
| | | if (m_pSelectedFormation) |
| | | { |
| | | _akFormation* pFormation = m_pSelectedFormation; |
| | | |
| | | int nFormLabel = -1; |
| | | if (pFormation && !pFormation->m_vecForms.empty()) |
| | | { |
| | | nFormLabel = pFormation->m_vecForms[0]->nLabel; |
| | | } |
| | | CakRectd rectForm; |
| | | |
| | | rectForm.set( |
| | | GetWindowPosX(pFormation->m_dRectLeft), |
| | | GetWindowPosY(pFormation->m_dRectTop), |
| | | GetWindowPosX(pFormation->m_dRectRight), |
| | | GetWindowPosY(pFormation->m_dRectBottom) |
| | | ); |
| | | |
| | | rectForm.NormalizeRect(); |
| | | rectForm.InflateRect(4, 4, 5, 5); |
| | | rectForm.InflateRect(-1, -1, -1, -1); |
| | | |
| | | CPen PenDefect, *pOldPen; |
| | | //PenDefect.CreatePen(PS_SOLID, 1, RGB(192, 192, 24)); |
| | | |
| | | //if(pFormation->m_nFormType == 0) PenDefect.CreatePen(PS_DOT, 1, RGB(234, 43, 36)); |
| | | //else if (pFormation->m_nFormType == 1) PenDefect.CreatePen(PS_DOT, 1, RGB(50, 153, 50)); |
| | | |
| | | PenDefect.CreatePen(PS_DOT, 1, RGB(24, 24, 192)); |
| | | pDC->SelectStockObject(NULL_BRUSH); |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | |
| | | pDC->Rectangle(rectForm.left, rectForm.top, rectForm.right, rectForm.bottom); |
| | | |
| | | //text |
| | | { |
| | | CString strDefectInfo; |
| | | pDC->SetTextAlign(TA_LEFT | TA_BOTTOM); |
| | | CString strFormType = "ROUND"; |
| | | if (pFormation->m_nFormType == 1) strFormType = "LINE"; |
| | | |
| | | strDefectInfo.Format("FORM %d, %s", nFormLabel, strFormType); |
| | | |
| | | pDC->SetBkMode(OPAQUE); |
| | | pDC->SetBkColor(RGB(0, 255, 0)); |
| | | pDC->SetTextColor(RGB(0, 0, 0)); |
| | | pDC->SelectObject(m_AxisX.m_Font); |
| | | pDC->TextOut(rectForm.left, rectForm.top, strDefectInfo); |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | } |
| | | } |
| | | if (m_pMouseOveredFormation) |
| | | { |
| | | _akFormation* pFormation = m_pMouseOveredFormation; |
| | | |
| | | int nFormLabel = -1; |
| | | if (pFormation && !pFormation->m_vecForms.empty()) |
| | | { |
| | | nFormLabel = pFormation->m_vecForms[0]->nLabel; |
| | | } |
| | | CakRectd rectForm; |
| | | |
| | | rectForm.set( |
| | | GetWindowPosX(pFormation->m_dRectLeft), |
| | | GetWindowPosY(pFormation->m_dRectTop), |
| | | GetWindowPosX(pFormation->m_dRectRight), |
| | | GetWindowPosY(pFormation->m_dRectBottom) |
| | | ); |
| | | |
| | | rectForm.NormalizeRect(); |
| | | rectForm.InflateRect(4, 4, 5, 5); |
| | | rectForm.InflateRect(1, 1, 1, 1); |
| | | |
| | | CPen PenDefect, *pOldPen; |
| | | PenDefect.CreatePen(PS_SOLID, 1, RGB(192, 192, 24)); |
| | | pDC->SelectStockObject(NULL_BRUSH); |
| | | pOldPen = pDC->SelectObject(&PenDefect); |
| | | |
| | | pDC->Rectangle(rectForm.left, rectForm.top, rectForm.right, rectForm.bottom); |
| | | |
| | | pDC->SelectObject(pOldPen); |
| | | |
| | | CString strDefectInfo; |
| | | pDC->SetTextAlign(TA_LEFT | TA_BOTTOM); |
| | | CString strFormType = "ROUND"; |
| | | if(pFormation->m_nFormType == 1) strFormType = "LINE"; |
| | | |
| | | strDefectInfo.Format("FORM %d, %s", nFormLabel, strFormType); |
| | | |
| | | pDC->SetBkMode(OPAQUE); |
| | | pDC->SetBkColor(RGB(0, 255, 0)); |
| | | pDC->SetTextColor(RGB(0, 0, 0)); |
| | | pDC->SelectObject(m_AxisX.m_Font); |
| | | pDC->TextOut(rectForm.left, rectForm.top, strDefectInfo); |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | |
| | | } |
| | | } |
| | | |
| | | void CakFormationMap::AddCellData() |
| | | { |
| | | CakRectd akCellTemp; |
| | | m_vecTempCellRect.push_back(akCellTemp); |
| | | } |
| | | |
| | | void CakFormationMap::AddCell() |
| | | { |
| | | CakRectd akCellTemp; |
| | | m_vecCellRect.push_back(akCellTemp); |
| | | } |
| | | |
| | | void CakFormationMap::RenderEnd(Graphics* grfx, CDC* pDC) |
| | | { |
| | | |
| | | CRgn rgn; |
| | | CRect rectROI = CakRectToCRect(m_rectData); |
| | | rgn.CreateRectRgnIndirect(&rectROI); |
| | | pDC->SelectClipRgn(&rgn); |
| | | |
| | | renderMouseoverInfos(pDC); |
| | | |
| | | pDC->SelectClipRgn(NULL); |
| | | |
| | | CakGraphBasic3::RenderEnd(grfx, pDC); |
| | | } |
ReviewHistory/ReveiwHistory/akFormationMap.h
ReviewHistory/ReveiwHistory/akGridData.cpp
ReviewHistory/ReveiwHistory/akGridData.h
ReviewHistory/ReveiwHistory/akIPCNetAOISystem.cpp
ReviewHistory/ReveiwHistory/akIPCNetAOISystem.h
ReviewHistory/ReveiwHistory/akImageView.cpp
ReviewHistory/ReveiwHistory/akImageView.h
ReviewHistory/ReveiwHistory/akLoggerExt.cpp
ReviewHistory/ReveiwHistory/akLoggerExt.h
ReviewHistory/ReveiwHistory/akWndArrange.cpp
ReviewHistory/ReveiwHistory/akWndArrange.h
ReviewHistory/ReveiwHistory/res/History.ico
ReviewHistory/ReveiwHistory/res/ReveiwHistory.ico
ReviewHistory/ReveiwHistory/res/ReveiwHistory.rc2
ReviewHistory/ReveiwHistory/resource.h
ReviewHistory/ReveiwHistory/stdafx.cpp
ReviewHistory/ReveiwHistory/stdafx.h
ReviewHistory/ReveiwHistory/targetver.h
ReviewHistory/ReveiwHistory/x64/Debug/reveiwhistorydlg.obj.enc
ReviewHistory/ReviewHistory.sln
ReviewHistory/bin/Config/PathSetting.ini
ReviewHistory/bin/ReviewHistroy.exe
ReviewHistory/bin/aaa.txt
ReviewHistory/bin/akCore_WS10_x64.dll
ReviewHistory/bin/akCored_WS10_x64.dll
ReviewHistory/bin/akGraph_x64_vc15.dll
ReviewHistory/bin/akGraphd_x64_vc15.dll
ReviewHistory/bin/akGridCtrl_vc15.dll
ReviewHistory/bin/akGridCtrl_x64_vc15.dll
ReviewHistory/bin/akGridCtrld_vc15.dll
ReviewHistory/bin/akGridCtrld_x64_vc15.dll
ReviewHistory/bin/akSTL_WS10.dll
ReviewHistory/bin/akSTL_WS10_x64.dll
ReviewHistory/bin/akSTLd_WS10.dll
ReviewHistory/bin/akSTLd_WS10_x64.dll
ReviewHistory/bin/no-image.png
ReviewHistory/include/akCore/akBit.h
ReviewHistory/include/akCore/akColorStruct.h
ReviewHistory/include/akCore/akCoordinate.h
ReviewHistory/include/akCore/akCoreLinker.h
ReviewHistory/include/akCore/akDE.h
ReviewHistory/include/akCore/akDE2.h
ReviewHistory/include/akCore/akDefine.h
ReviewHistory/include/akCore/akFileDB.h
ReviewHistory/include/akCore/akFileDBHash.h
ReviewHistory/include/akCore/akFileMgr.h
ReviewHistory/include/akCore/akFileMgrAdv.h
ReviewHistory/include/akCore/akFileMgrB.h
ReviewHistory/include/akCore/akFileUtil.h
ReviewHistory/include/akCore/akInterpolation.h
ReviewHistory/include/akCore/akLogger.h
ReviewHistory/include/akCore/akMath.h
ReviewHistory/include/akCore/akMatrix.h
ReviewHistory/include/akCore/akPathFileUtil.h
ReviewHistory/include/akCore/akRandom.h
ReviewHistory/include/akCore/akString.h
ReviewHistory/include/akCore/akStruct.h
ReviewHistory/include/akCore/akStructColor.h
ReviewHistory/include/akCore/akStructPoint.h
ReviewHistory/include/akCore/akStructRect.h
ReviewHistory/include/akCore/akStructVector.h
ReviewHistory/include/akCore/akSyncObject.h
ReviewHistory/include/akCore/akText.h
ReviewHistory/include/akCore/akTextExt.h
ReviewHistory/include/akCore/akTimeManager.h
ReviewHistory/include/akCore/akTrace.h
ReviewHistory/include/akCore/akTraceExt.h
ReviewHistory/include/akCore/akTrajectoryModel.h
ReviewHistory/include/akCore/akVector.h
ReviewHistory/include/akCore/akWGS84.h
ReviewHistory/include/akCore/akWaypoint.h
ReviewHistory/include/akGraph/akColorSettingDlg.h
ReviewHistory/include/akGraph/akColorTable.h
ReviewHistory/include/akGraph/akColorTableOption.h
ReviewHistory/include/akGraph/akDDSettingDlg.h
ReviewHistory/include/akGraph/akDataBasic1.h
ReviewHistory/include/akGraph/akDataBasic2.h
ReviewHistory/include/akGraph/akDataBasic3.h
ReviewHistory/include/akGraph/akDataImage.h
ReviewHistory/include/akGraph/akDataMesh.h
ReviewHistory/include/akGraph/akDataVector2.h
ReviewHistory/include/akGraph/akGraphBase.h
ReviewHistory/include/akGraph/akGraphBasic3.h
ReviewHistory/include/akGraph/akGraphCodeJ.h
ReviewHistory/include/akGraph/akGraphImage.h
ReviewHistory/include/akGraph/akGraphLinker.h
ReviewHistory/include/akGraph/akGraphMesh.h
ReviewHistory/include/akGraph/akGraphStruct.h
ReviewHistory/include/akGraph/akGraphType2V.h
ReviewHistory/include/akGraph/akGraphUtil.h
ReviewHistory/include/akGraph/akMemDC.h
ReviewHistory/include/akGraph/akPixel.h
ReviewHistory/include/akGraph/akRangeSettingDlg.h
ReviewHistory/include/akGraph/akRangeSettingNormalDlg.h
ReviewHistory/include/akGraph/akRangeSettingTimeDlg.h
ReviewHistory/include/akGraph/akRaySettingDlg.h
ReviewHistory/include/akGraph/akResource.h
ReviewHistory/include/akGraph/akSelectDataDlg.h
ReviewHistory/include/akGraph/akSyncObject.h
ReviewHistory/include/akGraph/akUnit.h
ReviewHistory/include/akGraph/khDataBase.h
ReviewHistory/include/akGridCtrl/CellRange.h
ReviewHistory/include/akGridCtrl/GridCell.h
ReviewHistory/include/akGridCtrl/GridCellBase.h
ReviewHistory/include/akGridCtrl/GridCellCheck.h
ReviewHistory/include/akGridCtrl/GridDropTarget.h
ReviewHistory/include/akGridCtrl/InPlaceEdit.h
ReviewHistory/include/akGridCtrl/MemDC.h
ReviewHistory/include/akGridCtrl/NewCellTypes/GridCellCheck.h
ReviewHistory/include/akGridCtrl/NewCellTypes/GridCellCombo.h
ReviewHistory/include/akGridCtrl/NewCellTypes/GridCellDateTime.h
ReviewHistory/include/akGridCtrl/NewCellTypes/GridCellNumeric.h
ReviewHistory/include/akGridCtrl/NewCellTypes/GridURLCell.h
ReviewHistory/include/akGridCtrl/TitleTip.h
ReviewHistory/include/akGridCtrl/akGridCtrl.h
ReviewHistory/include/akGridCtrl/akGridCtrlLinker.h
ReviewHistory/include/akGridCtrl/testCtrl.h
ReviewHistory/include/akSTL/akColor.h
ReviewHistory/include/akSTL/akPoint.h
ReviewHistory/include/akSTL/akPointT.h
ReviewHistory/include/akSTL/akQueue.h
ReviewHistory/include/akSTL/akQueueCircle.h
ReviewHistory/include/akSTL/akRect.h
ReviewHistory/include/akSTL/akRectT.h
ReviewHistory/include/akSTL/akSTLLinker.h
ReviewHistory/include/akSTL/akStruct.h
ReviewHistory/include/akSTL/akTrace.h
ReviewHistory/include/akSTL/akTrajectory.h
ReviewHistory/include/akSTL/akVector.h
ReviewHistory/include/akSTL/akVectorT.h
ReviewHistory/include/akSTL/backup/akColorStruct.h
ReviewHistory/include/akSTL/backup/akCoordinate.h
ReviewHistory/include/akSTL/backup/akFileMgr.h
ReviewHistory/include/akSTL/backup/akFileMgrAdv.h
ReviewHistory/include/akSTL/backup/akFileMgrB.h
ReviewHistory/include/akSTL/backup/akFileUtil.h
ReviewHistory/include/akSTL/backup/akInterpolation.h
ReviewHistory/include/akSTL/backup/akMath.h
ReviewHistory/include/akSTL/backup/akMatrix.h
ReviewHistory/include/akSTL/backup/akMemory.h
ReviewHistory/include/akSTL/backup/akRandom.h
ReviewHistory/include/akSTL/backup/akString.h
ReviewHistory/include/akSTL/backup/akSyncObject.h
ReviewHistory/include/akSTL/backup/akText.h
ReviewHistory/include/akSTL/backup/akTextExt.h
ReviewHistory/include/akSTL/backup/akTimeManager.h
ReviewHistory/include/akSTL/backup/akTraceExt.h
ReviewHistory/include/akSTL/backup/akTrajectoryModel.h
ReviewHistory/include/akSTL/backup/akWGS84.h
ReviewHistory/include/akSTL/backup/akWaypoint.h
ReviewHistory/include/akSTL/inl/akPointT.inl
ReviewHistory/include/akSTL/inl/akRectT.inl
ReviewHistory/include/akSTL/inl/akVectorT.inl
ReviewHistory/include/akSTL/새 폴더/akColorStruct.h
ReviewHistory/include/akSTL/새 폴더/akCoordinate.h
ReviewHistory/include/akSTL/새 폴더/akFileMgr.h
ReviewHistory/include/akSTL/새 폴더/akFileMgrAdv.h
ReviewHistory/include/akSTL/새 폴더/akFileMgrB.h
ReviewHistory/include/akSTL/새 폴더/akFileUtil.h
ReviewHistory/include/akSTL/새 폴더/akInterpolation.h
ReviewHistory/include/akSTL/새 폴더/akMath.h
ReviewHistory/include/akSTL/새 폴더/akMatrix.h
ReviewHistory/include/akSTL/새 폴더/akMemory.h
ReviewHistory/include/akSTL/새 폴더/akRandom.h
ReviewHistory/include/akSTL/새 폴더/akString.h
ReviewHistory/include/akSTL/새 폴더/akSyncObject.h
ReviewHistory/include/akSTL/새 폴더/akText.h
ReviewHistory/include/akSTL/새 폴더/akTextExt.h
ReviewHistory/include/akSTL/새 폴더/akTimeManager.h
ReviewHistory/include/akSTL/새 폴더/akTraceExt.h
ReviewHistory/include/akSTL/새 폴더/akTrajectoryModel.h
ReviewHistory/include/akSTL/새 폴더/akWGS84.h
ReviewHistory/include/akSTL/새 폴더/akWaypoint.h
ReviewHistory/lib/akCore_WS10_x64.lib
ReviewHistory/lib/akCored_WS10_x64.lib
ReviewHistory/lib/akGraph_x64_vc15.lib
ReviewHistory/lib/akGraphd_x64_vc15.lib
ReviewHistory/lib/akGridCtrl_vc15.lib
ReviewHistory/lib/akGridCtrl_x64_vc15.lib
ReviewHistory/lib/akGridCtrld_vc15.lib
ReviewHistory/lib/akGridCtrld_x64_vc15.lib
ReviewHistory/lib/akSTL_WS10.lib
ReviewHistory/lib/akSTL_WS10_x64.lib
ReviewHistory/lib/akSTLd_WS10.lib
ReviewHistory/lib/akSTLd_WS10_x64.lib
ReviewSystem/ReviewSystem/DitGlassRawClient.cpp
ReviewSystem/ReviewSystem/DitGlassRawClient.h
ReviewSystem/ReviewSystem/DitGlassRawStruct.h
ReviewSystem/ReviewSystem/ReviewProcessor.cpp
ReviewSystem/ReviewSystem/ReviewProcessor.h
ReviewSystem/ReviewSystem/ReviewProcessor_CPJT.h
ReviewSystem/include/CHReviewResult/ReviewResult.h |