| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "pch.h" |
| | | #include "CCollectionEvent.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CCollectionEvent::CCollectionEvent() |
| | | { |
| | | 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() |
| | | { |
| | | |
| | | } |
| | | |
| | | 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) |
| | | { |
| | | ASSERT(pReport); |
| | | if (getReport(pReport->getReportId()) != nullptr) { |
| | | return FALSE; |
| | | } |
| | | |
| | | m_reports.push_back(pReport); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CCollectionEvent::deleteReport(unsigned int nReportId) |
| | | { |
| | | BOOL bDelete = FALSE; |
| | | for (auto iter = m_reports.begin(); iter != m_reports.end(); ++iter) { |
| | | if (nReportId == (*iter)->getReportId()) { |
| | | m_reports.erase(iter); |
| | | bDelete = TRUE; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | return bDelete; |
| | | } |
| | | |
| | | CReport* CCollectionEvent::getReport(unsigned int nReportId) |
| | | { |
| | | for (auto item : m_reports) { |
| | | if (nReportId == item->getReportId()) { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | void CCollectionEvent::setReport(unsigned int nReportId) |
| | | { |
| | | m_rptids.clear(); |
| | | if (nReportId != 0) { |
| | | m_rptids.push_back(nReportId); |
| | | } |
| | | } |
| | | |
| | | std::vector<CReport*>& CCollectionEvent::getReports() |
| | | { |
| | | return m_reports; |
| | | } |
| | | |
| | | std::vector<unsigned int>& CCollectionEvent::getReportIds() |
| | | { |
| | | return m_rptids; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include "CReport.h" |
| | | #include <vector> |
| | | |
| | | |
| | | namespace SERVO { |
| | | class CCollectionEvent |
| | | { |
| | | 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::vector<unsigned int>& getReportIds(); |
| | | std::string getReportIdsText(); |
| | | BOOL addReport(CReport* pReport); |
| | | BOOL deleteReport(unsigned int nReportId); |
| | | CReport* getReport(unsigned int nReportId); |
| | | void setReport(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; |
| | | }; |
| | | } |
| | |
| | | return 0; |
| | | } |
| | | |
| | | int CHsmsActive::hsmsLinkEventReport(std::map<unsigned int, std::vector<unsigned int>>& mapEvent) |
| | | { |
| | | if (mapEvent.empty()) return 0; |
| | | |
| | | IMessage* pMessage = nullptr; |
| | | int nRet = HSMS_Create1Message(pMessage, m_nSessionId, 2 | REPLY, 35, ++m_nSystemByte); |
| | | ISECS2Item* pItem = pMessage->getBody(); |
| | | pItem->addU4Item(1, "DATAID"); |
| | | ISECS2Item* pItemEventList = pItem->addItem(); |
| | | for (auto item : mapEvent) { |
| | | ISECS2Item* pItemEvent = pItemEventList->addItem(); |
| | | pItemEvent->addU4Item(item.first, "CEID"); |
| | | ISECS2Item* pItemRptidList = pItemEvent->addItem(); |
| | | for (auto vid : item.second) { |
| | | pItemRptidList->addU4Item(vid, "RPTID"); |
| | | } |
| | | } |
| | | m_pActive->sendMessage(pMessage); |
| | | HSMS_Destroy1Message(pMessage); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | int CHsmsActive::replyAck0(IMessage* pMessage) |
| | | { |
| | | return 0; |
| | |
| | | #include <string> |
| | | #include <vector> |
| | | #include <map> |
| | | #include "CCollectionEvent.h" |
| | | |
| | | |
| | | typedef std::function<void(void* pFrom, ACTIVESTATE state)> STATECHANGED; |
| | | typedef struct _ACTIVEListener |
| | |
| | | // Define reports |
| | | int hsmsDefineReports(std::map<unsigned int, std::vector<unsigned int>>& mapReport); |
| | | |
| | | // Line Event Report |
| | | int hsmsLinkEventReport(std::map<unsigned int, std::vector<unsigned int>>& mapEvent); |
| | | |
| | | // éè¿çreply彿° |
| | | void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // CLinkReportDetailDlg.cpp: å®ç°æä»¶ |
| | | // |
| | | |
| | | #include "pch.h" |
| | | #include "EAPSimulator.h" |
| | | #include "CLinkReportDetailDlg.h" |
| | | #include "afxdialogex.h" |
| | | |
| | | |
| | | // CLinkReportDetailDlg å¯¹è¯æ¡ |
| | | |
| | | IMPLEMENT_DYNAMIC(CLinkReportDetailDlg, CDialogEx) |
| | | |
| | | CLinkReportDetailDlg::CLinkReportDetailDlg(CWnd* pParent /*=nullptr*/) |
| | | : CDialogEx(IDD_DIALOG_LINK_REPORT_DETAIL, pParent) |
| | | { |
| | | m_pEvent = nullptr; |
| | | } |
| | | |
| | | CLinkReportDetailDlg::~CLinkReportDetailDlg() |
| | | { |
| | | } |
| | | |
| | | void CLinkReportDetailDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialogEx::DoDataExchange(pDX); |
| | | } |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CLinkReportDetailDlg, CDialogEx) |
| | | ON_BN_CLICKED(IDOK, &CLinkReportDetailDlg::OnBnClickedOk) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CLinkReportDetailDlg æ¶æ¯å¤çç¨åº |
| | | |
| | | void CLinkReportDetailDlg::SetCollectionEvent(SERVO::CCollectionEvent* pEvent) |
| | | { |
| | | m_pEvent = pEvent; |
| | | } |
| | | |
| | | BOOL CLinkReportDetailDlg::OnInitDialog() |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | |
| | | |
| | | ASSERT(m_pEvent); |
| | | SetDlgItemInt(IDC_EDIT_CEID, m_pEvent->getEventId()); |
| | | SetDlgItemText(IDC_EDIT_CE_NAME, m_pEvent->getName().c_str()); |
| | | SetDlgItemText(IDC_EDIT_CE_DESCRIPTIONS, m_pEvent->getDescription().c_str()); |
| | | SetDlgItemText(IDC_EDIT_CE_RPTID, m_pEvent->getReportIdsText().c_str()); |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // å¼å¸¸: OCX 屿§é¡µåºè¿å FALSE |
| | | } |
| | | |
| | | void CLinkReportDetailDlg::OnBnClickedOk() |
| | | { |
| | | ASSERT(m_pEvent); |
| | | |
| | | UINT RPTID = GetDlgItemInt(IDC_EDIT_CE_RPTID); |
| | | m_pEvent->setReport(RPTID); |
| | | |
| | | CDialogEx::OnOK(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include "CCollectionEvent.h" |
| | | |
| | | |
| | | // CLinkReportDetailDlg å¯¹è¯æ¡ |
| | | |
| | | class CLinkReportDetailDlg : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CLinkReportDetailDlg) |
| | | |
| | | public: |
| | | CLinkReportDetailDlg(CWnd* pParent = nullptr); // æ åæé 彿° |
| | | virtual ~CLinkReportDetailDlg(); |
| | | void SetCollectionEvent(SERVO::CCollectionEvent* pEvent); |
| | | |
| | | private: |
| | | SERVO::CCollectionEvent* m_pEvent; |
| | | |
| | | // å¯¹è¯æ¡æ°æ® |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DIALOG_LINK_REPORT_DETAIL }; |
| | | #endif |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV æ¯æ |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | public: |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg void OnBnClickedOk(); |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // CLinkReportDlg.cpp: å®ç°æä»¶ |
| | | // |
| | | |
| | | #include "pch.h" |
| | | #include "EAPSimulator.h" |
| | | #include "CLinkReportDlg.h" |
| | | #include "afxdialogex.h" |
| | | #include <string.h> |
| | | #include <regex> |
| | | #include "CLinkReportDetailDlg.h" |
| | | |
| | | |
| | | // CLinkReportDlg å¯¹è¯æ¡ |
| | | |
| | | IMPLEMENT_DYNAMIC(CLinkReportDlg, CDialogEx) |
| | | |
| | | CLinkReportDlg::CLinkReportDlg(CWnd* pParent /*=nullptr*/) |
| | | : CDialogEx(IDD_DIALOG_LINK_REPORT, pParent) |
| | | { |
| | | |
| | | } |
| | | |
| | | CLinkReportDlg::~CLinkReportDlg() |
| | | { |
| | | } |
| | | |
| | | void CLinkReportDlg::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | CDialogEx::DoDataExchange(pDX); |
| | | } |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CLinkReportDlg, CDialogEx) |
| | | ON_NOTIFY(NM_DBLCLK, IDC_LIST1, &CLinkReportDlg::OnListCtrlDoubleClick) |
| | | ON_BN_CLICKED(IDC_BUTTON_SEND, &CLinkReportDlg::OnBnClickedButtonSend) |
| | | ON_WM_DESTROY() |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | // CLinkReportDlg æ¶æ¯å¤çç¨åº |
| | | BOOL CLinkReportDlg::OnInitDialog() |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | |
| | | CListCtrl* pListCtrl = (CListCtrl*)GetDlgItem(IDC_LIST1); |
| | | DWORD dwStyle = pListCtrl->GetExtendedStyle(); |
| | | dwStyle |= LVS_EX_FULLROWSELECT; |
| | | dwStyle |= LVS_EX_GRIDLINES; |
| | | pListCtrl->SetExtendedStyle(dwStyle); |
| | | pListCtrl->ModifyStyle(0, LVS_SHOWSELALWAYS); |
| | | |
| | | HIMAGELIST imageList = ImageList_Create(24, 24, ILC_COLOR24, 1, 1); |
| | | ListView_SetImageList(pListCtrl->GetSafeHwnd(), imageList, LVSIL_SMALL); |
| | | pListCtrl->InsertColumn(0, _T(""), LVCFMT_RIGHT, 0); |
| | | pListCtrl->InsertColumn(1, _T("CEID"), LVCFMT_LEFT, 120); |
| | | pListCtrl->InsertColumn(2, _T("CD Name"), LVCFMT_LEFT, 120); |
| | | pListCtrl->InsertColumn(3, _T("Descriptions"), LVCFMT_LEFT, 180); |
| | | pListCtrl->InsertColumn(4, _T("Attached RPTID"), LVCFMT_LEFT, 120); |
| | | pListCtrl->SetColumnWidth(4, LVSCW_AUTOSIZE_USEHEADER); |
| | | |
| | | |
| | | CString strFile; |
| | | strFile.Format(_T("%s\\CollectionEventList.txt"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir); |
| | | loadCollectionEvents((LPTSTR)(LPCTSTR)strFile); |
| | | |
| | | for (auto item : m_collectionEvents) { |
| | | int index = pListCtrl->InsertItem(pListCtrl->GetItemCount(), _T("")); |
| | | pListCtrl->SetItemData(index, (DWORD_PTR)item); |
| | | pListCtrl->SetItemText(index, 1, std::to_string(item->getEventId()).c_str()); |
| | | pListCtrl->SetItemText(index, 2, item->getName().c_str()); |
| | | pListCtrl->SetItemText(index, 3, item->getDescription().c_str()); |
| | | pListCtrl->SetItemText(index, 4, item->getReportIdsText().c_str()); |
| | | } |
| | | |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // å¼å¸¸: OCX 屿§é¡µåºè¿å FALSE |
| | | } |
| | | |
| | | int CLinkReportDlg::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); |
| | | events.push_back(pEvent); |
| | | } |
| | | |
| | | if (!events.empty()) { |
| | | clearAllCollectionEvent(); |
| | | for (auto item : events) { |
| | | m_collectionEvents.push_back(item); |
| | | } |
| | | } |
| | | |
| | | |
| | | file.Close(); |
| | | return 0; |
| | | } |
| | | |
| | | std::vector<unsigned int> CLinkReportDlg::parseVidList(CString& strNums) |
| | | { |
| | | // 1. å
廿å¯è½åºç°ç空ç½ç¬¦ï¼ç©ºæ ¼ãå¶è¡¨ç¬¦çï¼ |
| | | strNums.Trim(); |
| | | |
| | | // 2ï¸. |
| | | std::vector<unsigned int> result; |
| | | int i = 0; |
| | | CString strVid; |
| | | while (1) { |
| | | if (!AfxExtractSubString(strVid, (LPCTSTR)strNums, i, ',')) { |
| | | break; |
| | | } |
| | | if (!strVid.IsEmpty()) // é²å¾¡æ§æ£æ¥ |
| | | result.push_back(std::stoi((LPTSTR)(LPCTSTR)strVid)); |
| | | i++; |
| | | |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | void CLinkReportDlg::clearAllCollectionEvent() |
| | | { |
| | | for (auto item : m_collectionEvents) { |
| | | delete item; |
| | | } |
| | | m_collectionEvents.clear(); |
| | | } |
| | | |
| | | void CLinkReportDlg::OnListCtrlDoubleClick(NMHDR* pNMHDR, LRESULT* pResult) |
| | | { |
| | | LPNMITEMACTIVATE pNMItem = (LPNMITEMACTIVATE)pNMHDR; |
| | | int nItem = pNMItem->iItem; |
| | | if (nItem >= 0) { |
| | | CListCtrl* pListCtrl = (CListCtrl*)GetDlgItem(IDC_LIST1); |
| | | SERVO::CCollectionEvent* pEvent = (SERVO::CCollectionEvent*)pListCtrl->GetItemData(nItem); |
| | | CLinkReportDetailDlg dlg; |
| | | dlg.SetCollectionEvent(pEvent); |
| | | if (IDOK == dlg.DoModal()) { |
| | | pListCtrl->SetItemText(nItem, 4, pEvent->getReportIdsText().c_str()); |
| | | } |
| | | } |
| | | |
| | | *pResult = 0; |
| | | } |
| | | |
| | | void CLinkReportDlg::OnBnClickedButtonSend() |
| | | { |
| | | std::vector<SERVO::CCollectionEvent*> events; |
| | | CListCtrl* pListCtrl = (CListCtrl*)GetDlgItem(IDC_LIST1); |
| | | POSITION pos = pListCtrl->GetFirstSelectedItemPosition(); |
| | | while (pos) { |
| | | int nItem = pListCtrl->GetNextSelectedItem(pos); |
| | | SERVO::CCollectionEvent* pEvent = (SERVO::CCollectionEvent*)pListCtrl->GetItemData(nItem); |
| | | events.push_back(pEvent); |
| | | } |
| | | |
| | | std::map<unsigned int, std::vector<unsigned int>> mapEvent; |
| | | for (auto item : events) { |
| | | std::vector<unsigned int> RPTIDs = item->getReportIds(); |
| | | mapEvent[item->getEventId()] = RPTIDs; |
| | | } |
| | | |
| | | |
| | | theApp.m_model.m_pHsmsActive->hsmsLinkEventReport(mapEvent); |
| | | } |
| | | |
| | | void CLinkReportDlg::OnDestroy() |
| | | { |
| | | CDialogEx::OnDestroy(); |
| | | clearAllCollectionEvent(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include "CCollectionEvent.h" |
| | | |
| | | |
| | | // CLinkReportDlg å¯¹è¯æ¡ |
| | | |
| | | class CLinkReportDlg : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CLinkReportDlg) |
| | | |
| | | public: |
| | | CLinkReportDlg(CWnd* pParent = nullptr); // æ åæé 彿° |
| | | virtual ~CLinkReportDlg(); |
| | | int loadCollectionEvents(const char* pszFilepath); |
| | | std::vector<unsigned int> parseVidList(CString& strNums); |
| | | void clearAllCollectionEvent(); |
| | | |
| | | |
| | | private: |
| | | std::vector<SERVO::CCollectionEvent*> m_collectionEvents; |
| | | |
| | | // å¯¹è¯æ¡æ°æ® |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DIALOG_LINK_REPORT }; |
| | | #endif |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV æ¯æ |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | public: |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg void OnListCtrlDoubleClick(NMHDR* pNMHDR, LRESULT* pResult); |
| | | afx_msg void OnBnClickedButtonSend(); |
| | | afx_msg void OnDestroy(); |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "pch.h" |
| | | #include "CReport.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CReport::CReport() |
| | | { |
| | | m_nReportId = 0; |
| | | } |
| | | |
| | | CReport::CReport(unsigned int reportId, std::vector<unsigned int>& vids) |
| | | { |
| | | m_nReportId = reportId; |
| | | for (auto vid : vids) { |
| | | m_vids.push_back(vid); |
| | | } |
| | | } |
| | | |
| | | CReport::~CReport() |
| | | { |
| | | |
| | | } |
| | | |
| | | unsigned int CReport::getReportId() |
| | | { |
| | | return m_nReportId; |
| | | } |
| | | |
| | | BOOL CReport::addVariable(CVariable* pVariable) |
| | | { |
| | | ASSERT(pVariable); |
| | | if (getVariable(pVariable->getVarialbleId()) != nullptr) { |
| | | return FALSE; |
| | | } |
| | | |
| | | m_variabels.push_back(pVariable); |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CReport::deleteVarialble(unsigned int nVarialbleId) |
| | | { |
| | | BOOL bDelete = FALSE; |
| | | for (auto iter = m_variabels.begin(); iter != m_variabels.end(); ++iter) { |
| | | if (nVarialbleId == (*iter)->getVarialbleId()) { |
| | | m_variabels.erase(iter); |
| | | bDelete = TRUE; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | return bDelete; |
| | | } |
| | | |
| | | CVariable* CReport::getVariable(unsigned int nVarialbleId) |
| | | { |
| | | for (auto item : m_variabels) { |
| | | if (nVarialbleId == item->getVarialbleId()) { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | std::vector<CVariable*>& CReport::getVariables() |
| | | { |
| | | return m_variabels; |
| | | } |
| | | |
| | | std::string CReport::getVariablesIdsText() |
| | | { |
| | | std::string strResult, strName; |
| | | for (int i = 0; i < m_vids.size(); i++) { |
| | | strResult += std::to_string(m_vids[i]); |
| | | strResult += "("; |
| | | strResult += (getVariableName(m_vids[i], strName) ? |
| | | strName : _T("null")); |
| | | strResult += ")"; |
| | | if (i != m_vids.size() - 1) { |
| | | strResult += ","; |
| | | } |
| | | } |
| | | |
| | | return strResult; |
| | | } |
| | | |
| | | bool CReport::getVariableName(unsigned int vid, std::string& strName) |
| | | { |
| | | for (auto item : m_variabels) { |
| | | if (item->getVarialbleId() == vid) { |
| | | strName = item->getName(); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include "CVariable.h" |
| | | #include <vector> |
| | | |
| | | namespace SERVO { |
| | | class CReport |
| | | { |
| | | public: |
| | | CReport(); |
| | | CReport(unsigned int reportId, std::vector<unsigned int>& vids); |
| | | virtual ~CReport(); |
| | | |
| | | public: |
| | | unsigned int getReportId(); |
| | | BOOL addVariable(CVariable* pVariable); |
| | | BOOL deleteVarialble(unsigned int nVarialbleId); |
| | | CVariable* getVariable(unsigned int nVarialbleId); |
| | | std::vector<CVariable*>& getVariables(); |
| | | std::string getVariablesIdsText(); |
| | | bool getVariableName(unsigned int vid, std::string& strName); |
| | | |
| | | private: |
| | | unsigned int m_nReportId; |
| | | std::vector<unsigned int> m_vids; |
| | | std::vector<CVariable*> m_variabels; |
| | | }; |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "pch.h" |
| | | #include "CVariable.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CVariable::CVariable() |
| | | { |
| | | m_nVarialbeId = 0; |
| | | m_format = SVFromat::U1; |
| | | } |
| | | |
| | | CVariable::CVariable(const char* pszId, const char* pszName, const char* pszFormat, const char* pszRemark) |
| | | { |
| | | m_nVarialbeId = atoi(pszId); |
| | | m_strName = pszName; |
| | | m_format = toFormat(pszFormat); |
| | | m_strRemark = pszRemark; |
| | | TRACE("CVariable .....%d,%s,%d,%s\n", m_nVarialbeId, m_strName.c_str(), |
| | | m_format, m_strRemark.c_str()); |
| | | |
| | | } |
| | | |
| | | CVariable::~CVariable() |
| | | { |
| | | |
| | | } |
| | | |
| | | SVFromat CVariable::toFormat(const char* pszFormat) |
| | | { |
| | | if (_strcmpi("U1", pszFormat) == 0) { |
| | | return SVFromat::U1; |
| | | } |
| | | if (_strcmpi("U2", pszFormat) == 0) { |
| | | return SVFromat::U2; |
| | | } |
| | | if (_strcmpi("I2", pszFormat) == 0) { |
| | | return SVFromat::I2; |
| | | } |
| | | if (_strcmpi("A50", pszFormat) == 0) { |
| | | return SVFromat::A50; |
| | | } |
| | | if (_strcmpi("A20", pszFormat) == 0) { |
| | | return SVFromat::A20; |
| | | } |
| | | |
| | | return SVFromat::U1; |
| | | } |
| | | |
| | | |
| | | std::string CVariable::formatToString(SVFromat format) |
| | | { |
| | | if (SVFromat::U1 == format) { |
| | | return "U1"; |
| | | } |
| | | if (SVFromat::U2 == format) { |
| | | return "U1"; |
| | | } |
| | | if (SVFromat::I2 == format) { |
| | | return "I2"; |
| | | } |
| | | if (SVFromat::A50 == format) { |
| | | return "A50"; |
| | | } |
| | | if (SVFromat::A20 == format) { |
| | | return "A20"; |
| | | } |
| | | |
| | | return "U1"; |
| | | } |
| | | |
| | | unsigned int CVariable::getVarialbleId() |
| | | { |
| | | return m_nVarialbeId; |
| | | } |
| | | |
| | | std::string& CVariable::getName() |
| | | { |
| | | return m_strName; |
| | | } |
| | | |
| | | SVFromat CVariable::getFormat() |
| | | { |
| | | return m_format; |
| | | } |
| | | |
| | | std::string& CVariable::getRemark() |
| | | { |
| | | return m_strRemark; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include <string> |
| | | |
| | | |
| | | namespace SERVO { |
| | | // åéæ ¼å¼ |
| | | enum class SVFromat { |
| | | U1 = 0, |
| | | U2, |
| | | I2, |
| | | A20, |
| | | A50 |
| | | }; |
| | | |
| | | class CVariable |
| | | { |
| | | public: |
| | | CVariable(); |
| | | CVariable(const char* pszId, const char* pszName, const char* pszFormat, const char* pszRemark); |
| | | ~CVariable(); |
| | | |
| | | public: |
| | | static SVFromat toFormat(const char* pszFormat); |
| | | static std::string formatToString(SVFromat format); |
| | | unsigned int getVarialbleId(); |
| | | std::string& getName(); |
| | | SVFromat getFormat(); |
| | | std::string& getRemark(); |
| | | |
| | | private: |
| | | unsigned int m_nVarialbeId; |
| | | std::string m_strName; |
| | | SVFromat m_format; |
| | | std::string m_strRemark; |
| | | }; |
| | | } |
| | | |
| | |
| | | SetRegistryKey(_T("åºç¨ç¨åºå导çæçæ¬å°åºç¨ç¨åº")); |
| | | |
| | | |
| | | // æ¬ç¨åºæä»¶ç®å½ |
| | | TCHAR sDrive[_MAX_DRIVE]; |
| | | TCHAR sDir[_MAX_DIR]; |
| | | TCHAR sFilename[_MAX_FNAME], sAppFilename[_MAX_FNAME]; |
| | | TCHAR sExt[_MAX_EXT]; |
| | | GetModuleFileName(AfxGetInstanceHandle(), sAppFilename, _MAX_FNAME); |
| | | _tsplitpath_s(sAppFilename, sDrive, sDir, sFilename, sExt); |
| | | m_strAppDir = CString(sDrive) + CString(sDir); |
| | | m_strAppFile = CString(sFilename); |
| | | |
| | | |
| | | // åå§åRxåº |
| | | RX_Init(); |
| | | HSMS_Initialize(); |
| | |
| | | |
| | | public: |
| | | CModel m_model; |
| | | CString m_strAppDir; |
| | | CString m_strAppFile; |
| | | |
| | | // éå |
| | | public: |
| | |
| | | </ItemDefinitionGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="CAddIDSDlg.h" /> |
| | | <ClInclude Include="CCollectionEvent.h" /> |
| | | <ClInclude Include="CDefineReportsDlg.h" /> |
| | | <ClInclude Include="CEDEventReportDlg.h" /> |
| | | <ClInclude Include="CHsmsActive.h" /> |
| | | <ClInclude Include="CLinkReportDetailDlg.h" /> |
| | | <ClInclude Include="CLinkReportDlg.h" /> |
| | | <ClInclude Include="CModel.h" /> |
| | | <ClInclude Include="Common.h" /> |
| | | <ClInclude Include="Context.h" /> |
| | | <ClInclude Include="CReport.h" /> |
| | | <ClInclude Include="CTerminalDisplayDlg.h" /> |
| | | <ClInclude Include="CVariable.h" /> |
| | | <ClInclude Include="EAPSimulator.h" /> |
| | | <ClInclude Include="EAPSimulatorDlg.h" /> |
| | | <ClInclude Include="framework.h" /> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClCompile Include="CAddIDSDlg.cpp" /> |
| | | <ClCompile Include="CCollectionEvent.cpp" /> |
| | | <ClCompile Include="CDefineReportsDlg.cpp" /> |
| | | <ClCompile Include="CEDEventReportDlg.cpp" /> |
| | | <ClCompile Include="CHsmsActive.cpp" /> |
| | | <ClCompile Include="CLinkReportDetailDlg.cpp" /> |
| | | <ClCompile Include="CLinkReportDlg.cpp" /> |
| | | <ClCompile Include="CModel.cpp" /> |
| | | <ClCompile Include="Context.cpp" /> |
| | | <ClCompile Include="CReport.cpp" /> |
| | | <ClCompile Include="CTerminalDisplayDlg.cpp" /> |
| | | <ClCompile Include="CVariable.cpp" /> |
| | | <ClCompile Include="EAPSimulator.cpp" /> |
| | | <ClCompile Include="EAPSimulatorDlg.cpp" /> |
| | | <ClCompile Include="Log.cpp" /> |
| | |
| | | <ClInclude Include="CAddIDSDlg.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CLinkReportDlg.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CCollectionEvent.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CReport.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CVariable.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="CLinkReportDetailDlg.h"> |
| | | <Filter>头æä»¶</Filter> |
| | | </ClInclude> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClCompile Include="EAPSimulator.cpp"> |
| | |
| | | <ClCompile Include="CAddIDSDlg.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CLinkReportDlg.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CCollectionEvent.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CReport.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CVariable.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="CLinkReportDetailDlg.cpp"> |
| | | <Filter>æºæä»¶</Filter> |
| | | </ClCompile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="EAPSimulator.rc"> |
| | |
| | | #include "CTerminalDisplayDlg.h" |
| | | #include "CEDEventReportDlg.h" |
| | | #include "CDefineReportsDlg.h" |
| | | #include "CLinkReportDlg.h" |
| | | |
| | | |
| | | #ifdef _DEBUG |
| | |
| | | ON_BN_CLICKED(IDC_BUTTON_ED_EVENT_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonEdEventReport) |
| | | ON_BN_CLICKED(IDC_BUTTON_ED_ALARM_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonEdAlarmReport) |
| | | ON_BN_CLICKED(IDC_BUTTON_DEFINE_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonDefineReport) |
| | | ON_BN_CLICKED(IDC_BUTTON_LINE_REPORT, &CEAPSimulatorDlg::OnBnClickedButtonLineReport) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | GetDlgItem(IDC_BUTTON_TERMINAL_DISPLAY)->EnableWindow(enabled); |
| | | GetDlgItem(IDC_BUTTON_ED_EVENT_REPORT)->EnableWindow(enabled); |
| | | GetDlgItem(IDC_BUTTON_ED_ALARM_REPORT)->EnableWindow(enabled); |
| | | GetDlgItem(IDC_BUTTON_DEFINE_REPORT)->EnableWindow(enabled); |
| | | GetDlgItem(IDC_BUTTON_DEFINE_REPORT)->EnableWindow(enabled); |
| | | GetDlgItem(IDC_BUTTON_LINE_REPORT)->EnableWindow(enabled); |
| | | } |
| | | |
| | | void CEAPSimulatorDlg::OnBnClickedButtonConnect() |
| | |
| | | CDefineReportsDlg dlg; |
| | | dlg.DoModal(); |
| | | } |
| | | |
| | | void CEAPSimulatorDlg::OnBnClickedButtonLineReport() |
| | | { |
| | | CLinkReportDlg dlg; |
| | | dlg.DoModal(); |
| | | } |
| | |
| | | afx_msg void OnBnClickedButtonEdEventReport(); |
| | | afx_msg void OnBnClickedButtonEdAlarmReport(); |
| | | afx_msg void OnBnClickedButtonDefineReport(); |
| | | afx_msg void OnBnClickedButtonLineReport(); |
| | | }; |
| | |
| | | #define IDD_DIALOG_ED_EVENT_REPORT 131 |
| | | #define IDD_DIALOG_DEFINE_REPORTS 133 |
| | | #define IDD_DIALOG_ADD_IDS 135 |
| | | #define IDD_DIALOG_LINK_REPORT 137 |
| | | #define IDD_DIALOG_LINK_REPORT_DETAIL 139 |
| | | #define IDC_EDIT_LOG 1000 |
| | | #define IDC_EDIT_IP 1001 |
| | | #define IDC_EDIT_PORT 1002 |
| | |
| | | #define IDC_BUTTON_ED_ALARM_REPORT 1009 |
| | | #define IDC_BUTTON_SEND 1010 |
| | | #define IDC_BUTTON_DEFINE_REPORT 1010 |
| | | #define IDC_BUTTON_LINE_REPORT 1011 |
| | | #define IDC_RADIO_ENABLE 1012 |
| | | #define IDC_RADIO_DISABLE 1013 |
| | | #define IDC_EDIT_CEID 1014 |
| | | #define IDC_LIST1 1015 |
| | | #define IDC_EDIT_CE_NAME 1015 |
| | | #define IDC_LIST2 1016 |
| | | #define IDC_EDIT_CE_DESCRIPTIONS 1016 |
| | | #define IDC_BUTTON_ADD_RPTID 1017 |
| | | #define IDC_EDIT_CE_RPTID 1017 |
| | | #define IDC_BUTTON_DEL_REPORT 1018 |
| | | #define IDC_BUTTON_ADD_VID 1019 |
| | | #define IDC_BUTTON_DEL_VID 1020 |
| | |
| | | // |
| | | #ifdef APSTUDIO_INVOKED |
| | | #ifndef APSTUDIO_READONLY_SYMBOLS |
| | | #define _APS_NEXT_RESOURCE_VALUE 137 |
| | | #define _APS_NEXT_RESOURCE_VALUE 141 |
| | | #define _APS_NEXT_COMMAND_VALUE 32771 |
| | | #define _APS_NEXT_CONTROL_VALUE 1024 |
| | | #define _APS_NEXT_CONTROL_VALUE 1025 |
| | | #define _APS_NEXT_SYMED_VALUE 101 |
| | | #endif |
| | | #endif |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CCollectionEvent::setReport(CReport* pReport) |
| | | { |
| | | m_rptids.clear(); |
| | | m_reports.clear(); |
| | | if (pReport != nullptr) { |
| | | m_rptids.push_back(pReport->getReportId()); |
| | | m_reports.push_back(pReport); |
| | | } |
| | | } |
| | | |
| | | unsigned int CCollectionEvent::getPortID() |
| | | { |
| | | if (m_reports.empty()) return -1; |
| | | return m_reports.front()->getReportId(); |
| | | } |
| | | |
| | | BOOL CCollectionEvent::deleteReport(unsigned int nReportId) |
| | | { |
| | | BOOL bDelete = FALSE; |
| | |
| | | BOOL deleteReport(unsigned int nReportId); |
| | | CReport* getReport(unsigned int nReportId); |
| | | |
| | | /* 妿ä¸ä¸ªCEIDåªæä¸ä¸ªReportçåºæ¯,è°ç¨æ¤å½æ°è®¾ç½®æåæ¶ */ |
| | | void setReport(CReport* pReport); |
| | | unsigned int getPortID(); |
| | | private: |
| | | unsigned int m_nCEID; |
| | | std::string m_strName; |
| | |
| | | |
| | | } |
| | | |
| | | void CHsmsPassive::addReport(unsigned int id, const char* pszName) |
| | | void CHsmsPassive::linkEventReport(unsigned int CEID, unsigned int RPTID) |
| | | { |
| | | Lock(); |
| | | REPORT report; |
| | | report.id = id; |
| | | strcpy_s(report.szName, REPORT_NAME_MAX, pszName); |
| | | m_mapReport[id] = report; |
| | | Unlock(); |
| | | } |
| | | |
| | | void CHsmsPassive::linkEventReport(unsigned int RPTID, unsigned int CEID) |
| | | { |
| | | m_mapReportIdToCEID[RPTID] = CEID; |
| | | SERVO::CCollectionEvent* pEvent = getEvent(CEID); |
| | | SERVO::CReport* pReport = getReport(RPTID); |
| | | if (pEvent != nullptr) { |
| | | pEvent->setReport(pReport); |
| | | } |
| | | } |
| | | |
| | | void CHsmsPassive::unlinkEventReport(unsigned int CEID) |
| | | { |
| | | for (auto it = m_mapReportIdToCEID.begin(); it != m_mapReportIdToCEID.end(); ) { |
| | | if (it->second == CEID) { |
| | | m_mapReportIdToCEID.erase(it++); // æ´æ°è¿ä»£å¨ |
| | | } |
| | | else { |
| | | ++it; |
| | | } |
| | | SERVO::CCollectionEvent* pEvent = getEvent(CEID); |
| | | if (pEvent != nullptr) { |
| | | pEvent->setReport(nullptr); |
| | | } |
| | | |
| | | } |
| | | |
| | | unsigned int CHsmsPassive::getCEID(int RPTID) |
| | | { |
| | | auto iter = m_mapReportIdToCEID.find(RPTID); |
| | | if (iter != m_mapReportIdToCEID.end()) return iter->second; |
| | | return 0; |
| | | } |
| | | |
| | | SERVO::CReport* CHsmsPassive::defineReport(unsigned int RPTID, std::vector<unsigned int>& vids) |
| | |
| | | if (!events.empty()) { |
| | | clearAllCollectionEvent(); |
| | | for (auto item : events) { |
| | | m_collectionEvent.push_back(item); |
| | | m_collectionEvents.push_back(item); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | std::vector<SERVO::CCollectionEvent*>& CHsmsPassive::getCollectionEvents() |
| | | { |
| | | return m_collectionEvent; |
| | | return m_collectionEvents; |
| | | } |
| | | |
| | | void CHsmsPassive::clearAllCollectionEvent() |
| | | { |
| | | for (auto item : m_collectionEvent) { |
| | | for (auto item : m_collectionEvents) { |
| | | delete item; |
| | | } |
| | | m_collectionEvent.clear(); |
| | | m_collectionEvents.clear(); |
| | | } |
| | | |
| | | SERVO::CCollectionEvent* CHsmsPassive::getEvent(unsigned short CEID) |
| | | { |
| | | for (auto item : m_collectionEvents) { |
| | | if (item->getEventId() == CEID) { |
| | | return item; |
| | | } |
| | | } |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | std::vector<unsigned int> CHsmsPassive::parseVidList(CString& strNums) |
| | |
| | | else { |
| | | for (int k = 0; k < prtCount; k++) { |
| | | if (rptListItem->getSubItemU4(k, rptid)) { |
| | | linkEventReport(rptid, ceid); |
| | | linkEventReport(ceid, rptid); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | // æ£éªç»ææ¯å¦æ£ç¡® |
| | | for (auto item : m_mapReportIdToCEID) { |
| | | LOGE("=== prtid:%d, ceid:%d", item.first, item.second); |
| | | for (auto item : m_collectionEvents) { |
| | | LOGE("=== ceid:%d, prtid:%d", item->getEventId(), item->getPortID()); |
| | | } |
| | | |
| | | |
| | | MYREPLY: |
| | | replyAck(2, 36, pRecv->getHeader()->systemBytes, BYTE(0), "LRACK"); |
| | | return 0; |
| | |
| | | } |
| | | |
| | | // S6F11 |
| | | int CHsmsPassive::requestEventReportSend(unsigned int DATAID, unsigned int RPTID, const std::vector<std::string>& values) |
| | | int CHsmsPassive::requestEventReportSend(unsigned int DATAID, unsigned int CEID, const std::vector<std::string>& values) |
| | | { |
| | | if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) { |
| | | return ER_NOTSELECT; |
| | | } |
| | | |
| | | SERVO::CCollectionEvent* pEvent = getEvent(CEID); |
| | | if (pEvent == nullptr) { |
| | | return ER_NO_EVENT; |
| | | } |
| | | if (pEvent == nullptr) { |
| | | return ER_UNLINK_EVENT_REPORT; |
| | | } |
| | | |
| | | Lock(); |
| | |
| | | ASSERT(pMessage); |
| | | ISECS2Item* pItem = pMessage->getBody(); |
| | | pItem->addU4Item(DATAID, "DATAID"); |
| | | pItem->addU4Item(getCEID(RPTID), "CEID"); |
| | | pItem->addU4Item(CEID, "CEID"); |
| | | ISECS2Item* pItemList1 = pItem->addItem(); |
| | | ISECS2Item* pItemList2 = pItemList1->addItem(); |
| | | pItemList2->addU4Item(RPTID, "RPTID"); |
| | | pItemList2->addU4Item(pEvent->getPortID(), "RPTID"); |
| | | ISECS2Item* pItemList3 = pItemList2->addItem(); |
| | | for (auto item : values) { |
| | | pItemList3->addItem(item.c_str(), "V"); |
| | |
| | | #define VALUE_NAME_MAX 64 |
| | | |
| | | |
| | | #define ER_NOERROR 0 |
| | | #define ER_NOTSELECT -1 |
| | | #define ER_BUSY -2 |
| | | #define ER_PARAM_ERROR -3 |
| | | #define ER_NOERROR 0 |
| | | #define ER_NOTSELECT -1 |
| | | #define ER_BUSY -2 |
| | | #define ER_PARAM_ERROR -3 |
| | | #define ER_NO_EVENT -4 |
| | | #define ER_UNLINK_EVENT_REPORT -5 |
| | | |
| | | |
| | | /* |
| | |
| | | /* è®¾ç½®è½¯ä»¶çæ¬å· æå¤§é¿åº¦ 20 bytes */ |
| | | void setSoftRev(const char* pszRev); |
| | | |
| | | /* æ·»å Report */ |
| | | void addReport(unsigned int id, const char* pszName); |
| | | |
| | | // è¿æ¥Report |
| | | void linkEventReport(unsigned int RPTID, unsigned int CEID); |
| | | void linkEventReport(unsigned int CEID, unsigned int RPTID); |
| | | |
| | | // åæ¶è¿æ¥report |
| | | void unlinkEventReport(unsigned int CEID); |
| | | |
| | | unsigned int getCEID(int RPTID); |
| | | |
| | | // define Report |
| | | SERVO::CReport* defineReport(unsigned int RPTID, std::vector<unsigned int>& vids); |
| | |
| | | // åæ¶/å 餿æCollectionEvent |
| | | void clearAllCollectionEvent(); |
| | | |
| | | // åå¾CCollectionEvent |
| | | SERVO::CCollectionEvent* getEvent(unsigned short CEID); |
| | | |
| | | // åå¾Report |
| | | SERVO::CReport* getReport(int rptid); |
| | | |
| | | void setListener(SECSListener listener); |
| | |
| | | /* requestå¼å¤´ç彿°ä¸ºä¸»å¨åéæ°æ®ç彿° */ |
| | | int requestAreYouThere(); |
| | | int requestAlarmReport(int ALCD, int ALID, const char* ALTX); |
| | | int requestEventReportSend(unsigned int DATAID, unsigned int RPTID, const std::vector<std::string>& values); |
| | | int requestEventReportSend(unsigned int DATAID, unsigned int CEID, const std::vector<std::string>& values); |
| | | |
| | | private: |
| | | void replyAck(int s, int f, unsigned int systemBytes, BYTE ack, const char* pszAckName); |
| | |
| | | unsigned m_nCimWorkThrdaddr; |
| | | |
| | | private: |
| | | // RPTID to CEID |
| | | std::map<unsigned int, unsigned int> m_mapReportIdToCEID; |
| | | |
| | | // RPTID to Report |
| | | std::map<unsigned int, REPORT> m_mapReport; |
| | | |
| | | // VID to Report |
| | | std::map<unsigned int, VALUE> m_mapValue; |
| | | |
| | | // CVariable vector |
| | | std::vector<SERVO::CVariable*> m_variabels; |
| | | |
| | |
| | | std::vector<SERVO::CReport*> m_reports; |
| | | |
| | | // CollectionEvent vector |
| | | std::vector<SERVO::CCollectionEvent*> m_collectionEvent; |
| | | std::vector<SERVO::CCollectionEvent*> m_collectionEvents; |
| | | }; |
| | | |