From 789af4f4a7baee07bd6c2c03588afcb19555343b Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 16 七月 2025 14:00:32 +0800
Subject: [PATCH] 1.CollectionEvent列表从文件加载,界面上显示;

---
 Document/MASTER学习资料/LingSignal2.txt               |   58 +++++++
 SourceCode/Bond/Servo/Servo.vcxproj               |    2 
 Document/MASTER学习资料/LingSignal.bmp                |    0 
 SourceCode/Bond/Servo/HsmsPassive.h               |   23 ++
 SourceCode/Bond/Servo/resource.h                  |    0 
 SourceCode/Bond/Servo/CPageCollectionEvent.cpp    |  126 +++++++++++++++
 SourceCode/Bond/Servo/HsmsPassive.cpp             |   86 ++++++++++
 SourceCode/Bond/Servo/Model.cpp                   |    2 
 SourceCode/Bond/Servo/CCollectionEvent.cpp        |   41 +++++
 SourceCode/Bond/Servo/ServoDlg.cpp                |   17 +
 Document/MASTER学习资料/LingSignal - 副本.bmp           |    0 
 SourceCode/Bond/Servo/CCollectionEvent.h          |    8 +
 SourceCode/Bond/Servo/CPageCollectionEvent.h      |   34 ++++
 SourceCode/Bond/Servo/Servo.vcxproj.filters       |    2 
 Document/MASTER学习资料/SECS通讯整理.xlsx                 |    0 
 SourceCode/Bond/x64/Debug/CollectionEventList.txt |   39 ++++
 SourceCode/Bond/Servo/Servo.rc                    |    0 
 SourceCode/Bond/Servo/CReport.cpp                 |   11 -
 18 files changed, 427 insertions(+), 22 deletions(-)

diff --git "a/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal - \345\211\257\346\234\254.bmp" "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal - \345\211\257\346\234\254.bmp"
new file mode 100644
index 0000000..6c41ca3
--- /dev/null
+++ "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal - \345\211\257\346\234\254.bmp"
Binary files differ
diff --git "a/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal.bmp" "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal.bmp"
new file mode 100644
index 0000000..48efdae
--- /dev/null
+++ "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal.bmp"
Binary files differ
diff --git "a/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal2.txt" "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal2.txt"
new file mode 100644
index 0000000..ac3e3b2
--- /dev/null
+++ "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/LingSignal2.txt"
@@ -0,0 +1,58 @@
+| 淇″彿鍚嶇О                            | EAS瑙掕壊锛堣/鍐欙級 | 璇存槑                |
+| ------------------------------- | ---------- | ----------------- |
+| Downstream Inline               | 璇�          | 涓嬫父Inline鐘舵�侊紝璁惧鍛婄煡涓绘満 |
+| Downstream Trouble              | 璇�          | 涓嬫父寮傚父閫氱煡锛岃澶囧彂缁欎富鏈�     |
+| Interlock                       | 璇�          | 浜掗攣鐘舵�侊紝璁惧鍙嶉         |
+| Send Able                       | 璇�          | 璁惧鏄惁鍑嗗濂藉彂閫丟lass淇″彿  |
+| Send Start                      | 鍐�          | 涓绘満鎸囦护璁惧寮�濮嬪彂閫丟lass   |
+| Job Transfer                    | 鍐�          | 涓绘満鎸囦护璁惧杩涜Job杞Щ     |
+| Send Complete                   | 璇�          | 璁惧鍙嶉鍙戦�佸畬鎴愪俊鍙�        |
+| Shutter State                   | 璇�          | 璁惧鎸℃澘鐘舵�侊紝璁惧鍙嶉       |
+| Pin State                       | 璇�          | 璁惧閽堣剼鐘舵��            |
+| Slot Pair Flag                  | 璇�          | 璁惧鍙嶉Slot閰嶅鐘舵��      |
+| Arm Slot Pair Flag              | 璇�          | 鏈烘鑷係lot閰嶅鐘舵��       |
+| Exchange Possible               | 璇�          | 璁惧鍙嶉鏄惁鍏佽浜ゆ崲        |
+| Exchange Execute                | 鍐�          | 涓绘満涓嬪彂鎵ц浜ゆ崲鎸囦护        |
+| Cancel Request                  | 鍐�          | 涓绘満鍙栨秷褰撳墠鎿嶄綔璇锋眰        |
+| Cancel Ack                      | 璇�          | 璁惧纭鍙栨秷鎿嶄綔          |
+| Cancel Nck                      | 璇�          | 璁惧鎷掔粷鍙栨秷鎿嶄綔          |
+| Abort Request                   | 鍐�          | 涓绘満璇锋眰涓鎿嶄綔          |
+| Abort Ack                       | 璇�          | 璁惧纭涓鎿嶄綔          |
+| Abort Nck                       | 璇�          | 璁惧鎷掔粷涓鎿嶄綔          |
+| Resume Request                  | 鍐�          | 涓绘満璇锋眰鎭㈠鎿嶄綔          |
+| Resume Ack                      | 璇�          | 璁惧纭鎭㈠鎿嶄綔          |
+| Resume Nak                      | 璇�          | 璁惧鎷掔粷鎭㈠鎿嶄綔          |
+| Abnormal                        | 璇�          | 璁惧寮傚父淇″彿            |
+| Empty                           | 璇�          | 璁惧绌虹姸鎬�             |
+| Idle                            | 璇�          | 璁惧绌洪棽鐘舵��            |
+| Run                             | 璇�          | 璁惧杩愯鐘舵��            |
+| Complete                        | 璇�          | 璁惧瀹屾垚鐘舵��            |
+| Lift Up or Pin Up               | 璇�          | 璁惧鎶崌鐘舵��            |
+| Lift Down or Pin Down           | 璇�          | 璁惧涓嬮檷鐘舵��            |
+| Stopper Up or Shutter Open      | 璇�          | 璁惧鎸℃澘寮�鐘舵��           |
+| Stopper Down or Shutter Close   | 璇�          | 璁惧鎸℃澘鍏崇姸鎬�           |
+| Manual Operation                | 璇�          | 璁惧鎵嬪姩鎿嶄綔鐘舵��          |
+| Body Moving                     | 璇�          | 璁惧鍔ㄤ綔涓姸鎬�           |
+| Glass Exist #1(Check Sensor on) | 璇�          | 鐜荤拑瀛樺湪浼犳劅鍣ㄤ俊鍙�         |
+| Glass Exist #2(Check Sensor on) | 璇�          | 鐜荤拑瀛樺湪浼犳劅鍣ㄤ俊鍙�         |
+| Glass Exist #1 Exist            | 璇�          | 鐜荤拑瀹為檯瀛樺湪鐘舵��          |
+| Glass Exist #2 Exist            | 璇�          | 鐜荤拑瀹為檯瀛樺湪鐘舵��          |
+| Arm Stretch complete            | 璇�          | 鏈烘鑷備几灞曞畬鎴�           |
+| Arm Vacuum                      | 璇�          | 鏈烘鑷傚惛闄勭姸鎬�           |
+| Conveyor State                  | 璇�          | 浼犻�佸甫鐘舵��             |
+| Arm Fold complete               | 璇�          | 鏈烘鑷傛姌鍙犲畬鎴�           |
+| Make Define #1\~#9              | 璇�          | 璁惧鑷畾涔変俊鍙凤紝涓�鑸澶囧弽棣�    |
+
+
+
+鎬荤粨
+| 浣犻渶瑕佽繖涓や釜淇″彿鍚楋紵 | 绛旀鏄細蹇呴』鍚屾椂鐢ㄣ��
+| 鈥� | 鈥� |
+| Robot CMD | 鈥滃啓鎼繍鍔ㄤ綔鍙傛暟鈥� |
+| Indexer Operation Mode Command | 鈥滃彂鍚姩鍛戒护鈥� |
+
+Load port Status涓婃姤jobData
+杈规NG, Job Data Change report, 瑕佸師璺��鍥�
+
+sh600975 sz002818 sh600727 sh600829
+
diff --git "a/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/SECS\351\200\232\350\256\257\346\225\264\347\220\206.xlsx" "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/SECS\351\200\232\350\256\257\346\225\264\347\220\206.xlsx"
new file mode 100644
index 0000000..f48f0e0
--- /dev/null
+++ "b/Document/MASTER\345\255\246\344\271\240\350\265\204\346\226\231/SECS\351\200\232\350\256\257\346\225\264\347\220\206.xlsx"
Binary files differ
diff --git a/SourceCode/Bond/Servo/CCollectionEvent.cpp b/SourceCode/Bond/Servo/CCollectionEvent.cpp
index 89095b7..53794c9 100644
--- a/SourceCode/Bond/Servo/CCollectionEvent.cpp
+++ b/SourceCode/Bond/Servo/CCollectionEvent.cpp
@@ -8,6 +8,16 @@
 		m_nCEID = 0;
 	}
 
+	CCollectionEvent::CCollectionEvent(unsigned int id, const char* pszName, const char* pszDescription, std::vector<unsigned int>& prtids)
+	{
+		m_nCEID = id;
+		m_strName = pszName;
+		m_strDescription = pszDescription;
+		for (auto item : prtids) {
+			m_rptids.push_back(item);
+		}
+	}
+
 	CCollectionEvent::~CCollectionEvent()
 	{
 
@@ -16,6 +26,16 @@
 	unsigned int CCollectionEvent::getEventId()
 	{
 		return m_nCEID;
+	}
+
+	std::string& CCollectionEvent::getName()
+	{
+		return m_strName;
+	}
+
+	std::string& CCollectionEvent::getDescription()
+	{
+		return m_strDescription;
 	}
 
 	BOOL CCollectionEvent::addReport(CReport* pReport)
@@ -53,4 +73,25 @@
 
 		return nullptr;
 	}
+
+	std::vector<CReport*>& CCollectionEvent::getReports()
+	{
+		return m_reports;
+	}
+
+	std::string CCollectionEvent::getReportIdsText()
+	{
+		std::string strResult, strName;
+		for (int i = 0; i < m_rptids.size(); i++) {
+			strResult += std::to_string(m_rptids[i]);// (getReport(m_rptids[i]) ?
+			if (nullptr == getReport(m_rptids[i])) {
+				strResult += "?";
+			}
+			if (i != m_rptids.size() - 1) {
+				strResult += ",";
+			}
+		}
+
+		return strResult;
+	}
 }
diff --git a/SourceCode/Bond/Servo/CCollectionEvent.h b/SourceCode/Bond/Servo/CCollectionEvent.h
index 9bdd993..55e4c1f 100644
--- a/SourceCode/Bond/Servo/CCollectionEvent.h
+++ b/SourceCode/Bond/Servo/CCollectionEvent.h
@@ -8,16 +8,24 @@
 	{
 	public:
 		CCollectionEvent();
+		CCollectionEvent(unsigned int id, const char* pszName, const char* pszDescription, std::vector<unsigned int>& prtids);
 		virtual ~CCollectionEvent();
 
 	public:
 		unsigned int getEventId();
+		std::string& getName();
+		std::string& getDescription();
+		std::vector<CReport*>& getReports();
+		std::string getReportIdsText();
 		BOOL addReport(CReport* pReport);
 		BOOL deleteReport(unsigned int nReportId);
 		CReport* getReport(unsigned int nReportId);
 
 	private:
 		unsigned int m_nCEID;
+		std::string m_strName;
+		std::string m_strDescription;
+		std::vector<unsigned int> m_rptids;
 		std::vector<CReport*> m_reports;
 	};
 }
diff --git a/SourceCode/Bond/Servo/CPageCollectionEvent.cpp b/SourceCode/Bond/Servo/CPageCollectionEvent.cpp
new file mode 100644
index 0000000..a7108fb
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageCollectionEvent.cpp
@@ -0,0 +1,126 @@
+锘�// CPageCollectionEvent.cpp: 瀹炵幇鏂囦欢
+//
+
+#include "stdafx.h"
+#include "Servo.h"
+#include "CPageCollectionEvent.h"
+#include "afxdialogex.h"
+
+
+// CPageCollectionEvent 瀵硅瘽妗�
+
+IMPLEMENT_DYNAMIC(CPageCollectionEvent, CHMPropertyPage)
+
+CPageCollectionEvent::CPageCollectionEvent(CWnd* pParent /*=nullptr*/)
+	: CHMPropertyPage(IDD_PAGE_COLLECTION_EVENT, pParent)
+{
+
+}
+
+CPageCollectionEvent::~CPageCollectionEvent()
+{
+}
+
+void CPageCollectionEvent::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+	DDX_Control(pDX, IDC_LIST1, m_listCtrl);
+}
+
+
+BEGIN_MESSAGE_MAP(CPageCollectionEvent, CHMPropertyPage)
+	ON_WM_CTLCOLOR()
+	ON_WM_DESTROY()
+	ON_WM_SIZE()
+END_MESSAGE_MAP()
+
+
+// CPageCollectionEvent 娑堟伅澶勭悊绋嬪簭
+
+
+BOOL CPageCollectionEvent::OnInitDialog()
+{
+	CHMPropertyPage::OnInitDialog();
+
+	// 璇诲嚭鍒楀
+	CString strIniFile, strItem;
+	strIniFile.Format(_T("%s\\configuration.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+	int width[8] = { 0, 218, 180, 180, 180, 180, 180, 180 };
+	for (int i = 0; i < 8; i++) {
+		strItem.Format(_T("Col_%d_Width"), i);
+		width[i] = GetPrivateProfileInt("PageCollectionListCtrl", strItem, width[i], strIniFile);
+	}
+
+
+	// 鎶ヨ〃鎺т欢
+	DWORD dwStyle = m_listCtrl.GetExtendedStyle();
+	dwStyle |= LVS_EX_FULLROWSELECT;
+	dwStyle |= LVS_EX_GRIDLINES;
+	m_listCtrl.SetExtendedStyle(dwStyle);
+
+	HIMAGELIST imageList = ImageList_Create(24, 24, ILC_COLOR24, 1, 1);
+	ListView_SetImageList(m_listCtrl.GetSafeHwnd(), imageList, LVSIL_SMALL);
+	m_listCtrl.InsertColumn(0, _T(""), LVCFMT_RIGHT, width[0]);
+	m_listCtrl.InsertColumn(1, _T("CEID"), LVCFMT_LEFT, width[1]);
+	m_listCtrl.InsertColumn(2, _T("CE Name"), LVCFMT_LEFT, width[2]);
+	m_listCtrl.InsertColumn(3, _T("Descriptions"), LVCFMT_LEFT, width[3]);
+	m_listCtrl.InsertColumn(4, _T("Attached RPTID"), LVCFMT_LEFT, width[4]);
+	loadCollectionEvents();
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+				  // 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
+}
+
+
+HBRUSH CPageCollectionEvent::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
+{
+	HBRUSH hbr = CHMPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
+
+	// TODO:  鍦ㄦ鏇存敼 DC 鐨勪换浣曠壒鎬�
+
+	// TODO:  濡傛灉榛樿鐨勪笉鏄墍闇�鐢荤瑪锛屽垯杩斿洖鍙︿竴涓敾绗�
+	return hbr;
+}
+
+
+void CPageCollectionEvent::OnDestroy()
+{
+	CHMPropertyPage::OnDestroy();
+
+	// 淇濆瓨鍒楀
+	CString strIniFile, strItem, strTemp;
+	strIniFile.Format(_T("%s\\configuration.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+	CHeaderCtrl* pHeader = m_listCtrl.GetHeaderCtrl();
+	for (int i = 0; i < pHeader->GetItemCount(); i++) {
+		RECT rect;
+		pHeader->GetItemRect(i, &rect);
+		strItem.Format(_T("Col_%d_Width"), i);
+		strTemp.Format(_T("%d"), rect.right - rect.left);
+		WritePrivateProfileString("PageCollectionListCtrl", strItem, strTemp, strIniFile);
+	}
+}
+
+
+void CPageCollectionEvent::OnSize(UINT nType, int cx, int cy)
+{
+	CHMPropertyPage::OnSize(nType, cx, cy);
+	if (GetDlgItem(IDC_LIST1) == nullptr) return;
+
+	CWnd* pItem;
+	CRect rcClient, rcItem;
+	GetClientRect(&rcClient);
+	m_listCtrl.MoveWindow(12, 12, rcClient.Width() - 24, rcClient.Height() - 24);
+}
+
+void CPageCollectionEvent::loadCollectionEvents()
+{
+	auto& collectionEvent = theApp.m_model.m_hsmsPassive.getCollectionEvents();
+	for (auto item : collectionEvent) {
+		int index = m_listCtrl.InsertItem(m_listCtrl.GetItemCount(), _T(""));
+		m_listCtrl.SetItemData(index, (DWORD_PTR)item);
+		m_listCtrl.SetItemText(index, 1, std::to_string(item->getEventId()).c_str());
+		m_listCtrl.SetItemText(index, 2, item->getName().c_str());
+		m_listCtrl.SetItemText(index, 3, item->getDescription().c_str());
+		m_listCtrl.SetItemText(index, 4, item->getReportIdsText().c_str());
+	}
+}
diff --git a/SourceCode/Bond/Servo/CPageCollectionEvent.h b/SourceCode/Bond/Servo/CPageCollectionEvent.h
new file mode 100644
index 0000000..7332a09
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageCollectionEvent.h
@@ -0,0 +1,34 @@
+锘�#pragma once
+#include "CHMPropertyPage.h"
+#include "ListCtrlEx.h"
+
+
+// CPageCollectionEvent 瀵硅瘽妗�
+
+class CPageCollectionEvent : public CHMPropertyPage
+{
+	DECLARE_DYNAMIC(CPageCollectionEvent)
+
+public:
+	CPageCollectionEvent(CWnd* pParent = nullptr);   // 鏍囧噯鏋勯�犲嚱鏁�
+	virtual ~CPageCollectionEvent();
+	void loadCollectionEvents();
+
+private:
+	CListCtrlEx m_listCtrl;
+
+// 瀵硅瘽妗嗘暟鎹�
+#ifdef AFX_DESIGN_TIME
+	enum { IDD = IDD_PAGE_COLLECTION_EVENT };
+#endif
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 鏀寔
+
+	DECLARE_MESSAGE_MAP()
+public:
+	virtual BOOL OnInitDialog();
+	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
+	afx_msg void OnDestroy();
+	afx_msg void OnSize(UINT nType, int cx, int cy);
+};
diff --git a/SourceCode/Bond/Servo/CReport.cpp b/SourceCode/Bond/Servo/CReport.cpp
index 49f2fd0..1ab15fa 100644
--- a/SourceCode/Bond/Servo/CReport.cpp
+++ b/SourceCode/Bond/Servo/CReport.cpp
@@ -81,17 +81,6 @@
 			}
 		}
 
-		/*
-		for (int i = 0; i < m_variabels.size(); i++) {
-			strResult += std::to_string(m_variabels[i]->getVarialbleId());
-			strResult += "(";
-			strResult += m_variabels[i]->getName();
-			strResult += ")";
-			if (i != m_variabels.size() - 1) {
-				strResult += ",";
-			}
-		}
-		*/
 		return strResult;
 	}
 
diff --git a/SourceCode/Bond/Servo/HsmsPassive.cpp b/SourceCode/Bond/Servo/HsmsPassive.cpp
index a40a131..20334e8 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.cpp
+++ b/SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -282,7 +282,7 @@
 	std::vector<SERVO::CReport*> reports;
 	int index;
 	CString strLine, strVariable;
-	CString strId, strName, strFormat, strRemark;
+	CString strId;
 	while (file.ReadString(strLine)) {
 		if (!std::regex_match((LPTSTR)(LPCTSTR)strLine, pattern)) {
 			continue;
@@ -324,12 +324,95 @@
 	return m_reports;
 }
 
+SERVO::CReport* CHsmsPassive::getReport(int rptid)
+{
+	for (auto item : m_reports) {
+		if (item->getReportId() == rptid) {
+			return item;
+		}
+	}
+
+	return nullptr;
+}
+
 void CHsmsPassive::clearAllReport()
 {
 	for (auto item : m_reports) {
 		delete item;
 	}
 	m_reports.clear();
+}
+
+int CHsmsPassive::loadCollectionEvents(const char* pszFilepath)
+{
+	CStdioFile file;
+	if (!file.Open(pszFilepath, CFile::modeRead)) {
+		return -1;
+	}
+
+	std::regex pattern("^\\d+,[^,]*,[^,]*,\\(\\d+(,\\d+)*\\).*");  // 鍖归厤浠ユ暟瀛�+閫楀彿寮�澶寸殑瀛楃涓�
+	std::vector<SERVO::CCollectionEvent*> events;
+	int index, last;
+	CString strLine, strRPTIDs;
+	CString strId, strName, strDescription;
+	while (file.ReadString(strLine)) {
+		if (!std::regex_match((LPTSTR)(LPCTSTR)strLine, pattern)) {
+			continue;
+		}
+
+		last = 0;
+		index = strLine.Find(",", last);
+		if (index < 0) continue;
+		strId = strLine.Left(index);
+		last = index + 1;
+
+		index = strLine.Find(",", last);
+		if (index < 0) continue;
+		strName = strLine.Mid(last, index - last);
+		last = index + 1;
+
+		index = strLine.Find(",", last);
+		if (index < 0) continue;
+		strDescription = strLine.Mid(last, index - last);
+		strRPTIDs = strLine.Right(strLine.GetLength() - index - 1);
+		strRPTIDs.Delete(0);
+		strRPTIDs.Delete(strRPTIDs.GetLength() - 1);
+		auto prtids = parseVidList(strRPTIDs);
+
+		SERVO::CCollectionEvent* pEvent = new SERVO::CCollectionEvent(
+			atoi(strId), (LPTSTR)(LPCTSTR)strName, (LPTSTR)(LPCTSTR)strDescription, prtids);
+		for (auto rptid : prtids) {
+			SERVO::CReport* pReport = getReport(rptid);
+			if (pReport != nullptr) {
+				pEvent->addReport(pReport);
+			}
+		}
+		events.push_back(pEvent);
+	}
+
+	if (!events.empty()) {
+		clearAllCollectionEvent();
+		for (auto item : events) {
+			m_collectionEvent.push_back(item);
+		}
+	}
+
+
+	file.Close();
+	return 0;
+}
+
+std::vector<SERVO::CCollectionEvent*>& CHsmsPassive::getCollectionEvents()
+{
+	return m_collectionEvent;
+}
+
+void CHsmsPassive::clearAllCollectionEvent()
+{
+	for (auto item : m_collectionEvent) {
+		delete item;
+	}
+	m_collectionEvent.clear();
 }
 
 std::vector<unsigned int> CHsmsPassive::parseVidList(CString& strNums)
@@ -487,6 +570,7 @@
 
 	clearAllVariabel();
 	clearAllReport();
+	clearAllCollectionEvent();
 
 	return 0;
 }
diff --git a/SourceCode/Bond/Servo/HsmsPassive.h b/SourceCode/Bond/Servo/HsmsPassive.h
index 7549e7c..742c7fc 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.h
+++ b/SourceCode/Bond/Servo/HsmsPassive.h
@@ -108,9 +108,6 @@
 	// 取消 define report
 	void deleteReport(unsigned int RPTID);
 
-	// 取消/删除所有 define report
-	void deleteAllReport();
-
 	// 从文件中加载CVariable列表
 	int loadVarialbles(const char* pszFilepath);
 
@@ -120,10 +117,25 @@
 	// 取得指定Variable
 	SERVO::CVariable* getVariable(int variableId);
 
-	// 从文件中加载CReport表表
+	// 从文件中加载CReport列表
 	int loadReports(const char* pszFilepath);
 
+	// 取消/删除所有 define report
+	void deleteAllReport();
+
+	// 取得Report列表
 	std::vector<SERVO::CReport*>& getReports();
+
+	// 从文件中加载CCollectionEvent列表
+	int loadCollectionEvents(const char* pszFilepath);
+
+	// 取得CCollectionEvent列表
+	std::vector<SERVO::CCollectionEvent*>& getCollectionEvents();
+
+	// 取消/删除所有CollectionEvent
+	void clearAllCollectionEvent();
+
+	SERVO::CReport* getReport(int rptid);
 
 	void setListener(SECSListener listener);
 	unsigned OnCimWork();
@@ -203,5 +215,8 @@
 
 	// CReport vector
 	std::vector<SERVO::CReport*> m_reports;
+
+	// CollectionEvent vector
+	std::vector<SERVO::CCollectionEvent*> m_collectionEvent;
 };
 
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 0060ca4..7544937 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -134,6 +134,8 @@
 	m_hsmsPassive.init(this, "APP", 7000);
 	strVarialbleFile.Format(_T("%s\\ReportList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
 	m_hsmsPassive.loadReports((LPTSTR)(LPCTSTR)strVarialbleFile);
+	strVarialbleFile.Format(_T("%s\\CollectionEventList.txt"), (LPTSTR)(LPCTSTR)m_strWorkDir);
+	m_hsmsPassive.loadCollectionEvents((LPTSTR)(LPCTSTR)strVarialbleFile);
 	m_hsmsPassive.init(this, "APP", 7000);
 
 	SERVO::MasterListener masterListener;
diff --git a/SourceCode/Bond/Servo/Servo.rc b/SourceCode/Bond/Servo/Servo.rc
index 2996a08..c89ce25 100644
--- a/SourceCode/Bond/Servo/Servo.rc
+++ b/SourceCode/Bond/Servo/Servo.rc
Binary files differ
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index 95e187b..7ea9d98 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -205,6 +205,7 @@
     <ClInclude Include="CGlassPool.h" />
     <ClInclude Include="ChangePasswordDlg.h" />
     <ClInclude Include="CMyStatusbar.h" />
+    <ClInclude Include="CPageCollectionEvent.h" />
     <ClInclude Include="CPageLinkSignal.h" />
     <ClInclude Include="CPageReport.h" />
     <ClInclude Include="CPageVarialbles.h" />
@@ -352,6 +353,7 @@
     <ClCompile Include="CGlassPool.cpp" />
     <ClCompile Include="ChangePasswordDlg.cpp" />
     <ClCompile Include="CMyStatusbar.cpp" />
+    <ClCompile Include="CPageCollectionEvent.cpp" />
     <ClCompile Include="CPageLinkSignal.cpp" />
     <ClCompile Include="CPageReport.cpp" />
     <ClCompile Include="CPageVarialbles.cpp" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.filters b/SourceCode/Bond/Servo/Servo.vcxproj.filters
index 4b6248e..aeed166 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.filters
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -174,6 +174,7 @@
     <ClCompile Include="CVariable.cpp" />
     <ClCompile Include="CPageVarialbles.cpp" />
     <ClCompile Include="CPageReport.cpp" />
+    <ClCompile Include="CPageCollectionEvent.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="AlarmManager.h" />
@@ -353,6 +354,7 @@
     <ClInclude Include="CVariable.h" />
     <ClInclude Include="CPageVarialbles.h" />
     <ClInclude Include="CPageReport.h" />
+    <ClInclude Include="CPageCollectionEvent.h" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="Servo.rc" />
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 1b04b6b..b37b0f8 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -25,6 +25,7 @@
 #include "CHMPropertyDlg.h"
 #include "CPageVarialbles.h"
 #include "CPageReport.h"
+#include "CPageCollectionEvent.h"
 
 
 #ifdef _DEBUG
@@ -561,13 +562,17 @@
 {
 	CHMPropertyDlg dlg(_T("Variable|Rreport|Collection Event"), 658, 788);
 
-	CPageReport* pPage1 = new CPageReport();
-	pPage1->Create(IDD_PAGE_REPORT);
-	dlg.addPage(pPage1, "Report");
+	CPageCollectionEvent* pPage1 = new CPageCollectionEvent();
+	pPage1->Create(IDD_PAGE_COLLECTION_EVENT);
+	dlg.addPage(pPage1, "Event");
 
-	CPageVarialbles* pPage2 = new CPageVarialbles();
-	pPage2->Create(IDD_PAGE_VARIABLE);
-	dlg.addPage(pPage2, "Variable");
+	CPageReport* pPage2 = new CPageReport();
+	pPage2->Create(IDD_PAGE_REPORT);
+	dlg.addPage(pPage2, "Report");
+
+	CPageVarialbles* pPage3 = new CPageVarialbles();
+	pPage3->Create(IDD_PAGE_VARIABLE);
+	dlg.addPage(pPage3, "Variable");
 
 	dlg.DoModal();
 }
diff --git a/SourceCode/Bond/Servo/resource.h b/SourceCode/Bond/Servo/resource.h
index 26ca77d..97a7ea7 100644
--- a/SourceCode/Bond/Servo/resource.h
+++ b/SourceCode/Bond/Servo/resource.h
Binary files differ
diff --git a/SourceCode/Bond/x64/Debug/CollectionEventList.txt b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
new file mode 100644
index 0000000..48df026
--- /dev/null
+++ b/SourceCode/Bond/x64/Debug/CollectionEventList.txt
@@ -0,0 +1,39 @@
+300,AccessMode_To_Manual,,(300)
+301,AccessMode_To_Auto,,(301)
+600,ControlStateChanged,,(600)
+700,ProcessStateChanged,,(700)
+10000,RecipeChanged,,(10000)
+10030,CarrierArrived,,(10300)
+10031,CarrierRemoved,,(10300)
+10040,ReadyToLoad,,(10300)
+10041,ReadyToUnLoad,,(10300)
+10051,CarrierIDWaitingForHost,,(10051)
+10052,CarrierIDVerificationOK,,(10052)
+10053,CarrierIDVerificationNG,,(10052)
+10061,SlotMapWaitingForHost,,(10061)
+10062,SlotMapVerificationOK,,(10062)
+10063,SlotMapVerificationNG,,(10062)
+10071,GlassIDReadWaitingForHost,,(10071)
+10072,GlassIDReadVerificationOK,,(10072)
+10073,GlassIDReadVerificationNG,,(10072)
+10080,CarrierStart,,(10080)
+10081,CarrierCompleted,,(10080)
+10082,CarrierStopped,,(10080)
+20000,GlassSlotStart,,(20000)
+20001,GlassSlotCompleted,,(20000)
+30000,PrJobPooled,,(30000)
+30001,PrJobAbort,,(30000)
+30010,PrJobProcessing,,(30000)
+30011,PrJobCompleted,,(30000)
+30013,PrJobPaused,,(30000)
+30014,PrJobResume,,(30000)
+30020,PrJobDeleted,,(30000)
+31000,CJobQueued,,(31000)
+31001,CJobAbort,,(31000)
+31010,CJobExecuting,,(31000)
+31020,CJobCompleted,,(31000)
+31021,CJobDeleted,,(31000)
+31031,CJobPaused,,(31000)
+31032,CJobResume,,(31000)
+40000,E90_SPSM_NoState_To_NeedsProcessing,,(40000)
+40001,E90_SPSM_InProcess_To_ProcessCompleted,,(40000)

--
Gitblit v1.9.3