#include "StdAfx.h"
|
#include "CHReviewResultParser/ParsingGlassResult_CPJT.h"
|
|
using namespace CHReviewResult;
|
|
CParsingGlassResult_CPJT::CParsingGlassResult_CPJT(void)
|
{
|
}
|
|
CParsingGlassResult_CPJT::~CParsingGlassResult_CPJT(void)
|
{
|
}
|
|
// [2017:5:12]-[WEZASW] : DFS Result File Format ����
|
void CParsingGlassResult_CPJT::ParsingFileToGlassResult(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)//Cmark
|
{
|
if(pGlassResult==NULL || pResultFileMgr==NULL)
|
return;
|
|
CString strItem = _T("");
|
CString strData = _T("");
|
char * strTemp;
|
char * strType;
|
char * strLine;
|
strLine = pResultFileMgr->GetHeaderData(0,3);
|
strTemp = strtok_s(strLine, ":",&strType);
|
|
pGlassResult->m_strEquipID = strType; // 10: Equipment ID
|
//pGlassResult->m_strRecipeID = pResultFileMgr->GetRawData(eCSOTRaw_GlassInfoData, 0, eCSOTRaw_Glass_RecipeID); // Recipe ID
|
|
// read cell(Panel) data
|
CCellResult cellResult;
|
|
//int nDefectRawDataCount = 0;//pResultFileMgr->GetRawDataCount(eCSOTRaw_DefectInfoData, 0);
|
int nDefectRawDataCount = pResultFileMgr->GetDefectCount();
|
|
register int nTotalDefectIdx = 0;
|
int nGlassIDLength = 0;
|
int nCellCount = pResultFileMgr->GetCellCount();
|
|
for(int nCellIdx=0; nCellIdx<nCellCount; nCellIdx++)
|
{
|
int idx =0;
|
cellResult.Reset();
|
|
cellResult.nDefectCount = pResultFileMgr->GetDefectCount();
|
cellResult.strCellJudge = pResultFileMgr->GetCellData(nCellIdx,3);
|
cellResult.strCellID = pResultFileMgr->GetCellData(nCellIdx, eCPJTRaw_Defect_PANEL_ID);
|
|
|
//cellResult.nUMOriginX = atoi(pResultFileMgr->GetCellData(nCellIdx, eCSOTRaw_Panel_X));
|
//cellResult.nUMOriginY = atoi(pResultFileMgr->GetCellData(nCellIdx, eCSOTRaw_Panel_Y));
|
//cellResult.nUMOriginWidth = atoi(pResultFileMgr->GetCellData(nCellIdx, eCSOTRaw_Panel_X_A));
|
//cellResult.nUMOriginHeight = atoi(pResultFileMgr->GetCellData(nCellIdx, eCSOTRaw_Panel_Y_A));;
|
|
|
//cellResult.nUMOriginX = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 3)); // No.3 Panel Position Start X
|
//cellResult.nUMOriginY = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 4)); // No.4 Panel Position Start Y
|
//cellResult.nUMOriginWidth = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 5)); // No.5 Panel Size Width
|
//cellResult.nUMOriginHeight = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 6)); // No.6 Panel Size Height
|
|
|
//=========================
|
#pragma region ���� �ڵ�
|
//cellResult.strCellID = pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, eCSOTRaw_Panel_CellNum); // No.1 Cell Number
|
// No.1 Cell Number
|
//cellResult.nDefectCount = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, eCSOTRaw_Panel_RearCPDefectNum)); // No.2 Defect Count
|
//cellResult.strCellJudge = pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, eCSOTRaw_Panel_Judge); // No.3 Panel Judge
|
/*
|
cellResult.nUMOriginX = 100;
|
cellResult.nUMOriginY = 100;
|
cellResult.nUMOriginWidth = 10;
|
cellResult.nUMOriginHeight = 10;
|
*/
|
/*
|
cellResult.nUMOriginX = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 3)); // No.3 Panel Position Start X
|
cellResult.nUMOriginY = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 4)); // No.4 Panel Position Start Y
|
cellResult.nUMOriginX = cellResult.nUMOriginX + pGlassResult->GetGlassSizeX()/2;
|
cellResult.nUMOriginY = cellResult.nUMOriginY + pGlassResult->GetGlassSizeY()/2;
|
cellResult.nUMOriginWidth = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 5)); // No.5 Panel Size Width
|
cellResult.nUMOriginHeight = atoi(pResultFileMgr->GetRawData(eCSOTRaw_PanelInfoData, nCellIdx, 6)); // No.6 Panel Size Height
|
*/
|
#pragma endregion
|
//=========================
|
|
|
pGlassResult->AddCellResult(cellResult); // �߰�
|
|
// ����ó�� : PNL Total ������ ���� �ҷ� ���� Ȯ��
|
if (nTotalDefectIdx+cellResult.nDefectCount > nDefectRawDataCount) { continue; }
|
|
|
cellResult.nDefectCount = pResultFileMgr->GetDefectCount();
|
int nData = 0;
|
double dData = 0.0;
|
|
for (int nDefIdx=0; nDefIdx<cellResult.nDefectCount; nDefIdx++)
|
{
|
CDefectResult* pDefectResult = new CDefectResult;
|
if (pDefectResult==NULL) continue;
|
|
// pDefectResult->nPanelID = atoi(pResultFileMgr->GetDefectData(nDefIdx,0));
|
// pDefectResult->nDefectidx1 = atoi( pResultFileMgr->GetDefectData(nDefIdx,1));
|
// pDefectResult->nDefectidx2 = atoi(pResultFileMgr->GetDefectData(nDefIdx,2));
|
|
//pDefectResult->strDefectCode = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Code); // No.1 �����ڵ�1
|
pDefectResult->strDefectCode.TrimRight();
|
pDefectResult->nDefectCode = GetDefectCodeType( pGlassResult->m_strRecipeID, pDefectResult->strDefectCode );
|
|
|
|
double a = pGlassResult->GetGlassSizeY()/2;
|
double b = pDefectResult->dUMCenterOriginY;
|
double c = atoi(pResultFileMgr->GetDefectData(nDefIdx,12));
|
|
pDefectResult->dUMCenterOriginX = atoi(pResultFileMgr->GetDefectData(nDefIdx,12));
|
pDefectResult->dUMCenterOriginY = atoi(pResultFileMgr->GetDefectData(nDefIdx,13));
|
pDefectResult->nUMOriginX = int((pGlassResult->GetGlassSizeX()/2) + pDefectResult->dUMCenterOriginX);
|
pDefectResult->nUMOriginY = int((pGlassResult->GetGlassSizeY()/2) + pDefectResult->dUMCenterOriginY);
|
|
//pDefectResult->nUMOriginX = pDefectResult->nUMCenterOriginX*1000;
|
//pDefectResult->nUMOriginY = pDefectResult->nUMCenterOriginY*1000;
|
///pDefectResult->nUMTransX = pDefectResult->nUMCenterOriginX*1000 - (pGlassResult->GetGlassSizeX()/2);
|
///pDefectResult->nUMTransY = pDefectResult->nUMCenterOriginY*1000 + (pGlassResult->GetGlassSizeY()/2);
|
|
|
|
//pDefectResult->strDefectType = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_AOI_DEFECT_TYPE); // No.7 ���� Type // A - N: Normal, C: Common, M: Mask
|
pDefectResult->nDefectType = GetCSOTDefectType(pDefectResult->strDefectType);
|
|
pDefectResult->nAOIArea = atof(pResultFileMgr->GetDefectData(nTotalDefectIdx, 20)); // No.5 Defect Size
|
pDefectResult->strSizeType = pResultFileMgr->GetDefectData(nTotalDefectIdx, eCPJTRaw_Defect_AOI_DEFECT_WIH); // No.6 Defect SizeType // S/M/L/O
|
pDefectResult->nSizeType = GetSizeType(pDefectResult->strSizeType);
|
|
|
pDefectResult->nAOISizeW = atof(pResultFileMgr->GetDefectData(nTotalDefectIdx, eCPJTRaw_Defect_AOI_DEFECT_WID))*1000; // No.10 Defect��s X axis size (um)
|
pDefectResult->nAOISizeH = atof(pResultFileMgr->GetDefectData(nTotalDefectIdx, eCPJTRaw_Defect_AOI_DEFECT_HGT))*1000; // No.11 Defect��s Y axis size (um)
|
pDefectResult->nAOISize = atof(pResultFileMgr->GetDefectData(nTotalDefectIdx, 26));
|
|
//pDefectResult->nAOISizeLength = pDefectResult->nAOISizeW;
|
|
|
//pDefectResult->strDefectZone = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Zone); // No.7 DefectZone
|
pDefectResult->nDefectZone = GetZoneType(pDefectResult->strDefectZone);
|
|
pDefectResult->strEquipID = strType;
|
|
|
//pDefectResult->nAOISizeS = atoi(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Size)); // CCD Size
|
//pDefectResult->strCPResult = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_CPResult); // No.10 CP Result
|
pDefectResult->strUploadImgFileName = pResultFileMgr->GetDefectData(nTotalDefectIdx, eCPJTRaw_Defect_FILE_NAME); // No.11 Image Name
|
// pDefectResult->nUMDefectImageSizeX = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_ImageSizeX)); // No.12 Image Size X
|
// pDefectResult->nUMDefectImageSizeY = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_ImageSizeY));*/ // No.13 Image Size Y
|
|
//pDefectResult->nGrayType = 1; // Imsi
|
pDefectResult->nOpticType = 1;
|
|
|
//=======================
|
#pragma region ���� �ڵ�
|
/*
|
//atoi(pResultFileMgr->GetCellData(idx,nCellIdx));
|
////pDefectResult->strCellID
|
//
|
|
pDefectResult->strDefectCode = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Code); // No.1 �����ڵ�1
|
pDefectResult->strDefectCode.TrimRight();
|
pDefectResult->nDefectCode = GetDefectCodeType( pGlassResult->m_strRecipeID, pDefectResult->strDefectCode );
|
|
pDefectResult->nUMCenterOriginX = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_CenterOriX)); // No.3 Glass Center ���� ��ǥ X(mm)
|
pDefectResult->nUMCenterOriginY = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_CenterOriY)); // No.4 Glass Center ���� ��ǥ Y(mm)
|
pDefectResult->nUMOriginX = (pGlassResult->GetGlassSizeX()/2) + pDefectResult->nUMCenterOriginX*1000;
|
pDefectResult->nUMOriginY = (pGlassResult->GetGlassSizeY()/2) + pDefectResult->nUMCenterOriginY*1000;
|
//pDefectResult->nUMOriginX = pDefectResult->nUMCenterOriginX*1000;
|
//pDefectResult->nUMOriginY = pDefectResult->nUMCenterOriginY*1000;
|
///pDefectResult->nUMTransX = pDefectResult->nUMCenterOriginX*1000 - (pGlassResult->GetGlassSizeX()/2);
|
///pDefectResult->nUMTransY = pDefectResult->nUMCenterOriginY*1000 + (pGlassResult->GetGlassSizeY()/2);
|
|
pDefectResult->nAOIArea = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_DefectArea)); // No.5 Defect Size
|
pDefectResult->strSizeType = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_DefectSizeType); // No.6 Defect SizeType // S/M/L/O
|
pDefectResult->nSizeType = GetSizeType(pDefectResult->strSizeType);
|
|
pDefectResult->strDefectType = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_DefectType); // No.7 ���� Type // A - N: Normal, C: Common, M: Mask
|
pDefectResult->nDefectType = GetCSOTDefectType(pDefectResult->strDefectType);
|
|
pDefectResult->nAOISizeW = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_SizeDX))*1000; // No.10 Defect��s X axis size (um)
|
pDefectResult->nAOISizeH = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_SizeDY))*1000; // No.11 Defect��s Y axis size (um)
|
pDefectResult->nAOISize = int(pDefectResult->nAOISizeW*pDefectResult->nAOISizeH);
|
pDefectResult->nAOISizeLength = pDefectResult->nAOISizeW;
|
|
pDefectResult->strDefectZone = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Zone); // No.7 DefectZone
|
pDefectResult->nDefectZone = GetZoneType(pDefectResult->strDefectZone);
|
|
pDefectResult->nAOISizeS = atoi(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_Size)); // CCD Size
|
pDefectResult->strCPResult = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_CPResult); // No.10 CP Result
|
pDefectResult->strUploadImgFileName = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_ImageName); // No.11 Image Name
|
pDefectResult->nUMDefectImageSizeX = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_ImageSizeX)); // No.12 Image Size X
|
pDefectResult->nUMDefectImageSizeY = atof(pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, nTotalDefectIdx, eCSOTRaw_Defect_ImageSizeY));*/ // No.13 Image Size Y
|
#pragma endregion
|
//=======================
|
|
|
if(pDefectResult->strUploadImgFileName.Compare(_T("0")) == 0)
|
{
|
pDefectResult->strUploadImgFileName = "";
|
pDefectResult->nUMDefectImageSizeX = NULL;
|
pDefectResult->nUMDefectImageSizeY = NULL;
|
}
|
|
pDefectResult->strJudgeType = cellResult.strCellJudge;
|
pDefectResult->strCellID = cellResult.strCellID;
|
pDefectResult->nGrayType = 1; // Imsi
|
pDefectResult->nOpticType = 1;
|
|
pDefectResult->nTotalDefectCount = nTotalDefectIdx;
|
|
pGlassResult->AddDefectResult(pDefectResult);
|
|
nTotalDefectIdx++;
|
}
|
|
}
|
}
|
|
// [2017:5:12]-[WEZASW] : DFS Result File Format ���� cmark
|
int CParsingGlassResult_CPJT::ParsingReviewResultDataToFile(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
if (pResultFileMgr==NULL || pGlassResult==NULL)
|
return -1;
|
|
// size count
|
int pSizeCount[5] = {0, 0, 0, 0, 0};
|
|
// judge count
|
int pJudgeCount[3] = {0, 0, 0};
|
|
int nReviewCnt = 0;
|
CString strReviewNum = _T("");
|
|
// write defect data
|
CString strImageFileName = _T("");
|
int nWriteCount = 0;
|
int nGlassResultCnt = 0;
|
int nGlassUserResultCnt = 0;
|
int nCameraResultCnt = 0;
|
int nUserCameraResultCnt = 0;
|
|
|
|
if( pGlassResult->GetReadRawFile() )
|
{
|
strReviewNum = pResultFileMgr->GetGlassData(0,0);
|
//strReviewNum = pResultFileMgr->GetRawData(eCSOTRaw_GlassInfoData, 0, eCSOTRaw_Glass_ReviewNum);
|
|
if( strReviewNum.Compare(_T("")) == 0 )
|
nReviewCnt = 0;
|
else
|
nReviewCnt = atoi(pResultFileMgr->GetGlassData(0,0));
|
|
// nReviewCnt = atoi(pResultFileMgr->GetRawData(eCSOTRaw_GlassInfoData, 0, eCSOTRaw_Glass_ReviewNum)); // Review Cnt Num
|
}
|
|
/*
|
pResultFileMgr->SetRawData(eCSOTRaw_GlassInfoData, 0, eCSOTRaw_Glass_ProcessTime, (int)pGlassResult->GetTackTime() );
|
|
nGlassResultCnt = pGlassResult->GetReviewResultCount();
|
|
for (int nCameraIdx=0; nCameraIdx<nGlassResultCnt; nCameraIdx++)
|
{
|
const CReviewResult* pCameraResult = pGlassResult->GetReviewResult(nCameraIdx);
|
if (pCameraResult==NULL) continue;
|
|
nCameraResultCnt = pCameraResult->GetSReviewResultCount();
|
|
for (int nResultIdx=0; nResultIdx<nCameraResultCnt; nResultIdx++)
|
{
|
const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
if (pResult==NULL) continue;
|
if (pResult->nResultCode!=ReviewResult_Process_Complete) continue;
|
if (pResult->nReviewType!=ReviewType_Review) continue;
|
|
// [2018/01/11 11:32:27 by jylee] related Review Count Check
|
if( nResultIdx >= nReviewCnt )
|
break;
|
|
// review image file name
|
int nSize = 0;
|
char* strTemp = NULL;
|
///strImageFileName = pResult->strUploadImgFileName;
|
|
if (pResult->nDefectIdx != -1)
|
strImageFileName.Format(_T("%s_%s_%s_%.3lf_%.3lf.jpg"), pResult->strDefectType, pGlassResult->m_strGlassID, pResult->strCellID, pResult->nUMCenterOriginX, pResult->nUMCenterOriginY );
|
|
|
#ifdef _UNICODE
|
nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
strTemp = new char[nSize];
|
WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
#else
|
nSize = strImageFileName.GetLength();
|
strTemp = new char[nSize+1];
|
memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
strTemp[nSize] = NULL;
|
#endif
|
if (pResult->nDefectIdx != -1)
|
{
|
// ���������϶���
|
/ *
|
if( pGlassResult->GetUserResultCount() > 0 )
|
{
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nResultIdx, eCSOTRaw_Review_PosX, pResult->nUMCenterOriginX );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nResultIdx, eCSOTRaw_Review_PosY, pResult->nUMCenterOriginY );
|
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nResultIdx, eCSOTRaw_Review_ImageName, strTemp );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nResultIdx, eCSOTRaw_Review_SizeX, pResult->nUMDefectImageSizeX, 2 );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nResultIdx, eCSOTRaw_Review_SizeY, pResult->nUMDefectImageSizeY, 2 );
|
}
|
* /
|
pResultFileMgr->SetRawData(eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_ImageName, strTemp );
|
pResultFileMgr->SetRawData(eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_ImageSizeX, pResult->nUMDefectImageSizeX, 2 );
|
pResultFileMgr->SetRawData(eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_ImageSizeY, pResult->nUMDefectImageSizeX, 2 );
|
|
nWriteCount++;
|
}
|
|
if(strTemp)
|
{
|
delete[] strTemp;
|
strTemp = NULL;
|
}
|
}
|
}
|
|
//-------------------------------------------------------------------------------------------------
|
// [2018/02/05 17:01:54 by jylee] related CSOT User Defect Result
|
nGlassUserResultCnt = pGlassResult->GetUserResultCount();
|
|
for (int nUCameraIdx=0; nUCameraIdx<nGlassUserResultCnt; nUCameraIdx++)
|
{
|
const CReviewResult* pCameraResult = pGlassResult->GetUserResult(nUCameraIdx);
|
if (pCameraResult==NULL) continue;
|
|
nUserCameraResultCnt = pCameraResult->GetSReviewResultCount();
|
|
for (int nUResultIdx=0; nUResultIdx<nUserCameraResultCnt; nUResultIdx++)
|
{
|
const SReviewResult *pResult = pCameraResult->GetSReviewResult(nUResultIdx);
|
if (pResult==NULL) continue;
|
if (pResult->nResultCode!=ReviewResult_Process_Complete) continue;
|
if (pResult->nReviewType!=ReviewType_User) continue;
|
|
// [2018/01/11 11:32:27 by jylee] related Review Count Check
|
if( nUResultIdx >= nReviewCnt )
|
break;
|
|
// review image file name
|
int nSize = 0;
|
char* strTemp = NULL;
|
|
//strImageFileName.Format(_T("U_%s_0000_%.3lf_%.3lf.jpg"), / *pResult->strDefectType, * /pGlassResult->m_strGlassID, / *pResult->strCellID, * /pResult->nUMOriginX, pResult->nUMCenterOriginY );
|
strImageFileName = pResult->strUploadImgFileName;
|
|
#ifdef _UNICODE
|
nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
strTemp = new char[nSize];
|
WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
#else
|
nSize = strImageFileName.GetLength();
|
strTemp = new char[nSize+1];
|
memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
strTemp[nSize] = NULL;
|
#endif
|
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nUResultIdx, eCSOTRaw_Review_PosX, pResult->nUMOriginX / 1000. );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nUResultIdx, eCSOTRaw_Review_PosY, pResult->nUMOriginY / 1000. );
|
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nUResultIdx, eCSOTRaw_Review_ImageName, strTemp );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nUResultIdx, eCSOTRaw_Review_SizeX, pResult->nUMDefectImageSizeX, 2 );
|
pResultFileMgr->SetRawData(eCSOTRaw_ReviewInfoData, nUResultIdx, eCSOTRaw_Review_SizeY, pResult->nUMDefectImageSizeY, 2 );
|
|
nWriteCount++;
|
|
if(strTemp)
|
{
|
delete[] strTemp;
|
strTemp = NULL;
|
}
|
}
|
}
|
//-------------------------------------------------------------------------------------------------
|
*/
|
|
return nWriteCount;
|
}
|
|
int CParsingGlassResult_CPJT::ParsingReviewResultDataCD(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
int nWriteCount = 0;
|
|
return nWriteCount;
|
}
|
|
int CParsingGlassResult_CPJT::ParsingReviewResultDataSD(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
int nWriteCount = 0;
|
|
return nWriteCount;
|
}
|
|
// [2017:1:3]-[WEZASW] : WSI ���� ��� ���� (��� �������� �⺻ ����) (ING)
|
int CParsingGlassResult_CPJT::ParsingWsiResultDataToFile(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
|
|
if (pResultFileMgr==NULL || pGlassResult==NULL)
|
return -1;
|
|
// write defect data
|
CString strImageFileName = _T("");
|
int nWriteCount = 0;
|
|
for (int nCameraIdx=0; nCameraIdx<pGlassResult->GetWsiResultCount(); nCameraIdx++)
|
{
|
const CReviewResult* pCameraResult = pGlassResult->GetWsiResult(nCameraIdx);
|
if (pCameraResult==NULL) continue;
|
|
for (int nResultIdx=0; nResultIdx<pCameraResult->GetSReviewResultCount(); nResultIdx++)
|
{
|
const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
if (pResult==NULL) continue;
|
if (pResult->nResultCode!=WsiResultSuccess) continue;
|
if (pResult->nReviewType!=ReviewType_Wsi) continue;
|
|
if (pResultFileMgr && pResult->nDefectIdx != -1)
|
{
|
// [2017:5:13]-[WEZASW] : 7�� �߰� ���̾����� ����� �����(����) ����(�̽�)�Ǿ� �����Ǿ� ����� ȸ������ �߰� ��(13, 25, 26)�� ���� �ϱ�� �����(��D) ���ǵ�.
|
// [2017:5:24]-[WEZASW] : AOI DFS(DFT) �� �߰�(Index ����)
|
///pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 15, int(pResult->pWsi_ResultData[Wsi_X_Height]*1000)); // No.13 Defect Height (um)
|
///pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 27, pResult->nWsi_ResultCode); // No.25 Measurement Code (Success:1 / fail:0)
|
///pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 28, int(pResult->pWsi_ResultData[Wsi_X_A_Ratio]*1000)); // No.26 Defect X axis Ration (um)
|
|
nWriteCount++;
|
}
|
}
|
}
|
|
return nWriteCount;
|
}
|
|
int CParsingGlassResult_CPJT::ParsingReflowResultData(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
if (pGlassResult==NULL || pResultFileMgr==NULL)
|
return -1;
|
|
// write reflow data
|
CString strImageFileName = _T("");
|
int nWriteCount = 0;
|
int nCommonReviewCnt = pGlassResult->GetDefectResultCount();
|
int nMNTCnt=0, nMNTPADCnt=0;
|
|
for (int nCameraIdx=0; nCameraIdx<pGlassResult->GetReviewResultCount(); nCameraIdx++)
|
{
|
const CReviewResult* pCameraResult = pGlassResult->GetReviewResult(nCameraIdx);
|
if (pCameraResult==NULL) continue;
|
|
for (int nResultIdx=0; nResultIdx<pCameraResult->GetSReviewResultCount(); nResultIdx++)
|
{
|
const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
if (pResult==NULL) continue;
|
//if (pResult->nReviewType!=ReviewType_Reflow) continue;
|
if (pResult->nReviewType!=ReviewType_User) continue;
|
if (pResult->nResultCode!=ReviewResult_Process_Complete) continue;
|
|
if (pResult->nDefectIdx != -1)
|
{
|
int nSize = 0;
|
char* strTemp = NULL;
|
char strData[20] = {0,};
|
pResultFileMgr->SetUserDefectData(nResultIdx, 2, nCommonReviewCnt+nResultIdx+1);
|
//4. CELL_ID
|
//CString strCellID = pResult->strFullCellID;
|
CString strCellID = pResult->strCellID;
|
#ifdef _UNICODE
|
nSize = WideCharToMultiByte(CP_ACP, 0, strCellID.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
strTemp = new char[nSize];
|
WideCharToMultiByte(CP_ACP, 0, strCellID.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
#else
|
nSize = strCellID.GetLength();
|
strTemp = new char[nSize+1];
|
memcpy(strTemp, strCellID.GetBuffer(), sizeof(char)*nSize);
|
strTemp[nSize] = NULL;
|
#endif
|
pResultFileMgr->SetUserDefectData(nResultIdx, 3, strTemp);
|
//5. CELL_SIDE
|
sprintf_s(strData, "ACT");
|
pResultFileMgr->SetUserDefectData(nResultIdx, 4, strData);
|
//6,7. COORD_X1,Y1
|
pResultFileMgr->SetUserDefectData(nResultIdx, 5, pResult->nUMTransX);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 6, pResult->nUMTransY);
|
//8,9. COORD_X2,Y2
|
pResultFileMgr->SetUserDefectData(nResultIdx, 7, pResult->nUMOriginX);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 8, pResult->nUMOriginY);
|
//19,20,21 AREA_SCORE,DF_W,DF_L
|
pResultFileMgr->SetUserDefectData(nResultIdx, 18, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 19, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 20, 0.0);
|
//23. DFCT_CD_06
|
// if (pResult->nReflowPosition==0)
|
// {
|
// sprintf_s(strData, "MNT");
|
// nMNTCnt++;
|
// }
|
// else if (pResult->nReflowPosition==1)
|
// {
|
// sprintf_s(strData, "MNTPAD");
|
// nMNTPADCnt++;
|
// }
|
pResultFileMgr->SetUserDefectData(nResultIdx, 22, strData);
|
//25,26,27,28,29,30,31,32,33,34,35,36,37 DFCT_CD_08~20
|
pResultFileMgr->SetUserDefectData(nResultIdx, 24, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 25, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 26, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 27, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 28, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 29, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 30, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 31, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 32, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 33, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 34, 0.0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 35, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 36, 0.0);
|
//38. ST
|
sprintf_s(strData, "TD");
|
pResultFileMgr->SetUserDefectData(nResultIdx, 37, strData);
|
//41. JUDGE
|
sprintf_s(strData, "ND");
|
pResultFileMgr->SetUserDefectData(nResultIdx, 40, strData);
|
//46~59.
|
pResultFileMgr->SetUserDefectData(nResultIdx, 45, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 46, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 47, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 48, -10.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 49, 0);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 50, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 51, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 52, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 53, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 54, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 55, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 56, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 57, 0.00000);
|
pResultFileMgr->SetUserDefectData(nResultIdx, 58, 0.00000);
|
|
|
//14. ZONE_P, 18. DEF_AVG, 60. MEASURE_15 = RESULT (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 13, pResult->nReflowReultCode);
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 17, pResult->nReflowReultCode);
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 59, pResult->nReflowReultCode);
|
// //15. SIZE_W, 61. MEASURE_16 = FOCUS (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 14, pResult->nReflowFocusValue);
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 60, pResult->nReflowFocusValue);
|
// //16. SIZE_L, 62. MEASURE_17 = AVG (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 15, pResult->dReflowAvgValue);
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 61, pResult->dReflowAvgValue);
|
// //17. BF_MIN, 65. MEASURE_20 = CON2 (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 16, pResult->nReflowConvValue2);
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 64, pResult->nReflowConvValue2);
|
// //63. MEASURE_18 = CON1 (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 62, pResult->nReflowConvValue11);
|
// //64. MEASURE_19 = CON1 (reflow)
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 63, pResult->nReflowConvValue12);
|
|
//43. IMAGE_FILE1 = IMAGE
|
nSize = 0;
|
if (strTemp) delete[] strTemp;
|
strTemp = NULL;
|
strImageFileName = pResult->strUploadImgFileName;
|
#ifdef _UNICODE
|
nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
strTemp = new char[nSize];
|
WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
#else
|
nSize = strImageFileName.GetLength();
|
strTemp = new char[nSize+1];
|
memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
strTemp[nSize] = NULL;
|
#endif
|
pResultFileMgr->SetUserDefectData(nResultIdx, 42, strTemp);
|
|
//44. IMAGE_FILE2 = IMAGE (reflow)
|
// nSize = 0;
|
// if (strTemp) delete[] strTemp;
|
// strTemp = NULL;
|
// strImageFileName = pResult->strReflowUploadImageFileName;
|
// #ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strTemp = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
// #else
|
// nSize = strImageFileName.GetLength();
|
// strTemp = new char[nSize+1];
|
// memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
// strTemp[nSize] = NULL;
|
// #endif
|
// pResultFileMgr->SetUserDefectData(nResultIdx, 43, strTemp);
|
|
nWriteCount++;
|
|
if(strTemp)
|
{
|
delete[] strTemp;
|
strTemp = NULL;
|
}
|
}
|
}
|
}
|
|
// write glass data
|
for (int nGlass=0; nGlass<pResultFileMgr->GetGlassCount(); nGlass++)
|
{
|
pResultFileMgr->SetGlassData(nGlass, 58, nMNTCnt);
|
pResultFileMgr->SetGlassData(nGlass, 59, nMNTPADCnt);
|
}
|
|
return nWriteCount;
|
}
|
|
int CParsingGlassResult_CPJT::ParsingMeasureResultDataToFile(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
return 0;
|
}
|
|
void CParsingGlassResult_CPJT::ParsingRTMSFileToGlassResult(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
if(pGlassResult==NULL || pResultFileMgr==NULL)
|
return;
|
|
/*
|
CString strItem = _T("");
|
CString strData = _T("");
|
|
// read glass data
|
// strData = pResultFileMgr->GetGlassData(0, 11);
|
// pGlassResult->SetAOIStartTime(strData);
|
// strData = pResultFileMgr->GetGlassData(0, 12);
|
// pGlassResult->SetAOIEndTime(strData);
|
|
// read cell data
|
CCellResult cellResult;
|
int nCellCount = pResultFileMgr->GetRTMSCellCount();
|
|
for(int idx=0; idx<nCellCount; idx++)
|
{
|
cellResult.Reset();
|
|
strItem = pResultFileMgr->GetCellData(idx, 2);
|
strItem.TrimRight();
|
// cellResult.strFullCellID = strItem;
|
cellResult.strCellID = strItem;//strItem.Right(4).Left(3);
|
|
cellResult.nUMOriginX = atoi(pResultFileMgr->GetCellData(idx, 4));
|
cellResult.nUMOriginY = atoi(pResultFileMgr->GetCellData(idx, 5));
|
cellResult.nUMOriginX = cellResult.nUMOriginX - pGlassResult->GetGlassSizeX()/2 + 47620;
|
cellResult.nUMOriginY = cellResult.nUMOriginY - pGlassResult->GetGlassSizeY()/2 + 420000;
|
|
|
cellResult.nUMOriginWidth = atoi(pResultFileMgr->GetCellData(idx, 6));
|
cellResult.nUMOriginHeight = atoi(pResultFileMgr->GetCellData(idx, 7));
|
|
pGlassResult->AddCellResult(cellResult);
|
}
|
|
*/
|
}
|
|
int CParsingGlassResult_CPJT::ParsingReviewResultDataToRTMSFile(CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr)
|
{
|
if (pResultFileMgr==NULL || pGlassResult==NULL)
|
return -1;
|
|
// size count
|
int pSizeCount[5] = {0, 0, 0, 0, 0};
|
|
// judge count
|
int pJudgeCount[3] = {0, 0, 0};
|
|
// write defect data
|
CString strImageFileName = _T("");
|
int nWriteCount = 0;
|
for (int nCameraIdx=0; nCameraIdx<pGlassResult->GetReviewResultCount(); nCameraIdx++)
|
{
|
const CReviewResult* pCameraResult = pGlassResult->GetReviewResult(nCameraIdx);
|
if (pCameraResult==NULL) continue;
|
|
for (int nResultIdx=0; nResultIdx<pCameraResult->GetSReviewResultCount(); nResultIdx++)
|
{
|
const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
if (pResult==NULL) continue;
|
if (pResult->nResultCode!=ReviewResult_Process_Complete) continue;
|
if (pResult->nReviewType!=ReviewType_Review) continue;
|
|
// review image file name
|
strImageFileName = pResult->strUploadImgFileName;
|
|
// [2018/02/13 22:22:06 by jylee] related RTMS ��Ī, ���� ó��
|
if (pResult->nDefectIdx != -1)
|
{
|
CheckResultFileAndCopy( pGlassResult, pResultFileMgr, pResult, strImageFileName );
|
|
nWriteCount++;
|
}
|
}
|
}
|
|
return nWriteCount;
|
}
|
|
|
BOOL CParsingGlassResult_CPJT::CheckResultFileAndCopy( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr, const SReviewResult *pResult, const CString& strFileName )
|
{
|
BOOL bRet = FALSE;
|
|
int nSize = 0;
|
char* strTemp = NULL;
|
CString strImageFileName = _T("");
|
|
CString strCenterOriX = _T("");
|
CString strCenterOriY = _T("");
|
CString strRTMSOriX = _T("");
|
CString strRTMSOriY = _T("");
|
CString strAOIImageFileName = _T("");
|
|
CString strAOISrcPath = _T("");
|
CString strAOIDstPath = _T("");
|
|
|
strImageFileName = strFileName;
|
#ifdef _UNICODE
|
nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
strTemp = new char[nSize];
|
WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
#else
|
nSize = strImageFileName.GetLength();
|
strTemp = new char[nSize+1];
|
memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
strTemp[nSize] = NULL;
|
#endif
|
|
// strCenterOriX = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_CenterOriX );
|
// strCenterOriY = pResultFileMgr->GetRawData(eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_CenterOriY );
|
|
for( int nIdx = 0; nIdx < pResultFileMgr->GetRTMSDefectCount(); nIdx++ )
|
{
|
strRTMSOriX.Format(_T("%.3lf"), atoi(pResultFileMgr->GetDefectData(nIdx, 8))/1000.0);
|
strRTMSOriY.Format(_T("%.3lf"), atoi(pResultFileMgr->GetDefectData(nIdx, 9))/1000.0);
|
|
if( (strRTMSOriX.Compare(strCenterOriX) == 0) && (strRTMSOriY.Compare(strCenterOriY) == 0) )
|
{
|
pResultFileMgr->SetDefectData(nIdx, 24, strTemp);
|
strAOIImageFileName = pResultFileMgr->GetDefectData(nIdx, 23);
|
|
strAOISrcPath.Format( _T("%s\\%s\\%s"), pGlassResult->m_strRTMSLocalAOIImageFilePath, *pGlassResult->GetGlassID(), strAOIImageFileName );
|
strAOIDstPath.Format( _T("%s\\%s"), pGlassResult->m_strUploadRTMSImageFilePath, strAOIImageFileName );
|
|
if(CopyFile(strAOISrcPath, strAOIDstPath, FALSE))
|
bRet = TRUE;
|
else
|
bRet = FALSE;
|
|
break;
|
}
|
}
|
|
if(strTemp)
|
{
|
delete[] strTemp;
|
strTemp = NULL;
|
}
|
|
return bRet;
|
}
|
|
//int CParsingGlassResult_CPJT::ParsingDeepLearningFileToResultData( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr )
|
//{
|
// if (pResultFileMgr==NULL || pGlassResult==NULL)
|
// return -1;
|
//
|
// // write defect data
|
// CString strImageFileName = _T("");
|
// BOOL bRet = FALSE;
|
// int nWriteCount = 0;
|
//
|
// for( int nIdx = 0; nIdx < pResultFileMgr->GetDeepLearningCount(); nIdx++ )
|
// {
|
// strImageFileName = pResultFileMgr->GetDeepLearningRawData(nIdx, eCSOTRaw_DeepLearning_Name);
|
//
|
// bRet = CheckDeepLearningResult( pGlassResult, pResultFileMgr, nIdx, strImageFileName );
|
//
|
// if( bRet )
|
// nWriteCount++;
|
// }
|
//
|
// return nWriteCount;
|
//}
|
|
//BOOL CParsingGlassResult_CPJT::CheckDeepLearningResult( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr, int nDLIndex, const CString& strFileName )
|
//{
|
// BOOL bRet = FALSE;
|
//
|
// CString strImageFileName = _T("");
|
//
|
// for (int nCameraIdx=0; nCameraIdx<pGlassResult->GetReviewResultCount(); nCameraIdx++)
|
// {
|
// const CReviewResult* pCameraResult = pGlassResult->GetReviewResult(nCameraIdx);
|
// if (pCameraResult==NULL) continue;
|
//
|
// for (int nResultIdx=0; nResultIdx<pCameraResult->GetSReviewResultCount(); nResultIdx++)
|
// {
|
// const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
// if (pResult==NULL) continue;
|
// if (pResult->nResultCode!=ReviewResult_Process_Complete) continue;
|
// if (pResult->nReviewType!=ReviewType_Review) continue;
|
//
|
// // review image file name
|
// strImageFileName = pResult->strUploadImgFileName;
|
//
|
// if( strImageFileName.Compare(strFileName) == 0 )
|
// {
|
// if (pResult->nDefectIdx != -1)
|
// {
|
// bRet = pResultFileMgr->SetRawData( eCSOTRaw_DefectInfoData, pResult->nDefectIdx, eCSOTRaw_Defect_Code, pResultFileMgr->GetDeepLearningRawData(nDLIndex, eCSOTRaw_DeepLearning_Judge) );
|
// return bRet;
|
// }
|
// }
|
// }
|
// }
|
//
|
// return bRet;
|
//}
|
|
|
|
//int CParsingGlassResult_CPJT::ParsingDeepLearningResultDataToGlassResult( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr )
|
//{
|
// int nWriteCount = 0;
|
//
|
// int i = 0;
|
// int nSize = 0;
|
// CString strJudge = _T("");
|
// char* strTemp = NULL;
|
//
|
// MapDefectResult *pMapDefectResult = pGlassResult->GetMapDefectResult();
|
// CDefectResult* pDefectResult = NULL;
|
//
|
// for (MapDefectResultIt it = pMapDefectResult->begin(); it != pMapDefectResult->end(); it++)
|
// {
|
// pDefectResult = static_cast<CDefectResult*>(it->second);
|
// if (!pDefectResult)
|
// continue;
|
//
|
// pDefectResult->strDefectCode = pResultFileMgr->GetDeepLearningRawData(i, eCSOTRaw_DeepLearning_Judge);
|
// pDefectResult->strDefectCode.TrimRight();
|
// pDefectResult->nDefectCode = GetDefectCodeType( pGlassResult->m_strRecipeID, pDefectResult->strDefectCode );
|
//
|
// ///TRACE( _T("===== DefectIdx : %d, i: %d, code : %s\n"), pDefectResult->nDefectIdx, i, pDefectResult->strDefectCode );
|
// pResultFileMgr->SetRawData( eCSOTRaw_DefectInfoData, i, eCSOTRaw_Defect_Code, pResultFileMgr->GetDeepLearningRawData(i, eCSOTRaw_DeepLearning_Judge) );
|
//
|
// i++;
|
//
|
// if( i >= pResultFileMgr->GetDeepLearningCount() )
|
// break;
|
// }
|
//
|
//#if 0
|
// for( i = 0; i<pResultFileMgr->GetDeepLearningCount(); i++ )
|
// {
|
// /*
|
// strTemp = NULL;
|
// strJudge = GetDeepLearningRawData(i, eCSOTRaw_DeepLearning_Judge);
|
//
|
//#ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strJudge.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strTemp = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strJudge.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
//#else
|
// nSize = strImageFileName.GetLength();
|
// strTemp = new char[nSize+1];
|
// memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
// strTemp[nSize] = NULL;
|
//#endif
|
// */
|
// pResultFileMgr->SetRawData( eCSOTRaw_DefectInfoData, i, eCSOTRaw_Defect_Code, pResultFileMgr->GetDeepLearningRawData(i, eCSOTRaw_DeepLearning_Judge) );
|
//
|
// }
|
//#endif
|
//
|
// return nWriteCount;
|
//}
|
|
int CParsingGlassResult_CPJT::ParsingDataReloadToGlassResult( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr, int nOrgGlass )
|
{
|
int nWriteCount = 0;
|
|
int i = 0;
|
int nSize = 0;
|
CString strJudge = _T("");
|
char* strTemp = NULL;
|
|
MapDefectResult *pMapDefectResult = pGlassResult->GetMapDefectResult();
|
CDefectResult* pDefectResult = NULL;
|
|
for (MapDefectResultIt it = pMapDefectResult->begin(); it != pMapDefectResult->end(); it++)
|
{
|
pDefectResult = static_cast<CDefectResult*>(it->second);
|
if (!pDefectResult)
|
continue;
|
|
switch( nOrgGlass )
|
{
|
case GlassOrigin_LeftTop:
|
break;
|
case GlassOrigin_RightTop:
|
{
|
pDefectResult->nUMOriginX = int((pGlassResult->GetGlassSizeX()/2) + pDefectResult->dUMCenterOriginX*1000);
|
pDefectResult->nUMOriginY = int((pGlassResult->GetGlassSizeY()/2) + pDefectResult->dUMCenterOriginY*1000);
|
}
|
break;
|
case GlassOrigin_LeftBottom:
|
break;
|
case GlassOrigin_RightBottom:
|
break;
|
}
|
|
i++;
|
}
|
|
return nWriteCount;
|
}
|
|
int CParsingGlassResult_CPJT::GetDefectType(const CString& strValue)
|
{
|
if (strValue.Compare(_T("BD"))==0)
|
{
|
return DEFECT_TYPE_BD; //3
|
}
|
else if (strValue.Compare(_T("B"))==0)
|
{
|
return DEFECT_TYPE_B; //2
|
}
|
else if (strValue.Compare(_T("D"))==0)
|
{
|
return DEFECT_TYPE_D; //1
|
}
|
else if (strValue.Compare(_T("PBD"))==0)
|
{
|
return DEFECT_TYPE_PBD; //3
|
}
|
else if (strValue.Compare(_T("PB"))==0)
|
{
|
return DEFECT_TYPE_PB; //2
|
}
|
else if (strValue.Compare(_T("PD"))==0)
|
{
|
return DEFECT_TYPE_PD; //1
|
}
|
else if (strValue.Compare(_T("MNT"))==0)
|
{
|
return DEFECT_TYPE_MNT;
|
}
|
else if (strValue.Compare(_T("EC"))==0)
|
{
|
return DEFECT_TYPE_EC;
|
}
|
else if (strValue.Compare(_T("MURA"))==0)
|
{
|
return DEFECT_TYPE_MURA;
|
}
|
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::GetCSOTDefectType(const CString& strValue)
|
{
|
if (strValue.Compare(_T("N"))==0)
|
{
|
return DEFECT_TYPE_NORMAL;
|
}
|
else if (strValue.Compare(_T("C"))==0)
|
{
|
return DEFECT_TYPE_COMMON;
|
}
|
else if (strValue.Compare(_T("M"))==0)
|
{
|
return DEFECT_TYPE_MASK;
|
}
|
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::GetGrayType(const CString& strValue)
|
{
|
if (strValue == "BRIGHT") return DEFECT_GRAY_WHITE;
|
else return DEFECT_GRAY_BLACK;
|
|
return DEFECT_GRAY_NONE;
|
}
|
|
CString CParsingGlassResult_CPJT::GetGrayType(const int& nValue)
|
{
|
if (nValue == DEFECT_GRAY_BLACK) return _T("B");
|
else return _T("W");
|
|
return _T("NONE");
|
}
|
|
int CParsingGlassResult_CPJT::GetProcessType(const CString& strValue)
|
{
|
if (strValue == "M") return DEFECT_PROCESS_MASK;
|
else if (strValue == "C") return DEFECT_PROCESS_COMMON;
|
else if (strValue == "K") return DEFECT_PROCESS_CRACK;
|
else return DEFECT_PROCESS_NORMAL;
|
|
return DEFECT_PROCESS_NONE;
|
}
|
|
int CParsingGlassResult_CPJT::GetSizeType(const CString& strValue)
|
{
|
if (strValue == "S") return DEFECT_SIZE_SMALL;
|
else if (strValue == "M") return DEFECT_SIZE_MEDIUM;
|
else if (strValue == "L") return DEFECT_SIZE_LARGE;
|
else return DEFECT_SIZE_HUGE;
|
return DEFECT_SIZE_NONE;
|
}
|
|
int CParsingGlassResult_CPJT::GetStackType(const CString& strValue)
|
{
|
if (strValue == "") return DEFECT_STACK_NONE;
|
else if (strValue == "CD") return DEFECT_STACK_CD;
|
else if (strValue == "SD") return DEFECT_STACK_SD;
|
else if (strValue == "TD") return DEFECT_STACK_TD;
|
|
return DEFECT_STACK_NONE;
|
}
|
|
int CParsingGlassResult_CPJT::GetJudgeType(const CString& strValue)
|
{
|
if (strValue == "R") return DEFECT_JUDGE_TR;
|
else if (strValue == "X") return DEFECT_JUDGE_PR;
|
else if (strValue == "W") return DEFECT_JUDGE_PR;
|
else return DEFECT_JUDGE_OK;
|
|
return DEFECT_JUDGE_NONE;
|
}
|
|
int CParsingGlassResult_CPJT::GetOpticType(int nDefectType)
|
{
|
if (nDefectType==DEFECT_TYPE_BD || nDefectType==DEFECT_TYPE_PBD)
|
{
|
return DEFECT_OPTIC_DKBR;
|
}
|
else if (nDefectType==DEFECT_TYPE_D || nDefectType==DEFECT_TYPE_PD)
|
{
|
return DEFECT_OPTIC_DARK;
|
}
|
else if (nDefectType==DEFECT_TYPE_B || nDefectType==DEFECT_TYPE_PB)
|
{
|
return DEFECT_OPTIC_BRIGHT;
|
}
|
|
return 0;
|
}
|
|
//int CParsingGlassResult_CPJT::GetFeatureType(const CString& strValue)
|
//{
|
// if (strValue=="NONF" || strValue=="D" || strValue=="Black") return DEFECT_FEATURE_1;
|
// else if (strValue=="DEPO" || strValue=="BD" || strValue=="White") return DEFECT_FEATURE_2;
|
// else if (strValue=="B" || strValue=="Surface") return DEFECT_FEATURE_3;
|
// else if (strValue=="Micro") return DEFECT_FEATURE_4;
|
// else DEFECT_FEATURE_NONE;
|
//
|
// return 0;
|
//}
|
|
|
//0131 cmark strDefectType => nDefectCode
|
|
int CParsingGlassResult_CPJT::GetCSOTDefectCode(CString strDfectType){
|
|
//COST_CRACK=0,CSOT_PARTICLE,CSOT_MURA,CSOT_PROTRUDE,CSOT_DENT,CSOT_TFE_ABNORMAL,CSOT_BUBBLE,CSOT_SCRATCH
|
//Compare ����̸� 0 ���ũ�� 1 ������ -1
|
|
if(strDfectType.Compare(_T("CRACK"))==0)
|
{
|
return COST_CRACK;
|
}
|
else if(strDfectType.Compare(_T("PARTICLE"))==0)
|
{
|
return CSOT_PARTICLE;
|
}
|
else if(strDfectType.Compare(_T("MURA"))==0)
|
{
|
return CSOT_MURA;
|
}
|
else if(strDfectType.Compare(_T("PROTRUDE"))==0)
|
{
|
return CSOT_PROTRUDE;
|
}
|
else if(strDfectType.Compare(_T("DENT"))==0)
|
{
|
return CSOT_DENT;
|
}
|
else if(strDfectType.Compare(_T("TFE_ABNORMAL"))==0)
|
{
|
return CSOT_TFE_ABNORMAL;
|
}
|
else if(strDfectType.Compare(_T("BUBBLE"))==0)
|
{
|
return CSOT_BUBBLE;
|
}
|
else if(strDfectType.Compare(_T("SCRATCH"))==0){
|
return CSOT_SCRATCH;
|
}
|
else
|
{
|
return -1;
|
}
|
|
}
|
|
|
CString CParsingGlassResult_CPJT::GetGradeType(int nJudgementType)
|
{
|
CString sStr = _T("");
|
|
switch (nJudgementType)
|
{
|
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_ND: sStr.Format("ND");
|
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;
|
}
|
|
return sStr;
|
}
|
|
int CParsingGlassResult_CPJT::GetCodeType(CString strValue)
|
{
|
|
if (strValue.Compare(_T("TRDF")) == 0)
|
{
|
return TRDF;
|
}
|
else if (strValue.Compare(_T("BATR")) == 0)
|
{
|
return BATR;
|
}
|
else if (strValue.Compare(_T("DOBB")) == 0)
|
{
|
return DOBB;
|
}
|
else if (strValue.Compare(_T("DOBS")) == 0)
|
{
|
return DOBS;
|
}
|
else if (strValue.Compare(_T("DOWW")) == 0)
|
{
|
return DOBS;
|
}
|
else if (strValue.Compare(_T("DOWB")) == 0)
|
{
|
return DOWB;
|
}
|
else if (strValue.Compare(_T("DOWS")) == 0)
|
{
|
return DOWS;
|
}
|
else
|
{
|
return CODE_DEFAULT;
|
}
|
return 0;
|
|
}
|
|
|
// [2018/03/14 09:47:51 by jylee] related Deep Learning
|
int CParsingGlassResult_CPJT::GetDefectCodeType( const CString& strRecipeID, const CString& strValue )
|
{
|
if( (strRecipeID.Compare(LAYER_GT_50) == 0) || (strRecipeID.Compare(LAYER_GT_58) == 0) )
|
{
|
if (strValue.Compare(_T("PGAOS"))==0) return DEFECT_CODE_GT_PGAOS;
|
else if (strValue.Compare(_T("PGAON"))==0) return DEFECT_CODE_GT_PGAON;
|
else if (strValue.Compare(_T("PGAOL"))==0) return DEFECT_CODE_GT_PGAOL;
|
else if (strValue.Compare(_T("PGAOH"))==0) return DEFECT_CODE_GT_PGAOH;
|
else if (strValue.Compare(_T("PGASN"))==0) return DEFECT_CODE_GT_PGASN;
|
else if (strValue.Compare(_T("PGASL"))==0) return DEFECT_CODE_GT_PGASL;
|
else if (strValue.Compare(_T("PGASH"))==0) return DEFECT_CODE_GT_PGASH;
|
else if (strValue.Compare(_T("PGARN"))==0) return DEFECT_CODE_GT_PGARN;
|
else if (strValue.Compare(_T("PGADN"))==0) return DEFECT_CODE_GT_PGADN;
|
else if (strValue.Compare(_T("PGADL"))==0) return DEFECT_CODE_GT_PGADL;
|
else if (strValue.Compare(_T("PGADH"))==0) return DEFECT_CODE_GT_PGADH;
|
else if (strValue.Compare(_T("PGTON"))==0) return DEFECT_CODE_GT_PGTON;
|
else if (strValue.Compare(_T("PGTDN"))==0) return DEFECT_CODE_GT_PGTDN;
|
else if (strValue.Compare(_T("PGTSN"))==0) return DEFECT_CODE_GT_PGTSN;
|
else return DEFECT_CODE_GT_NONE;
|
}
|
else if( (strRecipeID.Compare(LAYER_IGZO_50) == 0) || (strRecipeID.Compare(LAYER_IGZO_58) == 0) )
|
{
|
if (strValue.Compare(_T("PIALN"))==0) return DEFECT_CODE_IGZO_PIALN;
|
else if (strValue.Compare(_T("PIALL"))==0) return DEFECT_CODE_IGZO_PIALL;
|
else if (strValue.Compare(_T("PIALH"))==0) return DEFECT_CODE_IGZO_PIALH;
|
else if (strValue.Compare(_T("PIARN"))==0) return DEFECT_CODE_IGZO_PIARN;
|
else if (strValue.Compare(_T("PIARL"))==0) return DEFECT_CODE_IGZO_PIARL;
|
else if (strValue.Compare(_T("PIARH"))==0) return DEFECT_CODE_IGZO_PIARH;
|
else if (strValue.Compare(_T("PIADN"))==0) return DEFECT_CODE_IGZO_PIADN;
|
else if (strValue.Compare(_T("PIADL"))==0) return DEFECT_CODE_IGZO_PIADL;
|
else if (strValue.Compare(_T("PIADH"))==0) return DEFECT_CODE_IGZO_PIADH;
|
else if (strValue.Compare(_T("PITLN"))==0) return DEFECT_CODE_IGZO_PITLN;
|
else if (strValue.Compare(_T("PITDN"))==0) return DEFECT_CODE_IGZO_PITDN;
|
else if (strValue.Compare(_T("PITRN"))==0) return DEFECT_CODE_IGZO_PITRN;
|
else if (strValue.Compare(_T("PIPLD"))==0) return DEFECT_CODE_IGZO_PIPLD;
|
else return DEFECT_CODE_IGZO_NONE;
|
}
|
else if( (strRecipeID.Compare(LAYER_ESGI_50) == 0) || (strRecipeID.Compare(LAYER_ESGI_58) == 0) )
|
{
|
if (strValue.Compare(_T("PEALN"))==0) return DEFECT_CODE_ESGI_PEALN;
|
else if (strValue.Compare(_T("PEALL"))==0) return DEFECT_CODE_ESGI_PEALL;
|
else if (strValue.Compare(_T("PEALH"))==0) return DEFECT_CODE_ESGI_PEALH;
|
else if (strValue.Compare(_T("PEARN"))==0) return DEFECT_CODE_ESGI_PEARN;
|
else if (strValue.Compare(_T("PEADN"))==0) return DEFECT_CODE_ESGI_PEADN;
|
else if (strValue.Compare(_T("PEADL"))==0) return DEFECT_CODE_ESGI_PEADL;
|
else if (strValue.Compare(_T("PEADH"))==0) return DEFECT_CODE_ESGI_PEADH;
|
else if (strValue.Compare(_T("PETLN"))==0) return DEFECT_CODE_ESGI_PETLN;
|
else if (strValue.Compare(_T("PETDN"))==0) return DEFECT_CODE_ESGI_PETDN;
|
else if (strValue.Compare(_T("PETRN"))==0) return DEFECT_CODE_ESGI_PETRN;
|
else if (strValue.Compare(_T("PEPLD"))==0) return DEFECT_CODE_ESGI_PEPLD;
|
else return DEFECT_CODE_ESGI_NONE;
|
}
|
else if( (strRecipeID.Compare(LAYER_SD_50) == 0) || (strRecipeID.Compare(LAYER_SD_58) == 0) )
|
{
|
if (strValue.Compare(_T("PSAON"))==0) return DEFECT_CODE_SD_PSAON;
|
else if (strValue.Compare(_T("PSAOL"))==0) return DEFECT_CODE_SD_PSAOL;
|
else if (strValue.Compare(_T("PSAOH"))==0) return DEFECT_CODE_SD_PSAOH;
|
else if (strValue.Compare(_T("PSAOD"))==0) return DEFECT_CODE_SD_PSAOD;
|
else if (strValue.Compare(_T("PSASN"))==0) return DEFECT_CODE_SD_PSASN;
|
else if (strValue.Compare(_T("PSASL"))==0) return DEFECT_CODE_SD_PSASL;
|
else if (strValue.Compare(_T("PSASH"))==0) return DEFECT_CODE_SD_PSASH;
|
else if (strValue.Compare(_T("PSASD"))==0) return DEFECT_CODE_SD_PSASD;
|
else if (strValue.Compare(_T("PSARN"))==0) return DEFECT_CODE_SD_PSARN;
|
else if (strValue.Compare(_T("PSADN"))==0) return DEFECT_CODE_SD_PSADN;
|
else if (strValue.Compare(_T("PSADL"))==0) return DEFECT_CODE_SD_PSADL;
|
else if (strValue.Compare(_T("PSADH"))==0) return DEFECT_CODE_SD_PSADH;
|
else if (strValue.Compare(_T("PSTON"))==0) return DEFECT_CODE_SD_PSTON;
|
else if (strValue.Compare(_T("PSTDN"))==0) return DEFECT_CODE_SD_PSTDN;
|
else if (strValue.Compare(_T("PSTSN"))==0) return DEFECT_CODE_SD_PSTSN;
|
else if (strValue.Compare(_T("PSPLD"))==0) return DEFECT_CODE_SD_PSPLD;
|
else return DEFECT_CODE_SD_NONE;
|
}
|
else if( (strRecipeID.Compare(LAYER_JAS_50) == 0) || (strRecipeID.Compare(LAYER_JAS_58) == 0) )
|
{
|
if (strValue.Compare(_T("PJALN"))==0) return DEFECT_CODE_JAS_PJALN; // Photo Jas Active-Area jas-Lack Normal
|
else if (strValue.Compare(_T("PJALL"))==0) return DEFECT_CODE_JAS_PJALL; // Photo Jas Active-Area jas-Lack Large
|
else if (strValue.Compare(_T("PJALH"))==0) return DEFECT_CODE_JAS_PJALH; // Photo Jas Active-Area jas-Lack Huge
|
else if (strValue.Compare(_T("PJARN"))==0) return DEFECT_CODE_JAS_PJARN; // Photo Jas Active-Area jas-Residue Normal
|
else if (strValue.Compare(_T("PJADN"))==0) return DEFECT_CODE_JAS_PJADN; // Photo Jas Active-Area Dust Normal
|
else if (strValue.Compare(_T("PJADL"))==0) return DEFECT_CODE_JAS_PJADL; // Photo Jas Active-Area Dust Large
|
else if (strValue.Compare(_T("PJADH"))==0) return DEFECT_CODE_JAS_PJADH; // Photo Jas Active-Area Dust Huge
|
else if (strValue.Compare(_T("PJTLN"))==0) return DEFECT_CODE_JAS_PJTLN; // Phote Jas Terminal jas-Lack
|
else if (strValue.Compare(_T("PJTDN"))==0) return DEFECT_CODE_JAS_PJTDN; // Photo Jas Terminal Dust Normal
|
else if (strValue.Compare(_T("PJTRN"))==0) return DEFECT_CODE_JAS_PJTRN; // Photo Jas Terminal jas-Residue
|
else if (strValue.Compare(_T("PJPLD"))==0) return DEFECT_CODE_JAS_PJPLD; // Photo Jas Pre Layer Defect
|
else return DEFECT_CODE_JAS_NONE;
|
|
return DEFECT_CODE_JAS_NONE;
|
}
|
else if( (strRecipeID.Compare(LAYER_PIX_50) == 0) || (strRecipeID.Compare(LAYER_PIX_58) == 0) )
|
{
|
if (strValue.Compare(_T("PPALN"))==0) return DEFECT_CODE_PIX_PPALN;
|
else if (strValue.Compare(_T("PPALL"))==0) return DEFECT_CODE_PIX_PPALL;
|
else if (strValue.Compare(_T("PPALH"))==0) return DEFECT_CODE_PIX_PPALH;
|
else if (strValue.Compare(_T("PPARN"))==0) return DEFECT_CODE_PIX_PPARN;
|
else if (strValue.Compare(_T("PPARL"))==0) return DEFECT_CODE_PIX_PPARL;
|
else if (strValue.Compare(_T("PPARH"))==0) return DEFECT_CODE_PIX_PPARH;
|
else if (strValue.Compare(_T("PPADN"))==0) return DEFECT_CODE_PIX_PPADN;
|
else if (strValue.Compare(_T("PPADL"))==0) return DEFECT_CODE_PIX_PPADL;
|
else if (strValue.Compare(_T("PPADH"))==0) return DEFECT_CODE_PIX_PPADH;
|
else if (strValue.Compare(_T("PPAIL"))==0) return DEFECT_CODE_PIX_PPAIL;
|
else if (strValue.Compare(_T("PPTLN"))==0) return DEFECT_CODE_PIX_PPTLN;
|
else if (strValue.Compare(_T("PPTDN"))==0) return DEFECT_CODE_PIX_PPTDN;
|
else if (strValue.Compare(_T("PPTRN"))==0) return DEFECT_CODE_PIX_PPTRN;
|
else if (strValue.Compare(_T("PPPLD"))==0) return DEFECT_CODE_PIX_PPPLD;
|
else return DEFECT_CODE_PIX_NONE;
|
}
|
else
|
{
|
if (strValue.Compare(_T("PJALN"))==0) return DEFECT_CODE_JAS_PJALN; // Photo Jas Active-Area jas-Lack Normal
|
else if (strValue.Compare(_T("PJALL"))==0) return DEFECT_CODE_JAS_PJALL; // Photo Jas Active-Area jas-Lack Large
|
else if (strValue.Compare(_T("PJALH"))==0) return DEFECT_CODE_JAS_PJALH; // Photo Jas Active-Area jas-Lack Huge
|
else if (strValue.Compare(_T("PJARN"))==0) return DEFECT_CODE_JAS_PJARN; // Photo Jas Active-Area jas-Residue Normal
|
else if (strValue.Compare(_T("PJADN"))==0) return DEFECT_CODE_JAS_PJADN; // Photo Jas Active-Area Dust Normal
|
else if (strValue.Compare(_T("PJADL"))==0) return DEFECT_CODE_JAS_PJADL; // Photo Jas Active-Area Dust Large
|
else if (strValue.Compare(_T("PJADH"))==0) return DEFECT_CODE_JAS_PJADH; // Photo Jas Active-Area Dust Huge
|
else if (strValue.Compare(_T("PJTLN"))==0) return DEFECT_CODE_JAS_PJTLN; // Phote Jas Terminal jas-Lack
|
else if (strValue.Compare(_T("PJTDN"))==0) return DEFECT_CODE_JAS_PJTDN; // Photo Jas Terminal Dust Normal
|
else if (strValue.Compare(_T("PJTRN"))==0) return DEFECT_CODE_JAS_PJTRN; // Photo Jas Terminal jas-Residue
|
else if (strValue.Compare(_T("PJPLD"))==0) return DEFECT_CODE_JAS_PJPLD; // Photo Jas Pre Layer Defect
|
else return DEFECT_CODE_JAS_NONE;
|
|
return DEFECT_CODE_JAS_NONE;
|
}
|
}
|
|
// [2018/07/28 10:57:21 by jylee] related Zone Data
|
|
int CParsingGlassResult_CPJT::GetZoneType(const CString& strValue)
|
{
|
if (strValue == "DA") return DEFECT_ZONE_DA;
|
else if (strValue == "GA") return DEFECT_ZONE_GA;
|
else if (strValue == "GH") return DEFECT_ZONE_GH;
|
else if (strValue == "AA") return DEFECT_ZONE_AA;
|
else return DEFECT_ZONE_NONE;
|
|
return DEFECT_ZONE_NONE;
|
}
|
|
void CParsingGlassResult_CPJT::MemoryParsingFileToGlassResult( CGlassResult* pGlassResult, CDitGlassRawClient* pDitRawClient )
|
{
|
|
//���ڵ�//
|
if(pGlassResult==NULL || pDitRawClient==NULL) return;
|
|
CString strItem = _T("");
|
CString strData = _T("");
|
|
pGlassResult->m_strEquipID = pDitRawClient->GetGlassData()->m_strEquipID; // 10: Equipment ID
|
//pGlassResult->m_strRecipeID = pResultFileMgr->GetRawData(eCSOTRaw_GlassInfoData, 0, eCSOTRaw_Glass_RecipeID); // Recipe ID
|
|
// read cell(Panel) data
|
CCellResult cellResult;
|
|
//int nDefectRawDataCount = 0;//pResultFileMgr->GetRawDataCount(eCSOTRaw_DefectInfoData, 0);
|
int nDefectRawDataCount = pDitRawClient->GetGlassData()->m_nDefectNum;
|
//int nDefectRawDataCount = m_pDitRawClient->GetEQPGlassData()->m_nTotalDefectCount;
|
|
pGlassResult->m_strProcessID = pDitRawClient->GetGlassData()->m_strProcessID;
|
|
pGlassResult->m_strOperID = pDitRawClient->GetGlassData()->m_strOperID;
|
|
int nTotalDefectIdx = 0;
|
int nGlassIDLength = 0;
|
int nCellCount = pDitRawClient->GetGlassData()->m_nCellNum;
|
|
for(int nCellIdx=0; nCellIdx<nCellCount; nCellIdx++)
|
{
|
int idx =0;
|
cellResult.Reset();
|
|
cellResult.nDefectCount = pDitRawClient->GetCellData(nCellIdx)->getTotalDefectNum();
|
cellResult.strCellJudge.Format(_T("%d"),pDitRawClient->GetCellData(nCellIdx)->m_nJudgement);
|
|
//20201126 CELL ��ǥ�踦 ������ǥ�� �ٲ����� ���� ��ǥ�迡�� + �۶� ������/2 �ؾߵ�
|
cellResult.nUMOriginX = pDitRawClient->GetCellData(nCellIdx)->m_rectCellLeft + pDitRawClient->GetGlassData()->m_nGlassSizeWidth/2;
|
cellResult.nUMOriginY = pDitRawClient->GetCellData(nCellIdx)->m_rectCellTop + pDitRawClient->GetGlassData()->m_nGlassSizeHeight / 2;
|
cellResult.nUMOriginWidth = pDitRawClient->GetCellData(nCellIdx)->m_rectCellRight - cellResult.nUMOriginX + pDitRawClient->GetGlassData()->m_nGlassSizeWidth / 2;
|
cellResult.nUMOriginHeight = pDitRawClient->GetCellData(nCellIdx)->m_rectCellBottom- cellResult.nUMOriginY + pDitRawClient->GetGlassData()->m_nGlassSizeHeight / 2;
|
|
|
CString strCellID(pDitRawClient->GetCellData(nCellIdx)->m_strCellName);
|
cellResult.strCellID = strCellID;
|
|
pGlassResult->AddCellResult(cellResult); // �߰�
|
|
}
|
pGlassResult->m_strGlassID = pDitRawClient->GetGlassData()->m_strGlassID;
|
int nData = 0;
|
double dData = 0.0;
|
_grmDefectData* pSharedDefect;
|
|
for (int nDefIdx=0; nDefIdx<nDefectRawDataCount; nDefIdx++)
|
{
|
pSharedDefect = pDitRawClient->GetDefectData(nDefIdx);
|
|
CDefectResult* pDefectResult = new CDefectResult;
|
if (pDefectResult==NULL) continue;
|
|
if (pSharedDefect->m_strAoiImageName != _T("*"))
|
{
|
pDefectResult->strInspectImgFileName = pSharedDefect->m_strAoiImageName;
|
}
|
|
//g_pLog->DisplayMessage(_T("AOIImageName : \n"), pSharedDefect->m_strAoiImageName);
|
|
pDefectResult->strInspectImgFileName = pSharedDefect->m_strAoiImageName;
|
/*< LYW 20211220 - #0000 ADD Start >*/
|
//버그 수정
|
pDefectResult->nDefectWBType = int(pSharedDefect->m_DefectType);
|
/*< LYW 20211220 - #0000 ADD End >*/
|
|
if(pDefectResult->nDefectWBType == 1 || pDefectResult->nDefectWBType == 3 || pDefectResult->nDefectWBType ==5) pDefectResult->nDefectWBType =2;
|
else pDefectResult->nDefectWBType = 1;
|
|
//�̰Ž� �ƿ��� ��� Review ���� 210205
|
if (pSharedDefect->m_bDefectCutoff == 1)
|
{
|
continue;
|
}
|
pDefectResult->nDefectIdx = nDefIdx;// pSharedDefect->m_nDefectIdx;
|
pDefectResult->nDefectidx2 = nDefIdx;
|
pDefectResult->nDefectidx1 = pSharedDefect->m_nDefectIdx;
|
pDefectResult->nDefectCode = 0;//pSharedDefect->m_strDefectCode;
|
pDefectResult->strDefectCode = pSharedDefect->m_strDefectCode;
|
pDefectResult->nAOICameraIdx = pSharedDefect->m_nCameraID;
|
pDefectResult->nAOIScanIdx = pSharedDefect->m_nScanIdx;
|
pDefectResult->dUMCenterOriginX = pSharedDefect->m_nUMCenterAlignX;
|
pDefectResult->dUMCenterOriginY = pSharedDefect->m_nUMCenterAlignY;
|
pDefectResult->nUMOriginX = pSharedDefect->m_nUMOriginX;//
|
pDefectResult->nUMOriginY = pSharedDefect->m_nUMOriginY;//
|
|
//20210608 �ڵ�� �켱����
|
pDefectResult->nDefectJudgeCode = GetCodeType(pSharedDefect->m_strDefectCode);
|
pDefectResult->strDefectJudgeCode = pSharedDefect->m_strDefectCode;
|
|
|
pDefectResult->nJudgeType = pSharedDefect->m_DefectJudgement;
|
pDefectResult->strJudgeType = GetGradeType(pDefectResult->nJudgeType);
|
|
|
pDefectResult->nUMTransX =0;
|
pDefectResult->nUMTransY =0;
|
|
pDefectResult->nLocation = pSharedDefect->m_sDefectLoc;
|
|
//��Ƽ �� Review/WSI ������ ���� ����
|
pDefectResult->nMultiModel = pSharedDefect->m_nModelIdx;
|
|
/*< LYW 20211220 - #$0000 MOD Start >*/
|
if (pDefectResult->nDefectWBType == 1)
|
{
|
//Dark
|
pDefectResult->nOpticType = 2;
|
pDefectResult->nGrayType = 1;
|
pDefectResult->strOpticType = _T("DARK");
|
}
|
else if (pDefectResult->nDefectWBType == 2)
|
{
|
//White
|
pDefectResult->nOpticType = 1;
|
pDefectResult->nGrayType = 2;
|
pDefectResult->strOpticType = _T("WHITE");
|
}
|
else
|
{
|
//both
|
pDefectResult->nOpticType = 3;
|
pDefectResult->nGrayType = 1;
|
pDefectResult->strOpticType = _T("BOTH");
|
}
|
/*< LYW 20211220 - #0000 MOD End >*/
|
/*< Origin Code >*/
|
// if (pSharedDefect->m_DefectBDType == 1)
|
// {
|
// //Dark
|
// pDefectResult->nOpticType = 2;
|
// pDefectResult->nGrayType = 1;
|
// pDefectResult->strOpticType = _T("DARK");
|
// }
|
// else if (pSharedDefect->m_DefectBDType == 0)
|
// {
|
// //White
|
// pDefectResult->nOpticType = 1;
|
// pDefectResult->nGrayType = 2;
|
// pDefectResult->strOpticType = _T("WHITE");
|
// }
|
// else
|
// {
|
// //both
|
// pDefectResult->nOpticType = 3;
|
// pDefectResult->nGrayType = 1;
|
// pDefectResult->strOpticType = _T("BOTH");
|
// }
|
|
|
|
|
////20190311CHM
|
//if(pSharedDefect->m_StackInfo == 1) //���� �ε� ���� ����
|
//{
|
// pDefectResult->nStackType = 1; //3�� SD
|
//}
|
//else if(pSharedDefect->m_StackInfo == 2) // �����ε� ���� ��
|
//{
|
// pDefectResult->nStackType = 2;
|
//}
|
//else
|
//{
|
// pDefectResult->nStackType = 0; //0�� ALL
|
//}
|
|
pDefectResult->nStackType = pSharedDefect->m_StackInfo;
|
|
pDefectResult->nDefectType = pSharedDefect->m_DefectType;
|
|
pDefectResult->strDefectType = pSharedDefect->m_strDefectType;
|
|
//RB RW
|
//
|
pDefectResult->nDefectCode = GetCSOTDefectCode(pDefectResult->strDefectType);
|
|
pDefectResult->nSizeType = pSharedDefect->m_DefectSizeType;// No.6 Defect SizeType // S/M/L/O
|
//pDefectResult->strSizeType = "S";
|
if(pDefectResult->nSizeType==1) pDefectResult->strSizeType = _T("S");
|
else if(pDefectResult->nSizeType==2) pDefectResult->strSizeType = _T("M");
|
else if(pDefectResult->nSizeType==3) pDefectResult->strSizeType = _T("L");
|
else if(pDefectResult->nSizeType==4) pDefectResult->strSizeType = _T("O");
|
|
//if(pDefectResult->nSizeType==0) pDefectResult->strJudgeType = _T("O");
|
//else if(pDefectResult->nSizeType==2) pDefectResult->strJudgeType = _T("N");
|
//else if(pDefectResult->nSizeType==1) pDefectResult->strJudgeType = _T("R");
|
//else pDefectResult->strJudgeType = _T("O");
|
|
|
|
pDefectResult->nSrcMax = pSharedDefect->m_nLevelSrcMax;
|
pDefectResult->nRefMax = pSharedDefect->m_nLevelRefMax;
|
pDefectResult->nAOIPeak = pSharedDefect->m_sDefectPeak;
|
pDefectResult->nAOISizeW = pSharedDefect->m_sPixelWidth;
|
pDefectResult->nAOISizeH = pSharedDefect->m_sPixelHeight;
|
pDefectResult->nAOISize = pSharedDefect->m_nUMSize;
|
pDefectResult->nAOIArea = pSharedDefect->m_nPixelSize;
|
|
pDefectResult->strAOIArea =_T("%d",pSharedDefect->m_nPixelSize);
|
|
pDefectResult->nAOISizeLength = pSharedDefect->m_nDefectRScale;
|
|
pDefectResult->nDefectZone = pDefectResult->nDefectZone;
|
|
pDefectResult->strEquipID = pDitRawClient->GetGlassData()->m_strEquipID;
|
pDefectResult->nAOIScanIdx = pSharedDefect->m_nScanIdx;
|
|
pDefectResult->nUMCellX =pSharedDefect->m_nUMCellX;
|
pDefectResult->nUMCellY =pSharedDefect->m_nUMCellY;
|
pDefectResult->strUploadImgFileName =pSharedDefect->m_strAoiImageName; // No.11 Image Name
|
|
if(pDefectResult->strUploadImgFileName.Compare(_T("0")) == 0)
|
{
|
pDefectResult->strUploadImgFileName = "";
|
pDefectResult->nUMDefectImageSizeX = NULL;
|
pDefectResult->nUMDefectImageSizeY = NULL;
|
}
|
//pDefectResult->strJudgeType = cellResult.strCellJudge;
|
|
CString strCellID(pDitRawClient->GetCellData(pSharedDefect->m_nCellIdx)->m_strCellName);
|
pDefectResult->strCellID = strCellID;
|
|
//pDefectResult->nGrayType = 1; // Imsi
|
pDefectResult->nOpticType = 1;
|
pDefectResult->nTotalDefectCount = nTotalDefectIdx;
|
pDefectResult->ProcessID = pDitRawClient->GetGlassData()->m_strOperID;
|
pDefectResult->strOperID = pDitRawClient->GetGlassData()->m_strOperID;
|
pDefectResult->strGlassID = pDitRawClient->GetGlassData()->m_strGlassID;
|
pDefectResult->strLotID = pDitRawClient->GetGlassData()->m_strLotID;
|
|
|
|
pGlassResult->AddDefectResult(pDefectResult);
|
|
nTotalDefectIdx++;
|
}
|
}
|
|
int CParsingGlassResult_CPJT::MemoryParsingReviewResultDataToFile( CGlassResult* pGlassResult, CDitGlassRawClient* pRawMemoryMgr )
|
{
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::MemoryParsingWsiResultDataToFile( CGlassResult* pGlassResult, CDitGlassRawClient* pRawMemoryMgr )
|
{
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::MemoryParsingMeasureResultDataToFile( CGlassResult* pGlassResult, CDitGlassRawClient* pRawMemoryMgr )
|
{
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::MemoryParsingReflowResultDataToFile( CGlassResult* pGlassResult, CDitGlassRawClient* pRawMemoryMgr )
|
{
|
return 0;
|
}
|
|
int CParsingGlassResult_CPJT::ParsingWsiReflowResultDataToFile( CGlassResult* pGlassResult, CResultFileManager* pResultFileMgr )
|
{
|
|
|
|
// if (pResultFileMgr==NULL || pGlassResult==NULL)
|
// return -1;
|
// CString strReflowResult;
|
// CString strReflowType1;
|
//
|
// int nSize;
|
// char* strTempReflowResult = NULL;
|
// char* strGlassID = NULL;
|
// // write defect data
|
// CString strImageFileName = _T("");
|
// CString strCellID = _T("");
|
// int nWriteCount = 0;
|
// int nDefectCount;
|
// int nCellCount;
|
// // pResultFileMgr->m_nLineCount;
|
// nCellCount = pGlassResult->GetCellResultCount();
|
// for (int nCameraIdx=0; nCameraIdx<pGlassResult->GetWsiReflowResultCount(); nCameraIdx++)
|
// {
|
// CString strTempGlassID;
|
// strTempGlassID.Format(_T("%sRRRR"), *pGlassResult->GetGlassID());
|
//
|
//#ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strTempGlassID.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strGlassID = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strTempGlassID.GetBuffer(), -1, strGlassID, nSize, NULL, NULL);
|
//#else
|
// nSize = strTempGlassID.GetLength();
|
// strGlassID = new char[nSize+1];
|
// memcpy(strGlassID, strTempGlassID.GetBuffer(), sizeof(char)*nSize);
|
// strGlassID[nSize] = NULL;
|
//#endif
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_PanelInfoData, nCellCount, 1, 7);
|
// pResultFileMgr->SetRawData(eB7Raw_PanelInfoData, nCellCount, 2, strGlassID);
|
// pResultFileMgr->SetRawData(eB7Raw_PanelInfoData, nCellCount, 3, "R");
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_PanelSumData, nCellCount, 1, 18);
|
// pResultFileMgr->SetRawData(eB7Raw_PanelSumData, nCellCount, 2, pGlassResult->GetSReflowResultCount(nCameraIdx));
|
// pResultFileMgr->SetRawData(eB7Raw_PanelSumData, nCellCount, 15, "N");
|
// pResultFileMgr->SetRawData(eB7Raw_PanelSumData, nCellCount, 16, 0);
|
//
|
//
|
// // pResultFileMgr->SetRawData(eB7Raw_PanelInfoItem, pResultFileMgr->GetRawDataCount(eB7Raw_PanelInfoItem,0), , "");
|
//
|
// nDefectCount = pResultFileMgr->GetDefectCount() - pGlassResult->GetSWsiReflowResultCount(nCameraIdx);
|
// const CReviewResult* pCameraResult = pGlassResult->GetWsiReflowResult(nCameraIdx);
|
// if (pCameraResult==NULL) continue;
|
//
|
// for (int nResultIdx=0; nResultIdx<pCameraResult->GetSReviewResultCount(); nResultIdx++)
|
// {
|
// const SReviewResult *pResult = pCameraResult->GetSReviewResult(nResultIdx);
|
// if (pResult==NULL) continue;
|
// if (pResult->nResultCode!=WsiResultSuccess) continue;
|
// if (pResult->nReviewType!=ReviewType_WsiReflow) continue;
|
//
|
// // if (pResultFileMgr && pResult->nDefectIdx != -1)
|
// if (pResultFileMgr && pResult->nResultIdx != -1)
|
// {
|
// CString strSeqNum;
|
// strSeqNum.Format(_T("%d"), nResultIdx+1);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 1, 36);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 2, _ttoi(strSeqNum)); // No.1 Defect Number.
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 3, "OF"); // No.2 Defect Code
|
//
|
// /*
|
// WsiReflow_AZoneJudge
|
// WsiReflow_BZoneJudge
|
// WsiReflow_CZoneJudge
|
// */
|
//
|
// // 181203 SJB, Wsi Reflow Result Judge
|
//
|
// if(pResult->nWsi_ResultCode == 0)
|
// {
|
// strReflowResult.Format(_T("WTestFail"));
|
// strReflowType1.Format(_T("F"));
|
// }
|
// else
|
// {
|
// if(pResult->nWsi_pReflowResultData[WsiReflow_DZoneJudge] == 1)
|
// {
|
// strReflowResult.Format(_T("WReflow"));
|
// strReflowType1.Format(_T("4"));
|
// }
|
// else if(pResult->nWsi_pReflowResultData[WsiReflow_DZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_CZoneJudge] == 1)
|
// {
|
// strReflowResult.Format(_T("WReflow"));
|
// strReflowType1.Format(_T("3"));
|
// }
|
// else if(pResult->nWsi_pReflowResultData[WsiReflow_DZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_CZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_BZoneJudge] == 1)
|
// {
|
// strReflowResult.Format(_T("WReflow"));
|
// strReflowType1.Format(_T("2"));
|
// }
|
// else if(pResult->nWsi_pReflowResultData[WsiReflow_DZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_CZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_BZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_AZoneJudge] == 1)
|
// {
|
// strReflowResult.Format(_T("WReflow"));
|
// strReflowType1.Format(_T("1"));
|
// }
|
// else if(pResult->nWsi_pReflowResultData[WsiReflow_DZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_CZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_BZoneJudge] == 0 && pResult->nWsi_pReflowResultData[WsiReflow_AZoneJudge] == 0)
|
// {
|
// strReflowResult.Format(_T("WNoReflow"));
|
// strReflowType1.Format(_T("0"));
|
// }
|
//
|
//
|
// }
|
//
|
//#ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strReflowResult.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strTempReflowResult = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strReflowResult.GetBuffer(), -1, strTempReflowResult, nSize, NULL, NULL);
|
//#else
|
// nSize = strReflowResult.GetLength();
|
// strTempReflowResult = new char[nSize+1];
|
// memcpy(strTempReflowResult, strReflowResult.GetBuffer(), sizeof(char)*nSize);
|
// strTempReflowResult[nSize] = NULL;
|
//#endif
|
//
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 4, strTempReflowResult); // No.4 Defect Name
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 5, strTempReflowResult); // No.5 Defect Type
|
// if (pResult->nReflow_Result < 1)
|
// {
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 19, "OK");
|
// }
|
// else if (pResult->nReflow_Result >= 1 && pResult->nReflow_Result <= 4)
|
// {
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 19, "NG");
|
// }
|
// else
|
// {
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 19, "FAIL");
|
// }
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 25, (LPSTR)(LPCTSTR)strReflowType1); // No.25 Defect Type1
|
// if (pResult->nReflow_Side == 0)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "TOP"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 1)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "LEFT"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 2)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "RIGHT"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 3)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "LEFTTOP"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 4)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "RIGHTTOP"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 5)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "LEFTBOTTOM"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 6)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "RIGHTBOTTOM"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 7)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "BOTTOM"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 8)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "LEFTNOTCH"); // No.26 Defect Type2
|
// else if (pResult->nReflow_Side == 9)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "RIGHTNOTCH"); // No.26 Defect Type2
|
// else
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 26, "UNKNOWN"); // No.26 Defect Type2
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 6, pResult->nUMTransX);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 7, pResult->nUMTransY);
|
//
|
// int nUMCenterOriginY = pGlassResult->GetGlassSizeX()/2 - pResult->nUMOriginX;
|
// int nUMCenterOriginX = pGlassResult->GetGlassSizeY()/2 - pResult->nUMOriginY;
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 8, nUMCenterOriginX);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 9, nUMCenterOriginY);
|
//
|
// char* strTempCellID = NULL;
|
// strCellID = pResult->strCellID;
|
//#ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strCellID.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strTempCellID = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strCellID.GetBuffer(), -1, strTempCellID, nSize, NULL, NULL);
|
//#else
|
// nSize = pResult->strCellID.GetLength();
|
// strTempCellID = new char[nSize+1];
|
// memcpy(strTempCellID, pResult->strCellID.GetBuffer(), sizeof(char)*nSize);
|
// strTempCellID[nSize] = NULL;
|
//#endif
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 10, strTempCellID);
|
//
|
// if(strTempCellID)
|
// {
|
// delete[] strTempCellID;
|
// strTempCellID = NULL;
|
// }
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 11, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 12, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 13, nUMCenterOriginX);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 14, nUMCenterOriginY);
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 15, "LINE");
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 16, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 17, "***");
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 18, "***");
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 20, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 21, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 22, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 23, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 24, 0);
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 27, "PAD");
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 28, "***");
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 29, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 30, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 31, "***");
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 32, "1");
|
//
|
//
|
// char* strTemp = NULL;
|
// strImageFileName = pResult->strImgFileName;
|
//#ifdef _UNICODE
|
// nSize = WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, NULL, 0, NULL,NULL);
|
// strTemp = new char[nSize];
|
// WideCharToMultiByte(CP_ACP, 0, strImageFileName.GetBuffer(), -1, strTemp, nSize, NULL, NULL);
|
//#else
|
// nSize = strImageFileName.GetLength();
|
// strTemp = new char[nSize+1];
|
// memcpy(strTemp, strImageFileName.GetBuffer(), sizeof(char)*nSize);
|
// strTemp[nSize] = NULL;
|
//#endif
|
// if (pResult->nResultIdx != -1)
|
// {
|
// // 20170831 smok �� �߰� DEFECT_ZONE(AA/PAD/CRACK) 31 -> 32
|
// // [2017:5:24]-[WEZASW] : AOI DFS(DFT) �� �߰�(Index ����)
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 33, strTemp); // No.31 Image File Name
|
//
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 34, "***");
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 35, 0);
|
// pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, nDefectCount + pResult->nResultIdx, 36, "***");
|
//
|
//
|
// // pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 2, ""); // No.2 Defect Code
|
// // pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 3, ); // No.3 Defect Name
|
// // pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 24, ); // No.24 Defect Type1
|
// // pResultFileMgr->SetRawData(eB7Raw_DefectInfoData, pResult->nTotalDefectCount, 25, ); // No.25 Defect Type2
|
// }
|
// nWriteCount++;
|
//
|
// if(strTempReflowResult)
|
// {
|
// delete[] strTempReflowResult;
|
// strTempReflowResult = NULL;
|
// }
|
// if(strTemp)
|
// {
|
// delete[] strTemp;
|
// strTemp = NULL;
|
// }
|
// }
|
// }
|
// if(strGlassID)
|
// {
|
// delete[] strGlassID;
|
// strGlassID = NULL;
|
// }
|
// // pResultFileMgr->SetRawDataCount(eB7Raw_DefectInfoData, pResultFileMgr->GetDefectCount());
|
// }
|
//
|
// return nWriteCount;
|
return 0;
|
}
|