|
@@ -5,6 +5,7 @@
|
|
#include "OGCAssistTool.h"
|
|
#include "OGCAssistTool.h"
|
|
#include "PageDebug.h"
|
|
#include "PageDebug.h"
|
|
#include "Injection.h"
|
|
#include "Injection.h"
|
|
|
|
+#include "CharEncoding.h"
|
|
|
|
|
|
// 注入;
|
|
// 注入;
|
|
extern CInjection g_Injection;
|
|
extern CInjection g_Injection;
|
|
@@ -144,6 +145,63 @@ BOOL CPageDebug::ConnectProc(DATAHEADER *pHeader, MSG_INFO *pMsg)
|
|
|
|
|
|
BOOL CPageDebug::GoProc(DATAHEADER *pHeader, MSG_INFO *pMsg)
|
|
BOOL CPageDebug::GoProc(DATAHEADER *pHeader, MSG_INFO *pMsg)
|
|
{
|
|
{
|
|
|
|
+ if ( !pHeader || !pMsg )
|
|
|
|
+ return FALSE;
|
|
|
|
+
|
|
|
|
+ // 获取时间;
|
|
|
|
+ DWORD dwElapsed = _tstol((TCHAR*)pMsg->byData);
|
|
|
|
+ // 获取Config.dat第七行;
|
|
|
|
+ TCHAR szConfigPath[MAX_PATH] = {0};
|
|
|
|
+ _stprintf_s(szConfigPath, _T("%s\\Config.dat"), GLOBAL::g_config.szOGCToolPath);
|
|
|
|
+ if ( PathFileExists(szConfigPath) )
|
|
|
|
+ {
|
|
|
|
+ CFile file;
|
|
|
|
+ CFileException excep;
|
|
|
|
+ if ( file.Open(szConfigPath, CFile::modeRead, &excep) )
|
|
|
|
+ {
|
|
|
|
+ DWORD dwRead = 0;
|
|
|
|
+ DWORD dwCount = 0;
|
|
|
|
+ string strData;
|
|
|
|
+ char szRead[MAX_PATH] = {0};
|
|
|
|
+ DWORD dwLen = file.GetLength();
|
|
|
|
+ while ( dwCount < dwLen )
|
|
|
|
+ {
|
|
|
|
+ dwRead = file.Read(szRead, MAX_PATH);
|
|
|
|
+ strData.append(szRead, dwRead);
|
|
|
|
+ dwCount += dwRead;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ file.Close();
|
|
|
|
+
|
|
|
|
+ // 获取第七行;
|
|
|
|
+ int nPos=0;
|
|
|
|
+ int nIndex = 0;
|
|
|
|
+ while ( (nPos=strData.find('\r\n')) != std::string::npos )
|
|
|
|
+ {
|
|
|
|
+ if ( nIndex++ == 6 )
|
|
|
|
+ {
|
|
|
|
+ strData = strData.substr(0, nPos);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ strData = strData.substr(nPos+2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 输出的文件cvs路径;
|
|
|
|
+ CString strSN;
|
|
|
|
+ m_pDlg->GetDlgItemText(EDIT_SN, strSN);
|
|
|
|
+ TCHAR szOutDataPath[MAX_PATH] = {0};
|
|
|
|
+ _stprintf_s(szOutDataPath, _T("%s\\Output_%s_%s\\%s\\sRGB_32Patterns_.csv"), GLOBAL::g_config.szOGCToolPath, CharEncoding::ASCII2UNICODE(strData.c_str()), CTime::GetCurrentTime().Format("%Y%m%d").GetString(), strSN.GetString());
|
|
|
|
+ if ( PathFileExists(szOutDataPath) )
|
|
|
|
+ {
|
|
|
|
+ // 文件存在,按行读取;
|
|
|
|
+ std::string strFileData = GLOBAL::GetFileData(szOutDataPath);
|
|
|
|
+ if ( strFileData.size() )
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
return FALSE;
|
|
return FALSE;
|
|
}
|
|
}
|