优化:显示在流程中解锁,并且把文件字符集统一替换成UTF-8(BOM)
| | |
| | | #ifndef BL_COMMON_H |
| | | #ifndef BL_COMMON_H |
| | | #define BL_COMMON_H |
| | | |
| | | #include <windows.h> |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "DefectStorage.h" |
| | | #include "SISBuffer.h" |
| | | #include "BlobStorage.h" |
| | |
| | | delete[] m_pDefect; |
| | | } |
| | | |
| | | // 16俺狼 咯盒阑 敌促..恐? 郴干.. |
| | | // 16俺狼 咯盒阑 敌促..恐? 郴干.. |
| | | int DefectSapce= maxDefect+ 16; |
| | | m_pDefect= new CDefect[DefectSapce]; |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | |
| | | #include "AssemDefect.h" |
| | |
| | | |
| | | class CDefectControl : public CDefectStorage |
| | | { |
| | | public:// Defect 傈价何 眠啊. |
| | | public:// Defect 傈价何 眠啊. |
| | | CDefectControl(); |
| | | virtual ~CDefectControl(); |
| | | |
| | |
| | | // Glass.cpp: implementation of the CGlass class. |
| | | // Glass.cpp: implementation of the CGlass class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | arrString.clear(); |
| | | |
| | | CString strData = strDataInput; |
| | | strData.Trim(); //??3y??óD????μ??é?? |
| | | strData.Trim(); //??3y??óD????μ??é?? |
| | | if (strData.IsEmpty()) { |
| | | return TRUE; |
| | | } |
| | | if (-1 == strData.Find(strSign)) { //2?°üo?·???·? |
| | | if (-1 == strData.Find(strSign)) { //2?°üo?·???·? |
| | | arrString.push_back(strData); |
| | | return TRUE; |
| | | } |
| | | while (0 == strData.Find(strSign)) { //?-?·é?3yê×??é?μ?·???·? |
| | | while (0 == strData.Find(strSign)) { //?-?·é?3yê×??é?μ?·???·? |
| | | strData.Delete(0, strSign.GetLength()); |
| | | } |
| | | strData += strSign; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include "Global_Define.h" |
| | |
| | | BOOL m_bInspectComplete; |
| | | BOOL m_bJudgeNG; // TRUE : NG, FALSE : OK |
| | | // Defect |
| | | MapDefect m_MapDefect_NG; // 搬窃沥焊 (NG) |
| | | MapDefect m_MapDefect_OK; // 搬窃沥焊 (OK) |
| | | MapDefect m_MapDefect_NG; // 搬窃沥焊 (NG) |
| | | MapDefect m_MapDefect_OK; // 搬窃沥焊 (OK) |
| | | |
| | | int m_nCurDefectIdx_Total; |
| | | int m_nCurDefectIdx_NG; |
| | |
| | | CString m_strLoadingTimeFileName; |
| | | CString m_strLoadingDayFileName; |
| | | |
| | | // Stage theta 焊沥 |
| | | // Stage theta 焊沥 |
| | | short m_nStageLongTheta[2]; |
| | | short m_nStageShortTheta[2]; |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | | |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "PostProcess.h" |
| | | #include "Config.h" |
| | | #include "FreeImage.h" |
| | |
| | | if (glass_id.IsEmpty() == TRUE) |
| | | glass_id.Format(_T("MANUAL_ID")); |
| | | |
| | | // 获取当前产品加载时间 |
| | | // 获取当前产品加载时间 |
| | | CTime tGlassLoading = m_pGlassData->GetLoadingTime(); |
| | | |
| | | CString measure_data; |
| | |
| | | |
| | | CString measure_file_path; |
| | | if (m_pHardware->m_bSaveResultByHour) { |
| | | // 按小时保存结果 |
| | | // 按小时保存结果 |
| | | measure_file_path.Format(_T("%s\\%s_%02d_MeasureData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay, tGlassLoading.GetHour()); |
| | | } |
| | | else { |
| | | // 不按小时保存结果 |
| | | // 不按小时保存结果 |
| | | measure_file_path.Format(_T("%s\\%s_MeasureData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay); |
| | | } |
| | | |
| | |
| | | CString strDefectType = g_strDefectType[pDefect->m_DefectInfo.m_DefectLoc]; |
| | | if ((strDefectType.Compare(_T("Chip")) == 0 || strDefectType.Compare(_T("In_Chip")) == 0)) |
| | | { |
| | | // 获取当前时间 |
| | | // 获取当前时间 |
| | | std::time_t now = std::time(nullptr); |
| | | // 使用localtime_s代替localtime |
| | | // 使用localtime_s代替localtime |
| | | std::tm nowTm; |
| | | localtime_s(&nowTm, &now); |
| | | |
| | |
| | | |
| | | if ((strDefectType.Compare(_T("Chip")) == 0 || strDefectType.Compare(_T("In_Chip")) == 0)) |
| | | { |
| | | // 获取当前时间 |
| | | // 获取当前时间 |
| | | std::time_t now = std::time(nullptr); |
| | | // 使用localtime_s代替localtime |
| | | // 使用localtime_s代替localtime |
| | | std::tm nowTm; |
| | | localtime_s(&nowTm, &now); |
| | | |
| | |
| | | |
| | | CString Chip_file_path; |
| | | if (m_pHardware->m_bSaveResultByHour) { |
| | | // 按小时保存结果 |
| | | // 按小时保存结果 |
| | | Chip_file_path.Format(_T("%s\\%s_%02d_ChipData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay, tGlassLoading.GetHour()); |
| | | } |
| | | else { |
| | | // 不按小时保存结果 |
| | | // 不按小时保存结果 |
| | | Chip_file_path.Format(_T("%s\\%s_ChipData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay); |
| | | } |
| | | |
| | |
| | | |
| | | CString Defect_file_path; |
| | | if (m_pHardware->m_bSaveResultByHour) { |
| | | // 按小时保存结果 |
| | | // 按小时保存结果 |
| | | Defect_file_path.Format(_T("%s\\%s_%02d_DefectData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay, tGlassLoading.GetHour()); |
| | | } |
| | | else { |
| | | // 不按小时保存结果 |
| | | // 不按小时保存结果 |
| | | Defect_file_path.Format(_T("%s\\%s_DefectData.csv"), m_strResultFolder, g_pBase->m_strLoadingDay); |
| | | } |
| | | |
| | |
| | | BOOL bSuccess = TRUE; |
| | | |
| | | Lock(); |
| | | // 标题文本 |
| | | // 标题文本 |
| | | CString strTitle; |
| | | int nSideIdx = (0 <= pDefect->m_DefectInfo.m_nSideIdx && pDefect->m_DefectInfo.m_nSideIdx < MAX_SIDE_COUNT) ? pDefect->m_DefectInfo.m_nSideIdx : MAX_SIDE_COUNT; |
| | | int nCategoryIdx = (0 <= pDefect->m_DefectInfo.m_DefectLoc && pDefect->m_DefectInfo.m_DefectLoc < DefectLoc_None) ? pDefect->m_DefectInfo.m_DefectLoc : DefectLoc_Unknown; |
| | |
| | | // 3. Corner |
| | | |
| | | |
| | | // A 惑何 官蹿 |
| | | // A 惑何 官蹿 |
| | | vecStrTitle.push_back(_T("CORNER_1_X")); |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_A)->m_nBottomCornerWidth); |
| | | vecStrResultData.push_back(strTemp); |
| | |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_A)->m_nBottomCornerHeight); |
| | | vecStrResultData.push_back(strTemp); |
| | | |
| | | // C 惑何 官蹿 |
| | | // C 惑何 官蹿 |
| | | vecStrTitle.push_back(_T("CORNER_2_X")); |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_C)->m_nBottomCornerWidth); |
| | | vecStrResultData.push_back(strTemp); |
| | |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_C)->m_nBottomCornerHeight); |
| | | vecStrResultData.push_back(strTemp); |
| | | |
| | | // C 惑何 啪 |
| | | // C 惑何 啪 |
| | | vecStrTitle.push_back(_T("CORNER_3_X")); |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_C)->m_nTopCornerWidth); |
| | | vecStrResultData.push_back(strTemp); |
| | |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_C)->m_nTopCornerHeight); |
| | | vecStrResultData.push_back(strTemp); |
| | | |
| | | // A 惑何 啪 |
| | | // A 惑何 啪 |
| | | vecStrTitle.push_back(_T("CORNER_4_X")); |
| | | strTemp.Format(_T("%d"), m_pGlassData->GetSideData(DIMENSION_A)->m_nTopCornerWidth); |
| | | vecStrResultData.push_back(strTemp); |
| | |
| | | CSide_Data* pSideData_UP = NULL; |
| | | CSide_Data* pSideData_DN = NULL; |
| | | |
| | | // Notch乐绰 搁 茫扁 |
| | | // Notch乐绰 搁 茫扁 |
| | | for(int nSideIdx=0; nSideIdx<MAX_PANEL_SIDE; nSideIdx++) |
| | | { |
| | | pSideData_UP = m_pGlassData->GetSideData(arryWriteOrder_UP[nSideIdx]); |
| | |
| | | |
| | | for(int nNotchIdx=0; nNotchIdx<MAX_SIDE_NOTCH_COUNT; nNotchIdx++) |
| | | { |
| | | // 4-2. Dimension, 酒阀搁栏肺 螟沥 |
| | | // 4-2. Dimension, 酒阀搁栏肺 螟沥 |
| | | for(int nMeasureIdx = 0; nMeasureIdx < MAX_SIDE_NOTCH_MEASURE_COUNT; nMeasureIdx++) |
| | | { |
| | | strTemp.Format(_T("NOTCH_%d_DIM_%d"), nNotchIdx+1, nMeasureIdx+1); |
| | |
| | | // Save Path |
| | | CString strFilePath; |
| | | if (m_pHardware->m_bSaveResultByHour) { |
| | | // 按小时保存,绑定玻璃 Loading Time |
| | | // 按小时保存,绑定玻璃 Loading Time |
| | | strFilePath.Format(_T("D:\\Data\\%s\\%s\\%d\\%02d\\%02d\\%s_%s_%02d.csv"), |
| | | m_pHardware->GetMachineName(), |
| | | m_pHardware->GetLineID(), |
| | |
| | | tLoadingTime.GetHour()); |
| | | } |
| | | else { |
| | | // 按天保存,绑定玻璃 Loading Time |
| | | // 按天保存,绑定玻璃 Loading Time |
| | | strFilePath.Format(_T("D:\\Data\\%s\\%s\\%d\\%02d\\%02d\\%s_%s.csv"), |
| | | m_pHardware->GetMachineName(), |
| | | m_pHardware->GetLineID(), |
| | |
| | | |
| | | /* |
| | | pDefect->m_nUMOriginX = (int)((double) (pDefect->m_DefectInfo.m_ptDefectPos_pxl.y - nStartLine) * dScanRes); |
| | | pDefect->m_nUMOriginY = (int)((double) (pDefect->m_DefectInfo.m_ptDefectPos_pxl.x * dConvRes)); // 荐沥 鞘夸.. |
| | | pDefect->m_nUMOriginY = (int)((double) (pDefect->m_DefectInfo.m_ptDefectPos_pxl.x * dConvRes)); // 荐沥 鞘夸.. |
| | | */ |
| | | |
| | | CSIDE_PARM* pSideParam = &pRecipe->m_SideParam[pDefect->m_DefectInfo.m_nSideIdx]; |
| | |
| | | TCHAR szTemp[MAX_PATH]; |
| | | |
| | | wcscpy_s(szTemp, MAX_PATH, strFolder); |
| | | szTemp[strFolder.GetLength() + 1] = NULL; // NULL巩磊啊 滴俺 甸绢啊具 茄促. |
| | | szTemp[strFolder.GetLength() + 1] = NULL; // NULL巩磊啊 滴俺 甸绢啊具 茄促. |
| | | |
| | | FileOp.hwnd = NULL; |
| | | FileOp.wFunc = FO_DELETE; |
| | | FileOp.pFrom = NULL; |
| | | FileOp.pTo = NULL; |
| | | FileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI; // 犬牢皋矫瘤啊 救哆档废 汲沥 |
| | | FileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI; // 犬牢皋矫瘤啊 救哆档废 汲沥 |
| | | FileOp.fAnyOperationsAborted = false; |
| | | FileOp.hNameMappings = NULL; |
| | | FileOp.lpszProgressTitle = NULL; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | | #include "HardwareSettings.h" |
| | |
| | | BOOL DeleteFolder(const CString &strFolder); |
| | | |
| | | private: |
| | | CRITICAL_SECTION m_criticalSection; //?¥3aá? |
| | | CRITICAL_SECTION m_criticalSection; //?¥3aá? |
| | | inline void Lock() { ::InitializeCriticalSection(&m_criticalSection); } |
| | | inline void Unlock() { ::DeleteCriticalSection(&m_criticalSection); } |
| | | |
| | |
| | | // StopWatch.cpp: implementation of the CStopWatch class. |
| | | // StopWatch.cpp: implementation of the CStopWatch class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | #include "stdafx.h" |
| | |
| | | // StopWatch.h: interface for the CStopWatch class. |
| | | // StopWatch.h: interface for the CStopWatch class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "TransDataManager.h" |
| | | #include <fstream> |
| | | #include <iostream> |
| | |
| | | EnumPackType ePackType = eAscii; |
| | | CString tmpItemByte; |
| | | |
| | | char LineStr[200]; //茄 临窜困 佬绢甸捞绰 滚欺 |
| | | char *tmpStr; //窜困肺 谗篮 单捞磐甫 啊府虐绰 器牢磐 |
| | | char LineStr[200]; //茄 临窜困 佬绢甸捞绰 滚欺 |
| | | char *tmpStr; //窜困肺 谗篮 单捞磐甫 啊府虐绰 器牢磐 |
| | | char *strType; |
| | | char seps[]=" ,\t\n"; //备盒磊 |
| | | char seps[]=" ,\t\n"; //备盒磊 |
| | | |
| | | std::ifstream input; |
| | | input.open(FilePath, std::ios::in /*| std::ios::nocreate*/); |
| | |
| | | int KeyValue = 0; |
| | | if (Key == -1) |
| | | { |
| | | KeyValue = (int)m_TransDataPackMap.size(); //父老 蜡老 虐蔼阑 林瘤 臼栏搁 措涝鉴栏肺 鉴瞒利牢 牢郸胶 蔼捞 虐蔼捞 凳 |
| | | KeyValue = (int)m_TransDataPackMap.size(); //父老 蜡老 虐蔼阑 林瘤 臼栏搁 措涝鉴栏肺 鉴瞒利牢 牢郸胶 蔼捞 虐蔼捞 凳 |
| | | } |
| | | else KeyValue = Key; |
| | | |
| | |
| | | |
| | | int k = Fstr.GetLength(); |
| | | |
| | | //傍归阑 绝矩促 |
| | | //傍归阑 绝矩促 |
| | | for(i=0;i<Fstr.GetLength();i++) |
| | | { |
| | | if(Fstr.Mid(i,1) != " ") |
| | |
| | | } |
| | | |
| | | k = returnValue.GetLength(); |
| | | //酒公繁 data档 绝栏搁 "*" 贸府茄促 |
| | | //酒公繁 data档 绝栏搁 "*" 贸府茄促 |
| | | if(returnValue.GetLength() == 0) |
| | | returnValue.Format("*"); |
| | | else if(returnValue.Mid(0,1) == "") |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | |
| | | #include <map> |
| | |
| | | eAscii = 0, |
| | | eUnsignedDec |
| | | }; |
| | | class CTransDataPack //拱幅 沥焊 class. |
| | | class CTransDataPack //拱幅 沥焊 class. |
| | | { |
| | | protected: |
| | | int m_nIndex; |
| | |
| | | } |
| | | } |
| | | |
| | | int GetIndex() {return m_nIndex;}; //拱幅 沥焊狼 鉴辑 |
| | | int GetByte() {return m_nByte;}; //拱幅 沥焊狼 辨捞. |
| | | int GetIndex() {return m_nIndex;}; //拱幅 沥焊狼 鉴辑 |
| | | int GetByte() {return m_nByte;}; //拱幅 沥焊狼 辨捞. |
| | | EnumPackType GetPackType() {return m_ePackType;} |
| | | char* GetValue() {return m_pstrData;}; //拱幅 沥焊狼 蔼 |
| | | char* GetValue() {return m_pstrData;}; //拱幅 沥焊狼 蔼 |
| | | |
| | | void SetValue(char* pstrData) |
| | | { |
| | |
| | | virtual ~CTransDataManager(); |
| | | CTransDataManager& operator=(const CTransDataManager& rhs); |
| | | |
| | | // 檬扁拳 |
| | | // 檬扁拳 |
| | | void ResetPackData(); |
| | | |
| | | // 16柳荐 -> 10柳荐(int) |
| | | // 16柳荐 -> 10柳荐(int) |
| | | int Hex2Dec(CString hex_str); |
| | | // 16柳荐 -> 何龋绝绰 10柳荐(short) |
| | | // 16柳荐 -> 何龋绝绰 10柳荐(short) |
| | | short Hex2SignedDec(CString hex_str); |
| | | // 酒胶虐 -> 16柳荐 巩磊凯 |
| | | // 酒胶虐 -> 16柳荐 巩磊凯 |
| | | CString Asc2Hex(CStringA hex_str); |
| | | // 胶飘傅 -> 16柳荐 |
| | | // 胶飘傅 -> 16柳荐 |
| | | BOOL StrToHex(CHAR* pchData, CHAR* pchDataSrc, INT nLength, BOOL bWordReverse = FALSE); |
| | | // 16柳荐 -> 何龋乐绰 10柳荐 |
| | | // 16柳荐 -> 何龋乐绰 10柳荐 |
| | | UINT Hex2UnsignedDec(CString hex_str); |
| | | // 况靛 -> 10柳荐 |
| | | // 况靛 -> 10柳荐 |
| | | UINT GetDataWord2Dec(CString buff, int ap, BOOL hi_bit); |
| | | // 况靛 -> 巩磊凯 |
| | | // 况靛 -> 巩磊凯 |
| | | CString GetDataWord2Str(CString& value, int& addr, int length); |
| | | // 拱幅 沥焊 辑摹 |
| | | // 拱幅 沥焊 辑摹 |
| | | BOOL SearchValueInMap(CString Name, CString& ReturnValue, int& ByteLength); |
| | | // 拱幅 沥焊 辑摹 |
| | | // 拱幅 沥焊 辑摹 |
| | | BOOL SearchValueInMap(CString Name, int& nReturnValue, int& ByteLength); |
| | | // PLC 单捞磐 -> 甘 |
| | | // PLC 单捞磐 -> 甘 |
| | | BOOL InsertPLCValueToPack(CString keyName, char* pstrData); |
| | | // 蔼 辑摹 |
| | | // 蔼 辑摹 |
| | | BOOL GetPackDataAll(CString &Name, int Index, int &Byte, CString &Value); |
| | | // 拱幅 单捞磐 傈眉 墨款飘 |
| | | // 拱幅 单捞磐 傈眉 墨款飘 |
| | | int GetDataPackTotalNumber(); |
| | | // 拱幅 单捞磐 傈眉 官捞飘 |
| | | // 拱幅 单捞磐 傈眉 官捞飘 |
| | | int GetDataPackTotalByteSize(){return m_DataPackTotalByteSize;}; |
| | | |
| | | // PLC 单捞磐 -> 甘 |
| | | // PLC 单捞磐 -> 甘 |
| | | BOOL InsertPLCValueToMap(char* pstrRawData,int nLength); |
| | | |
| | | // 拱幅单捞磐 器杆 殿废 |
| | | // 拱幅单捞磐 器杆 殿废 |
| | | void InsertTransItemToMap(CString ItemName, int ItemByte, int Key=-1, EnumPackType ePackType = eAscii); |
| | | // 拱幅单捞磐 器杆 佬扁 |
| | | // 拱幅单捞磐 器杆 佬扁 |
| | | BOOL LoadTransItemFromFile(CString FilePath); |
| | | |
| | | CString GetItemName(int nIndex); |
| | |
| | | void ResetData(); |
| | | private: |
| | | int m_DataPackTotalByteSize; |
| | | std::map<CString,CTransDataPack*> m_TransDataPackMap; //拱幅沥焊 捞抚, 辨捞, 蔼俊 措茄 甘 牧抛捞呈 |
| | | std::map<CString,CTransDataPack*>::iterator m_TransDataPackMapiterator; //拱幅 沥焊 啊府虐绰 器牢磐 |
| | | std::vector<CString> m_vTransDataList; //拱幅 沥焊 府胶飘 |
| | | std::map<CString,CTransDataPack*> m_TransDataPackMap; //拱幅沥焊 捞抚, 辨捞, 蔼俊 措茄 甘 牧抛捞呈 |
| | | std::map<CString,CTransDataPack*>::iterator m_TransDataPackMapiterator; //拱幅 沥焊 啊府虐绰 器牢磐 |
| | | std::vector<CString> m_vTransDataList; //拱幅 沥焊 府胶飘 |
| | | }; |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "Transfer_Data.h" |
| | | |
| | | CTransfer_Data::CTransfer_Data() |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "TransDataManager.h" |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #define DEFECTIMAGE_WIDTH 1024 |
| | | #define DEFECTIMAGE_HEIGHT 500 |
| | |
| | | int m_nJudge_Type; |
| | | |
| | | // Exception Area |
| | | int m_nExceptionArea; // 0 : 固器窃, 1 : 混娄 吧魔, 2 : 肯傈 器窃 |
| | | int m_nExceptionArea; // 0 : 固器窃, 1 : 混娄 吧魔, 2 : 肯傈 器窃 |
| | | |
| | | // User Defect Idx |
| | | int m_nUserDefectAreaIdx; |
| | |
| | | #ifndef GLOBAL_DEFINE_H |
| | | #ifndef GLOBAL_DEFINE_H |
| | | #define GLOBAL_DEFINE_H |
| | | |
| | | #include <map> |
| | |
| | | #define CHKMAX(a,b) (((a) > (b)) ? (a) : (b)) |
| | | #define CHKMIN(a,b) (((a) < (b)) ? (a) : (b)) |
| | | |
| | | #define MAX_PANEL_SIDE 4 // 搁 荐 |
| | | #define UPDN_TYPE 2 // 惑窍 鞍捞 乐绰版快 2 窍唱父 乐绰版快 1 |
| | | #define MAX_PANEL_SIDE 4 // 搁 荐 |
| | | #define UPDN_TYPE 2 // 惑窍 鞍捞 乐绰版快 2 窍唱父 乐绰版快 1 |
| | | #define MAX_SIDE_COUNT 8 |
| | | #define MAX_CORNER_DIMENSION_MEASURE_COUNT 5 |
| | | #define MAX_SIDE_DIMENSION_MEASURE_COUNT 16 // 弥措 Frame 荐 父怒 |
| | | #define MAX_SIDE_DIMENSION_MEASURE_COUNT 16 // 弥措 Frame 荐 父怒 |
| | | |
| | | #define MAX_SIDE_EXCEPTION_AREA_COUNT 32 |
| | | #define MAX_SIDE_USER_DEFECT_AREA_COUNT 32 |
| | |
| | | |
| | | enum EmSplashCmd {emShow=0, emHide, emText}; |
| | | |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass 扁霖 Scan 规氢. |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass 扁霖 Scan 规氢. |
| | | enum DimensionDir { DIMENSION_A=0, DIMENSION_B, DIMENSION_C, DIMENSION_D,DIMENSION_A_DN, DIMENSION_B_DN, DIMENSION_C_DN, DIMENSION_D_DN, DIMENSION_NONE}; |
| | | enum EM_CORNER_JUDGE {A_ZONE_CRACK=0,B_ZONE_CRACK,B_ZONE_BURR,C_ZONE_CRACK,C_ZONE_BURR, D_ZONE_CRACK, EDGE_THINCRACK, CHIP_WHITE}; |
| | | |
| | |
| | | #define IMAGE_WIDTH 4096 // 8192//2048 |
| | | #define IMAGE_HEIGHT 1024 |
| | | #define MAX_IMAGE_FRAME 160//100 |
| | | #define MAX_IMAGE_FRAME_SHORT 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_LONG 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_SHORT 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_LONG 160//100 // 弥措 橇饭烙 荐 |
| | | |
| | | #define MAX_SIDE_INSPECT_AREA_COUNT 12 |
| | | |
| | | #define MAX_IMAGE_LINE_SHORT MAX_IMAGE_FRAME_SHORT * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_LONG MAX_IMAGE_FRAME_LONG * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_SHORT MAX_IMAGE_FRAME_SHORT * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_LONG MAX_IMAGE_FRAME_LONG * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE MAX_IMAGE_LINE_LONG |
| | | #define MAX_LIMIT_LINE (MAX_IMAGE_FRAME - 1) * IMAGE_HEIGHT |
| | | |
| | | #define MAX_IMAGE_LINE_MARGIN ((MAX_IMAGE_FRAME+50) * IMAGE_HEIGHT) //(150 * IMAGE_HEIGHT) // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_MARGIN ((MAX_IMAGE_FRAME+50) * IMAGE_HEIGHT) //(150 * IMAGE_HEIGHT) // 弥措 扼牢荐 |
| | | |
| | | #define ALIGN_4BYTE(width) (width + 3)/4*4 |
| | | #define PI 3.14159265358979323846 |
| | |
| | | #define MAX_SIDE_INSPECT_TYPE 8 |
| | | |
| | | struct WSSendData { |
| | | //=======================待定========================== |
| | | //uint8_t operation; // 操作符 (1字节) |
| | | //uint8_t operand; // 操作数 (1字节) |
| | | //uint16_t blockNumber; // 图像块编号 (2字节无符号整数) |
| | | //uint32_t dataOffset; // 数据偏移 (4字节无符号整数) |
| | | //=======================待定========================== |
| | | //uint8_t operation; // 操作符 (1字节) |
| | | //uint8_t operand; // 操作数 (1字节) |
| | | //uint16_t blockNumber; // 图像块编号 (2字节无符号整数) |
| | | //uint32_t dataOffset; // 数据偏移 (4字节无符号整数) |
| | | //===================================================== |
| | | |
| | | uint8_t nCheckType = 0; // 检测类型 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint8_t nPosition = 0; // 位置 |
| | | uint8_t nState = 0; // ״̬ |
| | | uint16_t nEdgeX = 0; // X方向边缘坐标 |
| | | uint16_t nEdgeY = 0; // X方向边缘坐标 |
| | | uint16_t nNPointY = 0; // Y方向NG区域坐标 |
| | | uint16_t nWidth = 0; // 图像宽度 |
| | | uint16_t nHeight = 0; // 图像高度 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | std::string strSN = ""; // 序列号 |
| | | std::vector<char> image = {}; // 图像数据 (二进制数据) |
| | | uint8_t nCheckType = 0; // 检测类型 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint8_t nPosition = 0; // 位置 |
| | | uint8_t nState = 0; // 状态 |
| | | uint16_t nEdgeX = 0; // X方向边缘坐标 |
| | | uint16_t nEdgeY = 0; // X方向边缘坐标 |
| | | uint16_t nNPointY = 0; // Y方向NG区域坐标 |
| | | uint16_t nWidth = 0; // 图像宽度 |
| | | uint16_t nHeight = 0; // 图像高度 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | std::string strSN = ""; // 序列号 |
| | | std::vector<char> image = {}; // 图像数据 (二进制数据) |
| | | }; |
| | | |
| | | struct WSReceiveData { |
| | | // 定义一个表示NG位置的结构体 |
| | | // 定义一个表示NG位置的结构体 |
| | | struct NGPosition { |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | uint16_t nRight = 0; // 在原图的位置 |
| | | uint16_t nBottom = 0; // 在原图的位置 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | uint16_t nRight = 0; // 在原图的位置 |
| | | uint16_t nBottom = 0; // 在原图的位置 |
| | | }; |
| | | |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | std::string strSN = ""; // 序列号 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint8_t nGNum = 0; // NG 数量 |
| | | std::vector<NGPosition> ngPosArray = {}; // NG 位置数组 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | std::string strSN = ""; // 序列号 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint8_t nGNum = 0; // NG 数量 |
| | | std::vector<NGPosition> ngPosArray = {}; // NG 位置数组 |
| | | }; |
| | | |
| | | #endif // GLOBAL_DEFINE_H |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "config.h" |
| | | |
| | | const TCHAR *PANEL_SIDE[] = {_T("A_TOP"), _T("B_TOP"), _T("C_TOP"), _T("D_TOP"),_T("A_BOT"), _T("B_BOT"), _T("C_BOT"), _T("D_BOT")}; |
| | |
| | | // HMX64Fundamentals.h: interface for the CHMX64Fundamentals class. |
| | | // HMX64Fundamentals.h: interface for the CHMX64Fundamentals class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | public: |
| | | CStringArray m_strCamCCA; |
| | | CStringArray m_strCamCVI; |
| | | int *m_pBufferSize; // Grab俊辑 Buffer狼 农扁. |
| | | int *m_pBufferCount; // Grab Buffer狼 荐. |
| | | int *m_pMemFrameNo; // 角力 皋葛府 橇饭烙 荐 |
| | | int *m_pBufferSize; // Grab俊辑 Buffer狼 农扁. |
| | | int *m_pBufferCount; // Grab Buffer狼 荐. |
| | | int *m_pMemFrameNo; // 角力 皋葛府 橇饭烙 荐 |
| | | int *m_pCameraPort; |
| | | int *m_pFrameHeight; |
| | | int *m_pFrameWidth; |
| | | int *m_nBoardID; |
| | | int *m_nBoardCh; |
| | | AcqMode m_AcqMode; |
| | | int m_nFrameDefectPixel; // 茄 Frame狼 弥措 搬窃 Pixel 荐 |
| | | int m_nMaxDefect; // miniont,2011-04-28, 弥措 搬窃 俺荐 |
| | | int m_nFrameDefectPixel; // 茄 Frame狼 弥措 搬窃 Pixel 荐 |
| | | int m_nMaxDefect; // miniont,2011-04-28, 弥措 搬窃 俺荐 |
| | | int m_nCameraCount; |
| | | int m_nScanCount; |
| | | int m_nThreadCount; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "StatusMonitor.h" |
| | | |
| | | |
| | |
| | | TCHAR szTemp[MAX_PATH]; |
| | | |
| | | wcscpy_s(szTemp, MAX_PATH, strFolder); |
| | | szTemp[strFolder.GetLength() + 1] = NULL; // NULL巩磊啊 滴俺 甸绢啊具 茄促. |
| | | szTemp[strFolder.GetLength() + 1] = NULL; // NULL巩磊啊 滴俺 甸绢啊具 茄促. |
| | | |
| | | FileOp.hwnd = NULL; |
| | | FileOp.wFunc = FO_DELETE; |
| | | FileOp.pFrom = NULL; |
| | | FileOp.pTo = NULL; |
| | | FileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI; // 犬牢皋矫瘤啊 救哆档废 汲沥 |
| | | FileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI; // 犬牢皋矫瘤啊 救哆档废 汲沥 |
| | | FileOp.fAnyOperationsAborted = false; |
| | | FileOp.hNameMappings = NULL; |
| | | FileOp.lpszProgressTitle = NULL; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Singleton.h" |
| | | #include "Config.h" |
| | |
| | | #include "LicenseChecker.h" |
| | | |
| | | /* |
| | | Main Interface 狼 Instance Pointer 甫 爱绊 乐绰促. |
| | | Main Interface 狼 Instance Pointer 甫 爱绊 乐绰促. |
| | | |
| | | UI俊辑绰 Main Interface 立辟阑 窍霸登搁 惑龋 曼炼捞骨肺, |
| | | UI俊辑绰 Main Interface 立辟阑 窍霸登搁 惑龋 曼炼捞骨肺, |
| | | |
| | | CStatusMonitor 肺 阿 Instance 俊 立辟窍档废 窍磊 |
| | | CStatusMonitor 肺 阿 Instance 俊 立辟窍档废 窍磊 |
| | | |
| | | UI 付促 Interface 父靛绰芭 蓖满栏聪瘪 |
| | | UI 付促 Interface 父靛绰芭 蓖满栏聪瘪 |
| | | */ |
| | | |
| | | class CStatusMonitor : public Singleton<CStatusMonitor> |
| | |
| | | // DlgLicenseInfo.cpp : 备泅 颇老涝聪促. |
| | | // DlgLicenseInfo.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CDlgLicenseInfo 措拳 惑磊涝聪促. |
| | | // CDlgLicenseInfo 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgLicenseInfo, CDialogEx) |
| | | |
| | |
| | | // key status |
| | | switch (status.nKeyStatus) |
| | | { |
| | | case LicenseKey_NotConnected: // 楷搬 救凳 |
| | | case LicenseKey_NotConnected: // 楷搬 救凳 |
| | | strValue = L"Key Status = Not Connected"; |
| | | break; |
| | | case LicenseKey_NotCertified: // 牢刘 救凳 |
| | | case LicenseKey_NotCertified: // 牢刘 救凳 |
| | | strValue = L"Key Status = Not Certified"; |
| | | break; |
| | | case LicenseKey_NotActivated: // 劝己拳 救凳 |
| | | case LicenseKey_NotActivated: // 劝己拳 救凳 |
| | | strValue = L"Key Status = Not Activated"; |
| | | break; |
| | | case LicenseKey_Activated: // 劝己拳 凳 |
| | | case LicenseKey_Activated: // 劝己拳 凳 |
| | | strValue = L"Key Status = Activated"; |
| | | break; |
| | | } |
| | |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CDlgLicenseInfo 皋矫瘤 贸府扁涝聪促. |
| | | // CDlgLicenseInfo 皋矫瘤 贸府扁涝聪促. |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "StatusMonitor.h" |
| | | |
| | | // CDlgLicenseInfo 措拳 惑磊涝聪促. |
| | | // CDlgLicenseInfo 措拳 惑磊涝聪促. |
| | | |
| | | class CDlgLicenseInfo : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgLicenseInfo) |
| | | |
| | | public: |
| | | CDlgLicenseInfo(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CDlgLicenseInfo(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CDlgLicenseInfo(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DIALOG_LICENSE }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | |
| | | // DlgSideDimensionSetting.cpp : 备泅 颇老涝聪促. |
| | | // DlgSideDimensionSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgSideDimensionSetting, CDialogEx) |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "GridCtrl.h" |
| | | #include "GlassRecipe.h" |
| | | #include "Glass_Data.h" |
| | | |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CDlgSideDimensionSetting : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgSideDimensionSetting) |
| | | |
| | | public: |
| | | CDlgSideDimensionSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CDlgSideDimensionSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CDlgSideDimensionSetting(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_SIDE_DIMENSION_SETTING }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | BOOL PreTranslateMessage(MSG* pMsg); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | |
| | | // DlgSideExceptoinSetting.cpp : 备泅 颇老涝聪促. |
| | | // DlgSideExceptoinSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgSideExceptoinSetting, CDialogEx) |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "GridCtrl.h" |
| | | #include "GlassRecipe.h" |
| | | #include "Glass_Data.h" |
| | | #include "EdgeImageViewer.h" |
| | | |
| | | // CDlgSideExceptoinSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideExceptoinSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CDlgSideExceptoinSetting : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgSideExceptoinSetting) |
| | | |
| | | public: |
| | | CDlgSideExceptoinSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CDlgSideExceptoinSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CDlgSideExceptoinSetting(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_SIDE_EXCEPTION_SETTING }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | BOOL PreTranslateMessage(MSG* pMsg); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | |
| | | // DlgSideNotchSetting.cpp : 备泅 颇老涝聪促. |
| | | // DlgSideNotchSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "Global_Define.h" |
| | | |
| | | |
| | | // CDlgSideNotchSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideNotchSetting 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgSideNotchSetting, CDialogEx) |
| | | |
| | |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Use Notch Defect")); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Inspect Threshold (″)")); |
| | | strTemp.Format(_T("Inspect Threshold (″)")); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Inspect Offset")); |
| | | vecParams.push_back(strTemp); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "GridCtrl.h" |
| | | #include "GlassRecipe.h" |
| | | #include "Glass_Data.h" |
| | | #include "EdgeImageViewer.h" |
| | | |
| | | // CDlgSideNotchSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideNotchSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CDlgSideNotchSetting : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgSideNotchSetting) |
| | | |
| | | public: |
| | | CDlgSideNotchSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CDlgSideNotchSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CDlgSideNotchSetting(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_SIDE_NOTCH_SETTING }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | BOOL PreTranslateMessage(MSG* pMsg); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | |
| | | // DlgSideUserDefectSetting.cpp : 备泅 颇老涝聪促. |
| | | // DlgSideUserDefectSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideDimensionSetting 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgSideUserDefectSetting, CDialogEx) |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "GridCtrl.h" |
| | | #include "GlassRecipe.h" |
| | | #include "Glass_Data.h" |
| | | #include "EdgeImageViewer.h" |
| | | |
| | | // CDlgSideUserDefectSetting 措拳 惑磊涝聪促. |
| | | // CDlgSideUserDefectSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CDlgSideUserDefectSetting : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgSideUserDefectSetting) |
| | | |
| | | public: |
| | | CDlgSideUserDefectSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CDlgSideUserDefectSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CDlgSideUserDefectSetting(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_SIDE_USER_DEFECT_SETTING }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | BOOL PreTranslateMessage(MSG* pMsg); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | |
| | | |
| | | // EdgeInspector_App.cpp : 览侩 橇肺弊伐俊 措茄 努贰胶 悼累阑 沥狼钦聪促. |
| | | |
| | | // EdgeInspector_App.cpp : 览侩 橇肺弊伐俊 措茄 努贰胶 悼累阑 沥狼钦聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | BOOL g_bUse_SaveAllDMP = FALSE; |
| | | |
| | | LONG WINAPI MyUnhandledExceptionFilter(EXCEPTION_POINTERS* pExceptionInfo) { |
| | | // 太阋冼遂伲 |
| | | // 太阋冼遂伲 |
| | | char szFileName[MAX_PATH]; |
| | | struct stat buffer; |
| | | if (stat("D:\\Inspection\\Temp", &buffer) != 0) |
| | |
| | | |
| | | snprintf(szFileName, MAX_PATH, "D:\\Inspection\\Temp\\EdgeInspector_DmpFile.dmp"); |
| | | |
| | | // ?孙冼遂 |
| | | // ?孙冼遂 |
| | | HANDLE hFile = CreateFileA(szFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); |
| | | if (hFile != INVALID_HANDLE_VALUE) { |
| | | MINIDUMP_EXCEPTION_INFORMATION dumpInfo; |
| | |
| | | dumpInfo.ThreadId = GetCurrentThreadId(); |
| | | dumpInfo.ClientPointers = TRUE; |
| | | |
| | | // ?忑dump冼遂 |
| | | // ?忑dump冼遂 |
| | | BOOL success = MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, g_bUse_SaveAllDMP ? MiniDumpWithFullMemory : MiniDumpFilterMemory, &dumpInfo, NULL, NULL); |
| | | CloseHandle(hFile); |
| | | |
| | |
| | | |
| | | BEGIN_MESSAGE_MAP(CEdgeInspector_App, CWinAppEx) |
| | | ON_COMMAND(ID_APP_ABOUT, &CEdgeInspector_App::OnAppAbout) |
| | | // 钎霖 颇老阑 扁檬肺 窍绰 巩辑 疙飞涝聪促. |
| | | // 钎霖 颇老阑 扁檬肺 窍绰 巩辑 疙飞涝聪促. |
| | | ON_COMMAND(ID_FILE_NEW, &CWinAppEx::OnFileNew) |
| | | ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen) |
| | | // 钎霖 牢尖 汲沥 疙飞涝聪促. |
| | | // 钎霖 牢尖 汲沥 疙飞涝聪促. |
| | | ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinAppEx::OnFilePrintSetup) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CEdgeInspector_App 积己 |
| | | // CEdgeInspector_App 积己 |
| | | |
| | | CEdgeInspector_App::CEdgeInspector_App() |
| | | { |
| | | SetUnhandledExceptionFilter(MyUnhandledExceptionFilter); |
| | | m_bHiColorIcons = TRUE; |
| | | |
| | | // 促矫 矫累 包府磊 瘤盔 |
| | | // 促矫 矫累 包府磊 瘤盔 |
| | | m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS; |
| | | #ifdef _MANAGED |
| | | // 览侩 橇肺弊伐阑 傍侩 攫绢 繁鸥烙 瘤盔阑 荤侩窍咯 呼靛茄 版快(/clr): |
| | | // 1) 捞 眠啊 汲沥篮 促矫 矫累 包府磊 瘤盔捞 力措肺 累悼窍绰 单 鞘夸钦聪促. |
| | | // 2) 橇肺璃飘俊辑 呼靛窍妨搁 System.Windows.Forms俊 措茄 曼炼甫 眠啊秦具 钦聪促. |
| | | // 览侩 橇肺弊伐阑 傍侩 攫绢 繁鸥烙 瘤盔阑 荤侩窍咯 呼靛茄 版快(/clr): |
| | | // 1) 捞 眠啊 汲沥篮 促矫 矫累 包府磊 瘤盔捞 力措肺 累悼窍绰 单 鞘夸钦聪促. |
| | | // 2) 橇肺璃飘俊辑 呼靛窍妨搁 System.Windows.Forms俊 措茄 曼炼甫 眠啊秦具 钦聪促. |
| | | System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException); |
| | | #endif |
| | | |
| | | // TODO: 酒贰 览侩 橇肺弊伐 ID 巩磊凯阑 绊蜡 ID 巩磊凯肺 官操绞矫坷(鼻厘). |
| | | // 巩磊凯俊 措茄 辑侥: CompanyName.ProductName.SubProduct.VersionInformation |
| | | // TODO: 酒贰 览侩 橇肺弊伐 ID 巩磊凯阑 绊蜡 ID 巩磊凯肺 官操绞矫坷(鼻厘). |
| | | // 巩磊凯俊 措茄 辑侥: CompanyName.ProductName.SubProduct.VersionInformation |
| | | SetAppID(_T("EdgeInspector_App.AppID.NoVersion")); |
| | | |
| | | // TODO: 咯扁俊 积己 内靛甫 眠啊钦聪促. |
| | | // InitInstance俊 葛电 吝夸茄 檬扁拳 累诀阑 硅摹钦聪促. |
| | | // TODO: 咯扁俊 积己 内靛甫 眠啊钦聪促. |
| | | // InitInstance俊 葛电 吝夸茄 檬扁拳 累诀阑 硅摹钦聪促. |
| | | m_bCreateBase = FALSE; |
| | | m_bCreateLog = FALSE; |
| | | m_hMutex = NULL; |
| | | } |
| | | |
| | | // 蜡老茄 CEdgeInspector_App 俺眉涝聪促. |
| | | // 蜡老茄 CEdgeInspector_App 俺眉涝聪促. |
| | | |
| | | CEdgeInspector_App theApp; |
| | | |
| | | |
| | | // CEdgeInspector_App 檬扁拳 |
| | | // CEdgeInspector_App 檬扁拳 |
| | | |
| | | BOOL CEdgeInspector_App::InitInstance() |
| | | { |
| | | // 览侩 橇肺弊伐 概聪其胶飘啊 ComCtl32.dll 滚傈 6 捞惑阑 荤侩窍咯 厚林倔 胶鸥老阑 |
| | | // 荤侩窍档废 瘤沥窍绰 版快, Windows XP 惑俊辑 馆靛矫 InitCommonControlsEx()啊 鞘夸钦聪促. |
| | | // InitCommonControlsEx()甫 荤侩窍瘤 臼栏搁 芒阑 父甸 荐 绝嚼聪促. |
| | | // 览侩 橇肺弊伐 概聪其胶飘啊 ComCtl32.dll 滚傈 6 捞惑阑 荤侩窍咯 厚林倔 胶鸥老阑 |
| | | // 荤侩窍档废 瘤沥窍绰 版快, Windows XP 惑俊辑 馆靛矫 InitCommonControlsEx()啊 鞘夸钦聪促. |
| | | // InitCommonControlsEx()甫 荤侩窍瘤 臼栏搁 芒阑 父甸 荐 绝嚼聪促. |
| | | INITCOMMONCONTROLSEX InitCtrls; |
| | | InitCtrls.dwSize = sizeof(InitCtrls); |
| | | // 览侩 橇肺弊伐俊辑 荤侩且 葛电 傍侩 牧飘费 努贰胶甫 器窃窍档废 |
| | | // 捞 亲格阑 汲沥窍绞矫坷. |
| | | // 览侩 橇肺弊伐俊辑 荤侩且 葛电 傍侩 牧飘费 努贰胶甫 器窃窍档废 |
| | | // 捞 亲格阑 汲沥窍绞矫坷. |
| | | InitCtrls.dwICC = ICC_WIN95_CLASSES; |
| | | InitCommonControlsEx(&InitCtrls); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // OLE 扼捞宏矾府甫 檬扁拳钦聪促. |
| | | // OLE 扼捞宏矾府甫 檬扁拳钦聪促. |
| | | if (!AfxOleInit()) |
| | | { |
| | | AfxMessageBox(IDP_OLE_INIT_FAILED); |
| | |
| | | |
| | | EnableTaskbarInteraction(FALSE); |
| | | |
| | | // RichEdit 牧飘费阑 荤侩窍妨搁 AfxInitRichEdit2()啊 乐绢具 钦聪促. |
| | | // RichEdit 牧飘费阑 荤侩窍妨搁 AfxInitRichEdit2()啊 乐绢具 钦聪促. |
| | | // AfxInitRichEdit2(); |
| | | |
| | | // 钎霖 檬扁拳 |
| | | // 捞甸 扁瓷阑 荤侩窍瘤 臼绊 弥辆 角青 颇老狼 农扁甫 临捞妨搁 |
| | | // 酒贰俊辑 鞘夸 绝绰 漂沥 檬扁拳 |
| | | // 风凭阑 力芭秦具 钦聪促. |
| | | // 秦寸 汲沥捞 历厘等 饭瘤胶飘府 虐甫 函版窍绞矫坷. |
| | | // TODO: 捞 巩磊凯阑 雀荤 肚绰 炼流狼 捞抚苞 鞍篮 |
| | | // 利例茄 郴侩栏肺 荐沥秦具 钦聪促. |
| | | SetRegistryKey(_T("肺拿 览侩 橇肺弊伐 付过荤俊辑 积己等 览侩 橇肺弊伐")); |
| | | LoadStdProfileSettings(4); // MRU甫 器窃窍咯 钎霖 INI 颇老 可记阑 肺靛钦聪促. |
| | | // 钎霖 檬扁拳 |
| | | // 捞甸 扁瓷阑 荤侩窍瘤 臼绊 弥辆 角青 颇老狼 农扁甫 临捞妨搁 |
| | | // 酒贰俊辑 鞘夸 绝绰 漂沥 檬扁拳 |
| | | // 风凭阑 力芭秦具 钦聪促. |
| | | // 秦寸 汲沥捞 历厘等 饭瘤胶飘府 虐甫 函版窍绞矫坷. |
| | | // TODO: 捞 巩磊凯阑 雀荤 肚绰 炼流狼 捞抚苞 鞍篮 |
| | | // 利例茄 郴侩栏肺 荐沥秦具 钦聪促. |
| | | SetRegistryKey(_T("肺拿 览侩 橇肺弊伐 付过荤俊辑 积己等 览侩 橇肺弊伐")); |
| | | LoadStdProfileSettings(4); // MRU甫 器窃窍咯 钎霖 INI 颇老 可记阑 肺靛钦聪促. |
| | | |
| | | if (NULL != g_pBase) |
| | | { |
| | |
| | | theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, |
| | | RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams); |
| | | |
| | | // 览侩 橇肺弊伐狼 巩辑 袍敲复阑 殿废钦聪促. 巩辑 袍敲复篮 |
| | | // 巩辑, 橇饭烙 芒 棺 轰 荤捞狼 楷搬 开且阑 钦聪促. |
| | | // 览侩 橇肺弊伐狼 巩辑 袍敲复阑 殿废钦聪促. 巩辑 袍敲复篮 |
| | | // 巩辑, 橇饭烙 芒 棺 轰 荤捞狼 楷搬 开且阑 钦聪促. |
| | | CSingleDocTemplate* pDocTemplate; |
| | | pDocTemplate = new CSingleDocTemplate( |
| | | IDR_MAINFRAME, |
| | | RUNTIME_CLASS(CEdgeInspector_AppDoc), |
| | | RUNTIME_CLASS(CMainFrame), // 林 SDI 橇饭烙 芒涝聪促. |
| | | RUNTIME_CLASS(CMainFrame), // 林 SDI 橇饭烙 芒涝聪促. |
| | | RUNTIME_CLASS(CEdgeInspector_AppView)); |
| | | if (!pDocTemplate) |
| | | return FALSE; |
| | | AddDocTemplate(pDocTemplate); |
| | | |
| | | |
| | | // 钎霖 夹 疙飞, DDE, 颇老 凯扁俊 措茄 疙飞临阑 备巩 盒籍钦聪促. |
| | | // 钎霖 夹 疙飞, DDE, 颇老 凯扁俊 措茄 疙飞临阑 备巩 盒籍钦聪促. |
| | | CCommandLineInfo cmdInfo; |
| | | ParseCommandLine(cmdInfo); |
| | | |
| | | |
| | | |
| | | // 疙飞临俊 瘤沥等 疙飞阑 叼胶菩摹钦聪促. |
| | | // 览侩 橇肺弊伐捞 /RegServer, /Register, /Unregserver 肚绰 /Unregister肺 矫累等 版快 FALSE甫 馆券钦聪促. |
| | | // 疙飞临俊 瘤沥等 疙飞阑 叼胶菩摹钦聪促. |
| | | // 览侩 橇肺弊伐捞 /RegServer, /Register, /Unregserver 肚绰 /Unregister肺 矫累等 版快 FALSE甫 馆券钦聪促. |
| | | if (!ProcessShellCommand(cmdInfo)) |
| | | return FALSE; |
| | | |
| | | // 芒 窍唱父 檬扁拳登菌栏骨肺 捞甫 钎矫窍绊 诀单捞飘钦聪促. |
| | | // 芒 窍唱父 檬扁拳登菌栏骨肺 捞甫 钎矫窍绊 诀单捞飘钦聪促. |
| | | m_pMainWnd->ShowWindow(SW_SHOW); |
| | | m_pMainWnd->UpdateWindow(); |
| | | // 立固荤啊 乐阑 版快俊父 DragAcceptFiles甫 龋免钦聪促. |
| | | // SDI 览侩 橇肺弊伐俊辑绰 ProcessShellCommand 饶俊 捞矾茄 龋免捞 惯积秦具 钦聪促. |
| | | // 立固荤啊 乐阑 版快俊父 DragAcceptFiles甫 龋免钦聪促. |
| | | // SDI 览侩 橇肺弊伐俊辑绰 ProcessShellCommand 饶俊 捞矾茄 龋免捞 惯积秦具 钦聪促. |
| | | |
| | | CMainFrame* pMain = static_cast<CMainFrame*>(AfxGetMainWnd()); |
| | | //pMain->SetDoc(static_cast<CAlignInspectionDoc*>(pMain->GetActiveDocument())); |
| | |
| | | |
| | | CloseHandle(m_hMutex); |
| | | |
| | | //TODO: 眠啊茄 眠啊 府家胶甫 贸府钦聪促. |
| | | //TODO: 眠啊茄 眠啊 府家胶甫 贸府钦聪促. |
| | | AfxOleTerm(FALSE); |
| | | |
| | | return CWinAppEx::ExitInstance(); |
| | | } |
| | | |
| | | // CEdgeInspector_App 皋矫瘤 贸府扁 |
| | | // CEdgeInspector_App 皋矫瘤 贸府扁 |
| | | |
| | | |
| | | // 览侩 橇肺弊伐 沥焊俊 荤侩登绰 CAboutDlg 措拳 惑磊涝聪促. |
| | | // 览侩 橇肺弊伐 沥焊俊 荤侩登绰 CAboutDlg 措拳 惑磊涝聪促. |
| | | |
| | | class CAboutDlg : public CDialogEx |
| | | { |
| | | 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() |
| | | }; |
| | |
| | | BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) |
| | | END_MESSAGE_MAP() |
| | | |
| | | // 措拳 惑磊甫 角青窍扁 困茄 览侩 橇肺弊伐 疙飞涝聪促. |
| | | // 措拳 惑磊甫 角青窍扁 困茄 览侩 橇肺弊伐 疙飞涝聪促. |
| | | void CEdgeInspector_App::OnAppAbout() |
| | | { |
| | | CAboutDlg aboutDlg; |
| | | aboutDlg.DoModal(); |
| | | } |
| | | |
| | | // CEdgeInspector_App 荤侩磊 瘤沥 肺靛/历厘 皋辑靛 |
| | | // CEdgeInspector_App 荤侩磊 瘤沥 肺靛/历厘 皋辑靛 |
| | | |
| | | void CEdgeInspector_App::PreLoadState() |
| | | { |
| | |
| | | { |
| | | } |
| | | |
| | | // CEdgeInspector_App 皋矫瘤 贸府扁 |
| | | // CEdgeInspector_App 皋矫瘤 贸府扁 |
| | | |
| | | |
| | | |
| | |
| | | |
| | | // EdgeInspector_App.h : EdgeInspector_App 览侩 橇肺弊伐俊 措茄 林 庆歹 颇老 |
| | | |
| | | // EdgeInspector_App.h : EdgeInspector_App 览侩 橇肺弊伐俊 措茄 林 庆歹 颇老 |
| | | // |
| | | #pragma once |
| | | |
| | | #ifndef __AFXWIN_H__ |
| | | #error "PCH俊 措秦 捞 颇老阑 器窃窍扁 傈俊 'stdafx.h'甫 器窃钦聪促." |
| | | #error "PCH俊 措秦 捞 颇老阑 器窃窍扁 傈俊 'stdafx.h'甫 器窃钦聪促." |
| | | #endif |
| | | |
| | | #include "resource.h" // 林 扁龋涝聪促. |
| | | #include "resource.h" // 林 扁龋涝聪促. |
| | | |
| | | |
| | | // CEdgeInspector_App: |
| | | // 捞 努贰胶狼 备泅俊 措秦辑绰 EdgeInspector_App.cpp阑 曼炼窍绞矫坷. |
| | | // 捞 努贰胶狼 备泅俊 措秦辑绰 EdgeInspector_App.cpp阑 曼炼窍绞矫坷. |
| | | // |
| | | |
| | | class CEdgeInspector_App : public CWinAppEx |
| | |
| | | |
| | | ULONG_PTR m_gdiplusToken; |
| | | BOOL m_bCreateBase; |
| | | BOOL m_bCreateLog; // 辆丰矫 眉农甫 困秦. |
| | | BOOL m_bCreateLog; // 辆丰矫 眉农甫 困秦. |
| | | HANDLE m_hMutex; |
| | | |
| | | // 犁沥狼涝聪促. |
| | | // 犁沥狼涝聪促. |
| | | public: |
| | | virtual BOOL InitInstance(); |
| | | virtual int ExitInstance(); |
| | | |
| | | // 备泅涝聪促. |
| | | // 备泅涝聪促. |
| | | UINT m_nAppLook; |
| | | BOOL m_bHiColorIcons; |
| | | |
| | |
| | | |
| | | // EdgeInspector_AppDoc.cpp : CEdgeInspector_AppDoc 努贰胶狼 备泅 |
| | | |
| | | // EdgeInspector_AppDoc.cpp : CEdgeInspector_AppDoc 努贰胶狼 备泅 |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | // SHARED_HANDLERS绰 固府 焊扁, 绵家魄 弊覆 棺 八祸 鞘磐 贸府扁甫 备泅窍绰 ATL 橇肺璃飘俊辑 沥狼且 荐 乐栏哥 |
| | | // 秦寸 橇肺璃飘客 巩辑 内靛甫 傍蜡窍档废 秦 凛聪促. |
| | | // SHARED_HANDLERS绰 固府 焊扁, 绵家魄 弊覆 棺 八祸 鞘磐 贸府扁甫 备泅窍绰 ATL 橇肺璃飘俊辑 沥狼且 荐 乐栏哥 |
| | | // 秦寸 橇肺璃飘客 巩辑 内靛甫 傍蜡窍档废 秦 凛聪促. |
| | | #ifndef SHARED_HANDLERS |
| | | #include "EdgeInspector_App.h" |
| | | #endif |
| | |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CEdgeInspector_AppDoc 积己/家戈 |
| | | // CEdgeInspector_AppDoc 积己/家戈 |
| | | |
| | | CEdgeInspector_AppDoc::CEdgeInspector_AppDoc() |
| | | { |
| | | // TODO: 咯扁俊 老雀己 积己 内靛甫 眠啊钦聪促. |
| | | // TODO: 咯扁俊 老雀己 积己 内靛甫 眠啊钦聪促. |
| | | |
| | | } |
| | | |
| | |
| | | if (!CDocument::OnNewDocument()) |
| | | return FALSE; |
| | | |
| | | // TODO: 咯扁俊 犁檬扁拳 内靛甫 眠啊钦聪促. |
| | | // SDI 巩辑绰 捞 巩辑甫 促矫 荤侩钦聪促. |
| | | // TODO: 咯扁俊 犁檬扁拳 内靛甫 眠啊钦聪促. |
| | | // SDI 巩辑绰 捞 巩辑甫 促矫 荤侩钦聪促. |
| | | |
| | | return TRUE; |
| | | } |
| | |
| | | { |
| | | if (ar.IsStoring()) |
| | | { |
| | | // TODO: 咯扁俊 历厘 内靛甫 眠啊钦聪促. |
| | | // TODO: 咯扁俊 历厘 内靛甫 眠啊钦聪促. |
| | | } |
| | | else |
| | | { |
| | | // TODO: 咯扁俊 肺爹 内靛甫 眠啊钦聪促. |
| | | // TODO: 咯扁俊 肺爹 内靛甫 眠啊钦聪促. |
| | | } |
| | | } |
| | | |
| | | #ifdef SHARED_HANDLERS |
| | | |
| | | // 绵家魄 弊覆阑 瘤盔钦聪促. |
| | | // 绵家魄 弊覆阑 瘤盔钦聪促. |
| | | void CEdgeInspector_AppDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds) |
| | | { |
| | | // 巩辑狼 单捞磐甫 弊府妨搁 捞 内靛甫 荐沥窍绞矫坷. |
| | | // 巩辑狼 单捞磐甫 弊府妨搁 捞 内靛甫 荐沥窍绞矫坷. |
| | | dc.FillSolidRect(lprcBounds, RGB(255, 255, 255)); |
| | | |
| | | CString strText = _T("TODO: implement thumbnail drawing here"); |
| | |
| | | dc.SelectObject(pOldFont); |
| | | } |
| | | |
| | | // 八祸 贸府扁甫 瘤盔钦聪促. |
| | | // 八祸 贸府扁甫 瘤盔钦聪促. |
| | | void CEdgeInspector_AppDoc::InitializeSearchContent() |
| | | { |
| | | CString strSearchContent; |
| | | // 巩辑狼 单捞磐俊辑 八祸 能刨明甫 汲沥钦聪促. |
| | | // 能刨明 何盒篮 ";"肺 备盒登绢具 钦聪促. |
| | | // 巩辑狼 单捞磐俊辑 八祸 能刨明甫 汲沥钦聪促. |
| | | // 能刨明 何盒篮 ";"肺 备盒登绢具 钦聪促. |
| | | |
| | | // 抗: strSearchContent = _T("point;rectangle;circle;ole object;"); |
| | | // 抗: strSearchContent = _T("point;rectangle;circle;ole object;"); |
| | | SetSearchContent(strSearchContent); |
| | | } |
| | | |
| | |
| | | |
| | | #endif // SHARED_HANDLERS |
| | | |
| | | // CEdgeInspector_AppDoc 柳窜 |
| | | // CEdgeInspector_AppDoc 柳窜 |
| | | |
| | | #ifdef _DEBUG |
| | | void CEdgeInspector_AppDoc::AssertValid() const |
| | |
| | | #endif //_DEBUG |
| | | |
| | | |
| | | // CEdgeInspector_AppDoc 疙飞 |
| | | // CEdgeInspector_AppDoc 疙飞 |
| | |
| | | |
| | | // EdgeInspector_AppDoc.h : CEdgeInspector_AppDoc 努贰胶狼 牢磐其捞胶 |
| | | |
| | | // EdgeInspector_AppDoc.h : CEdgeInspector_AppDoc 努贰胶狼 牢磐其捞胶 |
| | | // |
| | | |
| | | |
| | |
| | | |
| | | class CEdgeInspector_AppDoc : public CDocument |
| | | { |
| | | protected: // serialization俊辑父 父甸绢笼聪促. |
| | | protected: // serialization俊辑父 父甸绢笼聪促. |
| | | CEdgeInspector_AppDoc(); |
| | | DECLARE_DYNCREATE(CEdgeInspector_AppDoc) |
| | | |
| | | // 漂己涝聪促. |
| | | // 漂己涝聪促. |
| | | public: |
| | | |
| | | // 累诀涝聪促. |
| | | // 累诀涝聪促. |
| | | public: |
| | | |
| | | // 犁沥狼涝聪促. |
| | | // 犁沥狼涝聪促. |
| | | public: |
| | | virtual BOOL OnNewDocument(); |
| | | virtual void Serialize(CArchive& ar); |
| | |
| | | virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds); |
| | | #endif // SHARED_HANDLERS |
| | | |
| | | // 备泅涝聪促. |
| | | // 备泅涝聪促. |
| | | public: |
| | | virtual ~CEdgeInspector_AppDoc(); |
| | | #ifdef _DEBUG |
| | |
| | | |
| | | protected: |
| | | |
| | | // 积己等 皋矫瘤 甘 窃荐 |
| | | // 积己等 皋矫瘤 甘 窃荐 |
| | | protected: |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | #ifdef SHARED_HANDLERS |
| | | // 八祸 贸府扁俊 措茄 八祸 能刨明甫 汲沥窍绰 档快固 窃荐 |
| | | // 八祸 贸府扁俊 措茄 八祸 能刨明甫 汲沥窍绰 档快固 窃荐 |
| | | void SetSearchContent(const CString& value); |
| | | #endif // SHARED_HANDLERS |
| | | }; |
| | |
| | | |
| | | // EdgeInspector_AppView.cpp : CEdgeInspector_AppView 努贰胶狼 备泅 |
| | | |
| | | // EdgeInspector_AppView.cpp : CEdgeInspector_AppView 努贰胶狼 备泅 |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | |
| | | |
| | | // CEdgeInspector_AppView |
| | | // CEdgeInspector_AppView 积己/家戈 |
| | | // CEdgeInspector_AppView 积己/家戈 |
| | | |
| | | IMPLEMENT_DYNCREATE(CEdgeInspector_AppView, CFormView) |
| | | |
| | |
| | | |
| | | BOOL CEdgeInspector_AppView::PreCreateWindow(CREATESTRUCT& cs) |
| | | { |
| | | // TODO: CREATESTRUCT cs甫 荐沥窍咯 咯扁俊辑 |
| | | // Window 努贰胶 肚绰 胶鸥老阑 荐沥钦聪促. |
| | | // TODO: CREATESTRUCT cs甫 荐沥窍咯 咯扁俊辑 |
| | | // Window 努贰胶 肚绰 胶鸥老阑 荐沥钦聪促. |
| | | |
| | | return CFormView::PreCreateWindow(cs); |
| | | } |
| | | |
| | | // CEdgeInspector_AppView 柳窜 |
| | | // CEdgeInspector_AppView 柳窜 |
| | | |
| | | void CEdgeInspector_AppView::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | |
| | | ON_EVENT(CEdgeInspector_AppView, IDC_BTN_MAIN_EXIT, DISPID_CLICK, CEdgeInspector_AppView::ClickMenuButton, VTS_NONE) |
| | | END_EVENTSINK_MAP() |
| | | |
| | | // CEdgeInspector_AppView 皋矫瘤 贸府扁 |
| | | // CEdgeInspector_AppView 皋矫瘤 贸府扁 |
| | | |
| | | void CEdgeInspector_AppView::CreateChildView() |
| | | { |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #include "btnenh.h" |
| | |
| | | public: |
| | | enum{ IDD = IDD_MAIN_VIEW }; |
| | | |
| | | // 犁沥狼涝聪促. |
| | | // 犁沥狼涝聪促. |
| | | public: |
| | | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
| | | virtual void DoDataExchange(CDataExchange* pDX); |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "CHDataFitting.h" |
| | | |
| | | #include <algorithm> |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | typedef std::vector<double> VectorDouble; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "MulticamControl.h" |
| | | #include "Global_Define.h" |
| | | #include "FrameBufferController.h" |
| | |
| | | if (nYStart + nYSize > nBufSizeY* GetEndFrameIdx()) |
| | | return FALSE; |
| | | |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | if(m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | if(m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | { |
| | | m_nSetBufferIdx = 0; |
| | | |
| | |
| | | int buffer_pitch_value; |
| | | driver_status |= McGetParamInt(m_hGrabChannel, MC_BufferPitch, &buffer_pitch_value); |
| | | |
| | | ///// Time out 5 檬.... |
| | | ///// Time out 5 檬.... |
| | | driver_status |= McSetParamInt(m_hGrabChannel, MC_AcqTimeout_ms, -1); |
| | | |
| | | driver_status |= McSetParamInt(m_hGrabChannel, MC_SurfaceCount, 25); |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #include "GrabberControl.h" |
| | |
| | | public: |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Initialization |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL InitializeBuffer(void *pParam); |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Deinit |
| | |
| | | |
| | | public: |
| | | _GRABBER_INIT_PARAM_ m_Param; |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nSetBufferIdx; |
| | | int m_nScanIndex; |
| | | int m_nBoardID; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "RadientControl.h" |
| | | #include "FrameBufferController.h" |
| | | |
| | |
| | | if (nYStart + nYSize > nBufSizeY* GetEndFrameIdx()) |
| | | return FALSE; |
| | | |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | |
| | | CGrabberRadient *pRadient = (CGrabberRadient*)HookDataPtr; |
| | | |
| | | if(pRadient->m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | if(pRadient->m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | { |
| | | pRadient->m_nSetBufferIdx = 0; |
| | | |
| | |
| | | /* |
| | | MdigControl(m_MilDigitizer, M_CAMERALINK_CC1_SOURCE, M_GRAB_EXPOSURE+M_TIMER1); |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE+M_TIMER1, M_ENABLE); |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_SOURCE+M_TIMER1, M_CONTINUOUS); // Periodic 脚龋 牢啊 |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_SOURCE+M_TIMER1, M_CONTINUOUS); // Periodic 脚龋 牢啊 |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_TIME+M_TIMER1, nExposureTimer); //10000ns |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_TIME_DELAY+M_TIMER1, nExposureTimerDelay); //10000ns |
| | | */ |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | |
| | | public: |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Initialization |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL InitializeBuffer(void *pParam); |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Deinit |
| | |
| | | public: |
| | | _GRABBER_INIT_PARAM_ m_Param; |
| | | |
| | | MIL_ID m_MilSystem; // 焊靛寸 1函荐 |
| | | MIL_ID m_MilDigitizer; // 墨皋扼 函荐 |
| | | MIL_ID m_MilSystem; // 焊靛寸 1函荐 |
| | | MIL_ID m_MilDigitizer; // 墨皋扼 函荐 |
| | | MIL_ID m_Milbufgrab[BUFFERING_SIZE_MAX]; |
| | | DIGSTATUS m_DigitizerStatus; |
| | | long m_lBord; |
| | |
| | | |
| | | CCriticalSection m_critical; |
| | | |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nSetBufferIdx; |
| | | int m_nScanIndex; |
| | | int m_nAllocatedGrabBufSize; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "SapControl.h" |
| | | |
| | | #define FRAME_HEAD_MARKER 0x55AAFF00 |
| | |
| | | |
| | | BOOL CSapControl::CreateXfer() |
| | | { |
| | | // Xfer勤甸 积己 |
| | | // Xfer勤甸 积己 |
| | | if (DisplayStatus("CorXferNew", CorXferNew(m_hBoard, m_hAcq, *m_hBuffer, NULL, &m_hXfer))) |
| | | return FALSE; |
| | | |
| | |
| | | xfer_desc.incByte = m_Param.nFrameWidth; |
| | | |
| | | #ifdef FRAME_CALLBACK |
| | | // 妮归 窃荐 殿废 |
| | | // 妮归 窃荐 殿废 |
| | | if (DisplayStatus("CorXferRegisterCallback" |
| | | , CorXferRegisterCallback(m_hXfer |
| | | , CORXFER_VAL_EVENT_TYPE_END_OF_FRAME |
| | | , XferCallback, (void*)this))) |
| | | #else |
| | | // 妮归 窃荐 殿废 |
| | | // 妮归 窃荐 殿废 |
| | | if (DisplayStatus("CorXferRegisterCallback" |
| | | , CorXferRegisterCallback(m_hXfer |
| | | , CORXFER_VAL_EVENT_TYPE_END_OF_NLINES + m_Param.nFrameHeight |
| | |
| | | if (DisplayStatus("CorXferAppend", CorXferAppend(m_hXfer, m_hAcq, m_hBuffer[i], NULL))) |
| | | return FALSE; |
| | | |
| | | // 妮归 窃荐 殿废 |
| | | // 妮归 窃荐 殿废 |
| | | if (DisplayStatus("CorXferRegisterCallback" |
| | | , CorXferRegisterCallback(m_hXfer |
| | | , CORXFER_VAL_EVENT_TYPE_END_OF_FRAME |
| | |
| | | return FALSE; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Buffer 且寸 |
| | | // Buffer 且寸 |
| | | CORSTATUS st; |
| | | int i; |
| | | SIZE_T tempBufferSize= m_Param.nGrabBufSize; |
| | |
| | | |
| | | for (i = 0; i <nBufferrCount; i++) |
| | | { |
| | | // Memory Address 且寸. |
| | | // Memory Address 且寸. |
| | | m_pX64Buffer[i] = (void*)(m_pOneLargeBuffer+ nBufferSize*i); |
| | | if (m_pX64Buffer[i]) |
| | | { |
| | |
| | | if (DisplayStatus("CorAcqSetPrms", CorAcqSetPrms(m_hAcq, m_hVic, m_hCam, TRUE))) |
| | | return FALSE; |
| | | |
| | | // 荐笼且 康惑狼 农扁 眠免 |
| | | // 荐笼且 康惑狼 农扁 眠免 |
| | | // if (DisplayStatus("CorAcqGetPrm", CorAcqGetPrm(m_hAcq, CORACQ_PRM_SCALE_HORZ, &g_pBase->m_nFrameWidth))) |
| | | // return FALSE; |
| | | |
| | |
| | | |
| | | if(bFreeRun == FALSE) |
| | | { |
| | | // 悼扁 康惑犬焊 版快 |
| | | // 悼扁 康惑犬焊 版快 |
| | | if( DisplayStatus( "CorAcqSetPrm", CorAcqSetPrm(m_hAcq, CORACQ_PRM_EXT_FRAME_TRIGGER_ENABLE, TRUE))) |
| | | return FALSE; |
| | | |
| | |
| | | { |
| | | g_pLog->DisplayMessage(L"StopAcq : Grab %d, End %d", m_nSetBufferIdx, m_nEndFrameIdx); |
| | | |
| | | //20141022 yjm abort 肺 窍搁 促澜 弊乏矫 磊操焊靛啊 桓绢滚赴促. 犁何泼父 烹窃..揪广 俺绊积ぱぱせ |
| | | //20141022 yjm abort 肺 窍搁 促澜 弊乏矫 磊操焊靛啊 桓绢滚赴促. 犁何泼父 烹窃..揪广 俺绊积ぱぱせ |
| | | if (DisplayStatus("CorXferStop", CorXferStop(m_hXfer)))//if (DisplayStatus("CorXferStop", CorXferAbort(m_hXfer))) |
| | | { |
| | | g_pLog->DisplayMessage(L"CorXferAbort Fail. Grab %d, End %d", m_nSetBufferIdx, m_nEndFrameIdx); |
| | |
| | | if (nYStart + nYSize > nBufSizeY* GetEndFrameIdx()) |
| | | return FALSE; |
| | | |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | { |
| | | LPBYTE lpBuffer = NULL; |
| | | |
| | | // 捞固瘤甫 嘛篮 利捞 绝绰 版快绰 滚欺甫 府畔茄促. |
| | | // 捞固瘤甫 嘛篮 利捞 绝绰 版快绰 滚欺甫 府畔茄促. |
| | | if (m_nStartFrameIdx == 0 && m_nEndFrameIdx == 0) |
| | | { |
| | | if (nFrameNo >= 0 && nFrameNo < g_pBase->m_pMemFrameNo[m_Param.nCameraIdx]) |
| | |
| | | else |
| | | lpBuffer = NULL; |
| | | } |
| | | else // 捞固瘤甫 嘛篮 版快绰 Frame No甫 犬牢窍咯 滚欺甫 府畔茄促. |
| | | else // 捞固瘤甫 嘛篮 版快绰 Frame No甫 犬牢窍咯 滚欺甫 府畔茄促. |
| | | { |
| | | if (nFrameNo >= m_nStartFrameIdx && nFrameNo < m_nEndFrameIdx) |
| | | { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | | #include "GrabberControl.h" |
| | |
| | | virtual ~CSapControl(void); |
| | | |
| | | public: |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL InitializeBuffer(void *pParam); |
| | | virtual BOOL Deinitialize(); |
| | | virtual BOOL GrabScanStart(int iScan, BOOL bFreeRun, int nPeriod, int nExposure=10, BOOL bAuto=TRUE); |
| | |
| | | |
| | | protected: |
| | | _GRABBER_INIT_PARAM_ m_Param; |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nSetBufferIdx; |
| | | int m_nScanIndex; |
| | | int m_nAllocatedGrabBufSize; |
| | |
| | | CCriticalSection m_csIdxLock; |
| | | |
| | | BYTE* m_pOneLargeBuffer; |
| | | void* m_pX64Buffer[MAX_BUFFER_COUNT]; // 角力 且寸瞪 滚欺. |
| | | void* m_pX64Buffer[MAX_BUFFER_COUNT]; // 角力 且寸瞪 滚欺. |
| | | CORBUFFER m_hBuffer[MAX_BUFFER_COUNT]; // Handle to Buffer module where acquisition will take place |
| | | CORBUFFER m_hFrame[MAX_FRAME_COUNT]; |
| | | BOOL m_bIsGrabbing; // Grabbing 吝牢瘤 酒囱瘤 魄窜. |
| | | BOOL m_bIsGrabbing; // Grabbing 吝牢瘤 酒囱瘤 魄窜. |
| | | |
| | | CORSERVER m_hPC; // Handle to a PC Sapera server |
| | | CORSERVER m_hBoard; // Handle to Sapera server that will be acquiring |
| | |
| | | |
| | | |
| | | #include "StdAfx.h" |
| | | #include "SapLineGrab.h" |
| | | |
| | |
| | | return INITX64_FAIL_CREATEBUFFER; |
| | | |
| | | if(ActivateObjects() == FALSE) |
| | | return INITX64_FAIL_CREATEXFER;// ??? 货肺款 define 急攫 鞘夸 |
| | | return INITX64_FAIL_CREATEXFER;// ??? 货肺款 define 急攫 鞘夸 |
| | | |
| | | m_pXfer->Connect(); |
| | | m_pXfer->SetAutoConnect(TRUE); |
| | |
| | | |
| | | |
| | | //////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | // Process侩 滚欺 积己 |
| | | // Process侩 滚欺 积己 |
| | | |
| | | // 1. Memory Virtual Alloc |
| | | |
| | |
| | | |
| | | LPBYTE CSapLineGrab::GetGrabFrameHeader(int nFrameNo, BOOL* bRet) |
| | | { |
| | | // 捞固瘤甫 嘛篮 利捞 绝绰 版快绰 滚欺甫 府畔茄促. |
| | | // 捞固瘤甫 嘛篮 利捞 绝绰 版快绰 滚欺甫 府畔茄促. |
| | | LPBYTE pBuff= NULL; |
| | | if(nFrameNo > m_nSetBufferIdx) return NULL; |
| | | |
| | |
| | | else |
| | | lpBuffer = NULL; |
| | | } |
| | | else // 捞固瘤甫 嘛篮 版快绰 Frame No甫 犬牢窍咯 滚欺甫 府畔茄促. |
| | | else // 捞固瘤甫 嘛篮 版快绰 Frame No甫 犬牢窍咯 滚欺甫 府畔茄促. |
| | | { |
| | | if (bRet) |
| | | *bRet = TRUE; |
| | |
| | | |
| | | if (bGrabbing == FALSE) |
| | | { |
| | | // Snap 疙飞捞 吭栏唱 Callback 窃荐啊 龋免登瘤 臼篮 版快 Abort() 龋免 -> Callback 窃荐啊 龋免登瘤 臼栏搁 Freeze()肺绰 Snap 辆丰啊 救等促. |
| | | // Snap 疙飞捞 吭栏唱 Callback 窃荐啊 龋免登瘤 臼篮 版快 Abort() 龋免 -> Callback 窃荐啊 龋免登瘤 臼栏搁 Freeze()肺绰 Snap 辆丰啊 救等促. |
| | | g_pLog->DisplayMessage(_T("Stop Acq Case 1-1 Not Grabbing")); |
| | | if(m_bSnapStart == TRUE && m_bXferCall == FALSE) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | // Callback 窃荐啊 龋免等 版快绰 Freeze() 龋免 |
| | | // Callback 窃荐啊 龋免等 版快绰 Freeze() 龋免 |
| | | //g_pLog->DisplayMessage(TRUE, "Stop Acq Case 2-1"); |
| | | if(m_bXferCall) |
| | | { |
| | |
| | | } |
| | | |
| | | /* |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "StdAfx.h" |
| | | #include "sapclassbasic.h" |
| | |
| | | virtual ~CSapLineGrab(void); |
| | | |
| | | public: |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL InitializeBuffer(void *pParam); |
| | | virtual BOOL Deinitialize(); |
| | | virtual BOOL GrabScanStart(int iScan, BOOL bFreeRun, int nPeriod, int nExposure=10, BOOL bAuto=TRUE); |
| | | virtual BOOL GrabLiveStart(int nExposure=15); |
| | | virtual BOOL GrabScanStop(); |
| | | virtual BOOL IsGrabbing(); |
| | | virtual int IsAcqFrame(int nFrameNo, int nThreadIdx = -1); // Return 0 - 酒流 救嘛澜, Return -1 - 瘤况, Return 1 - 沥惑 |
| | | virtual int IsAcqFrame(int nFrameNo, int nThreadIdx = -1); // Return 0 - 酒流 救嘛澜, Return -1 - 瘤况, Return 1 - 沥惑 |
| | | virtual LPBYTE GetFrameHeader(int iScan,int nFrameNo, BOOL* bSuccess = NULL); |
| | | virtual LPBYTE GetFrameHeaderLine(int iScan,int nLine, BOOL* bSuccess = NULL); |
| | | virtual BOOL GetSmallImage(int iScan,LPBYTE lpIn, int nXStart, int nYStart, int nXSize, int nYSize, BOOL bMustMapping = TRUE); |
| | |
| | | SapBuffer *m_pSapBuffers; |
| | | SapTransfer *m_pXfer; |
| | | SapView *View; |
| | | int m_nGrabFrameNo; // 矫累急苞 八荤且 橇饭烙 荐俊辑 拌魂等 角力 嘛绰 橇饭烙 荐. |
| | | int m_nGrabFrameNo; // 矫累急苞 八荤且 橇饭烙 荐俊辑 拌魂等 角力 嘛绰 橇饭烙 荐. |
| | | _GRABBER_INIT_PARAM_ m_Param; |
| | | int m_nBoardID; |
| | | int m_nAllocatedGrabBufSize; |
| | | int m_cxferCall; // Xfercallback捞 龋免等 墨款飘. |
| | | int m_cxferCall; // Xfercallback捞 龋免等 墨款飘. |
| | | int m_nScanIndex; |
| | | dqGrabIdx m_dqCallbackFrame; |
| | | CCriticalSection m_csIdxLock; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "SoliosControl.h" |
| | | #include "FrameBufferController.h" |
| | | |
| | |
| | | if (nYStart + nYSize > nBufSizeY* GetEndFrameIdx()) |
| | | return FALSE; |
| | | |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | // 矫累 橇饭烙 锅龋客 场 橇饭烙 锅龋. |
| | | int nStartFrameNo = nYStart / nBufSizeY; |
| | | int nEndFrameNo = (nYStart + nYSize) / nBufSizeY; |
| | | LPBYTE lpHeadAddr = GetFrameHeader(iScan,nStartFrameNo); |
| | |
| | | memcpy(lpIn + i * nXSize, lpStart + nLine * nBufSizeX, nXSize); |
| | | if (nStartFrameNo <= nEndFrameNo && (nYStart + i + 1) % nBufSizeY == 0) |
| | | { |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | // 捞固瘤甫 蝶郴具窍绰 康开捞 MemFrameNo 版拌俊 吧媚乐绰 版快 贸府. |
| | | lpHeadAddr = GetFrameHeader(iScan,++nStartFrameNo); |
| | | lpStart = lpHeadAddr + nXStart; |
| | | nLine = 0; |
| | |
| | | |
| | | CGrabberSolios *pRadient = (CGrabberSolios*)HookDataPtr; |
| | | |
| | | if(pRadient->m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | if(pRadient->m_isLiveGrab == TRUE) // Live Grab 矫. |
| | | { |
| | | pRadient->m_nSetBufferIdx = 0; |
| | | |
| | |
| | | /* |
| | | MdigControl(m_MilDigitizer, M_CAMERALINK_CC1_SOURCE, M_GRAB_EXPOSURE+M_TIMER1); |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE+M_TIMER1, M_ENABLE); |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_SOURCE+M_TIMER1, M_CONTINUOUS); // Periodic 脚龋 牢啊 |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_SOURCE+M_TIMER1, M_CONTINUOUS); // Periodic 脚龋 牢啊 |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_TIME+M_TIMER1, nExposureTimer); //10000ns |
| | | MdigControl(m_MilDigitizer, M_GRAB_EXPOSURE_TIME_DELAY+M_TIMER1, nExposureTimerDelay); //10000ns |
| | | */ |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | |
| | | public: |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Initialization |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL Initialize(void *pParam, int *pErrorCode,int iBoard=0); // Grabber 檬扁拳 |
| | | virtual BOOL InitializeBuffer(void *pParam); |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Deinit |
| | |
| | | public: |
| | | _GRABBER_INIT_PARAM_ m_Param; |
| | | |
| | | MIL_ID m_MilSystem; // 焊靛寸 1函荐 |
| | | MIL_ID m_MilDigitizer; // 墨皋扼 函荐 |
| | | MIL_ID m_MilSystem; // 焊靛寸 1函荐 |
| | | MIL_ID m_MilDigitizer; // 墨皋扼 函荐 |
| | | MIL_ID m_Milbufgrab[BUFFERING_SIZE_MAX]; |
| | | DIGSTATUS m_DigitizerStatus; |
| | | long m_lBord; |
| | |
| | | |
| | | CCriticalSection m_critical; |
| | | |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nEndFrameIdx; // 泅犁 Grab 茄 荐 |
| | | int m_nStartFrameIdx; // 啊厘 坷贰傈俊 Grab茄 Frame狼 牢郸胶. |
| | | int m_nSetBufferIdx; |
| | | int m_nScanIndex; |
| | | int m_nAllocatedGrabBufSize; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "InterfaceManager.h" |
| | | #include "MulticamControl.h" |
| | | #include "RadientControl.h" |
| | |
| | | return 0; |
| | | } |
| | | |
| | | // End Signal阑 PLC俊辑 肋 给罐酒辑 Retry 持菌澜 |
| | | // End Signal阑 PLC俊辑 肋 给罐酒辑 Retry 持菌澜 |
| | | void CInterfaceManager::PLCSignalRetry(SEND_MESSAGE_SECTION emSection,InspectToControlSignal emSendSignal,enInterface_Send_Control emControlSignal) |
| | | { |
| | | if(m_HardwareRecipe.m_nPLCSignalRetry <= 0) |
| | |
| | | m_PostProcess.SetView((void*) m_pView); |
| | | m_PostProcess.RunPostProcessing(); |
| | | |
| | | // 馆靛矫 Scan End 脚龋 焊郴扁 傈俊 秦拎具茄促... Scan End 脚龋 焊尘锭 Loading捞 肯丰 救登搁 救焊郴瘤霸 阜囚乐澜.. |
| | | // 馆靛矫 Scan End 脚龋 焊郴扁 傈俊 秦拎具茄促... Scan End 脚龋 焊尘锭 Loading捞 肯丰 救登搁 救焊郴瘤霸 阜囚乐澜.. |
| | | m_bGlassLoadingEnd = FALSE; |
| | | m_bPLCGlassLoading = FALSE; |
| | | |
| | |
| | | if(!m_strReserveRecipe.IsEmpty()) |
| | | { |
| | | g_pLog->DisplayMessage(_T("Apply reserve Recipe Loading - [%s]"), m_strReserveRecipe); |
| | | if (LoadGlassRecipe(m_strReserveRecipe,TRUE)) // 鞍篮 Recipe扼档 利侩 抗距登绢 乐栏搁 促矫 肺爹茄促. |
| | | if (LoadGlassRecipe(m_strReserveRecipe,TRUE)) // 鞍篮 Recipe扼档 利侩 抗距登绢 乐栏搁 促矫 肺爹茄促. |
| | | { |
| | | g_pLog->DisplayMessage(_T("Apply reserve Recipe Loading - [%s] : Success"), m_strReserveRecipe); |
| | | } |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | if (strRcp.CompareNoCase(m_GlassRecipe.GetRecipeName()) != 0) // strRecipeName 官差搁 肺爹茄促. |
| | | if (strRcp.CompareNoCase(m_GlassRecipe.GetRecipeName()) != 0) // strRecipeName 官差搁 肺爹茄促. |
| | | { |
| | | if (LoadGlassRecipe(strRcp,TRUE) == FALSE) |
| | | { |
| | |
| | | BlVision_GetVisionRecipe()->setRecipeType(EI_VISION_RECIPE); |
| | | BlVision_GetVisionRecipe()->init(); |
| | | |
| | | for (int i = 0; i < nCount; i++) { //设置分辨率 |
| | | for (int i = 0; i < nCount; i++) { //设置分辨率 |
| | | DimensionDir eDir = (DimensionDir)(i); |
| | | CBlSideData *pSide = BlVision_GetVisionRecipe()->getSideData(eDir); |
| | | |
| | |
| | | g_pLog->DisplayMessage( _T("CreateCamera Start!")); |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | | // Camera Handle 积己. |
| | | // Camera Handle 积己. |
| | | int iCam; |
| | | BOOL bRet = TRUE; |
| | | |
| | |
| | | int nErrorCode; |
| | | int nBoardId = iCam; |
| | | |
| | | // B5 4龋扁 悸泼 |
| | | // B5 4龋扁 悸泼 |
| | | g_pBase->m_strSBKLine = m_HardwareRecipe.GetLineID(); |
| | | g_pBase->m_strSBKLine.Append(_T("#")); |
| | | |
| | |
| | | FreeImage_Unload(bitmap); |
| | | |
| | | Unlock(); |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CInterfaceManager::SaveFullImageModern(CString strPath,LPBYTE lpOrigin,int nImgWidth,int nImgHeight,int iSide,int nStartY,int nQuality /*= 80*/) |
| | |
| | | cvReleaseImageHeader(&pImg); |
| | | #else |
| | | Lock(); |
| | | // 原始图像数据转 cv::Mat |
| | | // 原始图像数据转 cv::Mat |
| | | cv::Mat origin(nImgHeight, nImgWidth, CV_8UC1, lpOrigin + (nImgWidth * nStartY)); |
| | | |
| | | // 缩放图像 |
| | | // 缩放图像 |
| | | cv::Size szNew(static_cast<int>(nImgWidth * dRatio), static_cast<int>(nImgHeight * dRatio)); |
| | | cv::Mat resized; |
| | | cv::resize(origin, resized, szNew, 0, 0, cv::INTER_LINEAR); |
| | | |
| | | // 设置 JPEG 压缩参数 |
| | | // 设置 JPEG 压缩参数 |
| | | std::vector<int> params = { |
| | | cv::IMWRITE_JPEG_QUALITY, |
| | | nQuality |
| | |
| | | strPath.Append(_T("_NG")); |
| | | } |
| | | #else |
| | | // 加载灰度图像 |
| | | // 加载灰度图像 |
| | | std::string strFilename = CT2A(strPath); |
| | | cv::Mat img = cv::imread(strFilename, cv::IMREAD_GRAYSCALE); |
| | | |
| | |
| | | nHeight = img.rows; |
| | | } |
| | | else { |
| | | // 按比例缩放 |
| | | // 按比例缩放 |
| | | const double dRatio = 1.0 - static_cast<double>(IMAGE_COMPRESSRATIO) / 100.0; |
| | | int newWidth = static_cast<int>(img.cols / dRatio); |
| | | int newHeight = static_cast<int>(img.rows / dRatio); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | | #include "EdgeInspector_AppView.h" |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "LanguageControl.h" |
| | | #include <fstream> |
| | | #include <iostream> |
| | |
| | | |
| | | char lineBuffer[1024]; |
| | | |
| | | char seps[]="=\n"; //备盒磊 |
| | | char seps[]="=\n"; //备盒磊 |
| | | |
| | | char* pTemp; |
| | | char* pContext; |
| | |
| | | BSTR bstrWide; |
| | | char* pszAnsi; |
| | | int nLength; |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, NULL, NULL); |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), NULL, NULL); |
| | | bstrWide = SysAllocStringLen(NULL, nLength); |
| | | |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, bstrWide, nLength); |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), bstrWide, nLength); |
| | | nLength = WideCharToMultiByte(CP_ACP, 0, bstrWide, -1, NULL, 0, NULL, NULL); |
| | | pszAnsi = new char[nLength]; |
| | | |
| | |
| | | |
| | | char lineBuffer[1024]; |
| | | |
| | | char seps[]="=\n"; //备盒磊 |
| | | char seps[]="=\n"; //备盒磊 |
| | | |
| | | char* pTemp; |
| | | char* pContext; |
| | |
| | | BSTR bstrWide; |
| | | char* pszAnsi; |
| | | int nLength; |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, NULL, NULL); |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), NULL, NULL); |
| | | bstrWide = SysAllocStringLen(NULL, nLength); |
| | | |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, bstrWide, nLength); |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), bstrWide, nLength); |
| | | nLength = WideCharToMultiByte(CP_ACP, 0, bstrWide, -1, NULL, 0, NULL, NULL); |
| | | pszAnsi = new char[nLength]; |
| | | |
| | |
| | | |
| | | char lineBuffer[1024]; |
| | | |
| | | char seps[]="=\n"; //备盒磊 |
| | | char seps[]="=\n"; //备盒磊 |
| | | |
| | | //char* pTemp; |
| | | //char* pContext; |
| | |
| | | BSTR bstrWide; |
| | | char* pszAnsi; |
| | | int nLength; |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, NULL, NULL); |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), NULL, NULL); |
| | | bstrWide = SysAllocStringLen(NULL, nLength); |
| | | |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, bstrWide, nLength); |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), bstrWide, nLength); |
| | | nLength = WideCharToMultiByte(CP_ACP, 0, bstrWide, -1, NULL, 0, NULL, NULL); |
| | | pszAnsi = new char[nLength]; |
| | | |
| | |
| | | |
| | | char lineBuffer[1024]; |
| | | |
| | | char seps[]="=\n"; //备盒磊 |
| | | char seps[]="=\n"; //备盒磊 |
| | | |
| | | //char* pTemp; |
| | | //char* pContext; |
| | |
| | | nLength = MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, NULL, NULL); |
| | | bstrWide = SysAllocStringLen(NULL, nLength); |
| | | |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, strlen(lineBuffer) + 1, bstrWide, nLength); |
| | | MultiByteToWideChar(CP_UTF8, 0, lineBuffer, (int)(strlen(lineBuffer) + 1), bstrWide, nLength); |
| | | nLength = WideCharToMultiByte(CP_ACP, 0, bstrWide, -1, NULL, 0, NULL, NULL); |
| | | pszAnsi = new char[nLength]; |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "Config.h" |
| | | #include "Global_Define.h" |
| | | |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "Worker_UpdateLicense.h" |
| | | |
| | | #ifdef _DEBUG |
| | |
| | | #pragma comment(lib,"l_mega64.lib") |
| | | #endif |
| | | |
| | | // 皋啊遏 扼捞宏矾府 寇何 窃荐 急攫 矫累 |
| | | // 皋啊遏 扼捞宏矾府 寇何 窃荐 急攫 矫累 |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | extern unsigned int lock_init_usb(unsigned int op1); // 皋啊遏 沤祸 |
| | | extern unsigned int lock_init_usb(unsigned int op1); // 皋啊遏 沤祸 |
| | | extern unsigned char lock_write(unsigned char op1, char op2); |
| | | extern unsigned char lock_read(unsigned char op1); |
| | | extern unsigned int lock_boot_cnt(void); // 何泼 冉荐 掘扁 |
| | | extern unsigned int lock_boot_cnt(void); // 何泼 冉荐 掘扁 |
| | | extern unsigned char lock_version(void); |
| | | extern unsigned char lock_sn(char); // 皋啊遏 绊蜡锅龋 |
| | | extern unsigned char lock_check(void); // 皋啊遏 粮犁 咯何甫 狐福绊 埃窜洒 眉农 |
| | | extern unsigned char lock_sn(char); // 皋啊遏 绊蜡锅龋 |
| | | extern unsigned char lock_check(void); // 皋啊遏 粮犁 咯何甫 狐福绊 埃窜洒 眉农 |
| | | extern int lock_write_ex(int op1, int op2); |
| | | extern int lock_read_ex(int op1); |
| | | extern BOOL lock_receive(void); |
| | | |
| | | // 捞傈 滚傈苞 龋券己 蜡瘤甫 困茄 窃荐, 脚痹诀眉牢 版快 酒贰狼 窃荐绰 荤侩窍瘤 付技夸. |
| | | // 捞傈 滚傈苞 龋券己 蜡瘤甫 困茄 窃荐, 脚痹诀眉牢 版快 酒贰狼 窃荐绰 荤侩窍瘤 付技夸. |
| | | extern unsigned char lock_auto(char op1); |
| | | extern unsigned char lock_func0(unsigned char op1, unsigned char op2); |
| | | extern unsigned char lock_func1(unsigned char op1, unsigned char op2); |
| | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | // 皋啊遏 扼捞宏矾府 寇何 窃荐 急攫 场 |
| | | // 皋啊遏 扼捞宏矾府 寇何 窃荐 急攫 场 |
| | | |
| | | CWorker_UpdateLicense::CWorker_UpdateLicense(int nIndex, IWorkerUpdateLicense2Parent *pIWUL2P, DWORD dwTick) |
| | | : m_nIndex(nIndex), m_pIWUL2P(pIWUL2P), m_dwTick(dwTick) |
| | |
| | | { |
| | | if (m_bUpdate) return FALSE; |
| | | |
| | | //Read 胶饭靛 积己 |
| | | //Read 胶饭靛 积己 |
| | | m_bUpdate = TRUE; |
| | | AfxBeginThread(CWorker_UpdateLicense::UpdateLicense,(LPVOID)(this)); |
| | | |
| | |
| | | |
| | | void CWorker_UpdateLicense::Update_License() |
| | | { |
| | | ////////////////////// USB侩 皋啊遏 八荤风凭 矫累 |
| | | ////////////////////// USB侩 皋啊遏 八荤风凭 矫累 |
| | | DWORD64 dwTick = GetTickCount64(); |
| | | |
| | | m_sStatus.Reset(); |
| | |
| | | m_sStatus.expTime = tmpTime; |
| | | return; |
| | | |
| | | m_sStatus.nKeyStatus = LicenseKey_NotConnected; // 楷搬 救凳 |
| | | m_sStatus.nUsbID = lock_init_usb(8); // 楷搬 眉农 |
| | | m_sStatus.nKeyStatus = LicenseKey_NotConnected; // 楷搬 救凳 |
| | | m_sStatus.nUsbID = lock_init_usb(8); // 楷搬 眉农 |
| | | if (0 == m_sStatus.nUsbID) |
| | | { |
| | | m_pIWUL2P->IWUL2P_LicenceStatus(m_nIndex, m_sStatus); |
| | | return; |
| | | } |
| | | |
| | | m_sStatus.nKeyStatus = LicenseKey_NotCertified; // 牢刘 救凳 |
| | | if (0 != lock_check()) // 牢刘 眉农 |
| | | m_sStatus.nKeyStatus = LicenseKey_NotCertified; // 牢刘 救凳 |
| | | if (0 != lock_check()) // 牢刘 眉农 |
| | | { |
| | | m_pIWUL2P->IWUL2P_LicenceStatus(m_nIndex, m_sStatus); |
| | | return; |
| | |
| | | } |
| | | m_sStatus.strSerialNo = szTemp; |
| | | |
| | | m_sStatus.nKeyStatus = LicenseKey_NotActivated; // 劝己拳 救凳 |
| | | m_sStatus.nKeyStatus = LicenseKey_NotActivated; // 劝己拳 救凳 |
| | | |
| | | // TIME üũ |
| | | // TIME 眉农 |
| | | int pMemData[16] = { 0 }; |
| | | CString strTemp; |
| | | for (int i = 0; i < 16; i++) |
| | |
| | | |
| | | if (spanTime.GetTotalSeconds() > 0) |
| | | { |
| | | m_sStatus.nKeyStatus = LicenseKey_Activated; // 劝己拳凳 |
| | | m_sStatus.nKeyStatus = LicenseKey_Activated; // 劝己拳凳 |
| | | m_pIWUL2P->IWUL2P_LicenceStatus(m_nIndex, m_sStatus); |
| | | return; |
| | | } |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | enum LicenseKey_Status { |
| | | LicenseKey_NotConnected = 0, // 楷搬 救凳 |
| | | LicenseKey_NotCertified, // 牢刘 救凳 |
| | | LicenseKey_NotActivated, // 咀萍海捞记 救凳 |
| | | LicenseKey_Activated // 咀萍海捞记 凳 |
| | | LicenseKey_NotConnected = 0, // 楷搬 救凳 |
| | | LicenseKey_NotCertified, // 牢刘 救凳 |
| | | LicenseKey_NotActivated, // 咀萍海捞记 救凳 |
| | | LicenseKey_Activated // 咀萍海捞记 凳 |
| | | }; |
| | | |
| | | struct SLicenseStatus |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "LicenseChecker.h" |
| | | |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "Worker_UpdateLicense.h" |
| | | |
| | | class CLicenseChecker : public IWorkerUpdateLicense2Parent |
| | |
| | | // ExternLightControl.cpp: implementation of the CExternLightControl class. |
| | | // ExternLightControl.cpp: implementation of the CExternLightControl class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | // ExternLightControl.h: interface for the CExternLightControl class. |
| | | // ExternLightControl.h: interface for the CExternLightControl class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | |
| | | |
| | | #include "stdafx.h" |
| | | #include "ExternLightControlAKPNV.h" |
| | | |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | |
| | | |
| | | #include "stdafx.h" |
| | | #include "ExternLightControlLCP.h" |
| | | |
| | |
| | | |
| | | |
| | | #pragma once |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | |
| | | |
| | | #include "StdAfx.h" |
| | | #include "ExternLightControlLCP.h" |
| | | #include "ExternLightControlAKPNV.h" |
| | |
| | | if(pLingControl->OpenControl(pLight->m_nPort) == TRUE) |
| | | { |
| | | g_pLog->DisplayMessage(_T("Light controller %s connection success : Port[%d]"),strMsg,pLight->m_nPort); |
| | | //TRACE("炼疙 %s 楷搬 己傍 : Port[%d]\n",strMsg,pLight->m_nPort); |
| | | //TRACE("炼疙 %s 楷搬 己傍 : Port[%d]\n",strMsg,pLight->m_nPort); |
| | | nOldPort = pLight->m_nPort; |
| | | } |
| | | else |
| | | { |
| | | g_pLog->DisplayMessage(_T("Light controller %s connection fail : Port[%d]"),strMsg,pLight->m_nPort); |
| | | //TRACE("炼疙 %s 楷搬 角菩 : Port[%d]\n",strMsg,pLight->m_nPort); |
| | | //TRACE("炼疙 %s 楷搬 角菩 : Port[%d]\n",strMsg,pLight->m_nPort); |
| | | } |
| | | |
| | | m_vecLightControl.push_back(pLingControl); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include <vector> |
| | | #include "ExternLightControl.h" |
| | |
| | | |
| | | protected: |
| | | std::vector<CExternLightControl *> m_vecLightControl; |
| | | //CConfig m_ConfigLightValue; // 饭矫乔俊辑 包府窍磊... 炼疙 汲沥蔼阑 扁撅窍绰 Config File |
| | | //CConfig m_ConfigLightValue; // 饭矫乔俊辑 包府窍磊... 炼疙 汲沥蔼阑 扁撅窍绰 Config File |
| | | CWnd *m_pParents; |
| | | CHardwareSettings *m_pHardwareSetting; |
| | | |
| | |
| | | |
| | | // MainFrm.cpp : CMainFrame 努贰胶狼 备泅 |
| | | |
| | | // MainFrm.cpp : CMainFrame 努贰胶狼 备泅 |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | ON_WM_GETMINMAXINFO() |
| | | END_MESSAGE_MAP() |
| | | |
| | | // CMainFrame 积己/家戈 |
| | | // CMainFrame 积己/家戈 |
| | | |
| | | CMainFrame::CMainFrame() |
| | | { |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | // CMainFrame 皋矫瘤 贸府扁 |
| | | // CMainFrame 皋矫瘤 贸府扁 |
| | | void CMainFrame::OnGetMinMaxInfo(MINMAXINFO* lpMMI) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | //CFrameWndEx::OnGetMinMaxInfo(lpMMI); |
| | | |
| | | lpMMI->ptMinTrackSize.x = TOTAL_WINDOW_SIZE_X; |
| | |
| | | lpMMI->ptMaxTrackSize.y = TOTAL_WINDOW_SIZE_Y; |
| | | } |
| | | |
| | | // CMainFrame 柳窜 |
| | | // CMainFrame 柳窜 |
| | | |
| | | #ifdef _DEBUG |
| | | void CMainFrame::AssertValid() const |
| | |
| | | #endif //_DEBUG |
| | | |
| | | |
| | | // CMainFrame 皋矫瘤 贸府扁 |
| | | // CMainFrame 皋矫瘤 贸府扁 |
| | | void CMainFrame::SetView(CEdgeInspector_AppView *pView) |
| | | { |
| | | m_pView = pView; |
| | |
| | | if (PathFileExists(strExePath) && PathFileExists(strConfigPath)) { |
| | | LPCTSTR pszExeName = PathFindFileName(strExePath); |
| | | |
| | | // 去掉 .exe,并杀死进程 |
| | | // 去掉 .exe,并杀死进程 |
| | | TCHAR szNameWithoutExt[MAX_PATH] = { 0 }; |
| | | _tcscpy_s(szNameWithoutExt, pszExeName); |
| | | PathRemoveExtension(szNameWithoutExt); |
| | |
| | | if (PathFileExists(strExePath) && PathFileExists(strConfigPath)) { |
| | | LPCTSTR pszExeName = PathFindFileName(strExePath); |
| | | |
| | | // 去掉 .exe,并杀死进程 |
| | | // 去掉 .exe,并杀死进程 |
| | | TCHAR szNameWithoutExt[MAX_PATH] = { 0 }; |
| | | _tcscpy_s(szNameWithoutExt, pszExeName); |
| | | PathRemoveExtension(szNameWithoutExt); |
| | |
| | | { |
| | | m_strReserveRecipe.Empty(); |
| | | |
| | | if(!IsScanNow()) // 八荤 吝 |
| | | if(!IsScanNow()) // 八荤 吝 |
| | | { |
| | | if(LoadGlassRecipe(strRecipe,TRUE) == TRUE) |
| | | { |
| | |
| | | g_pBase->m_eProcessMode = PROC_MODE_SIMULATION_ONESIDE; |
| | | m_eManualInspectSide = eDim; |
| | | |
| | | // 烙矫肺 阜澜 |
| | | // 烙矫肺 阜澜 |
| | | //return TRUE; |
| | | |
| | | AfxBeginThread(ManualInspectProcess,this); |
| | |
| | | |
| | | // MainFrm.h : CMainFrame 努贰胶狼 牢磐其捞胶 |
| | | |
| | | // MainFrm.h : CMainFrame 努贰胶狼 牢磐其捞胶 |
| | | // |
| | | |
| | | #pragma once |
| | |
| | | , public IDisplyMessage2Parent |
| | | { |
| | | |
| | | protected: // serialization俊辑父 父甸绢笼聪促. |
| | | protected: // serialization俊辑父 父甸绢笼聪促. |
| | | CMainFrame(); |
| | | DECLARE_DYNCREATE(CMainFrame) |
| | | |
| | | // 漂己涝聪促. |
| | | // 漂己涝聪促. |
| | | public: |
| | | |
| | | // 累诀涝聪促. |
| | | // 累诀涝聪促. |
| | | public: |
| | | |
| | | // 犁沥狼涝聪促. |
| | | // 犁沥狼涝聪促. |
| | | public: |
| | | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
| | | |
| | | // 备泅涝聪促. |
| | | // 备泅涝聪促. |
| | | public: |
| | | virtual ~CMainFrame(); |
| | | #ifdef _DEBUG |
| | |
| | | void SetRegistryRcpName(CString strRecipe); |
| | | void ApplyViewRecipeSettingss(); |
| | | |
| | | // 积己等 皋矫瘤 甘 窃荐 |
| | | // 积己等 皋矫瘤 甘 窃荐 |
| | | protected: |
| | | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); |
| | | afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "mil.h" |
| | | |
| | |
| | | { |
| | | int nJobIndex; |
| | | int nSKipFrame; |
| | | int status; // 泅犁 惑怕... // M_STOP , M_START , M_FREE_START |
| | | int nCount; // 佬篮 扼牢荐... |
| | | int nIndex; // 捞固瘤 滚欺 牢郸胶 |
| | | int status; // 泅犁 惑怕... // M_STOP , M_START , M_FREE_START |
| | | int nCount; // 佬篮 扼牢荐... |
| | | int nIndex; // 捞固瘤 滚欺 牢郸胶 |
| | | int nDisplayFrame; |
| | | int nResetFrame; |
| | | }DIGSTATUS, *PDIGSTATUS; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "Control_Interface.h" |
| | | #include "Config.h" |
| | | #include "SharedMemoryDefine.h" |
| | |
| | | { |
| | | m_bConnect = FALSE; |
| | | |
| | | //4k 农扁狼 傍蜡 皋葛府 颇老 积己 |
| | | //4k 农扁狼 傍蜡 皋葛府 颇老 积己 |
| | | m_hMap = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, SHARED_MEMORY_SIZE, _T("MX_COMPONENT_SHARED_MEMORY")); |
| | | |
| | | //父老 捞固 积己等 按眉啊 乐促搁 捞固 Connector啊 累悼 吝.. |
| | | //父老 捞固 积己等 按眉啊 乐促搁 捞固 Connector啊 累悼 吝.. |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | //捞固 积己等 按眉啊 乐促搁 积己捞 酒聪扼 坷锹栏肺 角青 |
| | | //捞固 积己等 按眉啊 乐促搁 积己捞 酒聪扼 坷锹栏肺 角青 |
| | | m_hMap = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,_T("MX_COMPONENT_SHARED_MEMORY")); |
| | | } |
| | | else//父老 积己等 按眉啊 绝促搁 沥惑 悼累窍瘤 臼绰促. |
| | | else//父老 积己等 按眉啊 绝促搁 沥惑 悼累窍瘤 臼绰促. |
| | | g_pLog->DisplayMessage(_T("Error : No defect PLCConnector program.")); |
| | | |
| | | if (m_hMap == NULL) |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | //傍蜡皋葛府 甘俏 |
| | | //傍蜡皋葛府 甘俏 |
| | | m_pSharedMemory = (char*)::MapViewOfFile(m_hMap, FILE_MAP_ALL_ACCESS, 0, 0, SHARED_MEMORY_SIZE); |
| | | |
| | | if (m_pSharedMemory == NULL) |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | //0栏肺 檬扁拳 |
| | | //0栏肺 檬扁拳 |
| | | ZeroMemory(m_pSharedMemory,SHARED_MEMORY_SIZE); |
| | | |
| | | m_bConnect = TRUE; |
| | |
| | | else |
| | | memset(m_pSharedMemory+iAddr, 0x00, nWORDSize); |
| | | |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | m_pSharedMemory[iStartAddr] = 1; |
| | | |
| | | return true; |
| | |
| | | iAddr+=4; |
| | | memcpy(m_pSharedMemory+iAddr, WriteData, nWORDSize*2); |
| | | |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | m_pSharedMemory[iStartAddr] = 1; |
| | | return true; |
| | | } |
| | |
| | | iAddr+=2; |
| | | memcpy(m_pSharedMemory+iAddr, &msecTimer, 4); |
| | | |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | m_pSharedMemory[iStartAddr] = 1; |
| | | return true; |
| | | } |
| | |
| | | iAddr+=2; |
| | | memcpy(m_pSharedMemory+iAddr, &msecTimer, 4); |
| | | |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | m_pSharedMemory[iStartAddr] = 1; |
| | | return true; |
| | | } |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | // 胶飘傅 -> 16柳荐 |
| | | // 胶飘傅 -> 16柳荐 |
| | | BOOL CControl_Interface::StrToHex(CHAR* pchData, CHAR* pchDataSrc, INT nLength, BOOL bWordReverse) |
| | | { |
| | | //static UCHAR saucHex[] = "0123456789ABCDEF"; |
| | |
| | | if ( strlength > 6) strlength = 6; |
| | | |
| | | if( nWORDSize > 1000) nWORDSize = 1000; |
| | | //傍蜡 皋葛府俊 拱幅单捞磐甫 佬档废 脚龋甫 焊辰促. |
| | | //傍蜡 皋葛府俊 拱幅单捞磐甫 佬档废 脚龋甫 焊辰促. |
| | | ZeroMemory(m_pSharedMemory + PLC_READ_LONGDATA_ADDRESS_1, (PLC_READ_LONGDATA_LENGTH_1)-(PLC_READ_LONGDATA_ADDRESS_1)); |
| | | memcpy(m_pSharedMemory+PLC_READ_LONGDATA_ADDRESS_1, strAddress,strlength*sizeof(TCHAR)); |
| | | memcpy(m_pSharedMemory+PLC_READ_LONGDATA_LENGTH_1, &nWORDSize,2); |
| | | memset(m_pSharedMemory+PLC_READ_LONGDATA_SIGNAL_1, 0x01, 1); |
| | | |
| | | //单捞磐甫 促 佬绊 傍蜡皋葛府 利阑 锭鳖瘤 扁促赴促. |
| | | //单捞磐甫 促 佬绊 傍蜡皋葛府 利阑 锭鳖瘤 扁促赴促. |
| | | ::WaitForSingleObject(m_ReadEvent,2000); |
| | | |
| | | //肯丰啊 登搁 秦寸 蔼阑 促矫 佬绢柯促. |
| | | //肯丰啊 登搁 秦寸 蔼阑 促矫 佬绢柯促. |
| | | //pData = m_pSharedMemory+PLC_READ_LONGDATA_VALUE; |
| | | |
| | | memcpy(pData, m_pSharedMemory + PLC_READ_LONGDATA_VALUE_1, nWORDSize * 2); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Thread_ControlIF.h" |
| | | #include "TransDataManager.h" |
| | |
| | | char *m_pSharedMemory; |
| | | ST_PLC_RECIVE_01 m_Rcv01; |
| | | ST_PLC_SEND_01 m_Send01,m_SentBack01; |
| | | int m_nSignal; //Signal 涝仿 |
| | | int m_nLongSignal; //Signal 涝仿 |
| | | int m_nSignal; //Signal 涝仿 |
| | | int m_nLongSignal; //Signal 涝仿 |
| | | CEvent m_ReadEvent; |
| | | double m_dTickPrevTime; |
| | | |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "Control_Interface_New.h" |
| | | #include "Config.h" |
| | | #include "SharedMemoryDefine.h" |
| | |
| | | { |
| | | m_bConnect = FALSE; |
| | | |
| | | //4k 农扁狼 傍蜡 皋葛府 颇老 积己 |
| | | //4k 农扁狼 傍蜡 皋葛府 颇老 积己 |
| | | m_hMap = ::CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE |
| | | , 0, SHARED_MEMORY_SIZE, _T("MX_COMPONENT_SHARED_MEMORY")); |
| | | |
| | | //父老 捞固 积己等 按眉啊 乐促搁 捞固 Connector啊 累悼 吝.. |
| | | //父老 捞固 积己等 按眉啊 乐促搁 捞固 Connector啊 累悼 吝.. |
| | | if (::GetLastError() == ERROR_ALREADY_EXISTS) |
| | | { |
| | | //捞固 积己等 按眉啊 乐促搁 积己捞 酒聪扼 坷锹栏肺 角青 |
| | | //捞固 积己等 按眉啊 乐促搁 积己捞 酒聪扼 坷锹栏肺 角青 |
| | | m_hMap = ::OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,_T("MX_COMPONENT_SHARED_MEMORY")); |
| | | } |
| | | else//父老 积己等 按眉啊 绝促搁 沥惑 悼累窍瘤 臼绰促. |
| | | else//父老 积己等 按眉啊 绝促搁 沥惑 悼累窍瘤 臼绰促. |
| | | g_pLog->DisplayMessage(_T("Error : No defect PLCConnector program.")); |
| | | |
| | | if (m_hMap == NULL) |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | //傍蜡皋葛府 甘俏 |
| | | //傍蜡皋葛府 甘俏 |
| | | m_pSharedMemory = (char*)::MapViewOfFile(m_hMap, FILE_MAP_ALL_ACCESS, 0, 0, SHARED_MEMORY_SIZE); |
| | | |
| | | if (m_pSharedMemory == NULL) |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | //0栏肺 檬扁拳 |
| | | //0栏肺 檬扁拳 |
| | | ZeroMemory(m_pSharedMemory,SHARED_MEMORY_SIZE); |
| | | |
| | | m_bConnect = TRUE; |
| | |
| | | iAddr+=4; |
| | | memcpy(m_pSharedMemory+iAddr, WriteData, nWORDSize*2); |
| | | |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | //葛电 蔼阑 盲况 持篮 饶 PLCConnector俊霸 PLC 林家俊 蔼阑 利档废 脚龋甫 焊辰促. |
| | | m_pSharedMemory[iStartAddr] = 1; |
| | | return true; |
| | | } |
| | |
| | | break; |
| | | } |
| | | |
| | | //傍蜡 皋葛府俊 拱幅单捞磐甫 佬档废 脚龋甫 焊辰促. |
| | | //傍蜡 皋葛府俊 拱幅单捞磐甫 佬档废 脚龋甫 焊辰促. |
| | | ZeroMemory(m_pSharedMemory+nAddress,(nLength)-(nAddress)); |
| | | memcpy(m_pSharedMemory+nAddress, strAddress,strlength*sizeof(TCHAR)); |
| | | memcpy(m_pSharedMemory+nLength, &nWORDSize,2); |
| | | memset(m_pSharedMemory+nSignal, 0x01, 1); |
| | | |
| | | //单捞磐甫 促 佬绊 傍蜡皋葛府 利阑 锭鳖瘤 扁促赴促. |
| | | //单捞磐甫 促 佬绊 傍蜡皋葛府 利阑 锭鳖瘤 扁促赴促. |
| | | ::WaitForSingleObject(m_ReadEvent,2000); |
| | | |
| | | //肯丰啊 登搁 秦寸 蔼阑 促矫 佬绢柯促. |
| | | //肯丰啊 登搁 秦寸 蔼阑 促矫 佬绢柯促. |
| | | //pData = m_pSharedMemory+PLC_READ_LONGDATA_VALUE; |
| | | |
| | | memcpy(pData, m_pSharedMemory+nValue, nWORDSize*2); |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | // 胶飘傅 -> 16柳荐 |
| | | // 胶飘傅 -> 16柳荐 |
| | | BOOL CControl_Interface_New::StrToHex(CHAR* pchData, CHAR* pchDataSrc, INT nLength, BOOL bWordReverse) |
| | | { |
| | | //static UCHAR saucHex[] = "0123456789ABCDEF"; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Thread_ControlIF.h" |
| | | #include "TransDataManager.h" |
| | | #include "BICommon.h" |
| | | |
| | | // MINI LED EI, NOTCH (狐傅) |
| | | // MINI LED EI, NOTCH (狐傅) |
| | | // #define MINI_LED_PLC_ADDR_SENDSIGNAL 2129 |
| | | // #define MINI_LED_PLC_TRASFERDATA_ADDR 2000 |
| | | // #define MINI_LED_PLC_ADDR_GLASS_JUDEMENT 2100 |
| | | // #define MINI_LED_PLC_ADDR_PROFILE_JUDEMENT 4300 |
| | | |
| | | // EI, NOTCH, RCUT (扁粮 BF) |
| | | // EI, NOTCH, RCUT (扁粮 BF) |
| | | #if MINI_LED |
| | | #define EI_PLC_ADDR_SENDSIGNAL 2129 |
| | | #define EI_PLC_TRASFERDATA_ADDR 2000 |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "InspectCamera.h" |
| | | #include "GlassRecipe.h" |
| | | #include "HardwareSettings.h" |
| | |
| | | #endif // USE_WEBSOCKET |
| | | |
| | | #define BOUNDARY_GLASSSTARTWIDTH 160 |
| | | #define BOUNDARYHORIZ_LEVELDIST 8 // 荐乞 版拌急阑 茫阑 锭狼 厚背芭府 |
| | | #define BOUNDARYHORIZ_LEVELDIST 8 // 수평 경계선을 찾을 때의 비교거리 |
| | | #define TIME_WAIT_GLASS_START 3000 |
| | | |
| | | #define align_4byte(in) ((in + 3)/4)*4 |
| | |
| | | if(m_bFindGlassStart[stFrame.nScanIdx] == TRUE) |
| | | return ERR_FINDGLASSSTART_SUCCESS; |
| | | |
| | | // 磊悼老锭 橇饭烙 荐甫 面盒洒 棱栏搁 巩力啊 救登绰芭 鞍促父... 橇饭烙 荐啊 何练窍搁 咯扁辑 公茄栏肺 吧覆.. 弊府绊 矫累急 茫疽栏搁 弊成 逞绢啊搁 登瘤 臼唱? |
| | | // 자동일때 프레임 수를 충분히 잡으면 문제가 안되는거 같다만... 프레임 수가 부족하면 여기서 무한으로 걸림.. 그리고 시작선 찾았으면 그냥 넘어가면 되지 않나? |
| | | if(m_pGrabber->GetGrabFrameCount() < 1) |
| | | { |
| | | Sleep(0); |
| | |
| | | |
| | | while(TRUE) |
| | | { |
| | | Sleep(1); // Sleep 1肺 吧绢拎具 茄促... 0栏肺 吧搁 八荤啊 救瞪嫐啊 乐澜.. 恐? |
| | | Sleep(1); // Sleep 1로 걸어줘야 한다... 0으로 걸면 검사가 안될가 있음.. 왜? |
| | | |
| | | if(GetCheckExit() == TRUE) |
| | | { |
| | |
| | | break; |
| | | } |
| | | |
| | | // 1. 0锅 Thread肺 Start Line 茫扁 |
| | | // 1. 0번 Thread로 Start Line 찾기 |
| | | int iRetScan; |
| | | switch(IsGlassStartLine(iThread,iRetScan)) |
| | | { |
| | |
| | | break; |
| | | } |
| | | |
| | | // 2. Start Line阑 茫疽栏搁, 茄橇饭烙究 波郴辑 八荤 矫累 |
| | | // 2. Start Line을 찾았으면, 한프레임씩 꺼내서 검사 시작 |
| | | stFrameIndex stFrame = m_pGrabber->GetGrabFrame(); |
| | | if(stFrame.nScanIdx < 0 || stFrame.nFrameIdx < 0) |
| | | continue; |
| | |
| | | |
| | | m_pGlassData->GetSideData(emDim)->SetFrameProc(stFrame.nFrameIdx); |
| | | |
| | | // 3. Start Line Frame 焊促 捞傈牢瘤 眉农.. |
| | | // 3. Start Line Frame 보다 이전인지 체크.. |
| | | if(CheckStartLineFrame(emDim,stFrame.nFrameIdx) == FALSE) |
| | | { |
| | | g_pLog->DisplayMessage(_T("Check Start Line Frame.. %s : %d"),g_SideName[(int) emDim], stFrame.nFrameIdx); |
| | |
| | | pBlSideData->m_mBotMark.y = pSideData->m_ptBotMark_FindResult.y; |
| | | } |
| | | |
| | | //添加此功能 |
| | | //警속늪묘콘 |
| | | pBlSideData->m_nStartLine = pSideData->m_nGlassStartLine; |
| | | pBlSideData->m_nEndLine = pSideData->m_nGlassEndLine; |
| | | pBlSideData->m_vDispVisionResult.clear(); |
| | |
| | | for (int i = 0; i < ngNum; i++) { |
| | | NgInfo ng = ngArray[i]; |
| | | |
| | | //if (ng.isRes) continue; //结果OK,继续 |
| | | //这里添加结果 |
| | | //if (ng.isRes) continue; //써벎OK,셨崎 |
| | | //侶쟁警속써벎 |
| | | |
| | | if (5 == ng.ngType && (ng.result < ng.minValue || ng.result > ng.maxValue)) |
| | | { |
| | |
| | | |
| | | BOOL CInspectCamera::CheckThreadEnd(int iThread,stFrameIndex stFrame) |
| | | { |
| | | int iScan = stFrame.nScanIdx; |
| | | |
| | | CSingleLock myLoc(&m_csThreadEnd); |
| | | myLoc.Lock(); |
| | | |
| | | // 捞固 场抄 Thread.. |
| | | if(m_iThreadEnd[iScan][iThread] == 1) |
| | | { |
| | | int iScan = stFrame.nScanIdx; |
| | | if (m_iThreadEnd[iScan][iThread] == 1) { |
| | | myLoc.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | BOOL bEnd = FALSE; |
| | | |
| | | if(CheckProcessEnd(iThread,stFrame) == TRUE) |
| | | { |
| | | if (CheckProcessEnd(iThread, stFrame) == TRUE) { |
| | | m_iThreadEnd[iScan][iThread] = 1; |
| | | bEnd = TRUE; |
| | | myLoc.Unlock(); |
| | | } |
| | | |
| | | if(bEnd == TRUE) |
| | | { |
| | | if (bEnd == TRUE) { |
| | | DimensionDir emDim = GetDimension(iScan); |
| | | |
| | | m_pGlassData->GetSideData(emDim)->m_bInspection_Complete = TRUE; |
| | | |
| | | g_pLog->DisplayMessage(_T("%s Thread %d Process End : Scan %d, Frame %d"),PANEL_SIDE[emDim],iThread,iScan,stFrame.nFrameIdx); |
| | | |
| | | if(GetThreadEndCount(iScan) == MAX_THREAD) |
| | | { |
| | | if (GetThreadEndCount(iScan) == MAX_THREAD) { |
| | | myLoc.Lock(); |
| | | SaveFullImageCopy(iScan); |
| | | myLoc.Unlock(); |
| | |
| | | g_pLog->DisplayMessage(_T("%s Scan Process All End"),PANEL_SIDE[emDim]); |
| | | |
| | | FinallyVisionProc(emDim); |
| | | if(m_pII2S != NULL) |
| | | if (m_pII2S != NULL) { |
| | | m_pII2S->II2S_InspectionEnd(m_iCamera,iScan); |
| | | |
| | | /* |
| | | // Waiting All Frame Finish.. |
| | | DWORD dwTickCount = GetTickCount(); |
| | | while(GetTickCount() - dwTickCount < 5000) |
| | | { |
| | | if(CheckAllFrameFinish(iScan) == TRUE) |
| | | break; |
| | | } |
| | | */ |
| | | |
| | | //m_MsgJob.nState = 2; |
| | | //m_MsgJob.nSide = (int)emDim; |
| | | //m_MsgJob.nDispLine = stFrame.nFrameIdx * m_nFrameHeight; |
| | | //::SendMessage(m_hWndViewScan, WM_POCESS_STATUS,(WPARAM)&m_MsgJob, (int)emDim); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | m_nFrameFinishIdx[nCurrentScanIdx] = -1; |
| | | |
| | | for(int i=0; i<MAX_FRAM_COUNT; i++) |
| | | for (int i = 0; i < MAX_FRAM_COUNT; i++) { |
| | | m_bFrameFinish[nCurrentScanIdx][i] = FALSE; |
| | | } |
| | | |
| | | cslocalLock.Unlock(); |
| | | } |
| | |
| | | CSingleLock cslocalLock(&m_csFrameFinishCheck); |
| | | cslocalLock.Lock(); |
| | | |
| | | if(m_nFrameFinishIdx[nCurrentScanIdx] == -1) |
| | | if (m_nFrameFinishIdx[nCurrentScanIdx] == -1) { |
| | | cslocalLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | for(int i=0; i<m_nFrameFinishIdx[nCurrentScanIdx]; i++) |
| | | if(m_bFrameFinish[nCurrentScanIdx][i] == FALSE) |
| | | for (int i = 0; i < m_nFrameFinishIdx[nCurrentScanIdx]; i++) { |
| | | if (m_bFrameFinish[nCurrentScanIdx][i] == FALSE) { |
| | | cslocalLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | } |
| | | |
| | | cslocalLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | |
| | |
| | | double dRotate_X_pxl = sin(dRotateArea_T_Rad) * dMarkToArea_Distance_pxl * dDirection; |
| | | double dRotate_Y_pxl = cos(dRotateArea_T_Rad) * dMarkToArea_Distance_pxl * dDirection; |
| | | |
| | | bRotateArea.left = bRotateArea.right = (int) ptFind_TopMark.x + dRotate_X_pxl; |
| | | bRotateArea.top = bRotateArea.bottom = (int) ptFind_TopMark.y + dRotate_Y_pxl; |
| | | bRotateArea.left = bRotateArea.right = ptFind_TopMark.x + (LONG)dRotate_X_pxl; |
| | | bRotateArea.top = bRotateArea.bottom = ptFind_TopMark.y + (LONG)dRotate_Y_pxl; |
| | | |
| | | bRotateArea.InflateRect(rtSetArea.Width()/2, rtSetArea.Height()/2); |
| | | |
| | |
| | | |
| | | void CInspectCamera::SaveDebugImage(DimensionDir eDim, stFrameIndex stFrame, cv::Mat image, CString strFileName) |
| | | { |
| | | if (m_pHardparm == NULL) |
| | | if (m_pHardparm == NULL) { |
| | | return; |
| | | } |
| | | |
| | | if (m_pHardparm->m_bUse_SaveDebugImage == FALSE) |
| | | if (m_pHardparm->m_bUse_SaveDebugImage == FALSE) { |
| | | return; |
| | | } |
| | | |
| | | // #ifdef _DEBUG |
| | | if (image.empty() || image.data == NULL) |
| | | if (image.empty() || image.data == NULL) { |
| | | return; |
| | | } |
| | | |
| | | CString str; |
| | | str.Format(_T("D:\\Inspection\\DebugFullImg\\%s_Side[%s]_Frame[%d].jpg"), strFileName, GetSideName(eDim), stFrame.nFrameIdx); |
| | | |
| | | try |
| | | { |
| | | try { |
| | | g_pStatus->CheckDirectory(str); |
| | | |
| | | USES_CONVERSION; |
| | |
| | | std::string filePath(asciiStr); |
| | | cv::imwrite(filePath, image); |
| | | } |
| | | catch (...) |
| | | { |
| | | catch (...) { |
| | | g_pLog->DisplayMessage(_T("SaveDebugImage error...")); |
| | | } |
| | | |
| | |
| | | |
| | | void CInspectCamera::SaveFullImageCopy(int iScan) |
| | | { |
| | | // 4/17 |
| | | // 畴飘合 皋葛府啊 叠妨辑 促款登绰淀.. |
| | | // return; |
| | | if (m_pGlassData == NULL) { |
| | | return; |
| | | } |
| | | |
| | | if(m_pGlassData == NULL) |
| | | if (m_pGrabber == NULL) { |
| | | return; |
| | | if(m_pGrabber == NULL) |
| | | return; |
| | | } |
| | | |
| | | CSingleLock cLock(&m_csSaveimage); |
| | | cLock.Lock(); |
| | |
| | | DimensionDir eDim = GetDimension(iScan); |
| | | |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(eDim); |
| | | if(pSideData == NULL) |
| | | if (pSideData == NULL) { |
| | | cLock.Unlock(); |
| | | return; |
| | | } |
| | | |
| | | int nSetEnd = (pSideData->m_nGlassEndLine <= 0) ? pSideData->m_nPreGlassEndLine : pSideData->m_nGlassEndLine; |
| | | int nOffset = 1000; |
| | |
| | | |
| | | g_pLog->DisplayMessage(_T("%s Copy Full Image : nStartLine=%d, nEndLine=%d, nFullSize=%d"), PANEL_SIDE[eDim], nStartLine, nEndLine, nFullSize); |
| | | |
| | | if(nStartLine < 0) |
| | | { |
| | | if (nStartLine < 0) { |
| | | nStartLine = 0; |
| | | } |
| | | |
| | | if(nFullSize <= 0 || nEndLine < 0) |
| | | if (nFullSize <= 0 || nEndLine < 0) { |
| | | cLock.Unlock(); |
| | | return; |
| | | } |
| | | |
| | | //if(nFullSize <= nStartLine) |
| | | // return; |
| | | if (nFullSize <= nStartLine) { |
| | | cLock.Unlock(); |
| | | return; |
| | | } |
| | | |
| | | pINSPECTFULLIMAGE_BUFFER pImgBuf = GetFullImgBuffer(iScan); |
| | | int nFrameWidth,nFrameHeight; |
| | | |
| | | GetFrameSize(m_iCamera,iScan,nFrameWidth,nFrameHeight); |
| | | |
| | | if(nFrameWidth <= 0 || nFrameHeight <= 0) |
| | | if (nFrameWidth <= 0 || nFrameHeight <= 0) { |
| | | cLock.Unlock(); |
| | | return; |
| | | } |
| | | |
| | | if(nFullSize/nFrameHeight > m_pGrabber->GetFrameBuffer()->GetFrameCount()) |
| | | if (nFullSize / nFrameHeight > m_pGrabber->GetFrameBuffer()->GetFrameCount()) { |
| | | nFullSize = (m_pGrabber->GetFrameBuffer()->GetFrameCount()-1)*nFrameHeight; |
| | | } |
| | | |
| | | if(nFullSize <= 100) |
| | | if (nFullSize <= 100) { |
| | | cLock.Unlock(); |
| | | return; |
| | | } |
| | | |
| | | pImgBuf->iCamIdx = m_iCamera; |
| | | pImgBuf->iScanIdx = iScan; |
| | |
| | | g_pLog->DisplayMessage(_T("%s Full Image Memory Copy Start : Start[%d]-End[%d]"),PANEL_SIDE[eDim],nStartLine,nEndLine); |
| | | |
| | | LPBYTE lpHeader = m_pGrabber->GetFrameHeaderLine(iScan,nStartLine); |
| | | if(lpHeader == NULL) |
| | | { |
| | | if (lpHeader == NULL) { |
| | | cLock.Unlock(); |
| | | g_pLog->DisplayMessage(_T("%s Full Image Memory Copy fail : Start[%d]-End[%d]"),PANEL_SIDE[eDim],nStartLine,nEndLine); |
| | | return; |
| | | } |
| | |
| | | if(pSideData->m_nPreGlassEndFrame+MAX_THREAD <= stFrame.nFrameIdx) |
| | | return TRUE; |
| | | |
| | | // Glass End Line阑 茫绰 Thread 鳖瘤 柳青 吝捞搁 促 场抄芭瘤.. |
| | | // Glass End Line을 찾는 Thread 까지 진행 중이면 다 끝난거지.. |
| | | if(pSideData->m_bFindGlassEndLine == TRUE || pSideData->GetFrameProc(pSideData->m_nPreGlassEndFrame) == TRUE) |
| | | return TRUE; |
| | | |
| | |
| | | ::SendMessage(m_hWndViewScan, WM_POCESS_STATUS,(WPARAM)&m_MsgJob, (int)emDim); |
| | | |
| | | #define BOUNDARY_GLASSSTARTWIDTH_ENDLINE 140 |
| | | #define BOUNDARYHORIZ_LEVELDIST_ENDLINE 50 // 荐乞 版拌急阑 茫阑 锭狼 厚背芭府 |
| | | #define BOUNDARYHORIZ_LEVELDIST_ENDLINE 50 // 수평 경계선을 찾을 때의 비교거리 |
| | | |
| | | int nFrameWidth = m_nFrameWidth; |
| | | int nFrameHeight = m_nFrameHeight; |
| | |
| | | |
| | | if (j <= (pVertBuffer.GetHeight()-1-BOUNDARYHORIZ_LEVELDIST_ENDLINE)) |
| | | { |
| | | if(pnSum[j + BOUNDARYHORIZ_LEVELDIST_ENDLINE] == 0 || pnSum[j] == 0) // 肋 给 等 捞固瘤.. |
| | | if (pnSum[j + BOUNDARYHORIZ_LEVELDIST_ENDLINE] == 0 || pnSum[j] == 0) // 잘 못 된 이미지.. |
| | | continue; |
| | | |
| | | nGab = abs(pnSum[j + BOUNDARYHORIZ_LEVELDIST_ENDLINE] - pnSum[j]); |
| | |
| | | |
| | | if (nCountinueCount >= 2) |
| | | { |
| | | // Glass狼 矫累瘤痢阑 茫酒辑 备炼眉俊 持绰促. |
| | | // Glass의 시작지점을 찾아서 구조체에 넣는다. |
| | | pSideData->m_nGlassEndLine = nStartFrame*nFrameHeight + j + 2; |
| | | pSideData->m_nGlassEndFrame = pSideData->m_nGlassEndLine/nFrameHeight; |
| | | pSideData->m_bFindGlassEndLine = TRUE; |
| | |
| | | pSideData->m_nSideLineFrame[stFrame.nFrameIdx] = nFindLine; |
| | | pSideData->m_nSideLinePosY[stFrame.nFrameIdx] = rtROI.CenterPoint().y + nFrameYPos; |
| | | |
| | | // Side 茫绊, Chamfer 茫绰芭 眠啊 鞘夸... |
| | | // Side 찾고, Chamfer 찾는거 추가 필요... |
| | | pSideData->m_nSide_Chamfer_LineFrame[stFrame.nFrameIdx] = nFindLine + 0; |
| | | |
| | | g_pLog->DisplayMessage(_T("Find Side Line Frame[%d], Side[%d]"), stFrame.nFrameIdx, nFindLine); |
| | |
| | | { |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(emDim); |
| | | |
| | | if(pSideData == NULL) |
| | | { |
| | | if (pSideData == NULL) { |
| | | g_pLog->DisplayMessage(_T("Side Line Find Fail - Glass Data or HW Setting Error")); |
| | | return FALSE; |
| | | } |
| | |
| | | CRect rtROI; |
| | | rtROI.IntersectRect(rtFrame_pxl, rtAllSide_pxl); |
| | | |
| | | if(rtROI.IsRectEmpty() || rtROI.IsRectNull()) |
| | | if (rtROI.IsRectEmpty() || rtROI.IsRectNull()) { |
| | | return FALSE; |
| | | } |
| | | |
| | | // 4. Exception Notch Area... |
| | | std::vector<CRect> vectorInspectAreaList_New; |
| | |
| | | |
| | | std::vector<CRect> vecInspectArea; |
| | | |
| | | for(int i=0; i<nNotchCount; i++) |
| | | { |
| | | for (int i = 0; i < nNotchCount; i++) { |
| | | CRect rtNotchArea = pSideData->m_rtNotchArea_pxl[i]; |
| | | rtNotchArea.left = GetLeftMargin(m_iCamera,stFrame.nScanIdx); |
| | | rtNotchArea.right = m_nFrameWidth-1; |
| | |
| | | std::copy(vectorInspectAreaList_New.begin(), vectorInspectAreaList_New.end(), vectorInspectAreaList_Old.begin()); |
| | | vectorInspectAreaList_New.clear(); |
| | | |
| | | for(int j=0; j<vectorInspectAreaList_Old.size(); j++) |
| | | { |
| | | for (int j = 0; j < vectorInspectAreaList_Old.size(); j++) { |
| | | CRect rtTemp = vectorInspectAreaList_Old[j]; |
| | | |
| | | CRect rtNotchInterSectRect; |
| | | rtNotchInterSectRect.IntersectRect(rtTemp, rtNotchArea); |
| | | |
| | | if(rtNotchInterSectRect.IsRectEmpty() || rtNotchInterSectRect.IsRectNull()) // 畴摹啊 救吧府绰 版快俊绰 促矫 持绢霖促.. |
| | | { |
| | | if (rtNotchInterSectRect.IsRectEmpty() || rtNotchInterSectRect.IsRectNull()) { |
| | | vectorInspectAreaList_New.push_back(rtTemp); |
| | | continue; |
| | | } |
| | | |
| | | if(rtTemp.Height() == rtNotchInterSectRect.Height()) // Notch啊 康开狼 傈眉牢 版快 |
| | | if (rtTemp.Height() == rtNotchInterSectRect.Height()) { |
| | | continue; |
| | | } |
| | | |
| | | if(rtTemp.top == rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 1. Notch Frame 困俊 吧赴 版快 |
| | | { |
| | | if (rtTemp.top == rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) { |
| | | CRect rtNew = rtTemp; |
| | | rtNew.top = rtNotchInterSectRect.bottom; |
| | | vectorInspectAreaList_New.push_back(rtNew); |
| | | } |
| | | else if(rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 2. Notch Frame 吝埃俊 吧赴 版快 |
| | | { |
| | | else if (rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) { |
| | | CRect rtNewTop = rtTemp; |
| | | rtNewTop.top = rtNotchInterSectRect.bottom; |
| | | vectorInspectAreaList_New.push_back(rtNewTop); |
| | |
| | | rtNewBot.bottom = rtNotchInterSectRect.top; |
| | | vectorInspectAreaList_New.push_back(rtNewBot); |
| | | } |
| | | else if(rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom == rtTemp.bottom) // 3. Notch Frame 酒贰俊 吧赴 版快 |
| | | { |
| | | else if (rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom == rtTemp.bottom) { |
| | | CRect rtNew = rtTemp; |
| | | rtNew.bottom = rtNotchInterSectRect.top; |
| | | vectorInspectAreaList_New.push_back(rtNew); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 5. Side List.. |
| | | vecInspectArea.clear(); |
| | | |
| | | for(int i=0; i<vectorInspectAreaList_New.size(); i++) |
| | | { |
| | | for (int i = 0; i < vectorInspectAreaList_New.size(); i++) { |
| | | CRect rtInspectArea = vectorInspectAreaList_New[i]; |
| | | vecInspectArea.push_back(rtInspectArea); |
| | | } |
| | |
| | | #endif |
| | | |
| | | int stepSide = m_pGrabber->GetFrameBuffer()->GetFrameHeight(); |
| | | |
| | | for(int i=0; i<vecInspectArea.size(); i++) |
| | | { |
| | | for (int i = 0; i < vecInspectArea.size(); i++) { |
| | | CSISBuffer frameBuffer(m_pGrabber->GetFrameHeaderLine(stFrame.nScanIdx, vecInspectArea[i].top),nFrameWidth,vecInspectArea[i].Height()); |
| | | |
| | | if(frameBuffer.IsValidBuffer() == FALSE) |
| | | if (frameBuffer.IsValidBuffer() == FALSE) { |
| | | continue; |
| | | } |
| | | |
| | | #ifdef _DEBUG |
| | | CString str; |
| | |
| | | CRect rtFindROI = vecInspectArea[i]; |
| | | rtFindROI.OffsetRect(0, -rtFindROI.top); |
| | | |
| | | if(nSearchHeight < rtFindROI.Height()) |
| | | { |
| | | if (nSearchHeight < rtFindROI.Height()) { |
| | | CPoint ptCenter = rtFindROI.CenterPoint(); |
| | | rtFindROI.top = ptCenter.y - (nSearchHeight/2); |
| | | rtFindROI.bottom = ptCenter.y + (nSearchHeight/2); |
| | |
| | | int nSideLine = -1; |
| | | EdgeFind.FindEdge_ToRightROI(&frameBuffer,nSideLine,DEFECT_EDGE_AUTO_PITCH,nThres,DEFECT_EDGE_AUTO_RATIO,0,rtFindROI); |
| | | |
| | | if(nSideLine != -1) |
| | | { |
| | | if (nSideLine != -1) { |
| | | #if HALCON_VISION_KEY |
| | | if (NULL != pBlSideData){ |
| | | SideLineInf inf; |
| | |
| | | int idx = (int)(vecInspectArea[i].top / stepSide); |
| | | pBlSideData->m_mapSideLineInf[idx] = inf; |
| | | |
| | | //打印边界数据 |
| | | //댔丹긋썹鑒앴 |
| | | //Log_GetDebug()->TraceInfo("Find Side Line %d: %d, %d, (%d, %d, %d, %d), %d", |
| | | // idx, |
| | | // inf.nSideLine, inf.nThres, |
| | |
| | | chamferIns.Binarization(frameBuffer,ImgInsBin,nChamferLineThres); |
| | | |
| | | chamferIns.FindRightLine_Bin(ImgInsBin,nSideLine,dLine); |
| | | if(dLine != -1) |
| | | { |
| | | if (dLine != -1) { |
| | | nFindSideChamferLineSum += (int)dLine; |
| | | nFindSideChamferLineCount++; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(nFindSideLineCount > 0) |
| | | { |
| | | int nAvgSideLine = (int) (nFindSideLineSum / nFindSideLineCount); // Average.. |
| | | if (nFindSideLineCount > 0) { |
| | | int nAvgSideLine = (int)(nFindSideLineSum / nFindSideLineCount); |
| | | m_iSideLine[stFrame.nScanIdx] = nAvgSideLine; |
| | | pSideData->m_nSideLineFrame[stFrame.nFrameIdx] = nAvgSideLine; |
| | | pSideData->m_nSideLinePosY[stFrame.nFrameIdx] = rtROI.CenterPoint().y + nFrameYPos; |
| | | } |
| | | |
| | | if(nFindSideChamferLineCount > 0) |
| | | { |
| | | if (nFindSideChamferLineCount > 0) { |
| | | int nAvgChamferLine = (int) (nFindSideChamferLineSum / nFindSideChamferLineCount); // Average.. |
| | | pSideData->m_nSide_Chamfer_LineFrame[stFrame.nFrameIdx] = nAvgChamferLine; // Chamfer Line |
| | | } |
| | |
| | | CSingleLock localLock(&m_csTopCorner); |
| | | localLock.Lock(); |
| | | |
| | | if(m_pGlassData == NULL) |
| | | if (m_pGlassData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(emDim); |
| | | CSIDE_PARM* pSideParam = &m_pRecipe->m_SideParam[(int) emDim]; |
| | | |
| | | if(pSideData == NULL || pSideParam == NULL) |
| | | if (pSideData == NULL || pSideParam == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bFindGlassStartLine == FALSE) |
| | | if (pSideData->m_bFindGlassStartLine == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bTopCorner_Find == TRUE) |
| | | if (pSideData->m_bTopCorner_Find == TRUE) { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | |
| | | /* |
| | | BOOL bTopCornerUse = (BOOL) (m_pRecipe->m_SideParam[emDim].m_nTopCornerShape == 0) ? FALSE : TRUE; |
| | | |
| | | // Not Use Corner Inspection |
| | | if(bTopCornerUse == FALSE) |
| | | if (bTopCornerUse == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | */ |
| | | } |
| | | |
| | | double dCornerSizeY_Um = (double) m_pRecipe->m_SideParam[emDim].m_nTopCornerSizeY_um; |
| | | |
| | | int nCornerSizeY_Pixel = (int) GetUmToPixel_Y(dCornerSizeY_Um); |
| | | |
| | | int nFrameHeight = m_nFrameHeight; |
| | | |
| | | int nFindStartLine = pSideData->m_nGlassStartLine; |
| | | |
| | | int nTopCornerFrameIndex = (nFindStartLine + nCornerSizeY_Pixel) / nFrameHeight; |
| | | |
| | | if(stFrame.nFrameIdx < nTopCornerFrameIndex+1) |
| | | if (stFrame.nFrameIdx < nTopCornerFrameIndex + 1) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | int nSideLine = pSideData->m_nSideLineFrame[nTopCornerFrameIndex+1]; |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nTopCornerFrameIndex + 1]; |
| | | |
| | | if(nSideLine == -1) |
| | | if (nSideLine == -1) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | double dCornerSizeX_Um = (double) m_pRecipe->m_SideParam[emDim].m_nTopCornerSizeX_um; |
| | | |
| | | int nCornerSizeX_Pixel = (int) GetUmToPixel_X(dCornerSizeX_Um); |
| | | |
| | | CRect rtTopCornerArea(0, 0, nCornerSizeX_Pixel, nCornerSizeY_Pixel); |
| | | |
| | | rtTopCornerArea.OffsetRect(nSideLine, nFindStartLine); |
| | | |
| | | pSideData->m_bTopCorner_Find = TRUE; |
| | |
| | | int nTopCornerType = m_pRecipe->m_SideParam[emDim].m_nTopCornerShape; |
| | | pSideData->m_nTopCornerShape = m_pRecipe->m_SideParam[emDim].m_nTopCornerShape;; |
| | | |
| | | if(pSideParam->m_bTopCornerFindDefect == FALSE) |
| | | if (pSideParam->m_bTopCornerFindDefect == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | localLock.Unlock(); |
| | | |
| | | if(nTopCornerType == (int) 1) return FindTopCorner_CCut(iThread, emDim, stFrame); |
| | | else if(nTopCornerType == (int) 2) return FindTopCorner_RCut(iThread, emDim, stFrame); |
| | |
| | | CSingleLock localLock(&m_csThreadTopAlignMark); |
| | | localLock.Lock(); |
| | | |
| | | if(m_pGlassData == NULL) |
| | | if (m_pGlassData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(eDim); |
| | | |
| | | if(pSideData == NULL) |
| | | if (pSideData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bFindGlassStartLine == FALSE) |
| | | if (pSideData->m_bFindGlassStartLine == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bTopMark_Find == TRUE) |
| | | if (pSideData->m_bTopMark_Find == TRUE) { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | |
| | | if(pSideData->m_bTopCorner_Find == FALSE) |
| | | if (pSideData->m_bTopCorner_Find == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | BOOL bTopAlignMark = (BOOL) (m_pRecipe->m_SideParam[eDim].m_bTopMark_Use == 1) ? TRUE : FALSE; |
| | | |
| | | if(bTopAlignMark == FALSE) |
| | | if (bTopAlignMark == FALSE) { |
| | | localLock.Unlock(); |
| | | return FindTopAlignMark_Virtual(iThread, eDim, stFrame); |
| | | else |
| | | { |
| | | if(FindTopAlignMark_TempleteMatching(iThread, eDim, stFrame) == FALSE) |
| | | } |
| | | else { |
| | | if (FindTopAlignMark_TempleteMatching(iThread, eDim, stFrame) == FALSE) { |
| | | localLock.Unlock(); |
| | | return FindTopAlignMark_Virtual(iThread, eDim, stFrame); |
| | | else |
| | | } |
| | | else { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if((int) stFrame.nFrameIdx < nTopAlignMarkYPramIdx + 1) |
| | | return FALSE; |
| | | |
| | | int nSideLine = pSideData->m_nSideLineFrame[nTopAlignMarkYPramIdx + 1]; |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nTopAlignMarkYPramIdx + 1]; |
| | | double nEdgeToTopAlignMarkX_Um = m_pRecipe->m_SideParam[eDim].m_nTopMarkToEdgeX_um; |
| | | int nEdgeToTopAlignMarkX_Pixel = (int) GetUmToPixel_X(nEdgeToTopAlignMarkX_Um); |
| | | int nTopAlignMarkX_Pixel = nSideLine + nEdgeToTopAlignMarkX_Pixel; |
| | |
| | | if((int) stFrame.nFrameIdx < nTopAlignMarkYPramIdx + 1) |
| | | return FALSE; |
| | | |
| | | int nSideLine = pSideData->m_nSideLineFrame[nTopAlignMarkYPramIdx + 1]; |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nTopAlignMarkYPramIdx + 1]; |
| | | |
| | | if(nSideLine <= 0) |
| | | { |
| | |
| | | CSingleLock localLock(&m_csBotCorner); |
| | | localLock.Lock(); |
| | | |
| | | if(m_pGlassData == NULL) |
| | | if (m_pGlassData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(emDim); |
| | | CSIDE_PARM* pSideParam = &m_pRecipe->m_SideParam[(int) emDim]; |
| | | |
| | | if(pSideData == NULL || pSideParam == NULL) |
| | | if (pSideData == NULL || pSideParam == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if (pSideData->m_bFindGlassStartLine == FALSE || pSideData->m_bFindGlassEndLine == FALSE) |
| | | if (pSideData->m_bFindGlassStartLine == FALSE || pSideData->m_bFindGlassEndLine == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bBotCorner_Find == TRUE) |
| | | if (pSideData->m_bBotCorner_Find == TRUE) { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | |
| | | /* |
| | | BOOL bBotCornerUse = (BOOL) (m_pRecipe->m_SideParam[emDim].m_nBottomCornerShape == 0) ? FALSE : TRUE; |
| | | |
| | | if(bBotCornerUse == FALSE) |
| | | if (bBotCornerUse == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | */ |
| | | } |
| | | |
| | | double dCornerSizeY_Um = (double) m_pRecipe->m_SideParam[emDim].m_nBottomCornerSizeY_um; |
| | | |
| | | int nCornerSizeY_Pixel = (int) GetUmToPixel_Y(dCornerSizeY_Um); |
| | | |
| | | int nFrameHeight = m_nFrameHeight; |
| | | |
| | | int nFindBottomLine = (pSideData->m_bFindGlassEndLine == TRUE) ? pSideData->m_nGlassEndLine : pSideData->m_nPreGlassEndLine; |
| | | |
| | | int nBottomCornerFrameIndex = (nFindBottomLine - nCornerSizeY_Pixel) / nFrameHeight; |
| | | |
| | | if((int) stFrame.nFrameIdx < nBottomCornerFrameIndex) |
| | | if ((int)stFrame.nFrameIdx < nBottomCornerFrameIndex) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 澜.. 内呈 Side 扼牢捞 捞傈 橇饭烙俊 乐栏搁 绢录瘤.. 茄搁俊 Thread 啊 咯矾俺 倒搁?... 困 橇饭烙狼 Thread 啊 酒流 Side 扼牢阑 给茫疽栏搁.. 绊刮 粱 秦焊磊.. |
| | | // 荤捞靛喊 Thread绰 窍唱父 倒绊 八荤 Thread甫 咯矾俺 倒府绰 备炼肺 官层具摆促 |
| | | int nSideLine = pSideData->m_nSideLineFrame[nBottomCornerFrameIndex]; |
| | | nSideLine = (nSideLine == -1) ? pSideData->m_nSideLineFrame[nBottomCornerFrameIndex] : nSideLine; |
| | | // 음.. 코너 Side 라인이 이전 프레임에 있으면 어쩌지.. 한면에 Thread 가 여러개 돌면?... 위 프레임의 Thread 가 아직 Side 라인을 못찾았으면.. 고민 좀 해보자.. |
| | | // 사이드별 Thread는 하나만 돌고 검사 Thread를 여러개 돌리는 구조로 바꿔야겠다 |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nBottomCornerFrameIndex]; |
| | | nSideLine = (nSideLine == -1) ? (int)pSideData->m_nSideLineFrame[nBottomCornerFrameIndex] : nSideLine; |
| | | |
| | | if(nSideLine == -1) |
| | | if (nSideLine == -1) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | double dCornerSizeX_Um = (double) m_pRecipe->m_SideParam[emDim].m_nBottomCornerSizeX_um; |
| | | |
| | | int nCornerSizeX_Pixel = (int) GetUmToPixel_X(dCornerSizeX_Um); |
| | | |
| | | CRect rtBottomCornerArea(0, 0, nCornerSizeX_Pixel, nCornerSizeY_Pixel); |
| | | |
| | | rtBottomCornerArea.OffsetRect(nSideLine, nFindBottomLine-nCornerSizeY_Pixel); |
| | | |
| | | pSideData->m_bBotCorner_Find = TRUE; |
| | |
| | | |
| | | int nBottomCornerType = m_pRecipe->m_SideParam[emDim].m_nBottomCornerShape; |
| | | |
| | | if(pSideParam->m_bBottomCornerFindDefect == FALSE) |
| | | if (pSideParam->m_bBottomCornerFindDefect == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | localLock.Unlock(); |
| | | |
| | | if(nBottomCornerType == (int) 1) return FindBotCorner_CCut(iThread, emDim, stFrame); |
| | | else if(nBottomCornerType == (int) 2) return FindBotCorner_RCut(iThread, emDim, stFrame); |
| | |
| | | CSingleLock localLock(&m_csThreadBotAlignMark); |
| | | localLock.Lock(); |
| | | |
| | | if(m_pGlassData == NULL) |
| | | if (m_pGlassData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | CSide_Data* pSideData = m_pGlassData->GetSideData(eDim); |
| | | |
| | | if(pSideData == NULL) |
| | | if (pSideData == NULL) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | //if(pSideData->m_bBotCorner_Find == FALSE) |
| | | // return FALSE; |
| | | if (pSideData->m_bBotCorner_Find == FALSE) { |
| | | localLock.Unlock(); |
| | | return FALSE; |
| | | } |
| | | |
| | | if(pSideData->m_bBotMark_Find == TRUE) |
| | | if (pSideData->m_bBotMark_Find == TRUE) { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL bBotAlignMark = (BOOL) (m_pRecipe->m_SideParam[eDim].m_bBottomMark_Use == 1) ? TRUE : FALSE; |
| | | |
| | | if(bBotAlignMark == FALSE) |
| | | if (bBotAlignMark == FALSE) { |
| | | localLock.Unlock(); |
| | | return FindBotAlignMark_Virtual(iThread, eDim, stFrame); |
| | | else |
| | | { |
| | | if(FindBotAlignMark_TempleteMatching(iThread, eDim, stFrame) == FALSE) |
| | | } |
| | | else { |
| | | if (FindBotAlignMark_TempleteMatching(iThread, eDim, stFrame) == FALSE) { |
| | | localLock.Unlock(); |
| | | return FindBotAlignMark_Virtual(iThread, eDim, stFrame); |
| | | else |
| | | } |
| | | else { |
| | | localLock.Unlock(); |
| | | return TRUE; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if((int) stFrame.nFrameIdx < nGlassEndLineFrame) |
| | | return FALSE; |
| | | |
| | | int nSideLine = pSideData->m_nSideLineFrame[nBottomCornerTopFrameIndex]; |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nBottomCornerTopFrameIndex]; |
| | | double nEdgeToBotAlignMarkX_Um = m_pRecipe->m_SideParam[eDim].m_nBottomMarkToEdgeX_um; |
| | | int nEdgeToBotAlignMarkX_Pixel = (int) GetUmToPixel_X(nEdgeToBotAlignMarkX_Um); |
| | | int nBottomAlignMarkX_Pixel = nSideLine + nEdgeToBotAlignMarkX_Pixel; |
| | |
| | | if((int) stFrame.nFrameIdx < nGlassEndLineFrame) |
| | | return FALSE; |
| | | |
| | | int nSideLine = pSideData->m_nSideLineFrame[nBottomCornerTopFrameIndex]; |
| | | int nSideLine = (int)pSideData->m_nSideLineFrame[nBottomCornerTopFrameIndex]; |
| | | if(nSideLine <= 0) |
| | | { |
| | | CRect rectSide = CRect(0,nBottomAlignMarkY_Pixel,nFrameWidth-1,nBottomAlignMarkY_Pixel); |
| | |
| | | if(pSideData == NULL) |
| | | return FALSE; |
| | | |
| | | if(pSideData->m_nSideLineFrame[iFrame] < 0) // Side Line阑 给茫篮 版快.. |
| | | if (pSideData->m_nSideLineFrame[iFrame] < 0) // Side Line을 못찾은 경우.. |
| | | return FALSE; |
| | | |
| | | // 1. Make Corner Area |
| | |
| | | |
| | | // 2. Max Inspect Area.. |
| | | CRect rtFrame; |
| | | rtFrame.left = pSideData->m_nSide_Chamfer_LineFrame[iFrame]; |
| | | rtFrame.left = (LONG)pSideData->m_nSide_Chamfer_LineFrame[iFrame]; |
| | | rtFrame.top = iFrame * m_nFrameHeight; |
| | | rtFrame.right = rtFrame.left; |
| | | rtFrame.bottom = rtFrame.top + m_nFrameHeight; |
| | | |
| | | //rtFrame.top = rtFrame.top; // 困肺 炼陛 歹 八荤秦辑 搬窃捞 钦媚瘤霸 秦焊磊.. |
| | | rtFrame.top = rtFrame.top - 100; // 100 Pixel Frame 唱床柳 版快 巩力啊 登聪, 吝汗 八荤窍磊.. |
| | | //rtFrame.top = rtFrame.top; // 위로 조금 더 검사해서 결함이 합쳐지게 해보자.. |
| | | rtFrame.top = rtFrame.top - 100; // 100 Pixel Frame 나눠진 경우 문제가 되니, 중복 검사하자.. |
| | | |
| | | int nMaxInspectRange = 0; |
| | | |
| | |
| | | if(pSideData == NULL) |
| | | return FALSE; |
| | | |
| | | if(pSideData->m_nSideLineFrame[iFrame] < 0) // Side Line阑 给茫篮 版快.. |
| | | if (pSideData->m_nSideLineFrame[iFrame] < 0) // Side Line을 못찾은 경우.. |
| | | return FALSE; |
| | | |
| | | // 1. Make Corner Area |
| | |
| | | |
| | | // 2. Max Inspect Area.. |
| | | CRect rtFrame; |
| | | rtFrame.left = pSideData->m_nSide_Chamfer_LineFrame[iFrame]; |
| | | rtFrame.left = (LONG)pSideData->m_nSide_Chamfer_LineFrame[iFrame]; |
| | | rtFrame.top = iFrame * m_nFrameHeight; |
| | | rtFrame.right = rtFrame.left; |
| | | rtFrame.bottom = rtFrame.top + m_nFrameHeight; |
| | | |
| | | //rtFrame.top = rtFrame.top; // 困肺 炼陛 歹 八荤秦辑 搬窃捞 钦媚瘤霸 秦焊磊.. |
| | | rtFrame.top = rtFrame.top - 100; // 100 Pixel Frame 唱床柳 版快 巩力啊 登聪, 吝汗 八荤窍磊.. |
| | | //rtFrame.top = rtFrame.top; // 위로 조금 더 검사해서 결함이 합쳐지게 해보자.. |
| | | rtFrame.top = rtFrame.top - 100; // 100 Pixel Frame 나눠진 경우 문제가 되니, 중복 검사하자.. |
| | | |
| | | int nMaxInspectRange = 0; |
| | | |
| | |
| | | CRect rtNotchInterSectRect; |
| | | rtNotchInterSectRect.IntersectRect(rtTemp, rtNotchArea); |
| | | |
| | | if(rtNotchInterSectRect.IsRectEmpty() || rtNotchInterSectRect.IsRectNull()) // 畴摹啊 救吧府绰 版快俊绰 促矫 持绢霖促.. |
| | | if (rtNotchInterSectRect.IsRectEmpty() || rtNotchInterSectRect.IsRectNull()) // 노치가 안걸리는 경우에는 다시 넣어준다.. |
| | | { |
| | | vectorInspectAreaList_New.push_back(rtTemp); |
| | | continue; |
| | | } |
| | | |
| | | if(rtTemp.Height() == rtNotchInterSectRect.Height()) // Notch啊 康开狼 傈眉牢 版快 |
| | | if (rtTemp.Height() == rtNotchInterSectRect.Height()) // Notch가 영역의 전체인 경우 |
| | | continue; |
| | | |
| | | if(rtTemp.top == rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 1. Notch Frame 困俊 吧赴 版快 |
| | | if (rtTemp.top == rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 1. Notch Frame 위에 걸린 경우 |
| | | { |
| | | CRect rtNew = rtTemp; |
| | | rtNew.top = rtNotchInterSectRect.bottom; |
| | | vectorInspectAreaList_New.push_back(rtNew); |
| | | } |
| | | else if(rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 2. Notch Frame 吝埃俊 吧赴 版快 |
| | | else if (rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom < rtTemp.bottom) // 2. Notch Frame 중간에 걸린 경우 |
| | | { |
| | | CRect rtNewTop = rtTemp; |
| | | rtNewTop.top = rtNotchInterSectRect.bottom; |
| | |
| | | rtNewBot.bottom = rtNotchInterSectRect.top; |
| | | vectorInspectAreaList_New.push_back(rtNewBot); |
| | | } |
| | | else if(rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom == rtTemp.bottom) // 3. Notch Frame 酒贰俊 吧赴 版快 |
| | | else if (rtTemp.top < rtNotchInterSectRect.top && rtNotchInterSectRect.bottom == rtTemp.bottom) // 3. Notch Frame 아래에 걸린 경우 |
| | | { |
| | | CRect rtNew = rtTemp; |
| | | rtNew.bottom = rtNotchInterSectRect.top; |
| | |
| | | if (rtInspectArea.IsRectEmpty() == TRUE || m_pGlassData == NULL) |
| | | return FALSE; |
| | | |
| | | int nSideLine = m_pGlassData->GetSideData(eDim)->m_nSideLineFrame[iFrame]; |
| | | int nSideLine = (int)m_pGlassData->GetSideData(eDim)->m_nSideLineFrame[iFrame]; |
| | | |
| | | if (nSideLine < 0) |
| | | return FALSE; |
| | |
| | | |
| | | cv::Mat pBinMat = cv::Mat::zeros(pBinImage->GetHeight(), pBinImage->GetWidth(), CV_8UC1); |
| | | |
| | | // OwnerBuffer 郴何肺 16硅荐 皋葛府 爱绊 乐绢辑 茄锅俊 墨乔 救蹬.. |
| | | // OwnerBuffer 내부로 16배수 메모리 갖고 있어서 한번에 카피 안돼.. |
| | | for(int i=0; i<pBinImage->GetHeight(); i++) |
| | | CopyMemory(&pBinMat.data[pBinMat.step1() * i], pBinImage->GetDataAddress(0, i), pBinImage->GetWidth()); |
| | | |
| | |
| | | |
| | | int numOfLables = cv::connectedComponentsWithStats(pBinMat, matLabel, matStats, matCentrois, 8); |
| | | |
| | | if(numOfLables <= 1) // 硅版 窍唱父 乐澜.. |
| | | if (numOfLables <= 1) // 배경 하나만 있음.. |
| | | return TRUE; |
| | | |
| | | std::vector<int> vecMin, vecMax, vecSum, vecPixelCount; |
| | |
| | | int width = matStats.at<int>(nIdx, cv::CC_STAT_WIDTH); |
| | | int height = matStats.at<int>(nIdx, cv::CC_STAT_HEIGHT); |
| | | |
| | | int x = (int)matCentrois.at<double>(nIdx, 0); //吝缴谅钎 |
| | | int x = (int)matCentrois.at<double>(nIdx, 0); //중심좌표 |
| | | int y = (int)matCentrois.at<double>(nIdx, 1); |
| | | |
| | | if(MAX_DEFECT_COUNT_SIDE < nIdx) |
| | |
| | | |
| | | cv::Mat pBinMat = cv::Mat::zeros(pBinImage->height, pBinImage->width, CV_8UC1); |
| | | |
| | | // OwnerBuffer 郴何肺 16硅荐 皋葛府 爱绊 乐绢辑 茄锅俊 墨乔 救蹬.. |
| | | // OwnerBuffer 내부로 16배수 메모리 갖고 있어서 한번에 카피 안돼.. |
| | | for(int i=0; i<pBinImage->height; i++) |
| | | CopyMemory(&pBinMat.data[pBinMat.step1() * i], &pBinImage->imageData[pBinImage->widthStep*i], pBinImage->width); |
| | | |
| | |
| | | |
| | | int numOfLables = cv::connectedComponentsWithStats(pBinMat, matLabel, matStats, matCentrois, 8); |
| | | |
| | | if(numOfLables <= 1) // 硅版 窍唱父 乐澜.. |
| | | if (numOfLables <= 1) // 배경 하나만 있음.. |
| | | return TRUE; |
| | | |
| | | std::vector<int> vecMin, vecMax, vecSum, vecPixelCount; |
| | |
| | | int width = matStats.at<int>(nIdx, cv::CC_STAT_WIDTH); |
| | | int height = matStats.at<int>(nIdx, cv::CC_STAT_HEIGHT); |
| | | |
| | | int x = (int)matCentrois.at<double>(nIdx, 0); //吝缴谅钎 |
| | | int x = (int)matCentrois.at<double>(nIdx, 0); //중심좌표 |
| | | int y = (int)matCentrois.at<double>(nIdx, 1); |
| | | |
| | | if(MAX_DEFECT_COUNT_SIDE < nIdx) |
| | |
| | | if(pSideData == NULL) |
| | | return FALSE; |
| | | |
| | | if(pSideData->m_bFindGlassEndLine == FALSE) // Notch Processing篮 End Line 茫篮 Frame捞.. |
| | | if (pSideData->m_bFindGlassEndLine == FALSE) // Notch Processing은 End Line 찾은 Frame이.. |
| | | return FALSE; |
| | | |
| | | if(m_pRecipe == NULL) |
| | |
| | | g_pLog->DisplayMessage(_T("Notch_Process %s : %d, idx %d - %d,%d,%d,%d"),g_SideName[(int) emDim], stFrame.nFrameIdx,i,rtRotateArea.left,rtRotateArea.top,rtRotateArea.right,rtRotateArea.bottom); |
| | | |
| | | pSideData->m_rtNotchArea_pxl[i] = rtRotateArea; |
| | | //屏蔽Notch 区域上下位置 |
| | | //팁귁Notch 혐堵 龜쫍뿟? |
| | | rtRotateArea.top += 15; |
| | | rtRotateArea.bottom -= 15; |
| | | IplImage* pOriginImage; |
| | |
| | | return; |
| | | } |
| | | |
| | | // 中值滤波器大小,用于去噪,必须为奇数(若偶数会自动减1) |
| | | // 櫓令쫀꺼포댕鬼,痰黨혼臀,극伎槨펜鑒(흼탉鑒삔菱땡숑1) |
| | | const int nSmoothFilter = m_pRecipe->m_SideParam[(int)emDim].m_NotchPrm[nNotchIdx].m_nSmooth_Filter; |
| | | |
| | | // 磨边区域阈值,控制反二值化阈值,主要用于提取 Notch 边缘特征 |
| | | // 칠긋혐堵埴令,왠齡럽랗令뺏埴令,寮狼痰黨瓊혤 Notch 긋鍍景瀝 |
| | | const int nGrindThreshold = m_pRecipe->m_SideParam[(int)emDim].m_NotchPrm[nNotchIdx].m_nGrind_Threshold; |
| | | |
| | | // 玻璃区域阈值,控制正二值化阈值,用于提取玻璃主体区域 |
| | | // 깼젝혐堵埴令,왠齡攣랗令뺏埴令,痰黨瓊혤깼젝寮竟혐堵 |
| | | const int nGlassThreshold = m_pRecipe->m_SideParam[(int)emDim].m_NotchPrm[nNotchIdx].m_nGlass_Threshold; |
| | | |
| | | // 确保奇数滤波器大小 |
| | | // 횅괏펜鑒쫀꺼포댕鬼 |
| | | int nFilterSize = (nSmoothFilter % 2 == 0) ? (nSmoothFilter - 1) : nSmoothFilter; |
| | | |
| | | if (nFilterSize > 1) { |
| | | // 中值滤波降噪 |
| | | // 櫓令쫀꺼슉臀 |
| | | cvSmooth(scr, img_Bin, CV_MEDIAN, nFilterSize); |
| | | } |
| | | |
| | | // Edge图:反二值化阈值处理 |
| | | // Edge暠:럽랗令뺏埴令뇹잿 |
| | | cvThreshold(scr, img_Edge, nGrindThreshold, 255, CV_THRESH_BINARY_INV); |
| | | CString strEdgeFileName; |
| | | strEdgeFileName.Format(_T("Notch\\Notch_%d_Edge.jpg"), nNotchIdx); |
| | | SaveDebugImage(emDim, stFrame, img_Edge, strEdgeFileName); |
| | | |
| | | // Bin图:正常二值化 |
| | | // Bin暠:攣끽랗令뺏 |
| | | cvThreshold(scr, img_Bin, nGlassThreshold, 255, CV_THRESH_BINARY); |
| | | CString strBinFileName; |
| | | strBinFileName.Format(_T("Notch\\Notch_%d_Bin.jpg"), nNotchIdx); |
| | |
| | | ptSeed.y = img_Bin_MeasureLine->height / 2; |
| | | |
| | | img_Find_MeasureLine = cvCloneImage(img_Bin_MeasureLine); |
| | | // cvFloodFill(img_Find_MeasureLine, ptSeed, CV_RGB(255,255,255)); // 拱 锭巩俊 急捞 谗绢瘤绰 版快啊 乐绢辑 救茄促. |
| | | // cvFloodFill(img_Find_MeasureLine, ptSeed, CV_RGB(255,255,255)); // 물 때문에 선이 끊어지는 경우가 있어서 안한다. |
| | | // cvThreshold(img_Find_MeasureLine, img_Find_MeasureLine, 100, 255, CV_THRESH_BINARY); |
| | | |
| | | // 2. Find Curve Line |
| | | double dStepAngle = 1.0; |
| | | int nFindStep = (int) (360.0 / dStepAngle); |
| | | int nSkipStep = 30; // 贸澜 30档, 场 30档绰 胶诺茄促. |
| | | int nSkipStep = 30; // 처음 30도, 끝 30도는 스킵한다. |
| | | |
| | | IplImage* img_Find_MeasureLine_Point = cvCloneImage(scr); |
| | | |
| | |
| | | // 3. Meausre |
| | | int nCount = vecPointList.size()-2; |
| | | |
| | | if(nCount < MAX_SIDE_NOTCH_MEASURE_COUNT) // 螟沥 器牢飘 俊矾 |
| | | if (nCount < MAX_SIDE_NOTCH_MEASURE_COUNT) // 측정 포인트 에러 |
| | | { |
| | | cvReleaseImage(&img_Bin_MeasureLine); |
| | | cvReleaseImage(&img_Find_MeasureLine); |
| | |
| | | return; |
| | | } |
| | | |
| | | double dPointStep = (double) nCount / (MAX_SIDE_NOTCH_MEASURE_COUNT-1); // 16 Point 螟沥.. |
| | | double dPointStep = (double)nCount / (MAX_SIDE_NOTCH_MEASURE_COUNT - 1); // 16 Point 측정.. |
| | | |
| | | for(int nMeasureIdx=0; nMeasureIdx < MAX_SIDE_NOTCH_MEASURE_COUNT; nMeasureIdx++) |
| | | { |
| | | int nPointIdx = nMeasureIdx * dPointStep; |
| | | int nPointIdx = nMeasureIdx * (int)dPointStep; |
| | | |
| | | if(nPointIdx == 0) nPointIdx = 1; |
| | | else if(vecPointList.size() <= nPointIdx) nPointIdx = vecPointList.size() - 1; |
| | |
| | | { |
| | | double dMeasureRadius = dSearchRadius - dRadius; |
| | | |
| | | int nX = pt_Measure.x - (cos(dAngle_Radian) * dMeasureRadius); |
| | | int nY = pt_Measure.y + (sin(dAngle_Radian) * dMeasureRadius); |
| | | int nX = (int)(pt_Measure.x - (cos(dAngle_Radian) * dMeasureRadius)); |
| | | int nY = (int)(pt_Measure.y + (sin(dAngle_Radian) * dMeasureRadius)); |
| | | |
| | | img_Result->imageData[pt_Measure.y * img_Result->widthStep + pt_Measure.x] = 0; |
| | | |
| | |
| | | |
| | | if(pSideData->m_nNotch_Dimension_Edge_Judge[nNotchIdx][nMeasureIdx] != 1) |
| | | { |
| | | // Make 搬窃.. |
| | | // Make 결함.. |
| | | CRect rtDefectArea = CRect(pSideData->m_ptNotch_Dimension_Edge[nNotchIdx][nMeasureIdx].x, |
| | | pSideData->m_ptNotch_Dimension_Edge[nNotchIdx][nMeasureIdx].y, |
| | | pSideData->m_ptNotch_Dimension_Edge[nNotchIdx][nMeasureIdx].x, |
| | |
| | | pSideData->m_nNotch_Chamfer_Edge_Judge[nNotchIdx][nMeasureIdx] = 1; |
| | | |
| | | #if MINI_LED |
| | | //选取测量研磨尺寸最大值 |
| | | //朞혤꿎좆桔칠넹당離댕令 |
| | | if (m_nChamferOffset_um < dChamfer_um) { |
| | | m_nChamferOffset_um = dChamfer_um; |
| | | } |
| | |
| | | |
| | | if(pSideData->m_nNotch_Chamfer_Edge_Judge[nNotchIdx][nMeasureIdx] != 1) |
| | | { |
| | | // Make 搬窃.. |
| | | // Make 결함.. |
| | | CRect rtDefectArea = CRect(pSideData->m_ptNotch_Chamfer_Edge[nNotchIdx][nMeasureIdx].x, |
| | | pSideData->m_ptNotch_Chamfer_Edge[nNotchIdx][nMeasureIdx].y, |
| | | pSideData->m_ptNotch_Chamfer_Edge[nNotchIdx][nMeasureIdx].x, |
| | |
| | | int nThreshold = pNotchParam->m_nNotch_Inspect_Defect_Threshold; |
| | | int nOffset = pNotchParam->m_nNotch_Inspect_Defect_Offset; |
| | | |
| | | #if MINI_NOTCH //Defect检测开关, jiang |
| | | #if MINI_NOTCH //Defect쇱꿎역밑, jiang |
| | | int nEdgeThres = pNotchParam->m_nGrind_Threshold; |
| | | int nNgType = pNotchParam->m_nNotch_Inspect_Defect_Judge_And; |
| | | int xNgSize = pNotchParam->m_nNotch_Inspect_Defect_Judge_X_um; |
| | |
| | | nNotchIdx, nEdgeThres, nThreshold, nOffset, nNgType, |
| | | rtROI.left, rtROI.top, rtROI.right, rtROI.bottom, __LINE__); |
| | | |
| | | //输出计算信息 |
| | | //渴놔셕炬斤口 |
| | | std::vector<Point2D> vNorchPoints; |
| | | for (int nMeasureIdx = 0; nMeasureIdx < MAX_SIDE_NOTCH_MEASURE_COUNT; nMeasureIdx++){ |
| | | CPoint ptChamfer_pxl = m_pGlassData->GetSideData(emDim)->m_ptNotch_Chamfer_Edge[nNotchIdx][nMeasureIdx]; |
| | |
| | | vNorchPoints.push_back(point); |
| | | } |
| | | CRect defectResult[100]; |
| | | //nRet为缺陷数量,当前缺陷数 < 1时,表示为OK |
| | | //nRet槨홧屈鑒좆,뎠품홧屈鑒 < 1珂,깊刻槨OK |
| | | int nRet = BlVision_GetSoftVisionApp()->findNorchDefect(nSide, vNorchPoints, rtROI, nEdgeThres, nOffset, nThreshold, nNgType, xNgSize, yNgSize, defectResult); |
| | | printf("Norch Defect Number:%d\n", nRet); |
| | | |
| | |
| | | m_nChamferOffset_um = 0; |
| | | #endif // MINI_LED |
| | | |
| | | // 防止过大导致耗时或内存问题 |
| | | // 렝岺법댕돔鈴봬珂샀코닸狂痙 |
| | | if (nOffset > 50) { |
| | | g_pLog->DisplayMessage(_T("[WARN] Notch defect offset capped to 50 pixels, original: %d"), nOffset); |
| | | nOffset = 50; |
| | |
| | | SaveDebugImage(emDim, stFrame, pProcBinImage, strTemp); |
| | | |
| | | #if MINI_LED == 0 |
| | | // 限制膨胀次数,防止过大导致耗时或内存问题 |
| | | // 掘齡툇郞늴鑒,렝岺법댕돔鈴봬珂샀코닸狂痙 |
| | | int nDilateCount = pNotchParam->m_nNotch_Inspect_Defect_dilate; |
| | | nDilateCount = std::max(0, std::min(nDilateCount, 50)); |
| | | if (pNotchParam->m_nNotch_Inspect_Defect_dilate != nDilateCount) { |
| | |
| | | int iFrame = stFrame.nFrameIdx; |
| | | CRect rtProcessArea = rtROI; |
| | | |
| | | int nMinSize_X = pNotchParam->m_nNotch_Inspect_Defect_Min_X_um / m_pGlassData->GetSideData(emDim)->m_dPixelSizeX; |
| | | int nMinSize_Y = pNotchParam->m_nNotch_Inspect_Defect_Min_Y_um / m_pGlassData->GetSideData(emDim)->m_dPixelSizeY; |
| | | int nMinSize_X = (pNotchParam->m_nNotch_Inspect_Defect_Min_X_um / (int)m_pGlassData->GetSideData(emDim)->m_dPixelSizeX); |
| | | int nMinSize_Y = (pNotchParam->m_nNotch_Inspect_Defect_Min_Y_um / (int)m_pGlassData->GetSideData(emDim)->m_dPixelSizeY); |
| | | int nMinSize = 0; |
| | | |
| | | int nDilation = 0; |
| | |
| | | if(pSideData == NULL) |
| | | return; |
| | | |
| | | if(pSideData->m_bFindGlassEndLine == FALSE) // Notch Processing篮 End Line 茫篮 Frame捞.. |
| | | if (pSideData->m_bFindGlassEndLine == FALSE) // Notch Processing은 End Line 찾은 Frame이.. |
| | | return; |
| | | |
| | | if(m_pRecipe == NULL) |
| | |
| | | double dCenterPos_Y_pxl = rtROI.top + (dCenterPos_Y_um / m_dPixelSizeY); |
| | | |
| | | pSideData->m_nNotchCircle_Radius_Judge[nNotchIdx][nCircleIdx] = 1; |
| | | pSideData->m_ptNotchCircle_Center_pxl[nNotchIdx][nCircleIdx].x = dCenterPos_X_pxl; |
| | | pSideData->m_ptNotchCircle_Center_pxl[nNotchIdx][nCircleIdx].y = dCenterPos_Y_pxl; |
| | | pSideData->m_ptNotchCircle_Center_pxl[nNotchIdx][nCircleIdx].x = (LONG)dCenterPos_X_pxl; |
| | | pSideData->m_ptNotchCircle_Center_pxl[nNotchIdx][nCircleIdx].y = (LONG)dCenterPos_Y_pxl; |
| | | pSideData->m_ptNotchCircle_Radius_Result_X_pxl[nNotchIdx][nCircleIdx] = dRadiuse_um / m_dPixelSizeX; |
| | | pSideData->m_ptNotchCircle_Radius_Result_Y_pxl[nNotchIdx][nCircleIdx] = dRadiuse_um / m_dPixelSizeY; |
| | | pSideData->m_ptNotchCircle_Radius_Result_um[nNotchIdx][nCircleIdx] = dRadiuse_um; |
| | |
| | | |
| | | Measure_BotCorner(iThread, emDim, stFrame); |
| | | |
| | | if(pSideData->m_bFindGlassEndLine == FALSE) // Side Line篮 End Line 茫篮 Frame 捞 螟沥 茄促.. |
| | | if (pSideData->m_bFindGlassEndLine == FALSE) // Side Line은 End Line 찾은 Frame 이 측정 한다.. |
| | | return FALSE; |
| | | |
| | | g_pLog->DisplayMessage(_T("Side Measure Start %s - %d"),g_SideName[(int) emDim],stFrame.nFrameIdx); |
| | |
| | | |
| | | /////////////////////////////////////////////////////////////////////////////////////// |
| | | #if HALCON_VISION_KEY |
| | | //Set Info, 将MARK信息输入到SDK |
| | | //Set Info, 쉥MARK斤口渴흙돕SDK |
| | | CBlSideData* pBlSideData = BlVision_GetVisionRecipe()->getSideData(emDim); // ->m_bInspection_Complete = TRUE; |
| | | pBlSideData->m_bInspection_Complete = TRUE; |
| | | pBlSideData->m_dPixelSizeX = pSideData->m_dPixelSizeX; |
| | |
| | | int nSideLine = rtFindPos.left + nFindEdgeLine; |
| | | int nChamferLine = rtFindPos.left + ((nFindChamferLine != -1 && pSideParam->m_bSideChamfer_Use[nMeasurePointIdx] == TRUE) ? nFindChamferLine : nFindEdgeLine); |
| | | |
| | | // Frame俊辑 措钎肺 茫篮吧肺 螟沥 搬苞肺 静霸 沁绰单.... 捞固瘤俊辑 促矫 茫档废 荐沥捞 鞘夸..且鳖?? |
| | | // Frame에서 대표로 찾은걸로 측정 결과로 쓰게 했는데.... 이미지에서 다시 찾도록 수정이 필요..할까?? |
| | | int nFrameIdx = (int)(nEndPointPosY / m_nFrameHeight); |
| | | /* |
| | | int nSideLine = pSideData->m_nSideLineFrame[nFrameIdx]; |
| | |
| | | |
| | | pSideData->m_bSideMeasureLine[nMeasurePointIdx] = TRUE; |
| | | |
| | | // 烙矫肺 阜澜. SW 促款. |
| | | // 임시로 막음. SW 다운. |
| | | // continue; |
| | | |
| | | // Dimension |
| | |
| | | } |
| | | else if (pSideParam->m_bSideDimension_Use[nMeasurePointIdx] == TRUE && dTempValue < -0.01) { |
| | | #if HALCON_VISION_KEY |
| | | //切割线的长度计算, jiang, 09-27, 2024 |
| | | //학몇窟돨낀똑셕炬, jiang, 09-27, 2024 |
| | | int nThres = pSideParam->m_nSideDimensionSpec_Thres[nMeasurePointIdx]; |
| | | int toLineDist = 1000 * pSideParam->m_dSideDimensionSpec_mm_Std[nMeasurePointIdx]; |
| | | int toTopY = pSideParam->m_nSideDimensionPos_TopMarkToDistance_um[nMeasurePointIdx]; |
| | |
| | | if(iCornerFrame > stFrame.nFrameIdx) |
| | | return FALSE; |
| | | |
| | | // Corner 八荤 父甸扁.. |
| | | // Corner 검사 만들기.. |
| | | if(FindCorner(iThread,emDim,stFrame,0,rtTopCornerArea) == TRUE) |
| | | { |
| | | double dXSizeStd_um = pSideParam->m_nTopCorner_Measure_Judge_Std_um_X; |
| | |
| | | |
| | | int nSearchRange = 8; |
| | | |
| | | int nSearchRangeX = (int) ((double)nCornerSizeX_Pixel * 0.10); // 10%俊辑 茫澜.. |
| | | int nSearchRangeY = (int) ((double)nCornerSizeY_Pixel * 0.10); // 10%俊辑 茫澜.. |
| | | int nSearchRangeX = (int)((double)nCornerSizeX_Pixel * 0.10); // 10%에서 찾음.. |
| | | int nSearchRangeY = (int)((double)nCornerSizeY_Pixel * 0.10); // 10%에서 찾음.. |
| | | |
| | | nSearchRangeX = nSearchRangeY = 10; |
| | | |
| | |
| | | if(pSideData == NULL || pSideParam == NULL) |
| | | return FALSE; |
| | | |
| | | // R Corner 螟沥 |
| | | // R Corner 측정 |
| | | |
| | | return TRUE; |
| | | } |
| | |
| | | if(iCornerFrame > stFrame.nFrameIdx) |
| | | return FALSE; |
| | | |
| | | // Corner 八荤 父甸扁.. |
| | | // Corner 검사 만들기.. |
| | | if(FindCorner(iThread,emDim,stFrame,1,rtBottomCornerArea) == TRUE) |
| | | { |
| | | double dXSizeStd_um = pSideParam->m_nBottomCorner_Measure_Judge_Std_um_X; |
| | |
| | | if(pSideData == NULL) |
| | | return FALSE; |
| | | |
| | | if(pSideData->m_bFindGlassEndLine == FALSE) // User Defect Processing篮 End Line 茫篮 Frame捞.. |
| | | if (pSideData->m_bFindGlassEndLine == FALSE) // User Defect Processing은 End Line 찾은 Frame이.. |
| | | return FALSE; |
| | | |
| | | if(m_pRecipe == NULL) |
| | |
| | | if(pSideData == NULL) |
| | | return FALSE; |
| | | |
| | | if(pSideData->m_bFindGlassEndLine == FALSE) // Exception Area Processing篮 End Line 茫篮 Frame捞.. |
| | | if (pSideData->m_bFindGlassEndLine == FALSE) // Exception Area Processing은 End Line 찾은 Frame이.. |
| | | return FALSE; |
| | | |
| | | if(m_pRecipe == NULL) |
| | |
| | | while (TRUE) |
| | | { |
| | | nRet = m_pGrabber->IsAcqFrame(iFrame); |
| | | if (nRet < 2) // 酒流 救嘛躯栏骨肺 措扁. |
| | | if (nRet < 2) // 아직 안찍혔으므로 대기. |
| | | { |
| | | if (GetTickCount() - dwT1 > TIME_WAIT_GLASS_START) |
| | | { |
| | |
| | | { |
| | | for (k = nHStart; k < nHStart + BOUNDARY_GLASSSTARTWIDTH; k++) |
| | | { |
| | | // Grab牢 版快 滚欺狼 版拌俊辑 1024扼牢阑 逞绢哎 版快 促澜 滚欺甫 啊廉客具 茄促. |
| | | // Grab인 경우 버퍼의 경계에서 1024라인을 넘어갈 경우 다음 버퍼를 가져와야 한다. |
| | | if (j == nFrameHeight && nLine != 0 && bChangeBuffer == FALSE) |
| | | { |
| | | DWORD dwTick = GetTickCount(); |
| | |
| | | if (nCountinueCount >= 2) |
| | | { |
| | | g_pLog->DisplayMessage(_T("%s Start Line Frame %d, Line %d, Gab %d, Thres %d"), PANEL_SIDE[emDim],iFrame, j, nGab, nThreshold); |
| | | // Glass狼 矫累瘤痢阑 茫酒辑 备炼眉俊 持绰促. |
| | | // Glass의 시작지점을 찾아서 구조체에 넣는다. |
| | | pSideData->m_nGlassStartLine = iFrame * nFrameHeight + j - 2; |
| | | pSideData->m_nGlassStartFrame = pSideData->m_nGlassStartLine/nFrameHeight; |
| | | pSideData->m_bFindGlassStartLine = TRUE; |
| | |
| | | BOOL CInspectCamera::ProcessFrame(int iThread,DimensionDir emDim,stFrameIndex stFrame) |
| | | { |
| | | try { |
| | | // 1. Find End Line.. (Corner甫 力寇茄 Side扼牢阑 茫扁 困秦 End Line何磐 茫绰促) |
| | | // 1. Find End Line.. (Corner를 제외한 Side라인을 찾기 위해 End Line부터 찾는다) |
| | | FindEndLine(iThread, emDim, stFrame); |
| | | |
| | | // 2. Find Side Line.. (秦寸 橇饭烙俊辑 Corner/Notch 甫 力寇茄 Side 扼牢 茫扁) |
| | | // 2. Find Side Line.. (해당 프레임에서 Corner/Notch 를 제외한 Side 라인 찾기) |
| | | #if USE_AI_DETECT |
| | | FindSideLine(iThread, emDim, stFrame); |
| | | #else |
| | |
| | | if (m_wsClients != nullptr) |
| | | { |
| | | m_wsClients->set_message_handler([this](const std::string& msg) { |
| | | // JSON 格式 |
| | | // JSON 목駕 |
| | | if (!msg.empty() && msg.size() > 3) { |
| | | try { |
| | | nlohmann::json json_data = nlohmann::json::parse(msg); |
| | |
| | | DimensionDir emDim = (DimensionDir)(json_data.value("nLineType", 0) - 1); |
| | | WSReceiveData wsReceiveData; |
| | | |
| | | // 解析 JSON 数据并填充 wsReceiveData |
| | | // 썩驕 JSON 鑒앴깻輕념 wsReceiveData |
| | | wsReceiveData.nRecipe = json_data.value("Reciepe", 0); |
| | | wsReceiveData.nLineType = json_data.value("nLineType", 0); |
| | | wsReceiveData.nIndex = json_data.value("nIndex", 0); |
| | |
| | | wsReceiveData.nFrameIdx = json_data.value("nFrameIdx", 0); |
| | | wsReceiveData.strSN = json_data.value("SN", ""); |
| | | wsReceiveData.dTimeStamp = json_data.value("TimeStamp", 0.0); |
| | | wsReceiveData.nGNum = json_data.value("NGnum", 0); // NG 数量 |
| | | wsReceiveData.nGNum = json_data.value("NGnum", 0); // NG 鑒좆 |
| | | |
| | | // 格式化并显示基本信息 |
| | | // 목駕뺏깻鞫刻샘굶斤口 |
| | | CString strText; |
| | | strText.Format(_T("Reciepe: %d, LineType: %d, Index: %d, SN: %s, NGNum: %d, TimeStamp: %f\n"), |
| | | wsReceiveData.nRecipe, wsReceiveData.nLineType, wsReceiveData.nIndex, wsReceiveData.strSN.c_str(), wsReceiveData.nGNum, wsReceiveData.dTimeStamp); |
| | |
| | | && wsReceiveData.nGNum != 0 |
| | | && g_pBase->m_strHPanelID.Compare(CString(wsReceiveData.strSN.c_str())) == 0) |
| | | { |
| | | // 遍历并填充 ngPosArray |
| | | // 깁저깻輕념 ngPosArray |
| | | auto ngPosArray = json_data["NGPosArray"]; |
| | | for (auto& ngPos : ngPosArray) { |
| | | WSReceiveData::NGPosition ngPosition; |
| | |
| | | g_pLog->DisplayMessage(strText); |
| | | } |
| | | catch (const nlohmann::json::parse_error& e) { |
| | | // 处理 JSON 解析错误 |
| | | // 뇹잿 JSON 썩驕댄轎 |
| | | std::cerr << "JSON parse error: " << e.what() << std::endl; |
| | | } |
| | | } |
| | | else { |
| | | // 处理空消息 |
| | | // 뇹잿왕句口 |
| | | std::cerr << "Empty message" << std::endl; |
| | | } |
| | | }); |
| | |
| | | |
| | | std::string jsonMetadata = CreateJsonWSSendData(wsData); |
| | | |
| | | // 预先分配内存,减少动态扩容 |
| | | // 渡邱롸토코닸,숑 帽檄윈휭 |
| | | std::vector<char> message; |
| | | message.reserve(jsonMetadata.size() + width * height); |
| | | |
| | | // 插入 JSON 数据和图像数据 |
| | | // 꿨흙 JSON 鑒앴뵨暠獗鑒앴 |
| | | message.insert(message.end(), jsonMetadata.begin(), jsonMetadata.end()); |
| | | message.insert(message.end(), data, data + width * height); |
| | | |
| | | // 使用 std::move 传递 message,避免拷贝 |
| | | // 賈痰 std::move 눈뒵 message,긁출옙굔 |
| | | bool isSucceed = m_wsClients->send_binary_to_idle_client_with_retry(std::move(message), 1000, 50); |
| | | if (!isSucceed) |
| | | { |
| | |
| | | for (int i = 0; i < rtProcessArea.Height(); i++) |
| | | memcpy(pDefectProcessImage.GetDataAddress(0, i), frameBuffer.GetDataAddress(rtProcessArea.left, i), rtProcessArea.Width()); |
| | | |
| | | // 发送从临时缓冲区中获取的数据 |
| | | // 랙箇닖줄珂뻠녑혐櫓삿혤돨鑒앴 |
| | | int state = (stFrame.nFrameIdx == 0) ? 1 : (pDefectProcessImage.GetHeight() < IMAGE_HEIGHT ? 2 : 3); |
| | | SendImageDataOverWebSocket(eDim, stFrame, stFrame.nFrameIdx, pDefectProcessImage.GetDataAddress(0, 0), state, nCutLine, vecInspectAreaList[nRegionIdx].top, pDefectProcessImage.GetWidth(), pDefectProcessImage.GetHeight()); |
| | | |
| | |
| | | rtProcessArea.bottom += nHeightOff; |
| | | } |
| | | |
| | | // 保证图像高度为4的倍数 |
| | | // 괏聯暠獗멕똑槨4돨굡鑒 |
| | | nHeightOff = rtProcessArea.Height() % 4; |
| | | if (nHeightOff != 0) |
| | | { |
| | |
| | | |
| | | myLoc.Lock(); |
| | | long long dStartTime = GetCurrentTimestamp(); |
| | | // 发送从临时缓冲区中获取的数据 |
| | | // 랙箇닖줄珂뻠녑혐櫓삿혤돨鑒앴 |
| | | std::vector<AiDetectResult> results; |
| | | if (m_pAiDetectEx->detect(frame, results, m_strChannel)) { |
| | | for (auto& result : results) { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "ThreadControl.h" |
| | | #include "DefectStorage.h" |
| | |
| | | // 0. Start Line |
| | | BOOL CheckStartLineFrame(DimensionDir eDim,int iFrame); |
| | | BOOL FindGlassStartLine(DimensionDir emDim, stFrameIndex stFrame); |
| | | BOOL MakeNotchArea(DimensionDir emDim); // 矫累急阑 茫栏搁 Notch 康开阑 固府 父甸绢 初绰促. |
| | | BOOL MakeNotchArea(DimensionDir emDim); // 矫累急阑 茫栏搁 Notch 康开阑 固府 父甸绢 初绰促. |
| | | |
| | | // 1. Process Frame |
| | | BOOL ProcessFrame(int iThread,DimensionDir emDim, stFrameIndex stFrame); |
| | |
| | | // 12. Exception Area Process |
| | | BOOL ExceptionArea_Process(int iThread,DimensionDir emDim, stFrameIndex stFrame); |
| | | |
| | | //13. 视觉功能 |
| | | //13. 视觉功能 |
| | | void FinallyVisionProc(DimensionDir eDim); |
| | | |
| | | protected: |
| | |
| | | |
| | | |
| | | #include "StdAfx.h" |
| | | #include "ThreadControl.h" |
| | | |
| | |
| | | m_nWorkingThread++; |
| | | LeaveCriticalSection(&m_csWorkingEnd); |
| | | |
| | | Sleep(1);// 窍绰 老捞 绝栏搁 OnThreadEndAll 捞 静饭靛 俺荐 父怒 龋免瞪 荐 乐促. |
| | | Sleep(1);// 窍绰 老捞 绝栏搁 OnThreadEndAll 捞 静饭靛 俺荐 父怒 龋免瞪 荐 乐促. |
| | | |
| | | if(m_pThreadWorker) |
| | | return m_pThreadWorker->OnThreadRun(iThread, pInspectThread); |
| | |
| | | { |
| | | Sleep(1); |
| | | count++; |
| | | if(ms > 0) // 措扁矫埃 力茄捞 乐栏搁. |
| | | if(ms > 0) // 措扁矫埃 力茄捞 乐栏搁. |
| | | { |
| | | if(count > ms) |
| | | return FALSE; // 措扁矫埃 悼救 沥惑 辆丰 给窍绊 府畔. |
| | | return FALSE; // 措扁矫埃 悼救 沥惑 辆丰 给窍绊 府畔. |
| | | } |
| | | } |
| | | return TRUE; // 沥惑 辆丰 犬牢. |
| | | return TRUE; // 沥惑 辆丰 犬牢. |
| | | } |
| | | |
| | | BOOL CInspectThread::InitInstance() |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #define MAX_THREAD 1 |
| | | |
| | |
| | | virtual ~CInspectThread(); |
| | | void SetWorker(IThreadWorker *pWorker){m_pWorker= pWorker;} |
| | | |
| | | BOOL StartThreadLoop(int iThread); // 檬扁 |
| | | BOOL StartThreadLoop(int iThread); // 檬扁 |
| | | void StartThreadWork(){m_bWorking= TRUE;} |
| | | |
| | | void StopThread(); |
| | |
| | | |
| | | class CThreadControl : IThreadWorker |
| | | { |
| | | int m_nThreadLoop; // 积己等 Thread Count |
| | | int m_nWorkingThread; // 悼累[累诀]阑 矫累茄 Thread Count |
| | | int m_nThreadLoop; // 积己等 Thread Count |
| | | int m_nWorkingThread; // 悼累[累诀]阑 矫累茄 Thread Count |
| | | CInspectThread *m_pThread; |
| | | |
| | | IThreadWorker *m_pThreadWorker; |
| | |
| | | |
| | | public: |
| | | |
| | | // 1. Thread 磊眉狼 积己苞 家戈俊 包咯. |
| | | // 1. Thread 磊眉狼 积己苞 家戈俊 包咯. |
| | | int InitThreadControl(int nThread, IThreadWorker* pThreadWorker); |
| | | BOOL ReleaseThreadControl(); |
| | | |
| | | // 2. Thread Loop 救俊辑 累诀狼 瘤矫 咯何父 牧飘费 |
| | | // 2. Thread Loop 救俊辑 累诀狼 瘤矫 咯何父 牧飘费 |
| | | int StartThreadControl(); |
| | | void StopThreadControl(); |
| | | |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "GlassRecipe.h" |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Config.h" |
| | | #include "cv.h" |
| | |
| | | |
| | | typedef struct tagJUDGEEDGE |
| | | { |
| | | BOOL bError; //俊矾 咯何.. |
| | | int nRefernce; // 扁霖 |
| | | int nTolPlus; // +倾侩坷瞒 |
| | | int nTolMinus; // -倾侩坷瞒 |
| | | int nSlant; //荤急 |
| | | BOOL bError; //俊矾 咯何.. |
| | | int nRefernce; // 扁霖 |
| | | int nTolPlus; // +倾侩坷瞒 |
| | | int nTolMinus; // -倾侩坷瞒 |
| | | int nSlant; //荤急 |
| | | }JUDGEEDGE, *PJUDGEEDGE; |
| | | |
| | | typedef struct tagUserDefectArea |
| | |
| | | typedef struct tagEXECPTION_AREA |
| | | { |
| | | int nAreaType; |
| | | CRect rc; // 康开 困摹 (Mark 盔痢) |
| | | SIZE szErrSize; // 捞 康开俊辑 利侩瞪 Size |
| | | int nAppDefect; // 利侩瞪 Defect 辆幅 |
| | | int nDetectLimitedArea; // 荤侩磊 汲沥 ROI 荤侩 蜡公 |
| | | CRect rc; // 康开 困摹 (Mark 盔痢) |
| | | SIZE szErrSize; // 捞 康开俊辑 利侩瞪 Size |
| | | int nAppDefect; // 利侩瞪 Defect 辆幅 |
| | | int nDetectLimitedArea; // 荤侩磊 汲沥 ROI 荤侩 蜡公 |
| | | |
| | | void Init() |
| | | { |
| | |
| | | |
| | | |
| | | public: |
| | | TCHAR m_strRecipeName[MAX_STRING_LENGTH]; // 饭矫乔 捞抚. |
| | | TCHAR m_strRecipeFileName[MAX_STRING_LENGTH]; // 饭乔矫 颇老疙 |
| | | TCHAR m_strRecipeFileNameBackUp[MAX_STRING_LENGTH]; // 饭乔矫 颇老疙 |
| | | TCHAR m_strRecipeName[MAX_STRING_LENGTH]; // 饭矫乔 捞抚. |
| | | TCHAR m_strRecipeFileName[MAX_STRING_LENGTH]; // 饭乔矫 颇老疙 |
| | | TCHAR m_strRecipeFileNameBackUp[MAX_STRING_LENGTH]; // 饭乔矫 颇老疙 |
| | | int m_nSoftRevision; |
| | | |
| | | CString m_strComment; // Comment |
| | |
| | | BOOL WriteRecipe(CConfig *pFile, int nSideIdx, int nNotchIdx); |
| | | |
| | | public: |
| | | int m_nGlassStartLine_pxl; // Notch 殿废 且 锭 Glass Start Line.. |
| | | CPoint m_ptTopMarkPos; // Notch 殿废 且 锭 Top Align Mark.. |
| | | CPoint m_ptBotMarkPos; // Notch 殿废 且 锭 Bot Align Mark.. |
| | | int m_nGlassStartLine_pxl; // Notch 殿废 且 锭 Glass Start Line.. |
| | | CPoint m_ptTopMarkPos; // Notch 殿废 且 锭 Top Align Mark.. |
| | | CPoint m_ptBotMarkPos; // Notch 殿废 且 锭 Bot Align Mark.. |
| | | |
| | | BOOL m_bNotch_Use; |
| | | CRect m_rtNotch_Area_pxl; |
| | |
| | | // Notch Circle |
| | | int m_nNotch_Circle_Count; |
| | | BOOL m_bNotch_Circle_Use[MAX_SIDE_NOTCH_CIRCLE_COUNT]; |
| | | CPoint m_ptNotch_Circle_TopMarkPos[MAX_SIDE_NOTCH_CIRCLE_COUNT]; // Notch Circle 殿废 且 锭 Top Align Mark.. |
| | | CPoint m_ptNotch_Circle_BotMarkPos[MAX_SIDE_NOTCH_CIRCLE_COUNT]; // Notch Circle 殿废 且 锭 Bot Align Mark.. |
| | | CPoint m_ptNotch_Circle_TopMarkPos[MAX_SIDE_NOTCH_CIRCLE_COUNT]; // Notch Circle 殿废 且 锭 Top Align Mark.. |
| | | CPoint m_ptNotch_Circle_BotMarkPos[MAX_SIDE_NOTCH_CIRCLE_COUNT]; // Notch Circle 殿废 且 锭 Bot Align Mark.. |
| | | CRect m_rtNotch_Circle_Area_pxl[MAX_SIDE_NOTCH_CIRCLE_COUNT]; |
| | | double m_dNotch_Circle_Spec_Radius_um[MAX_SIDE_NOTCH_CIRCLE_COUNT]; |
| | | double m_dNotch_Circle_Spec_Radius_Min_um[MAX_SIDE_NOTCH_CIRCLE_COUNT]; |
| | |
| | | BOOL WriteRecipe(CConfig *pFile, int nSideIdx); |
| | | |
| | | public: |
| | | int m_nSidePanelSize_um; // Scan 搁狼 技肺 规氢 农扁 |
| | | int m_nSidePanelSize_um; // Scan 搁狼 技肺 规氢 农扁 |
| | | int m_nFindStartEndLine_X_pxl; // Start/End Find Pos X |
| | | int m_nFindStartEndLine_Threshold; |
| | | int m_nSideLineThreshold; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "HardwareSettings.h" |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Config.h" |
| | | #include "Global_Define.h" |
| | | |
| | | #define HARDWARE_SETTING_PATH _T("c:\\EdgeInspector_App\\Config\\HardwareSetting.cfg") // cfg 立辟 版肺汲沥 |
| | | #define HARDWARE_SETTING_PATH _T("c:\\EdgeInspector_App\\Config\\HardwareSetting.cfg") // cfg 立辟 版肺汲沥 |
| | | #define HARDWARE_SETTING_BACKUP_DIR_PATH _T("c:\\EdgeInspector_App\\Config\\Backup") |
| | | #define KEY_BASIC _T("Software\\EdgeInspector_App\\BASIC\\") // 饭瘤胶飘府 立辟 版肺汲沥 |
| | | #define KEY_BASIC _T("Software\\EdgeInspector_App\\BASIC\\") // 饭瘤胶飘府 立辟 版肺汲沥 |
| | | #define MAX_CNC_COUNT 6 |
| | | #define MAX_NCUT_STAGE_COUNT 12 |
| | | #define MAX_CCUT_STAGE_COUNT 1 |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "Side_Data.h" |
| | | |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "Global_Define.h" |
| | | |
| | | // 弥措 橇饭烙 160, 1橇饭烙 1024, 256栏肺 唱床辑 八荤窍搁 1橇饭烙俊 4 = 640俺 沥档 |
| | | // 弥措 橇饭烙 160, 1橇饭烙 1024, 256栏肺 唱床辑 八荤窍搁 1橇饭烙俊 4 = 640俺 沥档 |
| | | #define MAX_INSPECT_AREA_LIST 1024 |
| | | |
| | | class CSide_Data |
| | |
| | | double m_dPixelSizeX; |
| | | double m_dPixelSizeY; |
| | | |
| | | BOOL m_bInspection_Complete; // 八荤 肯丰 犬牢 |
| | | BOOL m_bInspection_Complete; // 八荤 肯丰 犬牢 |
| | | |
| | | // Start Line |
| | | BOOL m_bFindGlassStartLine; |
| | |
| | | int m_nGlassStartFrame; |
| | | |
| | | // Pre End Line |
| | | int m_nPreGlassEndLine; // 抗惑登绰 End Line |
| | | int m_nPreGlassEndLine; // 抗惑登绰 End Line |
| | | int m_nPreGlassEndFrame; |
| | | |
| | | // End Line |
| | |
| | | int m_nBotMarkToEdge_X_pxl; |
| | | int m_nBotMarkToEdge_Y_pxl; |
| | | |
| | | // Scan Start锭 固府 拌魂秦辑 静磊.. |
| | | // Scan Start锭 固府 拌魂秦辑 静磊.. |
| | | double m_dCamResolutionX; |
| | | double m_dCamResolutionY; |
| | | |
| | | // Frame 喊 茫篮 Side Line... |
| | | // Frame 喊 茫篮 Side Line... |
| | | double m_nSideLineFrame[MAX_IMAGE_FRAME]; // Frame Side Line |
| | | double m_nSide_Chamfer_LineFrame[MAX_IMAGE_FRAME]; // Frame Side Line |
| | | |
| | |
| | | int m_nSideInspectAreaCount[MAX_IMAGE_FRAME]; |
| | | CRect m_rtSideInspectArea[MAX_IMAGE_FRAME][MAX_SIDE_INSPECT_AREA_COUNT]; |
| | | |
| | | CRect m_rtInspectArea_InsType[MAX_SIDE_INSPECT_TYPE][MAX_IMAGE_FRAME]; // 八荤 康开 |
| | | CRect m_rtInspectArea_InsType[MAX_SIDE_INSPECT_TYPE][MAX_IMAGE_FRAME]; // 八荤 康开 |
| | | int m_nSideFilterLine_InsType[MAX_SIDE_INSPECT_TYPE][MAX_IMAGE_FRAME]; // Side Filter Line |
| | | |
| | | // Measure Dimension |
| | |
| | | int m_nNgDefectCount; |
| | | |
| | | // Thread Processing.. |
| | | BOOL m_nFrameThreadProc[MAX_IMAGE_FRAME]; // Thread啊 瘤唱埃 Frame阑 眉农窍磊.. |
| | | BOOL m_nFrameThreadProc[MAX_IMAGE_FRAME]; // Thread啊 瘤唱埃 Frame阑 眉农窍磊.. |
| | | CCriticalSection m_csFrameThread; |
| | | |
| | | }; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "PriorityThread.h" |
| | | |
| | | #ifdef _DEBUG |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "WorkThreadPool.h" |
| | | |
| | |
| | | // ProcPADThread.cpp : implementation file |
| | | // ProcPADThread.cpp : implementation file |
| | | // |
| | | |
| | | #include "StdAfx.h" |
| | |
| | | { |
| | | BOOL bReturn = TRUE; |
| | | |
| | | // Thread 积己 饶 Thread 荐青 |
| | | // Thread 积己 饶 Thread 荐青 |
| | | bReturn = CreateTimerThread(this); |
| | | |
| | | return bReturn; |
| | |
| | | SendCheckMSG.dwTickEnd = GetTickCount(); |
| | | SendCheckMSG.dwDuration = SendCheckMSG.dwTickEnd - SendCheckMSG.dwTickStart; |
| | | |
| | | if(pStats->IsPostProcStart() == TRUE) // Post Process啊 矫累登菌栏搁 了促 昏力 茄促. |
| | | if(pStats->IsPostProcStart() == TRUE) // Post Process啊 矫累登菌栏搁 了促 昏力 茄促. |
| | | { |
| | | it->bDelete = TRUE; |
| | | continue; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #if _MSC_VER > 1000 |
| | | #pragma once |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "Thread_ControlIF.h" |
| | | |
| | | #ifdef _DEBUG |
| | |
| | | { |
| | | BOOL bReturn = TRUE; |
| | | |
| | | // Thread 积己 饶 Thread 荐青 |
| | | // Thread 积己 饶 Thread 荐青 |
| | | bReturn = CreateTimerThread(this); |
| | | |
| | | return bReturn; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "TimerThreadPool.h" |
| | | |
| | |
| | | // ProcPADThread.cpp : implementation file |
| | | // ProcPADThread.cpp : implementation file |
| | | // |
| | | |
| | | #include "StdAfx.h" |
| | |
| | | { |
| | | BOOL bReturn = TRUE; |
| | | |
| | | // Thread 积己 饶 Thread 荐青 |
| | | // Thread 积己 饶 Thread 荐青 |
| | | bReturn = CreateTimerThread(this); |
| | | |
| | | return bReturn; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #if _MSC_VER > 1000 |
| | | #pragma once |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "Thread_ViewRefresh.h" |
| | | |
| | | |
| | |
| | | { |
| | | BOOL bReturn = TRUE; |
| | | |
| | | // Thread 积己 饶 Thread 荐青 |
| | | // Thread 积己 饶 Thread 荐青 |
| | | bReturn = CreateTimerThread(this); |
| | | |
| | | return bReturn; |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "TimerThreadPool.h" |
| | | #include "Global_Define.h" |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "TriggerControl_Mvsol.h" |
| | | |
| | | CTriggerControl_Mvsol::CTriggerControl_Mvsol(void) |
| | |
| | | return (m_hTriggerControl == NULL) ? FALSE : TRUE; |
| | | } |
| | | |
| | | // 飘府芭0锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // 飘府芭0锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // SND : 02 57 00 00 00 74 00 80 00 4B 03 |
| | | // ACK : 02 77 00 00 00 74 00 80 00 6B 03 |
| | | // 飘府芭1锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // 飘府芭1锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // SND : 02 57 00 01 00 74 00 80 00 4C 03 |
| | | // ACK : 02 77 00 01 00 74 00 80 00 6C 03 |
| | | // 飘府芭2锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // 飘府芭2锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // SND : 02 57 00 7D 22 00 74 00 80 00 4D 03 |
| | | // ACK : 02 77 00 7D 22 00 74 00 80 00 6D 03 |
| | | // 飘府芭3锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // 飘府芭3锅 盲澄狼 浚内歹 涝仿阑 0锅栏肺 静扁 |
| | | // SND : 02 57 00 7D 23 00 74 00 80 00 4E 03 |
| | | // ACK : 02 77 00 7D 23 00 74 00 80 00 6E 03 |
| | | |
| | | // 飘府芭0锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // 飘府芭0锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // SND : 02 57 00 00 10 74 00 80 00 5B 03 |
| | | // ACK : 02 77 00 00 10 74 00 80 00 7B 03 |
| | | // 飘府芭1锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // 飘府芭1锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // SND : 02 57 00 01 10 74 00 80 00 5C 03 |
| | | // ACK : 02 77 00 00 10 74 00 80 00 7B 03 |
| | | // 飘府芭2锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // 飘府芭2锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // SND : 02 57 00 7D 22 10 74 00 80 00 5D 03 |
| | | // ACK : 02 77 00 7D 22 10 74 00 80 00 7D 5D 03 |
| | | // 飘府芭3锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // 飘府芭3锅 盲澄狼 浚内歹 涝仿阑 1锅栏肺 静扁 |
| | | // SND : 02 57 00 7D 23 10 74 00 80 00 5E 03 |
| | | // ACK : 02 77 00 7D 23 10 74 00 80 00 7E 03 |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | class CTriggerControl_Mvsol |
| | | { |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "DisplayMessage.h" |
| | | |
| | | CDisplayMessage::CDisplayMessage(void) |
| | |
| | | |
| | | BOOL CDisplayMessage::MakeLogFile() |
| | | { |
| | | // Log 贸府 |
| | | // Log 贸府 |
| | | if (m_strLogPath.IsEmpty()) |
| | | return FALSE; |
| | | |
| | |
| | | // DisplayMessage.h: interface for the CDisplayMessage class. |
| | | // DisplayMessage.h: interface for the CDisplayMessage class. |
| | | // |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | |
| | | |
| | | #include "StdAfx.h" |
| | | #include "General_Draw.h" |
| | | #include "Server_MemDC.h" |
| | |
| | | #if !defined(__GENERALDRAW_INCLUDED__) |
| | | #if !defined(__GENERALDRAW_INCLUDED__) |
| | | #define __GENERALDRAW_INCLUDED__ |
| | | |
| | | ////////////////////////////////////////////////////////////////////////// |
| | |
| | | CreateFont(&m_Font[EN_ITEMFONT],14,_T("Arial")); |
| | | CreateFont(&m_Font[EN_DATAFONT],12,_T("Arial")); |
| | | CreateFont(&m_Font[EN_BUTTONFONT],24,_T("Arial")); |
| | | CreateFont(&m_Font[EN_HANFONT],12,_T("奔覆眉")); |
| | | CreateFont(&m_Font[EN_HANFONT],12,_T("奔覆眉")); |
| | | CreateFont(&m_Font[EN_LARGEFONT],48,_T("Arial")); |
| | | CreateFont(&m_Font[EN_MIDDLEFONT],35,_T("Arial")); |
| | | } |
| | |
| | | // MImageStatic.cpp : implementation file |
| | | // MImageStatic.cpp : implementation file |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | |
| | | void CMImageStatic::ResetImageStatic() |
| | | { |
| | | // 搬窃 捞固瘤 滚欺甫 檬扁拳. |
| | | // 搬窃 捞固瘤 滚欺甫 檬扁拳. |
| | | ZeroMemory(m_ImageBuf, DEFECTIMAGE_WIDTH * DEFECTIMAGE_HEIGHT + 1); |
| | | m_bSetImage = FALSE; |
| | | m_rectDefect = CRect(0,0,0,0); |
| | |
| | | #if !defined(AFX_HMIMAGESTATIC_H__D74697CD_885E_4E7C_A9EA_2A57C3F51B4A__INCLUDED_) |
| | | #if !defined(AFX_HMIMAGESTATIC_H__D74697CD_885E_4E7C_A9EA_2A57C3F51B4A__INCLUDED_) |
| | | #define AFX_HMIMAGESTATIC_H__D74697CD_885E_4E7C_A9EA_2A57C3F51B4A__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | |
| | | // Attributes |
| | | public: |
| | | UCHAR m_ImageBuf[DEFECTIMAGE_WIDTH * DEFECTIMAGE_HEIGHT + 1]; // 搬窃 捞固瘤甫 焊咯林绰 滚欺. |
| | | UCHAR m_ImageBuf[DEFECTIMAGE_WIDTH * DEFECTIMAGE_HEIGHT + 1]; // 搬窃 捞固瘤甫 焊咯林绰 滚欺. |
| | | BYTE m_BitmapInfo[sizeof(BITMAPINFOHEADER)+256*sizeof(RGBQUAD)]; |
| | | BOOL m_bSetImage; |
| | | void ResetImageStatic(); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | class CPixelPtr |
| | | { |
| | |
| | | #if !defined(CControlMemDC__INCLUDED_) |
| | | #if !defined(CControlMemDC__INCLUDED_) |
| | | #define CControlMemDC__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | ////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////// |
| | | // Singleton.h: interface for the Singleton class. |
| | | ////////////////////////////////////////////////////////////////////////////////////// |
| | | // ex) sample |
| | |
| | | |
| | | /*--------------------------------------------------------------------------- |
| | | |
| | | # 颇老疙 : Singleton.h |
| | | # 汲 疙 : interface for the Singleton template class. |
| | | # 郴 仿 : |
| | | # 厚 绊 : |
| | | # 颇老疙 : Singleton.h |
| | | # 汲 疙 : interface for the Singleton template class. |
| | | # 郴 仿 : |
| | | # 厚 绊 : |
| | | |
| | | ---------------------------------------------------------------------------*/ |
| | | |
| | |
| | | |
| | | /*--------------------------------------------------------------------------- |
| | | |
| | | # 努贰胶 疙 : Singleton |
| | | # 何葛努贰胶 : 绝澜 |
| | | # 曼炼努贰胶 : 绝澜 |
| | | # 包府氓烙磊 : Voidhoon |
| | | # 汲 疙 : |
| | | # 函 荐 : |
| | | # 郴 仿 : |
| | | # 巩 力 痢 : |
| | | # 努贰胶 疙 : Singleton |
| | | # 何葛努贰胶 : 绝澜 |
| | | # 曼炼努贰胶 : 绝澜 |
| | | # 包府氓烙磊 : Voidhoon |
| | | # 汲 疙 : |
| | | # 函 荐 : |
| | | # 郴 仿 : |
| | | # 巩 力 痢 : |
| | | |
| | | ---------------------------------------------------------------------------*/ |
| | | |
| | |
| | | // =========================================================================== |
| | | // =========================================================================== |
| | | // File Splash.cpp |
| | | // Desc The implementation file for the CSplash class. |
| | | // =========================================================================== |
| | |
| | | // =========================================================================== |
| | | // =========================================================================== |
| | | // File Splash.h |
| | | // Desc The interface of the CSplash class |
| | | // =========================================================================== |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_BTNENH_H__56F13D02_8CDD_42E1_9A73_46B206613CA4__INCLUDED_) |
| | | #if !defined(AFX_BTNENH_H__56F13D02_8CDD_42E1_9A73_46B206613CA4__INCLUDED_) |
| | | #define AFX_BTNENH_H__56F13D02_8CDD_42E1_9A73_46B206613CA4__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_CELLSMANAGER_H__519A1760_5ECF_4E09_ADF7_27E85FC5E0F8__INCLUDED_) |
| | | #if !defined(AFX_CELLSMANAGER_H__519A1760_5ECF_4E09_ADF7_27E85FC5E0F8__INCLUDED_) |
| | | #define AFX_CELLSMANAGER_H__519A1760_5ECF_4E09_ADF7_27E85FC5E0F8__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_FONT_H__680D290B_7A37_47D6_8E9B_300045E3AE85__INCLUDED_) |
| | | #if !defined(AFX_FONT_H__680D290B_7A37_47D6_8E9B_300045E3AE85__INCLUDED_) |
| | | #define AFX_FONT_H__680D290B_7A37_47D6_8E9B_300045E3AE85__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_SURFACECOLOR_H__C6425A9A_E45A_4DD6_BB82_0603E9663A09__INCLUDED_) |
| | | #if !defined(AFX_SURFACECOLOR_H__C6425A9A_E45A_4DD6_BB82_0603E9663A09__INCLUDED_) |
| | | #define AFX_SURFACECOLOR_H__C6425A9A_E45A_4DD6_BB82_0603E9663A09__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_TEXTDESCRIPTOR_H__8439099C_F0E9_45BA_9D40_FCE6F4946E85__INCLUDED_) |
| | | #if !defined(AFX_TEXTDESCRIPTOR_H__8439099C_F0E9_45BA_9D40_FCE6F4946E85__INCLUDED_) |
| | | #define AFX_TEXTDESCRIPTOR_H__8439099C_F0E9_45BA_9D40_FCE6F4946E85__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ |
| | | |
| | | // NOTE: Do not modify the contents of this file. If this class is regenerated by |
| | | // Microsoft Visual C++, your modifications will be overwritten. |
| | |
| | | #if !defined(AFX_TEXTURE_H__AF25E66F_E258_4096_BA2D_3E2E9DB88B3D__INCLUDED_) |
| | | #if !defined(AFX_TEXTURE_H__AF25E66F_E258_4096_BA2D_3E2E9DB88B3D__INCLUDED_) |
| | | #define AFX_TEXTURE_H__AF25E66F_E258_4096_BA2D_3E2E9DB88B3D__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | // DlgLogin.cpp : implementation file |
| | | // DlgLogin.cpp : implementation file |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #pragma once |
| | | #pragma once |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // CDlgLogin dialog |
| | | #include "EdgeInspector_App.h" |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "EdgeImageViewer.h" |
| | | |
| | | // CEdgeImageViewer |
| | |
| | | { |
| | | CMenu menu; |
| | | CMenu popMenu; |
| | | menu.CreateMenu(); // 弥惑困 焕措 皋春 |
| | | popMenu.CreatePopupMenu(); // 扑诀皋春 |
| | | menu.CreateMenu(); // 弥惑困 焕措 皋春 |
| | | popMenu.CreatePopupMenu(); // 扑诀皋春 |
| | | |
| | | popMenu.AppendMenu(MF_SEPARATOR); |
| | | popMenu.AppendMenu(MF_STRING, ID_MODE_USER_SELECT, _T("User Select (Mark/Manual Measure)")); |
| | |
| | | if(bAllCheck) |
| | | popMenu.CheckMenuItem(ID_MODE_VIEW_DEFECT_ALL,MF_CHECKED); |
| | | |
| | | // 牧咆胶飘 皋春 龋免 |
| | | // 牧咆胶飘 皋春 龋免 |
| | | CRect rect; |
| | | GetWindowRect(rect); |
| | | int nX = rect.left + point.x; |
| | |
| | | void CEdgeImageViewer::OnPaint() |
| | | { |
| | | CPaintDC dc(this); // device context for painting |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CStatic::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CStatic::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | UpdateView(); |
| | | } |
| | | |
| | |
| | | // 1. Draw Buffer Image |
| | | UpdateView_Image(&memDC); |
| | | |
| | | //2. 显示视觉效果 |
| | | //2. 显示视觉效果 |
| | | UpdateView_VisionResult(&memDC); |
| | | |
| | | |
| | |
| | | for (int i = 0; i < nCount; i++) { |
| | | DispVisionResult inf = pSideData->m_vDispVisionResult[i]; |
| | | int nType = inf.nType; |
| | | if (0 == nType) { //点 |
| | | if (0 == nType) { //点 |
| | | CRect rtMarkPos_pxl = CRect(inf.pointX-31, inf.pointY-31, inf.pointX + 31, inf.pointY + 31); |
| | | CRect rtMarkPos_wnd = GetWndPos(rtMarkPos_pxl); |
| | | CPoint ptMarkPos_wnd = rtMarkPos_wnd.CenterPoint(); |
| | |
| | | memDC->LineTo(ptMarkPos_wnd.x - 8, ptMarkPos_wnd.y + 8); |
| | | } |
| | | } |
| | | else if (1 == nType) { //矩形 |
| | | else if (1 == nType) { //矩形 |
| | | CRect rtMarkPos_pxl = CRect(inf.rectX1, inf.rectY1, inf.rectX2, inf.rectY2); |
| | | CRect rtMarkSearchPos_wnd = GetWndPos(rtMarkPos_pxl); |
| | | if (4 == inf.eVision) { |
| | |
| | | memDC->Rectangle(rtMarkSearchPos_wnd); |
| | | } |
| | | } |
| | | else if (2 == nType) { //Բ |
| | | else if (2 == nType) { //圆 |
| | | CRect rtMarkPos_pxl = CRect(inf.circleX - inf.circleRadius, inf.circleY - inf.circleRadius, inf.circleX + inf.circleRadius, inf.circleY + inf.circleRadius); |
| | | CRect rtMarkSearchPos_wnd = GetWndPos(rtMarkPos_pxl); |
| | | memDC->SelectObject(&pen); |
| | |
| | | memDC->Ellipse(rtMarkSearchPos_wnd); |
| | | } |
| | | } |
| | | else if (3 == nType) { //直线 |
| | | else if (3 == nType) { //直线 |
| | | CRect rtMarkPos_pxl = CRect(inf.rectX1 - 31, inf.rectY1 - 31, inf.rectX1 + 31, inf.rectY1 + 31); |
| | | CRect rtMarkPos_wnd = GetWndPos(rtMarkPos_pxl); |
| | | CPoint pt0 = rtMarkPos_wnd.CenterPoint(); |
| | |
| | | UpdateView_MousePoint(&memDC); |
| | | |
| | | #if HALCON_VISION_KEY |
| | | //17. 显示vision Rsult |
| | | //17. 显示vision Rsult |
| | | UpdateView_VisionResult(&memDC); |
| | | #endif // HALCON_VISION_KEY |
| | | |
| | |
| | | if(m_ptMousePos_Pxl.y < 0 || m_nTotalHeight <= m_ptMousePos_Pxl.y) |
| | | return; |
| | | |
| | | int nYPos = m_ptMousePos_Pxl.y - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | int nYPos = m_ptMousePos_Pxl.y - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | |
| | | int nPos = (nYPos * m_nFrameWidth) + m_ptMousePos_Pxl.x; |
| | | |
| | |
| | | memDC->TextOut(10, m_rtWnd.Height() - 45, strTemp); |
| | | |
| | | #if HALCON_VISION_KEY |
| | | if ((0 != m_ptMouseDown.x || 0 != m_ptMouseDown.y) && BlVision_GetVisionRecipe()->getVisionSetOpen()) { //鼠标改变 |
| | | if ((0 != m_ptMouseDown.x || 0 != m_ptMouseDown.y) && BlVision_GetVisionRecipe()->getVisionSetOpen()) { //鼠标改变 |
| | | strTemp.Format(_T("(%d / %d)"), m_ptMouseDown.x, m_ptMouseDown.y); |
| | | memDC->TextOut(10, m_rtWnd.Height() - 25, strTemp); |
| | | |
| | |
| | | |
| | | void CEdgeImageViewer::UpdateView_InspectArea(CDC* memDC) |
| | | { |
| | | if(m_pBuffer == NULL || memDC == NULL || m_pGlassData == NULL) |
| | | if (m_pBuffer == NULL || memDC == NULL || m_pGlassData == NULL) { |
| | | return; |
| | | } |
| | | |
| | | if(m_MenuStatus[MODE_VIEW_INSPECT_AREA] == FALSE) |
| | | if (m_MenuStatus[MODE_VIEW_INSPECT_AREA] == FALSE) { |
| | | return; |
| | | } |
| | | |
| | | CPen pen_SideLine(PS_DASH, 1, RGB(255,127,39)); |
| | | CPen pen_ChamferLine(PS_DASH, 1, RGB(255,255,0)); |
| | |
| | | |
| | | CRect rcTmp,rtRealPos; |
| | | int nFilterLine; |
| | | int nChamferLine; |
| | | |
| | | for(int nFrameIdx = 0; nFrameIdx < MAX_IMAGE_FRAME; nFrameIdx++) |
| | | { |
| | | for(int nFrameIdx = 0; nFrameIdx < MAX_IMAGE_FRAME; nFrameIdx++) { |
| | | CRect rtArea_Inspect = m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_rtInspectArea[nFrameIdx]; |
| | | int nSideLine = m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_nSideLineFrame[nFrameIdx]; |
| | | int nSideChamferLine = m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_nSide_Chamfer_LineFrame[nFrameIdx]; |
| | | int nSideLine = (int)m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_nSideLineFrame[nFrameIdx]; |
| | | int nSideChamferLine = (int)m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_nSide_Chamfer_LineFrame[nFrameIdx]; |
| | | |
| | | // Side Line |
| | | rtRealPos = rtArea_Inspect; |
| | | nFilterLine = nSideLine; |
| | | |
| | | if(0 < nFilterLine) |
| | | { |
| | | if(0 < nFilterLine) { |
| | | memDC->SelectObject(&pen_SideLine); |
| | | memDC->MoveTo(int((nFilterLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | memDC->LineTo(int((nFilterLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.bottom - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | } |
| | | |
| | | if(0 < nSideChamferLine) |
| | | { |
| | | if(0 < nSideChamferLine) { |
| | | memDC->SelectObject(&pen_ChamferLine); |
| | | memDC->MoveTo(int((nSideChamferLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | memDC->LineTo(int((nSideChamferLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.bottom - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | } |
| | | |
| | | for(int nInsType = 0; nInsType < MAX_SIDE_INSPECT_TYPE; nInsType++) |
| | | { |
| | | for(int nInsType = 0; nInsType < MAX_SIDE_INSPECT_TYPE; nInsType++) { |
| | | CRect rtArea = m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_rtInspectArea_InsType[nInsType][nFrameIdx]; |
| | | int nFilterLine = m_pGlassData->GetSideData((DimensionDir) m_nSideIdx)->m_nSideFilterLine_InsType[nInsType][nFrameIdx]; |
| | | |
| | | rtRealPos = rtArea; |
| | | nFilterLine = nFilterLine; |
| | | |
| | | if(rtRealPos.IsRectEmpty() != TRUE && rtRealPos.IsRectNull() != TRUE) |
| | | { |
| | | if(rtRealPos.IsRectEmpty() != TRUE && rtRealPos.IsRectNull() != TRUE) { |
| | | rcTmp.left = int((rtRealPos.left - m_ptDisplayStart_pxl.x ) * m_dZoom); |
| | | rcTmp.right = int((rtRealPos.right - m_ptDisplayStart_pxl.x ) * m_dZoom); |
| | | rcTmp.top = int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom); |
| | | rcTmp.bottom = int((rtRealPos.bottom - m_ptDisplayStart_pxl.y) * m_dZoom); |
| | | |
| | | if(rcTmp.top < 0 && rcTmp.bottom > 0 || rcTmp.top > 0 && rcTmp.top < m_rtWnd.bottom +1 || rcTmp.bottom > 0 && rcTmp.bottom < m_rtWnd.bottom +1) |
| | | { |
| | | if(rcTmp.top < 0 && rcTmp.bottom > 0 || rcTmp.top > 0 && rcTmp.top < m_rtWnd.bottom +1 || rcTmp.bottom > 0 && rcTmp.bottom < m_rtWnd.bottom +1) { |
| | | memDC->SelectObject(&pen_Green); |
| | | memDC->MoveTo(int((rtRealPos.left - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | memDC->LineTo(int((rtRealPos.right - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | |
| | | memDC->LineTo(int((rtRealPos.left - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | } |
| | | |
| | | if(0 < nFilterLine) |
| | | { |
| | | if(0 < nFilterLine) { |
| | | memDC->SelectObject(&pen_FilterLine); |
| | | memDC->MoveTo(int((nFilterLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.top - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | | memDC->LineTo(int((nFilterLine - m_ptDisplayStart_pxl.x ) * m_dZoom) , int((rtRealPos.bottom - m_ptDisplayStart_pxl.y) * m_dZoom)); |
| | |
| | | rtCircle.bottom = rtCircle.top + (nDistanceY_wnd * 2); |
| | | memDC->Arc(rtCircle, CPoint(rtCircle.left, rtCircle.CenterPoint().y), CPoint(rtCircle.left, rtCircle.CenterPoint().y)); |
| | | |
| | | /* 康开 救狼 1/4 盔父 焊捞绊 酵阑锭.. |
| | | /* 康开 救狼 1/4 盔父 焊捞绊 酵阑锭.. |
| | | if((ptEnd_Wnd.x < ptStart_Wnd.x && ptEnd_Wnd.y < ptStart_Wnd.y) || (ptEnd_Wnd.x > ptStart_Wnd.x && ptEnd_Wnd.y > ptStart_Wnd.y)) |
| | | memDC->Arc(rtCircle, CPoint(rtCircle.CenterPoint().x, ptEnd_Wnd.y), CPoint(ptEnd_Wnd.x, rtCircle.CenterPoint().y)); |
| | | else |
| | |
| | | for(int nX = m_ptMousePos_Pxl.x -8; nX < m_ptMousePos_Pxl.x + 8 ; nX++) |
| | | { |
| | | int nX_pxl = nX; |
| | | int nY_pxl = nY - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | int nY_pxl = nY - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | |
| | | if(nX_pxl < 0 || m_nFrameWidth <= nX_pxl) |
| | | continue; |
| | |
| | | for(int nX = m_ptMousePos_Pxl.x -8; nX < m_ptMousePos_Pxl.x + 8 ; nX++) |
| | | { |
| | | int nX_pxl = nX; |
| | | int nY_pxl = nY - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | int nY_pxl = nY - m_ptDisplayStart_pxl.y; // Recipe View俊辑 Scroll 且 锭 滚欺 困摹甫 官厕;;; |
| | | |
| | | if(nX_pxl < 0 || m_nFrameWidth <= nX_pxl) |
| | | continue; |
| | |
| | | #if HALCON_VISION_KEY |
| | | void CEdgeImageViewer::OnLButtonUp(UINT nFlags, CPoint point) |
| | | { |
| | | // TODO: 在此添加消息处理程序代码和/或调用默认值 |
| | | // TODO: 在此添加消息处理程序代码和/或调用默认值 |
| | | m_isMouseDown = FALSE; |
| | | |
| | | CWnd::OnLButtonUp(nFlags, point); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include <bitset> |
| | | #include "Global_Define.h" |
| | | #include "cv.h" |
| | |
| | | double m_dPixelSizeY; // Resolution Y |
| | | |
| | | double m_dZoom; |
| | | bitset<MAX_DISPLAY_SET> m_MenuStatus; // 拳搁 葛靛 惑怕 |
| | | EdgeViewer_ManualMeasure m_ManualMeasureStatus; // 荐悼 螟沥 惑怕 |
| | | bitset<MAX_DISPLAY_SET> m_MenuStatus; // 拳搁 葛靛 惑怕 |
| | | EdgeViewer_ManualMeasure m_ManualMeasureStatus; // 荐悼 螟沥 惑怕 |
| | | |
| | | CPoint m_ptDisplayStart_pxl; // View狼 0,0 狼 Pxl 困摹 |
| | | CPoint m_ptMousePos_Wnd; // Wnd狼 付快胶 困摹 |
| | | CPoint m_ptMousePos_Pxl; // Pixel狼 付快胶 困摹 |
| | | CPoint m_ptDisplayStart_pxl; // View狼 0,0 狼 Pxl 困摹 |
| | | CPoint m_ptMousePos_Wnd; // Wnd狼 付快胶 困摹 |
| | | CPoint m_ptMousePos_Pxl; // Pixel狼 付快胶 困摹 |
| | | |
| | | |
| | | public: |
| | |
| | | SIZE m_szImg; |
| | | SIZE m_szMark; |
| | | MANUAL_MEASURE m_ManualMeausre; |
| | | CPoint m_ptMouseSaved; // Profile Save 扁瓷矫 荤侩 |
| | | CPoint m_ptMouseSaved; // Profile Save 扁瓷矫 荤侩 |
| | | |
| | | IViewInterface2Parent *m_pI2M; |
| | | |
| | | CRect m_rcROI; // 泅力 焊咯瘤绊 乐绰 康开 |
| | | CRect m_rcROI; // 泅力 焊咯瘤绊 乐绰 康开 |
| | | CFont m_sideFont; |
| | | CImage m_ImageMagnify; |
| | | EXECPTION_AREA m_refMark; |
| | |
| | | CGlassRecipe* m_pRecipe; |
| | | |
| | | public: |
| | | CPoint m_ptMouseCurrent; // 泅犁 付快胶 谅钎 |
| | | CPoint m_ptMouseCurrent; // 泅犁 付快胶 谅钎 |
| | | EXECPTION_AREA *m_pTracker; |
| | | CRect m_WndRect; |
| | | POINT m_ptOrg; // 傈眉 捞固瘤俊辑 Display 矫累 谅钎 |
| | | POINT m_ptOrg; // 傈眉 捞固瘤俊辑 Display 矫累 谅钎 |
| | | |
| | | int m_nModeTrackerVCR; |
| | | CPoint m_ptOldMouseVCR; |
| | |
| | | // FrameImg.cpp : 备泅 颇老涝聪促. |
| | | // FrameImg.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | |
| | | |
| | | WCHAR wStr[MAX_PATH]; |
| | | FontFamily fontFamily(L"奔覆眉"); |
| | | FontFamily fontFamily(L"奔覆眉"); |
| | | Font font(&fontFamily,11, FontStyleBold ); |
| | | |
| | | swprintf(wStr, L"%d[%d,%d]",m_Image.GetPixel(m_ptCur.x + m_nScrStartX,m_ptCur.y) & 0xff,m_ptCur.x + m_nScrStartX,m_ptCur.y); |
| | |
| | | void CFrameImg::OnPaint() |
| | | { |
| | | CPaintDC dc(this); // device context for painting |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CStatic::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CStatic::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | ViewUpdate(); |
| | | } |
| | | |
| | |
| | | dc.SetTextColor(RGB(0,0,255)); |
| | | |
| | | dc.TextOut(120,3,strTmp); |
| | | // TFT CF Line阑 弊赴促. |
| | | // TFT CF Line阑 弊赴促. |
| | | |
| | | szROI.cx = CHKMIN(int(m_WndRect.Width() / m_dZoom), m_szImg.cx); |
| | | szROI.cy = int(m_WndRect.Height() / m_dZoom); |
| | |
| | | dc.MoveTo(x,y-7); |
| | | dc.LineTo(x,y+7); |
| | | |
| | | // Corner甫 弊赴促. |
| | | // Corner甫 弊赴促. |
| | | DrawCorner(dc,ptMark); |
| | | |
| | | //Defect阑 弊赴促. |
| | | //Defect阑 弊赴促. |
| | | DrawDefect(dc); |
| | | |
| | | // 八荤 康开阑 弊赴促 |
| | | // 八荤 康开阑 弊赴促 |
| | | //DrawInspectArea(dc); |
| | | |
| | | DrawMeasureLine(dc,ptMark); |
| | |
| | | int nValue; |
| | | |
| | | int nTx = (int)(x * m_dZoom) - 40; |
| | | if(m_nSide < 4) // 惑何 |
| | | if(m_nSide < 4) // 惑何 |
| | | { |
| | | // CF LINE |
| | | dc.MoveTo((int)((pInsResult->nGrindframe[0][nFrameIndex]- m_ptOrg.x) * m_dZoom) , m_ptMouseCurrent.y); |
| | |
| | | //strTmp.Format("GRIND : %d um",nValue); |
| | | dc.TextOut( nTx ,m_ptMouseCurrent.y + 30,strTmp); |
| | | } |
| | | else // 窍何 |
| | | else // 窍何 |
| | | { |
| | | // TFT LINE |
| | | dc.MoveTo((int)((pInsResult->nGrindframe[0][nFrameIndex]- m_ptOrg.x) * m_dZoom) , m_ptMouseCurrent.y); |
| | |
| | | |
| | | GetResolution(dResH,dResV); |
| | | |
| | | // 付农甫 弊赴促. |
| | | // 付农甫 弊赴促. |
| | | dc.SelectObject(&pen2); |
| | | |
| | | if(bMark[0]) |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | |
| | | // CFrameImg |
| | |
| | | SIZE m_szImg; |
| | | SIZE m_szMark; |
| | | MANUAL_MEASURE m_ManualMeausre; |
| | | CPoint m_ptMouseSaved; // Profile Save 扁瓷矫 荤侩 |
| | | CPoint m_ptMouseSaved; // Profile Save 扁瓷矫 荤侩 |
| | | |
| | | IViewInterface2Parent *m_pI2M; |
| | | bitset<MAX_DISPLAY_MODE> m_bitModeDisplay; // 拳搁 葛靛 bit |
| | | CRect m_rcROI; // 泅力 焊咯瘤绊 乐绰 康开 |
| | | bitset<MAX_DISPLAY_MODE> m_bitModeDisplay; // 拳搁 葛靛 bit |
| | | CRect m_rcROI; // 泅力 焊咯瘤绊 乐绰 康开 |
| | | CFont m_sideFont; |
| | | CImage m_ImageMagnify; |
| | | EXECPTION_AREA m_refMark; |
| | |
| | | CGlassRecipe* m_pRecipe; |
| | | |
| | | public: |
| | | CPoint m_ptMouseCurrent; // 泅犁 付快胶 谅钎 |
| | | CPoint m_ptMouseCurrent; // 泅犁 付快胶 谅钎 |
| | | EXECPTION_AREA *m_pTracker; |
| | | CRect m_WndRect; |
| | | POINT m_ptOrg; // 傈眉 捞固瘤俊辑 Display 矫累 谅钎 |
| | | POINT m_ptOrg; // 傈眉 捞固瘤俊辑 Display 矫累 谅钎 |
| | | |
| | | int m_nModeTrackerVCR; |
| | | CPoint m_ptOldMouseVCR; |
| | |
| | | // ImgDefect.cpp : 备泅 颇老涝聪促. |
| | | // ImgDefect.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | |
| | | |
| | | |
| | | // CImgDefect 皋矫瘤 贸府扁涝聪促. |
| | | // CImgDefect 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | |
| | | BOOL CImgDefect::Create(RECT const & rect, CWnd * pParentWnd /*= 0*/) |
| | |
| | | void CImgDefect::OnPaint() |
| | | { |
| | | CPaintDC dc(this); // device context for painting |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CWnd::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊钦聪促. |
| | | // 弊府扁 皋矫瘤俊 措秦辑绰 CWnd::OnPaint()阑(甫) 龋免窍瘤 付绞矫坷. |
| | | |
| | | CDC *pDC = GetDC(); |
| | | |
| | |
| | | DrawManualMeasure(memDC); |
| | | } |
| | | } |
| | | else // 角 Size Mode |
| | | else // 角 Size Mode |
| | | { |
| | | rc.right = m_img.GetWidth(); |
| | | rc.bottom = m_img.GetHeight(); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | // CImgDefect |
| | | |
| | |
| | | int m_nMode; |
| | | BOOL m_bMeasure; |
| | | int m_nTurn; |
| | | int m_nTextPos; // 0: Text 免仿 救窃 1: left Top, 2: rigt top, 3: left bottom, 4: right bottom |
| | | int m_nTextPos; // 0: Text 免仿 救窃 1: left Top, 2: rigt top, 3: left bottom, 4: right bottom |
| | | CString m_strTextInfo; |
| | | double m_dPx,m_dPy; |
| | | public: |
| | |
| | | // ImgListView.cpp : implementation file |
| | | // ImgListView.cpp : implementation file |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | { |
| | | m_bProcesing = 0; |
| | | m_bSelect = 0; |
| | | _stprintf(m_Path,_T("%s%s"),strFilePath,strFileName); |
| | | _stprintf_s(m_Path, MAX_PATH, _T("%s%s"), strFilePath, strFileName); |
| | | m_bValid = m_Img.Load(m_Path); |
| | | m_rcImg = CRect(0,0,100,100); |
| | | } |
| | |
| | | void CPotoItem::Draw(CDC *pDC, CRect rcClient, CRect rcChange) |
| | | { |
| | | //------------------------------------------------------ |
| | | // 沥荤阿屈 农扁甫 爱绰 皋葛府DC 积己( MemDC ) |
| | | // 沥荤阿屈 农扁甫 爱绰 皋葛府DC 积己( MemDC ) |
| | | //------------------------------------------------------ |
| | | |
| | | CDC MemDC; |
| | |
| | | MemBitmap.CreateCompatibleBitmap( pDC , rcChange.Width() , rcChange.Height() ); |
| | | CBitmap * pOldBitmap = (CBitmap *)MemDC.SelectObject( &MemBitmap ); |
| | | |
| | | // 硅版 磨窍扁 |
| | | // 硅版 磨窍扁 |
| | | CRect rcMemDC(0, 0, rcChange.Width(), rcChange.Height()); |
| | | |
| | | if(m_bSelect) |
| | |
| | | |
| | | if(m_bProcesing) |
| | | DrawRect(&MemDC,RGB(255,0,0),rcMemDC); |
| | | // 咯归篮 啊肺 技肺 5 |
| | | // Text 啊 静咯龙 傍埃 25 |
| | | // 咯归篮 啊肺 技肺 5 |
| | | // Text 啊 静咯龙 傍埃 25 |
| | | CRect rcImg (5, 5, rcChange.Width()-5, rcChange.Height()-ITEM_TEXT); |
| | | m_Img.Draw(MemDC.GetSafeHdc(), rcImg); |
| | | DrawText(&MemDC,RGB(0,0,255)); |
| | |
| | | int mode = pDC->SetBkMode( TRANSPARENT ); |
| | | int modeText = pDC->SetTextColor( color ); |
| | | //----------------------------------------------------------- |
| | | // 捞固瘤疙阑 拳搁俊 免仿茄促. |
| | | // File Name捞 15磊 捞惑 登搁 ~~ 肺 绵距 |
| | | // 捞固瘤疙阑 拳搁俊 免仿茄促. |
| | | // File Name捞 15磊 捞惑 登搁 ~~ 肺 绵距 |
| | | //----------------------------------------------------------- |
| | | CString strtmp; |
| | | // if(m_strName.GetLength() > 15) |
| | |
| | | MemDC.CreateCompatibleDC( &dc ); |
| | | MemBitmap.CreateCompatibleBitmap( &dc , rect.Width() , rect.Height() ); |
| | | pOldBitmap = (CBitmap *)MemDC.SelectObject( &MemBitmap ); |
| | | MemDC.FillRect( &rect , &m_BgBrush ); // 硅版祸栏肺 快急 磨秦林绊... |
| | | MemDC.FillRect( &rect , &m_BgBrush ); // 硅版祸栏肺 快急 磨秦林绊... |
| | | MemDC.SetWindowOrg( ptScroll.x , ptScroll.y ); // SetWindowOrg() |
| | | |
| | | |
| | |
| | | |
| | | if( !tmpRc.IntersectRect( pImgItem->m_rcImg , rcInvalid ) ) |
| | | { |
| | | //辑肺 般摹绰 何盒捞 绝促绰 巴阑 唱鸥辰促. |
| | | //溜 泅犁 酒捞袍篮 拳搁俊 促矫 弊府瘤 臼绰促. |
| | | //辑肺 般摹绰 何盒捞 绝促绰 巴阑 唱鸥辰促. |
| | | //溜 泅犁 酒捞袍篮 拳搁俊 促矫 弊府瘤 臼绰促. |
| | | continue; |
| | | } |
| | | pImgItem->Draw(&MemDC,rcInvalid,pImgItem->m_rcImg); |
| | |
| | | void CImgListView::OnLButtonDown(UINT nFlags, CPoint point) |
| | | { |
| | | CPoint ptScroll(point); |
| | | ptScroll += GetScrollPosition(); // 胶农费等 谅钎甫 歹秦林绊... |
| | | ptScroll += GetScrollPosition(); // 胶农费等 谅钎甫 歹秦林绊... |
| | | |
| | | if(SelectItemChk(ptScroll)) |
| | | Invalidate(FALSE);//Invalidate(); |
| | |
| | | |
| | | BOOL CImgListView::OnEraseBkgnd(CDC* pDC) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | CRect rect ; |
| | | GetClientRect(&rect); |
| | | pDC->FillRect(rect, &m_BgBrush); |
| | |
| | | CPoint ptScroll = GetScrollPosition(); |
| | | pDC->SetWindowOrg(ptScroll.x,ptScroll.y); |
| | | //---------------------------------------------------- |
| | | // Invalidate 等 康开狼 谅钎甫 稠府 谅钎拌肺 函拳窍扁 |
| | | // 困秦辑 掘绢柯促. |
| | | // Invalidate 等 康开狼 谅钎甫 稠府 谅钎拌肺 函拳窍扁 |
| | | // 困秦辑 掘绢柯促. |
| | | //---------------------------------------------------- |
| | | CRect rcInvalid; |
| | | GetClientRect(rcInvalid); |
| | |
| | | tmpRc = pImgItem->m_rcImg; |
| | | if( !tmpRc.IntersectRect( pImgItem->m_rcImg , rcInvalid ) ) |
| | | { |
| | | //辑肺 般摹绰 何盒捞 绝促绰 巴阑 唱鸥辰促. |
| | | //溜 泅犁 酒捞袍篮 拳搁俊 促矫 弊府瘤 臼绰促. |
| | | //辑肺 般摹绰 何盒捞 绝促绰 巴阑 唱鸥辰促. |
| | | //溜 泅犁 酒捞袍篮 拳搁俊 促矫 弊府瘤 臼绰促. |
| | | continue; |
| | | } |
| | | pImgItem->Draw(&MemDC,rcInvalid,pImgItem->m_rcImg); |
| | |
| | | |
| | | void CImgListView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | //UpdateView(); |
| | | CScrollView::OnVScroll(nSBCode, nPos, pScrollBar); |
| | | } |
| | |
| | | #if !defined(AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_) |
| | | #if !defined(AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_) |
| | | #define AFX_IMGLISTVIEW_H__C0DD00C1_EEA9_4E84_BB03_8DE83B2DEDEA__INCLUDED_ |
| | | |
| | | #if _MSC_VER > 1000 |
| | |
| | | |
| | | #define LEFT_MARJIN 15 |
| | | #define TOP_MARJIN 15 |
| | | #define ITEM_WIDTH 190 // 380 // 蔼捞 官差绢具 窍骨肺 define捞唱 const绰 绢匡府瘤 臼绰促. |
| | | #define ITEM_WIDTH 190 // 380 // 蔼捞 官差绢具 窍骨肺 define捞唱 const绰 绢匡府瘤 臼绰促. |
| | | #define ITEM_HEIGHT 160 // 320 // |
| | | #define ITEM_TEXT 22 // 酒捞袍俊 措茄 臂磊 臭捞 |
| | | #define ITEM_ROW_MARJIN 15 // 酒捞袍苞 酒捞袍狼 啊肺荤捞 |
| | | #define ITEM_COL_MARJIN 20 // 酒捞袍苞 酒捞袍狼 技肺荤捞 |
| | | #define ITEM_TEXT 22 // 酒捞袍俊 措茄 臂磊 臭捞 |
| | | #define ITEM_ROW_MARJIN 15 // 酒捞袍苞 酒捞袍狼 啊肺荤捞 |
| | | #define ITEM_COL_MARJIN 20 // 酒捞袍苞 酒捞袍狼 技肺荤捞 |
| | | |
| | | class CPotoItem |
| | | { |
| | |
| | | |
| | | CImage m_Img; |
| | | CRect m_rcImg; |
| | | BOOL m_bSelect; // 急琶 登菌绰啊 |
| | | BOOL m_bValid; // 按眉狼 粮犁己 |
| | | BOOL m_bProcesing; // 贸府吝牢啊 |
| | | BOOL m_bSelect; // 急琶 登菌绰啊 |
| | | BOOL m_bValid; // 按眉狼 粮犁己 |
| | | BOOL m_bProcesing; // 贸府吝牢啊 |
| | | TCHAR m_Path[MAX_PATH]; |
| | | |
| | | CRect GetRect() { return m_rcImg; } |
| | |
| | | |
| | | public: |
| | | IMG_MAP m_ImgMap; |
| | | int m_nHItem; // 技肺肺 割俺啊 免仿捞 瞪巴牢啊? |
| | | int m_nHItem; // 技肺肺 割俺啊 免仿捞 瞪巴牢啊? |
| | | int m_nHItemOld; |
| | | int m_nAddItem; // 佬绢甸牢 酒捞袍狼 醚肮荐 |
| | | CBrush m_BgBrush; // 硅版Brush |
| | | int m_nAddItem; // 佬绢甸牢 酒捞袍狼 醚肮荐 |
| | | CBrush m_BgBrush; // 硅版Brush |
| | | CImage* m_pSelImg; |
| | | CPotoItem *m_pSelectItem; |
| | | public: |
| | |
| | | // Dlg_LampControl.cpp : 备泅 颇老涝聪促. |
| | | // Dlg_LampControl.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "Global_Define.h" |
| | | |
| | | |
| | | // CViewLampControl 措拳 惑磊涝聪促. |
| | | // CViewLampControl 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewLampControl, CDialog) |
| | | |
| | |
| | | } |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // 抗寇: OCX 加己 其捞瘤绰 FALSE甫 馆券秦具 钦聪促. |
| | | // 抗寇: OCX 加己 其捞瘤绰 FALSE甫 馆券秦具 钦聪促. |
| | | } |
| | | |
| | | void CViewLampControl::ClickChkLampOnOffButton() |
| | |
| | | void CViewLampControl::OnNMCustomdrawSlider2(NMHDR *pNMHDR, LRESULT *pResult) |
| | | { |
| | | LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR); |
| | | // TODO: 咯扁俊 牧飘费 舅覆 贸府扁 内靛甫 眠啊钦聪促. |
| | | // TODO: 咯扁俊 牧飘费 舅覆 贸府扁 内靛甫 眠啊钦聪促. |
| | | |
| | | LampValueUpdate(1,IDC_EDIT_LAMP_VALUE_2); |
| | | *pResult = 0; |
| | |
| | | void CViewLampControl::OnNMCustomdrawSlider3(NMHDR *pNMHDR, LRESULT *pResult) |
| | | { |
| | | LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR); |
| | | // TODO: 咯扁俊 牧飘费 舅覆 贸府扁 内靛甫 眠啊钦聪促. |
| | | // TODO: 咯扁俊 牧飘费 舅覆 贸府扁 内靛甫 眠啊钦聪促. |
| | | |
| | | LampValueUpdate(2,IDC_EDIT_LAMP_VALUE_3); |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "afxcmn.h" |
| | | #include "EdgeInspector_App.h" |
| | | #include "Global_Define.h" |
| | |
| | | #include "GlassRecipe.h" |
| | | #include "HardwareSettings.h" |
| | | #include "Glass_Data.h" |
| | | // CViewLampControl 措拳 惑磊涝聪促. |
| | | // CViewLampControl 措拳 惑磊涝聪促. |
| | | |
| | | #define UM_LIGHT_APPLY_RECIPE (WM_USER + 4001) |
| | | |
| | |
| | | DECLARE_DYNAMIC(CViewLampControl) |
| | | |
| | | public: |
| | | CViewLampControl(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewLampControl(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewLampControl(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_LAMP_CONTROL }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | void ClickChkLampOnOffButton(); |
| | | void ClickChkCloseButton(); |
| | | DECLARE_MESSAGE_MAP() |
| | |
| | | // ViewDefect.cpp : 备泅 颇老涝聪促. |
| | | // ViewDefect.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | #include "Global_Define.h" |
| | | |
| | | // CViewDefect 措拳 惑磊涝聪促. |
| | | // CViewDefect 措拳 惑磊涝聪促. |
| | | |
| | | #define GRID_FIX_COLOR RGB(144,200,246) |
| | | #define GRID_COLOR RGB(242,242,242) |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | // CViewDefect 皋矫瘤 贸府扁涝聪促. |
| | | // CViewDefect 皋矫瘤 贸府扁涝聪促. |
| | | void CViewMain_Defect::SetRecipe(CHardwareSettings *pHW) |
| | | { |
| | | m_pHardware = pHW; |
| | |
| | | |
| | | if(m_pSelDefect->m_strSaveImagePath.IsEmpty() == TRUE || m_pSelDefect->m_bJudge_NG == FALSE) |
| | | { |
| | | // Buffer俊辑 捞固瘤 啊廉坷霸 窍绰巴档.. |
| | | // Buffer俊辑 捞固瘤 啊廉坷霸 窍绰巴档.. |
| | | |
| | | } |
| | | else |
| | |
| | | |
| | | void CViewMain_Defect::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | SCROLLINFO si; |
| | | si.fMask = SIF_ALL; |
| | | m_ctrlScrollH.GetScrollInfo(&si, SIF_ALL); |
| | |
| | | lf.lfItalic = 0; |
| | | lf.lfHeight = 14; |
| | | lf.lfWeight = FW_BOLD; |
| | | _tcscpy(lf.lfFaceName, _T("Arial")); |
| | | _tcscpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial")); |
| | | |
| | | m_GrdDefect.GetDefaultCell(TRUE, FALSE)->SetFont(&lf); |
| | | m_GrdDefect.GetDefaultCell(FALSE, TRUE)->SetFont(&lf); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "Global_Define.h" |
| | | #include "GridCtrl.h" |
| | |
| | | typedef std::vector<CDefect*> LISTDefect; |
| | | typedef std::vector<CDefect*>::iterator LISTDefectit; |
| | | |
| | | // CViewDefect 措拳 惑磊涝聪促. |
| | | // CViewDefect 措拳 惑磊涝聪促. |
| | | |
| | | class CViewMain_Defect : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CViewMain_Defect) |
| | | |
| | | public: |
| | | CViewMain_Defect(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_Defect(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_Defect(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_DEFECT }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(void); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); |
| | |
| | | // ViewHWSetting.cpp : 备泅 颇老涝聪促. |
| | | // ViewHWSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "Global_Define.h" |
| | | #include "NewCellTypes\GridCellCombo.h" |
| | | |
| | | // CViewHWSetting 措拳 惑磊涝聪促. |
| | | // CViewHWSetting 措拳 惑磊涝聪促. |
| | | extern BOOL g_bUse_SaveAllDMP; |
| | | const int LIGHT_COLUMN_COUNT = 4; |
| | | const TCHAR* LIGHT_COLUMN_ITEM[LIGHT_COLUMN_COUNT] = {_T("ID"),_T("Type"),_T("Port&IP"),_T("Maker")}; |
| | |
| | | |
| | | return TRUE; |
| | | } |
| | | // CViewHWSetting 皋矫瘤 贸府扁涝聪促. |
| | | // CViewHWSetting 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | |
| | | void CViewMain_HWSetting::Init_LightGrid() |
| | |
| | | lf.lfItalic = 0; |
| | | lf.lfHeight = 14; |
| | | lf.lfWeight = FW_BOLD; |
| | | _tcscpy(lf.lfFaceName, _T("Arial")); |
| | | _tcscpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial")); |
| | | |
| | | m_LightGrid.GetDefaultCell(TRUE, FALSE)->SetFont(&lf); |
| | | m_LightGrid.GetDefaultCell(FALSE, TRUE)->SetFont(&lf); |
| | |
| | | lf.lfItalic = 0; |
| | | lf.lfHeight = 14; |
| | | lf.lfWeight = FW_BOLD; |
| | | _tcscpy(lf.lfFaceName, _T("Arial")); |
| | | _tcscpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial")); |
| | | |
| | | m_CameraGrid.GetDefaultCell(TRUE, FALSE)->SetFont(&lf); |
| | | m_CameraGrid.GetDefaultCell(FALSE, TRUE)->SetFont(&lf); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "btnenh.h" |
| | | #include "General_Draw.h" |
| | |
| | | #include "HardwareSettings.h" |
| | | #include "DlgLicenseInfo.h" |
| | | |
| | | // CViewHWSetting 措拳 惑磊涝聪促. |
| | | // CViewHWSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CHardwareSettings; |
| | | class CViewMain_HWSetting : public CDialogEx |
| | |
| | | DECLARE_DYNAMIC(CViewMain_HWSetting) |
| | | |
| | | public: |
| | | CViewMain_HWSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_HWSetting(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_HWSetting(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_HWSETTING }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | afx_msg void OnPaint(); |
| | |
| | | // ViewLiveCam.cpp : 备泅 颇老涝聪促. |
| | | // ViewLiveCam.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | #include "Global_Define.h" |
| | | |
| | | // CViewLiveCam 措拳 惑磊涝聪促. |
| | | // CViewLiveCam 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewMain_LiveCam, CDialogEx) |
| | | |
| | |
| | | ON_EVENT(CViewMain_LiveCam, IDC_BTN_CAM_SNAP, DISPID_CLICK, CViewMain_LiveCam::OnBnClickedBtnCamSnap, VTS_NONE) |
| | | END_EVENTSINK_MAP() |
| | | |
| | | // CViewLiveCam 皋矫瘤 贸府扁涝聪促. |
| | | // CViewLiveCam 皋矫瘤 贸府扁涝聪促. |
| | | int CViewMain_LiveCam::GetIndex(int nSide) |
| | | { |
| | | int nIndex = 0; |
| | |
| | | |
| | | void CViewMain_LiveCam::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | |
| | | int nIndex; |
| | | |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "FrameImg.h" |
| | | // CViewLiveCam 措拳 惑磊涝聪促. |
| | | // CViewLiveCam 措拳 惑磊涝聪促. |
| | | |
| | | class CHardwareSettings; |
| | | class CGlass_Data; |
| | |
| | | DECLARE_DYNAMIC(CViewMain_LiveCam) |
| | | |
| | | public: |
| | | CViewMain_LiveCam(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_LiveCam(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_LiveCam(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_LIVECAM }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); |
| | |
| | | // ViewScanImage.cpp : 备泅 颇老涝聪促. |
| | | // ViewScanImage.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | |
| | | }; |
| | | |
| | | // CViewScanImage 措拳 惑磊涝聪促. |
| | | // CViewScanImage 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewMain_ScanImage, CDialogEx) |
| | | |
| | |
| | | END_EVENTSINK_MAP() |
| | | |
| | | |
| | | // CViewScanImage 皋矫瘤 贸府扁涝聪促. |
| | | // CViewScanImage 皋矫瘤 贸府扁涝聪促. |
| | | BOOL CViewMain_ScanImage::OnInitDialog() |
| | | { |
| | | UpdateData(FALSE); |
| | |
| | | |
| | | void CViewMain_ScanImage::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) |
| | | { |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | // TODO: 咯扁俊 皋矫瘤 贸府扁 内靛甫 眠啊 棺/肚绰 扁夯蔼阑 龋免钦聪促. |
| | | if(!pScrollBar) |
| | | { |
| | | return CDialogEx::OnHScroll(nSBCode, nPos, pScrollBar); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | //#include "FrameImg.h" |
| | | #include "EdgeImageViewer.h" |
| | | #include "afxcmn.h" |
| | | // CViewScanImage 措拳 惑磊涝聪促. |
| | | // CViewScanImage 措拳 惑磊涝聪促. |
| | | |
| | | class CHardwareSettings; |
| | | class CGlass_Data; |
| | |
| | | DECLARE_DYNAMIC(CViewMain_ScanImage) |
| | | |
| | | public: |
| | | CViewMain_ScanImage(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_ScanImage(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_ScanImage(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_SCANIMAGE }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | afx_msg void OnPaint(); |
| | |
| | | // ViewMainStatus.cpp : 备泅 颇老涝聪促. |
| | | // ViewMainStatus.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CViewMainStatus 措拳 惑磊涝聪促. |
| | | // CViewMainStatus 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewMain_Status, CDialogEx) |
| | | |
| | |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CViewMainStatus 皋矫瘤 贸府扁涝聪促. |
| | | // CViewMainStatus 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | BOOL CViewMain_Status::OnInitDialog(void) |
| | | { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "resource.h" |
| | | #include "Global_Define.h" |
| | | #include "StatusMonitor.h" |
| | |
| | | DECLARE_DYNAMIC(CViewMain_Status) |
| | | |
| | | public: |
| | | CViewMain_Status(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_Status(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_Status(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_STATUS }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(void); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | |
| | |
| | | |
| | | |
| | | #include "stdafx.h" |
| | | #include "ViewPPIDNew.h" |
| | | |
| | | |
| | | // CViewPPIDNew 措拳 惑磊涝聪促. |
| | | // CViewPPIDNew 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewPPIDNew, CDialog) |
| | | |
| | |
| | | ON_EVENT(CViewPPIDNew, IDC_BTN_PPIDNEW_CANCEL, DISPID_CLICK, CViewPPIDNew::ClickBtnPpidnewCancel, VTS_NONE) |
| | | END_EVENTSINK_MAP() |
| | | |
| | | // CViewPPIDNew 皋矫瘤 贸府扁涝聪促. |
| | | // CViewPPIDNew 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | BOOL CViewPPIDNew::OnInitDialog() |
| | | { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "EdgeInspector_App.h" |
| | | #include "General_Draw.h" |
| | | // CViewPPIDNew 措拳 惑磊涝聪促. |
| | | // CViewPPIDNew 措拳 惑磊涝聪促. |
| | | |
| | | class CViewPPIDNew : public CDialog |
| | | { |
| | | DECLARE_DYNAMIC(CViewPPIDNew) |
| | | |
| | | public: |
| | | CViewPPIDNew(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewPPIDNew(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewPPIDNew(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_PPID_NEW }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | public: |
| | |
| | | |
| | | |
| | | #include "stdafx.h" |
| | | #include "ViewRecipeList.h" |
| | | #include "ViewRecipeNew.h" |
| | |
| | | const TCHAR* PPIDLIST_COLUMN_ITEM[PPIDLIST_COLUMN_COUNT] = {_T("No"),_T("PLC Index"),_T("Recipe")}; |
| | | const int PPIDLIST_COLUMN_WIDHT[PPIDLIST_COLUMN_COUNT] = {50,130,145}; |
| | | |
| | | // CViewRecipeList 措拳 惑磊涝聪促. |
| | | // CViewRecipeList 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewRecipeList, CDialogEx) |
| | | |
| | |
| | | finder.Close(); |
| | | } |
| | | |
| | | // CViewRecipeList 皋矫瘤 贸府扁涝聪促. |
| | | // CViewRecipeList 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | void CViewRecipeList::OnShowWindow(BOOL bShow, UINT nStatus) |
| | | { |
| | |
| | | lf.lfItalic = 0; |
| | | lf.lfHeight = 14; |
| | | lf.lfWeight = FW_BOLD; |
| | | _tcscpy(lf.lfFaceName, _T("Arial")); |
| | | _tcscpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial")); |
| | | |
| | | m_ListRecipe.GetDefaultCell(TRUE, FALSE)->SetFont(&lf); |
| | | m_ListRecipe.GetDefaultCell(FALSE, TRUE)->SetFont(&lf); |
| | |
| | | lf.lfItalic = 0; |
| | | lf.lfHeight = 14; |
| | | lf.lfWeight = FW_BOLD; |
| | | _tcscpy(lf.lfFaceName, _T("Arial")); |
| | | _tcscpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial")); |
| | | |
| | | m_ListPPID.GetDefaultCell(TRUE, FALSE)->SetFont(&lf); |
| | | m_ListPPID.GetDefaultCell(FALSE, TRUE)->SetFont(&lf); |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "General_Draw.h" |
| | | |
| | |
| | | #include "HardwareSettings.h" |
| | | #include "Glass_Data.h" |
| | | |
| | | // CViewRecipeList 措拳 惑磊涝聪促. |
| | | // CViewRecipeList 措拳 惑磊涝聪促. |
| | | |
| | | #define UM_SELECT_RECIPE (WM_USER + 1001) |
| | | |
| | |
| | | DECLARE_DYNAMIC(CViewRecipeList) |
| | | |
| | | public: |
| | | CViewRecipeList(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewRecipeList(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewRecipeList(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_RECIPE_LIST }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | |
| | | afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); |
| | | afx_msg void OnBnClickedButListNewrecipe(); |
| | |
| | | // |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ViewRecipeNew.h" |
| | | |
| | | |
| | | // CViewRecipeNew 措拳 惑磊涝聪促. |
| | | // CViewRecipeNew 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewRecipeNew, CDialog) |
| | | |
| | |
| | | ON_EVENT(CViewRecipeNew, IDC_BTN_RECIPENEW_OK, DISPID_CLICK, CViewRecipeNew::ClickBtnRecipenewOk, VTS_NONE) |
| | | ON_EVENT(CViewRecipeNew, IDC_BTN_RECIPENEW_CANCEL, DISPID_CLICK, CViewRecipeNew::ClickBtnRecipenewCancel, VTS_NONE) |
| | | END_EVENTSINK_MAP() |
| | | // CViewRecipeNew 皋矫瘤 贸府扁涝聪促. |
| | | // CViewRecipeNew 皋矫瘤 贸府扁涝聪促. |
| | | |
| | | BOOL CViewRecipeNew::OnInitDialog() |
| | | { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "EdgeInspector_App.h" |
| | | #include "General_Draw.h" |
| | |
| | | DECLARE_DYNAMIC(CViewRecipeNew) |
| | | |
| | | public: |
| | | CViewRecipeNew(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewRecipeNew(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewRecipeNew(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_DLG_RECIPE_NEW }; |
| | | |
| | | protected: |
| | | virtual BOOL OnInitDialog(); |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | afx_msg void OnPaint(); |
| | | afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); |
| | | DECLARE_MESSAGE_MAP() |
| | |
| | | // ViewMainInformation.cpp : 备泅 颇老涝聪促. |
| | | // ViewMainInformation.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CViewMainInformation 措拳 惑磊涝聪促. |
| | | // CViewMainInformation 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewMain_Information, CDialogEx) |
| | | |
| | |
| | | { |
| | | CString strText; |
| | | |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nUnitNo);//研磨部 |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nUnitNo);//研磨部 |
| | | SetDlgItemText(IDC_STATIC_INSINFO_UNITNO, strText); |
| | | |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nEqpNo);//研磨段 |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nEqpNo);//研磨段 |
| | | SetDlgItemText(IDC_STATIC_INSINFO_EQPNO, strText); |
| | | |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nisGrind);//研磨棒 |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nisGrind);//研磨棒 |
| | | SetDlgItemText(IDC_STATIC_INSINFO_ISGRIND, strText); |
| | | |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nRoughPadLayer);//研磨棒使用寿命 |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nRoughPadLayer);//研磨棒使用寿命 |
| | | SetDlgItemText(IDC_STATIC_INSINFO_GLASS_ID, strText); |
| | | |
| | | strText.Format(_T("%d"), g_pStatus->m_pTransData->m_nHandNumber);//Stage No |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "GridCtrl.h" |
| | | |
| | | // CViewMainInformation 措拳 惑磊涝聪促. |
| | | // CViewMainInformation 措拳 惑磊涝聪促. |
| | | |
| | | class CViewMain_Information : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CViewMain_Information) |
| | | |
| | | public: |
| | | CViewMain_Information(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_Information(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_Information(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_INFORMATION }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | |
| | |
| | | // ViewLedRecipeSetting.cpp : 备泅 颇老涝聪促. |
| | | // ViewLedRecipeSetting.cpp : 备泅 颇老涝聪促. |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | |
| | | #include "ViewLampControl.h" |
| | | #include "DlgLogin.h" |
| | | #include "Global_Define.h" |
| | | // CViewLedRecipeSetting 措拳 惑磊涝聪促. |
| | | // CViewLedRecipeSetting 措拳 惑磊涝聪促. |
| | | |
| | | IMPLEMENT_DYNAMIC(CViewMain_Recipe, CDialogEx) |
| | | |
| | |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CViewLedRecipeSetting 皋矫瘤 贸府扁涝聪促. |
| | | // CViewLedRecipeSetting 皋矫瘤 贸府扁涝聪促. |
| | | BEGIN_EVENTSINK_MAP(CViewMain_Recipe, CDialogEx) |
| | | ON_EVENT(CViewMain_Recipe, IDC_BTN_IMG_LOAD, DISPID_CLICK, CViewMain_Recipe::ClickImgLoadButton, VTS_NONE) |
| | | ON_EVENT(CViewMain_Recipe, IDC_BTN_IMG_SAVE, DISPID_CLICK, CViewMain_Recipe::ClickImgSaveButton, VTS_NONE) |
| | |
| | | #if HALCON_VISION_KEY |
| | | void CViewMain_Recipe::onMsgVisionEvent(int code, int eDir) { |
| | | /* code */ |
| | | if (1 == code) { //获取区域数据 |
| | | if (1 == code) { //获取区域数据 |
| | | m_pThis->SetFrameRegion(); |
| | | } |
| | | else if (2 == code) { //获取效果 |
| | | else if (2 == code) { //获取效果 |
| | | m_pThis->DispAllResult(); |
| | | } |
| | | } |
| | |
| | | |
| | | tickCount = GetTickCount(); |
| | | |
| | | // 急琶等 Recipe 荐沥. |
| | | // 急琶等 Recipe 荐沥. |
| | | if (m_pDlgRecipe->WriteRecipeFile() == FALSE) |
| | | { |
| | | AfxMessageBox(_T("Save Fail"), MB_OK | MB_ICONERROR); |
| | |
| | | |
| | | void CViewMain_Recipe::DeleteVectorList() |
| | | { |
| | | // Vector 昏力 |
| | | // Vector 昏力 |
| | | LinkList* pList = NULL; |
| | | for (VectorLinkListIt it = m_VectorLinkList.begin(); it != m_VectorLinkList.end(); it++) |
| | | { |
| | |
| | | { |
| | | if(strRecipe.IsEmpty() == TRUE) |
| | | { |
| | | //AfxMessageBox("Recipe Name捞 绝嚼聪促."); |
| | | //AfxMessageBox("Recipe Name捞 绝嚼聪促."); |
| | | return FALSE; |
| | | } |
| | | |
| | |
| | | { |
| | | CPaintDC dc(this); |
| | | |
| | | DrawMarkImage(); // 恐 捞芭 秦拎具父 贸澜俊 付农 捞固瘤啊 弊妨龙鳖.. |
| | | DrawMarkImage(); // 恐 捞芭 秦拎具父 贸澜俊 付农 捞固瘤啊 弊妨龙鳖.. |
| | | } |
| | | |
| | | void CViewMain_Recipe::ClickButtonOpenExceptionSettingView() |
| | |
| | | |
| | | void CViewMain_Recipe::ClickButtonVisionSetting() |
| | | { |
| | | // TODO: 在此处添加消息处理程序代码 |
| | | // TODO: 在此处添加消息处理程序代码 |
| | | #if HALCON_VISION_KEY |
| | | IVisionRecipe* pInstance = BlVision_GetVisionRecipe(); |
| | | if (!pInstance->getVisionUse()) { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | #include "btnenh.h" |
| | | #include "General_Draw.h" |
| | |
| | | #include "ViewLampControl.h" |
| | | #include "ViewRecipeList.h" |
| | | |
| | | // CViewLedRecipeSetting 措拳 惑磊涝聪促. |
| | | // CViewLedRecipeSetting 措拳 惑磊涝聪促. |
| | | |
| | | class CViewMain_Recipe : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CViewMain_Recipe) |
| | | |
| | | public: |
| | | CViewMain_Recipe(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | CViewMain_Recipe(CWnd* pParent = NULL); // 钎霖 积己磊涝聪促. |
| | | virtual ~CViewMain_Recipe(); |
| | | |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | // 措拳 惑磊 单捞磐涝聪促. |
| | | enum { IDD = IDD_MAIN_VIEW_RECIPE }; |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促. |
| | | virtual BOOL OnInitDialog(); |
| | | virtual BOOL PreTranslateMessage(MSG* pMsg); |
| | | LRESULT OnProcessStatus(WPARAM wParam, LPARAM lParam); |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "ThreadPool.h" |
| | | |
| | | ThreadPool::ThreadPool(size_t thread_count) : m_stop(false) { |
| | |
| | | #ifndef THREADPOOL_H |
| | | #ifndef THREADPOOL_H |
| | | #define THREADPOOL_H |
| | | |
| | | #include <vector> |
| | |
| | | explicit ThreadPool(size_t thread_count); |
| | | ~ThreadPool(); |
| | | |
| | | // 提交任务 |
| | | // 提交任务 |
| | | template<class F> |
| | | void enqueue(F&& task) { |
| | | { |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "WebSocketClient.h" |
| | | |
| | | //WebSocketClient::WebSocketClient() : m_connected(false), m_reconnect(true), m_close_done(false), m_message_received(false), m_heartbeat_interval(5) { |
| | | // // 清除之前的客户端配置并重新初始化 |
| | | // // 清除之前的客户端配置并重新初始化 |
| | | // m_client.clear_access_channels(websocketpp::log::alevel::all); |
| | | // m_client.clear_error_channels(websocketpp::log::elevel::all); |
| | | // m_client.init_asio(); |
| | | // |
| | | // // 设置事件回调 |
| | | // // 设置事件回调 |
| | | // m_client.set_open_handler([this](websocketpp::connection_hdl hdl) { on_open(hdl); }); |
| | | // m_client.set_message_handler([this](websocketpp::connection_hdl hdl, message_ptr msg) { on_message(hdl, msg); }); |
| | | // m_client.set_close_handler([this](websocketpp::connection_hdl hdl) { on_close(hdl); }); |
| | |
| | | // m_client.clear_access_channels(websocketpp::log::alevel::all); |
| | | // m_client.clear_error_channels(websocketpp::log::elevel::all); |
| | | // |
| | | // std::lock_guard<std::mutex> lock(m_mutex); // 保护共享资源 |
| | | // std::lock_guard<std::mutex> lock(m_mutex); // 保护共享资源 |
| | | // auto con = m_client.get_connection(uri, ec); |
| | | // |
| | | // if (ec) { |
| | |
| | | // m_client.connect(con); |
| | | // } |
| | | // |
| | | // // 启动工作线程 |
| | | // // 启动工作线程 |
| | | // m_thread = std::thread(&WebSocketClient::run, this); |
| | | //} |
| | | // |
| | |
| | | // std::string message = m_message_queue.front(); |
| | | // m_message_queue.pop(); |
| | | // |
| | | // send(message); // 发送消息 |
| | | // send(message); // 发送消息 |
| | | // |
| | | // set_busy(false); // 设置为空闲状态,并处理下一个 |
| | | // set_busy(false); // 设置为空闲状态,并处理下一个 |
| | | // process_next_message(); |
| | | // } |
| | | //} |
| | |
| | | // std::vector<char> binary_data = m_binary_queue.front(); |
| | | // m_binary_queue.pop(); |
| | | // |
| | | // send_binary(binary_data); // 发送二进制数据 |
| | | // send_binary(binary_data); // 发送二进制数据 |
| | | // |
| | | // set_busy(false); // 设置为空闲状态,并处理下一个 |
| | | // set_busy(false); // 设置为空闲状态,并处理下一个 |
| | | // process_next_binary(); |
| | | // } |
| | | //} |
| | |
| | | // m_message_received = false; |
| | | // |
| | | // if (m_connected.load()) { |
| | | // // 发送消息 |
| | | // // 发送消息 |
| | | // websocketpp::lib::error_code ec; |
| | | // m_client.send(m_hdl, message, websocketpp::frame::opcode::text, ec); |
| | | // if (ec) { |
| | |
| | | // return false; |
| | | // } |
| | | // |
| | | // // 等待消息或超时 |
| | | // // 等待消息或超时 |
| | | // if (m_cv.wait_for(lock, std::chrono::milliseconds(timeout_ms), [this]() { return m_message_received; })) { |
| | | // std::cout << "Server response received." << std::endl; |
| | | // return true; |
| | |
| | | // m_message_received = false; |
| | | // |
| | | // if (m_connected.load()) { |
| | | // // 发送消息 |
| | | // // 发送消息 |
| | | // websocketpp::lib::error_code ec; |
| | | // m_client.send(m_hdl, binary_data.data(), binary_data.size(), websocketpp::frame::opcode::binary, ec); |
| | | // if (ec) { |
| | |
| | | // return false; |
| | | // } |
| | | // |
| | | // // 等待消息或超时 |
| | | // // 等待消息或超时 |
| | | // if (m_cv.wait_for(lock, std::chrono::milliseconds(timeout_ms), [this]() { return m_message_received; })) { |
| | | // std::cout << "Server response received." << std::endl; |
| | | // return true; |
| | |
| | | // } |
| | | // |
| | | // m_message_received = true; |
| | | // m_cv.notify_one(); // 唤醒等待线程 |
| | | // m_cv.notify_one(); // 唤醒等待线程 |
| | | //} |
| | | // |
| | | //void WebSocketClient::on_close(connection_hdl hdl) { |
| | | // std::cout << "Connection closed." << std::endl; |
| | | // std::lock_guard<std::mutex> lock(m_mutex); |
| | | // |
| | | // m_hdl.reset(); // 清空连接句柄 |
| | | // m_hdl.reset(); // 清空连接句柄 |
| | | // m_connected.store(false); |
| | | // if (m_close_handler) { |
| | | // m_close_handler(); |
| | | // } |
| | | // |
| | | // // 如果需要重连 |
| | | // // 如果需要重连 |
| | | // if (m_reconnect.load()) { |
| | | // |
| | | // // 停止当前运行的事件循环 |
| | | // // 停止当前运行的事件循环 |
| | | // //m_client.stop(); |
| | | // //if (m_thread.joinable()) { |
| | | // // m_thread.join(); |
| | | // //} |
| | | // std::cerr << "Connection lost. Attempting to reconnect..." << std::endl; |
| | | // //reconnect(); // 启动重连机制 |
| | | // //reconnect(); // 启动重连机制 |
| | | // } |
| | | // else { |
| | | // m_cv.notify_one(); |
| | |
| | | #ifndef WEBSOCKETCLIENT_H |
| | | #ifndef WEBSOCKETCLIENT_H |
| | | #define WEBSOCKETCLIENT_H |
| | | |
| | | //#include <websocketpp/config/asio_no_tls_client.hpp> |
| | |
| | | // WebSocketClient(); |
| | | // ~WebSocketClient(); |
| | | // |
| | | // // 连接到指定的URI |
| | | // // 连接到指定的URI |
| | | // void connect(const std::string& uri); |
| | | // |
| | | // // 增加客户端的状态标识 |
| | | // // 增加客户端的状态标识 |
| | | // bool is_busy() const; |
| | | // void set_busy(bool busy); |
| | | // |
| | | // // 发送文本消息 |
| | | // // 发送文本消息 |
| | | // void send(const std::string& message); |
| | | // |
| | | // // 发送二进制数据 |
| | | // // 发送二进制数据 |
| | | // void send_binary(const std::vector<char>& binary_data); |
| | | // |
| | | // // 通过队列发送文本消息 |
| | | // // 通过队列发送文本消息 |
| | | // void enqueue_message(const std::string& message); |
| | | // |
| | | // // 通过队列发送二进制数据 |
| | | // // 通过队列发送二进制数据 |
| | | // void enqueue_binary(const std::vector<char>& binary_data); |
| | | // |
| | | // // 处理下一个消息 |
| | | // // 处理下一个消息 |
| | | // void process_next_message(); |
| | | // void process_next_binary(); |
| | | // |
| | | // // 发送文本消息并等待回复 |
| | | // // 发送文本消息并等待回复 |
| | | // bool send_and_wait(const std::string& message, int timeout_ms); |
| | | // |
| | | // // 发送二进制数据并等待回复 |
| | | // // 发送二进制数据并等待回复 |
| | | // bool send_binary_and_wait(const std::vector<char>& binary_data, int timeout_ms); |
| | | // |
| | | // // 关闭连接 |
| | | // // 关闭连接 |
| | | // void close(); |
| | | // |
| | | // // 设置各种回调函数 |
| | | // // 设置各种回调函数 |
| | | // void set_open_handler(OpenHandler handler); |
| | | // void set_message_handler(MessageHandler handler); |
| | | // void set_close_handler(CloseHandler handler); |
| | | // void set_fail_handler(FailHandler handler); |
| | | // void set_pong_handler(PongHandler handler); |
| | | // |
| | | // // 设置心跳间隔(单位:秒) |
| | | // // 设置心跳间隔(单位:秒) |
| | | // void set_heartbeat_interval(int interval); |
| | | // |
| | | // // 获取当前连接的URL |
| | | // // 获取当前连接的URL |
| | | // std::string get_current_url(); |
| | | // |
| | | // // 检查当前连接是否仍然有效 |
| | | // // 检查当前连接是否仍然有效 |
| | | // bool is_connected() const; |
| | | // |
| | | //private: |
| | | // // WebSocket 运行函数 |
| | | // // WebSocket 运行函数 |
| | | // void run(); |
| | | // |
| | | // // 心跳检查函数 |
| | | // // 心跳检查函数 |
| | | // void heartbeat(); |
| | | // |
| | | // // 回调函数触发器 |
| | | // // 回调函数触发器 |
| | | // void on_open(websocketpp::connection_hdl hdl); |
| | | // void on_message(connection_hdl hdl, message_ptr msg); |
| | | // void on_close(websocketpp::connection_hdl hdl); |
| | |
| | | // void on_pong(websocketpp::connection_hdl hdl, const std::string& payload); |
| | | // |
| | | //private: |
| | | // // WebSocket客户端实例 |
| | | // // WebSocket客户端实例 |
| | | // client m_client; |
| | | // |
| | | // // WebSocket 连接句柄 |
| | | // // WebSocket 连接句柄 |
| | | // connection_hdl m_hdl; |
| | | // |
| | | // // 线程相关 |
| | | // // 线程相关 |
| | | // std::thread m_thread; |
| | | // std::thread m_heartbeat_thread; |
| | | // std::atomic<bool> m_connected; |
| | |
| | | // int m_heartbeat_interval; |
| | | // bool m_message_received; |
| | | // |
| | | // // 发送队列 |
| | | // // 发送队列 |
| | | // std::queue<std::string> m_message_queue; |
| | | // std::queue<std::vector<char>> m_binary_queue; |
| | | // |
| | | // // 标识客户端是否忙碌 |
| | | // // 标识客户端是否忙碌 |
| | | // std::atomic<bool> m_busy; |
| | | // |
| | | // // 线程同步相关 |
| | | // // 线程同步相关 |
| | | // bool m_close_done; |
| | | // std::condition_variable m_cv; |
| | | // |
| | | // // 互斥锁,用于保护共享资源 |
| | | // // 互斥锁,用于保护共享资源 |
| | | // std::mutex m_mutex; |
| | | // |
| | | // // 回调函数 |
| | | // // 回调函数 |
| | | // OpenHandler m_open_handler; |
| | | // MessageHandler m_message_handler; |
| | | // CloseHandler m_close_handler; |
| | |
| | | #include "StdAfx.h" |
| | | #include "StdAfx.h" |
| | | #include "WebSocketClientPool.h" |
| | | |
| | | //WebSocketClientPool::WebSocketClientPool(size_t thread_count) : m_thread_pool(thread_count) {} |
| | |
| | | // } |
| | | // } |
| | | // |
| | | // // 清空之前的客户端,确保是干净的状态 |
| | | // // 清空之前的客户端,确保是干净的状态 |
| | | // m_clients.clear(); |
| | | //} |
| | | // |
| | |
| | | //bool WebSocketClientPool::post_to_idle_client(const std::string& message) { |
| | | // for (auto& client : m_clients) { |
| | | // if (client->is_connected()) { |
| | | // // 提交发送任务到线程池 |
| | | // // 提交发送任务到线程池 |
| | | // m_thread_pool.enqueue([client, message]() { |
| | | // client->set_busy(true); // 标记为忙碌 |
| | | // client->send(message); // 发送消息 |
| | | // client->set_busy(false); // 完成后标记为空闲 |
| | | // client->set_busy(true); // 标记为忙碌 |
| | | // client->send(message); // 发送消息 |
| | | // client->set_busy(false); // 完成后标记为空闲 |
| | | // }); |
| | | // return true; // 成功提交任务 |
| | | // return true; // 成功提交任务 |
| | | // } |
| | | // } |
| | | // return false; // 没有可用客户端 |
| | | // return false; // 没有可用客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::post_binary_to_idle_client(const std::vector<char>& binary_data) { |
| | | // for (auto& client : m_clients) { |
| | | // if (client->is_connected()) { |
| | | // // 提交发送任务到线程池 |
| | | // // 提交发送任务到线程池 |
| | | // m_thread_pool.enqueue([client, binary_data]() { |
| | | // client->set_busy(true); // 标记为忙碌 |
| | | // client->send_binary(binary_data); // 发送二进制数据 |
| | | // client->set_busy(false); // 完成后标记为空闲 |
| | | // client->set_busy(true); // 标记为忙碌 |
| | | // client->send_binary(binary_data); // 发送二进制数据 |
| | | // client->set_busy(false); // 完成后标记为空闲 |
| | | // }); |
| | | // return true; // 成功提交任务 |
| | | // return true; // 成功提交任务 |
| | | // } |
| | | // } |
| | | // return false; // 没有可用客户端 |
| | | // return false; // 没有可用客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::send_to_idle_client(const std::string& message, int timeout_ms) { |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // // 标记为忙 |
| | | // // 标记为忙 |
| | | // client->set_busy(true); |
| | | // |
| | | // // 使用线程池发送消息 |
| | | // // 使用线程池发送消息 |
| | | // m_thread_pool.enqueue([client, message, timeout_ms]() { |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_and_wait(message, timeout_ms); // 5秒超时 |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_and_wait(message, timeout_ms); // 5秒超时 |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // }); |
| | | // |
| | | // return true; // 成功发送消息,返回 true |
| | | // return true; // 成功发送消息,返回 true |
| | | // } |
| | | // } |
| | | // return false; // 没有空闲客户端 |
| | | // return false; // 没有空闲客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::send_binary_to_idle_client(const std::vector<char>& binary_data, int timeout_ms) { |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // // 标记为忙 |
| | | // // 标记为忙 |
| | | // client->set_busy(true); |
| | | // |
| | | // // 使用线程池发送消息 |
| | | // // 使用线程池发送消息 |
| | | // m_thread_pool.enqueue([client, binary_data, timeout_ms]() { |
| | | // // 发送消息并等待服务器回复 |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_binary_and_wait(binary_data, timeout_ms); |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // }); |
| | | // |
| | | // return true; // 成功发送消息,返回 true |
| | | // return true; // 成功发送消息,返回 true |
| | | // } |
| | | // } |
| | | // return false; // 没有空闲客户端 |
| | | // return false; // 没有空闲客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::send_to_idle_client_and_wait(const std::string& message, int timeout_ms) { |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // client->set_busy(true); // 标记为忙 |
| | | // client->set_busy(true); // 标记为忙 |
| | | // |
| | | // try { |
| | | // // 直接在当前线程调用 send_and_wait,阻塞直到任务完成 |
| | | // // 直接在当前线程调用 send_and_wait,阻塞直到任务完成 |
| | | // bool result = client->send_and_wait(message, timeout_ms); |
| | | // client->set_busy(false); // 设置为空闲状态 |
| | | // return result; // 返回结果 |
| | | // client->set_busy(false); // 设置为空闲状态 |
| | | // return result; // 返回结果 |
| | | // } |
| | | // catch (const std::exception& e) { |
| | | // std::cerr << "Exception during sending: " << e.what() << std::endl; |
| | | // client->set_busy(false); // 即使发生异常,也要重置为未忙状态 |
| | | // return false; // 发生异常,返回失败 |
| | | // client->set_busy(false); // 即使发生异常,也要重置为未忙状态 |
| | | // return false; // 发生异常,返回失败 |
| | | // } |
| | | // } |
| | | // } |
| | | // return false; // 没有空闲客户端 |
| | | // return false; // 没有空闲客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::send_binary_to_idle_client_and_wait(const std::vector<char>& binary_data, int timeout_ms) { |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // client->set_busy(true); // 标记为忙 |
| | | // client->set_busy(true); // 标记为忙 |
| | | // |
| | | // try { |
| | | // // 直接在当前线程调用 send_and_wait,阻塞直到任务完成 |
| | | // // 直接在当前线程调用 send_and_wait,阻塞直到任务完成 |
| | | // bool result = client->send_binary_and_wait(binary_data, timeout_ms); |
| | | // client->set_busy(false); // 设置为空闲状态 |
| | | // return result; // 返回结果 |
| | | // client->set_busy(false); // 设置为空闲状态 |
| | | // return result; // 返回结果 |
| | | // } |
| | | // catch (const std::exception& e) { |
| | | // std::cerr << "Exception during sending: " << e.what() << std::endl; |
| | | // client->set_busy(false); // 即使发生异常,也要重置为未忙状态 |
| | | // return false; // 发生异常,返回失败 |
| | | // client->set_busy(false); // 即使发生异常,也要重置为未忙状态 |
| | | // return false; // 发生异常,返回失败 |
| | | // } |
| | | // } |
| | | // } |
| | | // return false; // 没有空闲客户端 |
| | | // return false; // 没有空闲客户端 |
| | | //} |
| | | // |
| | | //bool WebSocketClientPool::send_to_idle_client_with_retry(const std::string& message, int total_timeout_ms, int retry_interval_ms) { |
| | | // auto start_time = std::chrono::steady_clock::now(); |
| | | // |
| | | // while (true) { |
| | | // // 查找空闲客户端 |
| | | // // 查找空闲客户端 |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // // 标记为忙 |
| | | // // 标记为忙 |
| | | // client->set_busy(true); |
| | | // |
| | | // // 使用线程池发送消息 |
| | | // // 使用线程池发送消息 |
| | | // m_thread_pool.enqueue([client, message]() { |
| | | // try { |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_and_wait(message, 5000); // 这里的超时可以根据需要调整 |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_and_wait(message, 5000); // 这里的超时可以根据需要调整 |
| | | // } |
| | | // catch (const std::exception& e) { |
| | | // std::cerr << "Error sending data: " << e.what() << std::endl; |
| | | // } |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // }); |
| | | // |
| | | // return true; // 成功发送 |
| | | // return true; // 成功发送 |
| | | // } |
| | | // } |
| | | // |
| | | // // 计算已使用的时间 |
| | | // // 计算已使用的时间 |
| | | // auto elapsed_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - start_time).count(); |
| | | // |
| | | // if (elapsed_time >= total_timeout_ms) { |
| | | // std::cerr << "Timeout: failed to send data within the specified timeout of " << total_timeout_ms << " ms." << std::endl; |
| | | // return false; // 超时,无法发送 |
| | | // return false; // 超时,无法发送 |
| | | // } |
| | | // |
| | | // // 没有找到空闲客户端,等待 retry_interval_ms 毫秒后重试 |
| | | // // 没有找到空闲客户端,等待 retry_interval_ms 毫秒后重试 |
| | | // std::this_thread::sleep_for(std::chrono::milliseconds(retry_interval_ms)); |
| | | // } |
| | | //} |
| | |
| | | // auto start_time = std::chrono::steady_clock::now(); |
| | | // |
| | | // while (true) { |
| | | // // 查找空闲客户端 |
| | | // // 查找空闲客户端 |
| | | // for (auto& client : m_clients) { |
| | | // if (!client->is_busy() && client->is_connected()) { |
| | | // // 标记为忙 |
| | | // // 标记为忙 |
| | | // client->set_busy(true); |
| | | // |
| | | // // 使用线程池发送消息 |
| | | // // 使用线程池发送消息 |
| | | // m_thread_pool.enqueue([client, binary_data = std::move(binary_data)]() mutable { |
| | | // try { |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_binary_and_wait(binary_data, 5000); // 这里的超时可以根据需要调整 |
| | | // // 发送消息并等待服务器回复 |
| | | // client->send_binary_and_wait(binary_data, 5000); // 这里的超时可以根据需要调整 |
| | | // } |
| | | // catch (const std::exception& e) { |
| | | // std::cerr << "Error sending binary data: " << e.what() << std::endl; |
| | | // } |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // client->set_busy(false); // 标记为空闲 |
| | | // }); |
| | | // |
| | | // return true; // 成功发送 |
| | | // return true; // 成功发送 |
| | | // } |
| | | // } |
| | | // |
| | | // // 计算已使用的时间 |
| | | // // 计算已使用的时间 |
| | | // auto elapsed_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - start_time).count(); |
| | | // |
| | | // if (elapsed_time >= total_timeout_ms) { |
| | | // std::cerr << "Timeout: failed to send data within the specified timeout of " << total_timeout_ms << " ms." << std::endl; |
| | | // return false; // 超时,无法发送 |
| | | // return false; // 超时,无法发送 |
| | | // } |
| | | // |
| | | // // 没有找到空闲客户端,等待 retry_interval_ms 毫秒后重试 |
| | | // // 没有找到空闲客户端,等待 retry_interval_ms 毫秒后重试 |
| | | // std::this_thread::sleep_for(std::chrono::milliseconds(retry_interval_ms)); |
| | | // } |
| | | //} |
| | |
| | | #ifndef WEBSOCKETCLIENTWITHPOOL_H |
| | | #ifndef WEBSOCKETCLIENTWITHPOOL_H |
| | | #define WEBSOCKETCLIENTWITHPOOL_H |
| | | |
| | | //#include "WebSocketClient.h" |
| | |
| | | // explicit WebSocketClientPool(size_t thread_count); |
| | | // ~WebSocketClientPool(); |
| | | // |
| | | // // 初始化客户端 |
| | | // // 初始化客户端 |
| | | // void init_clients(const std::vector<std::string>& uris); |
| | | // |
| | | // // 退出所有客户端 |
| | | // // 退出所有客户端 |
| | | // void exit_clients(); |
| | | // |
| | | // // 使用线程池发送消息 |
| | | // // 使用线程池发送消息 |
| | | // void post_to_all(const std::string& message); |
| | | // void post_binary_to_all(const std::vector<char>& binary_data); |
| | | // |
| | | // // 从池中选择一个空闲的客户端进行发送,不需要服务器响应 |
| | | // // 从池中选择一个空闲的客户端进行发送,不需要服务器响应 |
| | | // bool post_to_idle_client(const std::string& message); |
| | | // bool post_binary_to_idle_client(const std::vector<char>& binary_data); |
| | | // |
| | | // // 从池中选择一个空闲的客户端进行发送,并需要服务器响应 |
| | | // // 从池中选择一个空闲的客户端进行发送,并需要服务器响应 |
| | | // bool send_to_idle_client(const std::string& message, int timeout_ms); |
| | | // bool send_binary_to_idle_client(const std::vector<char>& binary_data, int timeout_ms); |
| | | // |
| | | // // 从池中选择一个空闲的客户端进行发送,并等待服务器响应 |
| | | // // 从池中选择一个空闲的客户端进行发送,并等待服务器响应 |
| | | // bool send_to_idle_client_and_wait(const std::string& message, int timeout_ms); |
| | | // bool send_binary_to_idle_client_and_wait(const std::vector<char>& binary_data, int timeout_ms); |
| | | // |
| | | // // 从池中选择一个空闲的客户端进行发送,并等待服务器响应,如果超时则重试 |
| | | // // 从池中选择一个空闲的客户端进行发送,并等待服务器响应,如果超时则重试 |
| | | // bool send_to_idle_client_with_retry(const std::string& message, int total_timeout_ms, int retry_interval_ms); |
| | | // bool send_binary_to_idle_client_with_retry(std::vector<char>&& binary_data, int total_timeout_ms, int retry_interval_ms); |
| | | // |
| | | // // 设置 WebSocket 客户端事件处理程序 |
| | | // // 设置 WebSocket 客户端事件处理程序 |
| | | // void set_open_handler(WebSocketClient::OpenHandler handler); |
| | | // void set_message_handler(WebSocketClient::MessageHandler handler); |
| | | // void set_close_handler(WebSocketClient::CloseHandler handler); |
| | |
| | | |
| | | // stdafx.cpp : 钎霖 器窃 颇老父 甸绢 乐绰 家胶 颇老涝聪促. |
| | | // EdgeInspector_App.pch绰 固府 哪颇老等 庆歹啊 邓聪促. |
| | | // stdafx.obj俊绰 固府 哪颇老等 屈侥 沥焊啊 器窃邓聪促. |
| | | |
| | | // stdafx.cpp : 钎霖 器窃 颇老父 甸绢 乐绰 家胶 颇老涝聪促. |
| | | // EdgeInspector_App.pch绰 固府 哪颇老等 庆歹啊 邓聪促. |
| | | // stdafx.obj俊绰 固府 哪颇老等 屈侥 沥焊啊 器窃邓聪促. |
| | | |
| | | #include "stdafx.h" |
| | | |
| | |
| | | |
| | | // stdafx.h : 磊林 荤侩窍瘤父 磊林 函版登瘤绰 臼绰 |
| | | // 钎霖 矫胶袍 器窃 颇老 棺 橇肺璃飘 包访 器窃 颇老捞 |
| | | // 甸绢 乐绰 器窃 颇老涝聪促. |
| | | |
| | | // stdafx.h : 磊林 荤侩窍瘤父 磊林 函版登瘤绰 臼绰 |
| | | // 钎霖 矫胶袍 器窃 颇老 棺 橇肺璃飘 包访 器窃 颇老捞 |
| | | // 甸绢 乐绰 器窃 颇老涝聪促. |
| | | |
| | | #pragma once |
| | | |
| | |
| | | #endif |
| | | |
| | | #ifndef VC_EXTRALEAN |
| | | #define VC_EXTRALEAN // 芭狼 荤侩登瘤 臼绰 郴侩篮 Windows 庆歹俊辑 力寇钦聪促. |
| | | #define VC_EXTRALEAN // 芭狼 荤侩登瘤 臼绰 郴侩篮 Windows 庆歹俊辑 力寇钦聪促. |
| | | #endif |
| | | |
| | | #include "targetver.h" |
| | | |
| | | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 老何 CString 积己磊绰 疙矫利栏肺 急攫邓聪促. |
| | | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 老何 CString 积己磊绰 疙矫利栏肺 急攫邓聪促. |
| | | |
| | | // MFC狼 傍烹 何盒苞 公矫 啊瓷茄 版绊 皋矫瘤俊 措茄 见扁扁甫 秦力钦聪促. |
| | | // MFC狼 傍烹 何盒苞 公矫 啊瓷茄 版绊 皋矫瘤俊 措茄 见扁扁甫 秦力钦聪促. |
| | | #define _AFX_ALL_WARNINGS |
| | | |
| | | #include <afxwin.h> // MFC 琴缴 棺 钎霖 备己 夸家涝聪促. |
| | | #include <afxext.h> // MFC 犬厘涝聪促. |
| | | #include <afxwin.h> // MFC 琴缴 棺 钎霖 备己 夸家涝聪促. |
| | | #include <afxext.h> // MFC 犬厘涝聪促. |
| | | |
| | | |
| | | #include <afxdisp.h> // MFC 磊悼拳 努贰胶涝聪促. |
| | | #include <afxdisp.h> // MFC 磊悼拳 努贰胶涝聪促. |
| | | |
| | | |
| | | |
| | | #ifndef _AFX_NO_OLE_SUPPORT |
| | | #include <afxdtctl.h> // Internet Explorer 4 傍侩 牧飘费俊 措茄 MFC 瘤盔涝聪促. |
| | | #include <afxdtctl.h> // Internet Explorer 4 傍侩 牧飘费俊 措茄 MFC 瘤盔涝聪促. |
| | | #endif |
| | | #ifndef _AFX_NO_AFXCMN_SUPPORT |
| | | #include <afxcmn.h> // Windows 傍侩 牧飘费俊 措茄 MFC 瘤盔涝聪促. |
| | | #include <afxcmn.h> // Windows 傍侩 牧飘费俊 措茄 MFC 瘤盔涝聪促. |
| | | #endif // _AFX_NO_AFXCMN_SUPPORT |
| | | |
| | | #include <afxcontrolbars.h> // MFC狼 府夯 棺 牧飘费 阜措 瘤盔 |
| | | #include <afxcontrolbars.h> // MFC狼 府夯 棺 牧飘费 阜措 瘤盔 |
| | | |
| | | |
| | | #include "InspectionBase.h" |
| | |
| | | static UINT g_nSequenceOffColor = RGB(0, 0, 0); |
| | | static UINT g_nSequenceOnColor = RGB(0, 180, 0); |
| | | |
| | | //1. 采集模块 |
| | | //1. 采集模块 |
| | | #include "../SDK/BlGrabber/include/FrameBufferController.h" |
| | | #include "../SDK/BlGrabber/include/GrabberControl.h" |
| | | #if _DEBUG |
| | |
| | | #endif |
| | | |
| | | #if HALCON_VISION_KEY |
| | | //2. 视觉日志模块 |
| | | //2. 视觉日志模块 |
| | | #include "../SDK/LogSDK/include/ILogger.h" |
| | | #include "../SDK/LogSDK/include/LogLib.h" |
| | | #if _DEBUG |
| | |
| | | #pragma comment(lib,"../SDK/LogSDK/lib/x64/Release/Log.lib") |
| | | #endif |
| | | |
| | | //3. 视觉显示模块 |
| | | //3. 视觉显示模块 |
| | | #include "../SDK/BaseDisplaySDK/include/typesdef.h" |
| | | #include "../SDK/BaseDisplaySDK/include/BaseVision.h" |
| | | #include "../SDK/BaseDisplaySDK/include/IClsShape.h" |
| | |
| | | #pragma comment(lib,"../SDK/BaseDisplaySDK/lib/x64/Release/BaseDisplay.lib") |
| | | #endif |
| | | |
| | | //4. 视觉处理模块 |
| | | //4. 视觉处理模块 |
| | | #include "../SDK/BlVisionPro/include/IVisionRecipe.h" |
| | | #include "../SDK/BlVisionPro/include/ISoftVisionApp.h" |
| | | #include "../SDK/BlVisionPro/include/BlVisionLib.h" |
| | |
| | | #endif |
| | | #endif |
| | | |
| | | //5. AI模块 |
| | | //5. AI模块 |
| | | #include "../SDK/AIClient/include/AiDetectEx.h" |
| | | #if _DEBUG |
| | | #pragma comment (lib, "../SDK/AIClient/lib/AIClientD.lib") |
| | |
| | | #pragma comment (lib, "../SDK/AIClient/lib/AIClient.lib") |
| | | #endif |
| | | |
| | | //6. SIS底层模块 |
| | | //6. SIS底层模块 |
| | | #ifdef _DEBUG |
| | | #pragma comment(lib, "../SDK/CHThreadPool/lib/x64/Release/CHThreadPoolD.lib") |
| | | #pragma comment(lib, "../SDK/SISControls/lib/x64/Release/SISControlsD.lib") |
| | |
| | | #pragma once |
| | | #pragma once |
| | | |
| | | // 器窃 SDKDDKVer.h绰 荤侩 啊瓷茄 Windows 敲阀汽 吝 滚傈捞 啊厘 臭篮 敲阀汽阑 沥狼钦聪促. |
| | | // 器窃 SDKDDKVer.h绰 荤侩 啊瓷茄 Windows 敲阀汽 吝 滚傈捞 啊厘 臭篮 敲阀汽阑 沥狼钦聪促. |
| | | |
| | | // 捞傈 Windows 敲阀汽俊 措秦 览侩 橇肺弊伐阑 呼靛窍妨绰 版快俊绰 SDKDDKVer.h甫 器窃窍扁 傈俊 |
| | | // WinSDKVer.h甫 器窃窍绊 _WIN32_WINNT 概农肺甫 瘤盔窍妨绰 敲阀汽栏肺 汲沥窍绞矫坷. |
| | | // 捞傈 Windows 敲阀汽俊 措秦 览侩 橇肺弊伐阑 呼靛窍妨绰 版快俊绰 SDKDDKVer.h甫 器窃窍扁 傈俊 |
| | | // WinSDKVer.h甫 器窃窍绊 _WIN32_WINNT 概农肺甫 瘤盔窍妨绰 敲阀汽栏肺 汲沥窍绞矫坷. |
| | | |
| | | #include <SDKDDKVer.h> |