Merge branch 'clh' into liuyang
# Conflicts:
# SourceCode/Bond/Servo/PortConfigurationDlg.cpp
# SourceCode/Bond/Servo/PortConfigurationDlg.h
# SourceCode/Bond/Servo/Servo.rc
# SourceCode/Bond/Servo/resource.h
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "stdafx.h" |
| | | #include "CCustomCheckBox.h" |
| | | |
| | | |
| | | CCustomCheckBox::CCustomCheckBox() |
| | | : m_bgColor(RGB(255, 255, 255)), m_textColor(RGB(0, 0, 0)) |
| | | { |
| | | m_brush.CreateSolidBrush(m_bgColor); |
| | | } |
| | | |
| | | CCustomCheckBox::~CCustomCheckBox() |
| | | { |
| | | |
| | | } |
| | | |
| | | void CCustomCheckBox::SetBackgroundColor(COLORREF color) |
| | | { |
| | | m_bgColor = color; |
| | | if (m_brush.GetSafeHandle()) |
| | | m_brush.DeleteObject(); |
| | | m_brush.CreateSolidBrush(m_bgColor); |
| | | Invalidate(); |
| | | } |
| | | |
| | | void CCustomCheckBox::SetTextColor(COLORREF color) |
| | | { |
| | | m_textColor = color; |
| | | Invalidate(); |
| | | } |
| | | |
| | | void CCustomCheckBox::SetNotifyHwnd(HWND hWnd) |
| | | { |
| | | m_hNotifyWnd = hWnd; |
| | | } |
| | | |
| | | void CCustomCheckBox::OnClicked() |
| | | { |
| | | BOOL bChecked = (GetCheck() == BST_CHECKED); |
| | | |
| | | // ä½ å¯ä»¥å®ä¹èªå·±çèªå®ä¹æ¶æ¯ |
| | | if (m_hNotifyWnd && ::IsWindow(m_hNotifyWnd)) { |
| | | ::PostMessage(m_hNotifyWnd, WM_CHECKBOX_STATE_CHANGED, GetDlgCtrlID(), bChecked); |
| | | } |
| | | } |
| | | |
| | | BEGIN_MESSAGE_MAP(CCustomCheckBox, CButton) |
| | | ON_WM_CTLCOLOR_REFLECT() |
| | | ON_CONTROL_REFLECT(BN_CLICKED, &CCustomCheckBox::OnClicked) |
| | | END_MESSAGE_MAP() |
| | | |
| | | HBRUSH CCustomCheckBox::CtlColor(CDC* pDC, UINT /*nCtlColor*/) |
| | | { |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | pDC->SetTextColor(m_textColor); |
| | | return (HBRUSH)m_brush.GetSafeHandle(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | |
| | | |
| | | #define WM_CHECKBOX_STATE_CHANGED WM_USER + 1003 |
| | | |
| | | class CCustomCheckBox : public CButton |
| | | { |
| | | public: |
| | | CCustomCheckBox(); |
| | | virtual ~CCustomCheckBox(); |
| | | |
| | | public: |
| | | void SetBackgroundColor(COLORREF color); |
| | | void SetTextColor(COLORREF color); |
| | | void SetNotifyHwnd(HWND hWnd); // è®¾ç½®æ¶æ¯æ¥æ¶çªå£ |
| | | |
| | | protected: |
| | | afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); |
| | | afx_msg void OnClicked(); |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | private: |
| | | COLORREF m_bgColor; |
| | | COLORREF m_textColor; |
| | | CBrush m_brush; |
| | | HWND m_hNotifyWnd; |
| | | }; |
| | | |
| | |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (!isSlotProcessed(i)) continue; |
| | | if (pGlass == nullptr) continue; |
| | | if (!pGlass->isScheduledForProcessing()) continue; |
| | | if(pGlass->getInspResult(m_nID, 0) == InspResult::Fail) continue; |
| | | int lsPath = m_slot[i].getLinkSignalPath(); |
| | | if(!m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_INLINE] |
| | |
| | | if (m_slot[i].isLock()) continue; |
| | | CGlass* pGlass = (CGlass*)m_slot[i].getContext(); |
| | | if (pGlass == nullptr) continue; |
| | | if (!pGlass->isScheduledForProcessing()) continue; |
| | | if (pGlass->getInspResult(m_nID, 0) != InspResult::Fail) continue; |
| | | int lsPath = m_slot[i].getLinkSignalPath(); |
| | | if (!m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_INLINE] |
| | |
| | | typedef std::function<BOOL(void* pEiuipment, int port, CJobDataB* pJobDataB, short& putSlot)> ONPRESTOREDJOB; |
| | | typedef std::function<void(void* pEiuipment, PROCESS_STATE state)> ONPROCESSSTATE; |
| | | typedef std::function<void(void* pEiuipment, short scanMap, short downMap)> ONMAPMISMATCH; |
| | | typedef std::function<void(void* pEiuipment, short scanMap)> ONPORTINUSE; |
| | | typedef struct _EquipmentListener |
| | | { |
| | | ONALIVE onAlive; |
| | |
| | | ONPRESTOREDJOB onPreStoredJob; |
| | | ONPROCESSSTATE onProcessStateChanged; |
| | | ONMAPMISMATCH onMapMismatch; |
| | | ONPORTINUSE onPortInUse; |
| | | |
| | | } EquipmentListener; |
| | | |
| | | |
| | |
| | | m_pBuddy = nullptr; |
| | | m_nOriginPort = 0; |
| | | m_nOriginSlot = 0; |
| | | m_bScheduledForProcessing = FALSE; |
| | | } |
| | | |
| | | CGlass::~CGlass() |
| | |
| | | slot = m_nOriginSlot; |
| | | } |
| | | |
| | | BOOL CGlass::isScheduledForProcessing() |
| | | { |
| | | return m_bScheduledForProcessing; |
| | | } |
| | | |
| | | void CGlass::setScheduledForProcessing(BOOL bProcessing) |
| | | { |
| | | m_bScheduledForProcessing = bProcessing; |
| | | } |
| | | |
| | | CPath* CGlass::getPath() |
| | | { |
| | | return m_pPath; |
| | |
| | | WriteString(ar, m_strID); |
| | | ar << m_nOriginPort; |
| | | ar << m_nOriginSlot; |
| | | ar << m_bScheduledForProcessing; |
| | | ar << (ULONGLONG)m_pPath; |
| | | if (m_pPath != nullptr) { |
| | | m_pPath->serialize(ar); |
| | |
| | | ReadString(ar, m_strID); |
| | | ar >> m_nOriginPort; |
| | | ar >> m_nOriginSlot; |
| | | ar >> m_bScheduledForProcessing; |
| | | ar >> ullPath; |
| | | if (ullPath != 0) { |
| | | m_pPath = new CPath(); |
| | |
| | | std::string& getID(); |
| | | void setOriginPort(int port, int slot); |
| | | void getOrginPort(int& port, int& slot); |
| | | BOOL isScheduledForProcessing(); |
| | | void setScheduledForProcessing(BOOL bProcessing); |
| | | CPath* getPathWithEq(unsigned int nEqId, unsigned int nUnit); |
| | | CPath* getPath(); |
| | | void addPath(unsigned int nEqId, unsigned int nUnit); |
| | |
| | | std::string m_strBuddyId; |
| | | int m_nOriginPort; |
| | | int m_nOriginSlot; |
| | | BOOL m_bScheduledForProcessing; /* æ¯å¦å°å å·¥å¤ç */ |
| | | }; |
| | | } |
| | | |
| | |
| | | m_bEnable = FALSE; |
| | | m_bAutoChangeEnable = FALSE; |
| | | m_nNextCassetteSequenceNo = 0; |
| | | m_isCompareMapsBeforeProceeding = FALSE; |
| | | } |
| | | |
| | | CLoadPort::~CLoadPort() |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(dev[m_nIndex], sizeof(short), |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | m_cassetteType = (CassetteType)CToolUnits::toInt16(pszData); |
| | | //m_cassetteType = (CassetteType)CToolUnits::toInt16(pszData); |
| | | } |
| | | return 0; |
| | | }); |
| | |
| | | void CLoadPort::onTimer(UINT nTimerid) |
| | | { |
| | | CEquipment::onTimer(nTimerid); |
| | | |
| | | // æ¨¡ææµè¯ |
| | | /* |
| | | if (m_nIndex == 0) { |
| | | static int ii = 0; |
| | | ii++; |
| | | if (ii == 20) { |
| | | char szBuffer[64]; |
| | | CStep* pStep = getStepWithName(STEP_EQ_PORT1_INUSE); |
| | | CPortStatusReport portStatusReport; |
| | | portStatusReport.setPortStatus(PORT_INUSE); |
| | | portStatusReport.setJobExistenceSlot(0xf); |
| | | int nRet = portStatusReport.serialize(szBuffer, 64); |
| | | decodePortStatusReport(pStep, szBuffer, 64); |
| | | } |
| | | } |
| | | */ |
| | | } |
| | | |
| | | void CLoadPort::serialize(CArchive& ar) |
| | |
| | | |
| | | // å½portç¶æä¸ºInUse, æ¯è¾map |
| | | if (m_portStatusReport.getPortStatus() == PORT_INUSE) { |
| | | short scanMap = m_portStatusReport.getJobExistenceSlot(); |
| | | short downMap = getCassetteMap(); |
| | | if (scanMap == downMap) { |
| | | this->sendCassetteCtrlCmd(5, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | if (m_isCompareMapsBeforeProceeding) { |
| | | short scanMap = getScanCassetteMap(); |
| | | short downloadMap = getDownloadCassetteMap(); |
| | | if (scanMap == downloadMap) { |
| | | generateGlassList(scanMap); |
| | | this->sendCassetteCtrlCmd(CCC_PROCESS_START, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | } |
| | | else { |
| | | this->sendCassetteCtrlCmd(10, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | this->sendCassetteCtrlCmd(CCC_PROCESS_CANCEL, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | |
| | | // æåºå°åºç¨å±åæç¤º |
| | | if (m_listener.onMapMismatch != nullptr) { |
| | | m_listener.onMapMismatch(this, scanMap, downMap); |
| | | m_listener.onMapMismatch(this, scanMap, downloadMap); |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | // æåºå°åºç¨å±åéæ©è¦å å·¥ççå |
| | | generateGlassList(getScanCassetteMap()); |
| | | if (m_listener.onPortInUse != nullptr) { |
| | | m_listener.onPortInUse(this, getScanCassetteMap()); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | int CLoadPort::setCassetteType(CassetteType type, ONWRITED onWritedBlock/* = nullptr*/) |
| | | { |
| | | m_cassetteType = type; |
| | | static char* pszName[] = { STEP_PORT1_CASSETTE_TYPE_CHANGE, STEP_PORT2_CASSETTE_TYPE_CHANGE, STEP_PORT3_CASSETTE_TYPE_CHANGE, STEP_PORT4_CASSETTE_TYPE_CHANGE }; |
| | | SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(pszName[m_nIndex]); |
| | | if (pStep == nullptr) { |
| | |
| | | // test |
| | | code = WOK; |
| | | if (code == WOK) { |
| | | m_cassetteType = type; |
| | | LOGI("<CLoadPort-%d>设置Cassette Typeæå.", m_nIndex); |
| | | } |
| | | else { |
| | |
| | | m_bAutoChangeEnable = bEnable; |
| | | } |
| | | |
| | | short CLoadPort::getCassetteMap() |
| | | short CLoadPort::getScanCassetteMap() |
| | | { |
| | | short map = 0; |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | if (m_slot[i].getContext() == nullptr) continue; |
| | | map |= (1 << i); |
| | | return m_portStatusReport.getJobExistenceSlot(); |
| | | } |
| | | |
| | | short CLoadPort::getDownloadCassetteMap() |
| | | { |
| | | // ææ¶æªå®ç°æ¤åè½ |
| | | short map = 0; |
| | | return map; |
| | | } |
| | | |
| | |
| | | return 0; |
| | | } |
| | | |
| | | /* |
| | | * æ ¹æ®efemæ«æå°çmapï¼çæç»çå表 |
| | | */ |
| | | int CLoadPort::generateGlassList(short map) |
| | | { |
| | | // å
éæ¾è¾æ©åçæ°æ® |
| | | Lock(); |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | m_slot[i].setContext(nullptr); |
| | | } |
| | | Unlock(); |
| | | |
| | | |
| | | // æ ¹æ®mapçææ°ç |
| | | char szBuffer[64]; |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | | if (!(map >> i) & 1) continue; |
| | | |
| | | CJobDataS js; |
| | | js.setCassetteSequenceNo(getNextCassetteSequenceNo()); |
| | | js.setJobSequenceNo(m_slot[i].getNo()); |
| | | sprintf_s(szBuffer, 64, "%05d%05d", js.getCassetteSequenceNo(), js.getJobSequenceNo()); |
| | | js.setJobType(1); |
| | | js.setMaterialsType((int)m_cassetteType); |
| | | |
| | | CGlass* pGlass = theApp.m_model.m_glassPool.allocaGlass(); |
| | | pGlass->setOriginPort(m_nIndex, i); |
| | | pGlass->setScheduledForProcessing(i % 2 == 1); |
| | | pGlass->addPath(m_nID, 0); |
| | | pGlass->processEnd(m_nID, 0); |
| | | pGlass->setID(szBuffer); |
| | | pGlass->setType(m_cassetteType); |
| | | pGlass->setJobDataS(&js); |
| | | m_slot[i].setContext(pGlass); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | int CLoadPort::testGenerateGlassListFromConfig(const SERVO::PortConfig& config) |
| | | { |
| | | char szBuffer[64]; |
| | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | void CLoadPort::setCompareMapsBeforeProceeding(BOOL bCompare) |
| | | { |
| | | m_isCompareMapsBeforeProceeding = bCompare; |
| | | } |
| | | } |
| | |
| | | void localSetCessetteType(CassetteType type); |
| | | void localSetTransferMode(TransferMode mode); |
| | | void localAutoChangeEnable(BOOL bEnable); |
| | | short getCassetteMap(); |
| | | short getScanCassetteMap(); |
| | | short getDownloadCassetteMap(); |
| | | |
| | | public: |
| | | short getNextCassetteSequenceNo(); |
| | |
| | | int getCassetteMappingState(); |
| | | int getCassetteStatus(); |
| | | int testGenerateGlassList(MaterialsType type); |
| | | int generateGlassList(short map); |
| | | int testGenerateGlassListFromConfig(const SERVO::PortConfig& config); |
| | | |
| | | public: |
| | |
| | | CJobDataA* pJobDataA, |
| | | ONWRITED onWritedBlock); |
| | | CStep* getCassetteCtrlCmdStep(); |
| | | void setCompareMapsBeforeProceeding(BOOL bCompare); |
| | | |
| | | private: |
| | | int decodePortStatusReport(CStep* pStep, const char* pszData, size_t size); |
| | |
| | | BOOL m_bAutoChangeEnable; |
| | | CPortStatusReport m_portStatusReport; |
| | | int m_nNextCassetteSequenceNo; |
| | | |
| | | // å¨å¼å§å·¥èºåæ¯å¦å
éè¦å
æ¯è¾map |
| | | BOOL m_isCompareMapsBeforeProceeding; |
| | | }; |
| | | } |
| | | |
| | |
| | | m_state = MASTERSTATE::READY; |
| | | m_pActiveRobotTask = nullptr; |
| | | m_nLastError = 0; |
| | | m_isCompareMapsBeforeProceeding = FALSE; |
| | | InitializeCriticalSection(&m_criticalSection); |
| | | } |
| | | |
| | |
| | | LOGE("<Master-%s>Port InUse, map(%d!=%d)ä¸ä¸è´ï¼è¯·æ£æ¥ã", |
| | | ((CEquipment*)pEquipment)->getName().c_str(), scanMap, downMap); |
| | | }; |
| | | listener.onPortInUse = [&](void* pEquipment, short scanMap) { |
| | | LOGE("<Master-%s>Port InUseãscanMap=%d", ((CEquipment*)pEquipment)->getName().c_str(), scanMap); |
| | | if (m_listener.onLoadPortInUse != nullptr) { |
| | | m_listener.onLoadPortInUse(this, (CEquipment*)pEquipment, scanMap); |
| | | } |
| | | }; |
| | | pEquipment->setListener(listener); |
| | | pEquipment->setCcLink(&m_cclink); |
| | | m_listEquipment.push_back(pEquipment); |
| | |
| | | pEquipment->setID(EQ_ID_LOADPORT1 + index); |
| | | pEquipment->setName(szName); |
| | | pEquipment->setDescription(szName); |
| | | pEquipment->setCompareMapsBeforeProceeding(m_isCompareMapsBeforeProceeding); |
| | | addToEquipmentList(pEquipment); |
| | | |
| | | |
| | |
| | | unlock(); |
| | | |
| | | // å½å任塿å¨ä¸æ¢åï¼åæ¢è°åº¦ï¼éè¦æä½åå¨è§£å³é®é¢åï¼éæ°å¯å¨ |
| | | stop(); |
| | | // 25å¹´7æ23æ¥åä¿®æ¹ä¸ºä¸åæ¢ä»»å¡ |
| | | // stop(); |
| | | |
| | | return 0; |
| | | } |
| | |
| | | lock(); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->restore(); |
| | | } |
| | | unlock(); |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | int CMaster::resendCurrentTask() |
| | | { |
| | | lock(); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | m_pActiveRobotTask->resend(); |
| | | } |
| | | unlock(); |
| | | |
| | |
| | | pPort->localSetTransferMode((SERVO::TransferMode)transferMode); |
| | | pPort->localAutoChangeEnable(autoChangeEnable); |
| | | } |
| | | |
| | | void CMaster::setPortCassetteType(unsigned int index, SERVO::CassetteType type) |
| | | { |
| | | ASSERT(index < 4); |
| | | int eqid[] = { EQ_ID_LOADPORT1, EQ_ID_LOADPORT2, EQ_ID_LOADPORT3, EQ_ID_LOADPORT4 }; |
| | | CLoadPort* pPort = (CLoadPort*)getEquipment(eqid[index]); |
| | | pPort->localSetCessetteType(type); |
| | | } |
| | | |
| | | void CMaster::setCompareMapsBeforeProceeding(BOOL bCompare) |
| | | { |
| | | m_isCompareMapsBeforeProceeding = bCompare; |
| | | } |
| | | } |
| | |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, CVcrEventReport* pReport)> ONEQVCREVENTREPORT; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, int code)> ONEQDATACHANGED; |
| | | typedef std::function<void(void* pMaster, CRobotTask* pTask, int code)> ONROBOTTASKEVENT; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, short scanMap)> ONLOADPORTINUSE; |
| | | typedef struct _MasterListener |
| | | { |
| | | ONMASTERSTATECHANGED onMasterStateChanged; |
| | |
| | | ONEQVCREVENTREPORT onEqVcrEventReport; |
| | | ONEQDATACHANGED onEqDataChanged; |
| | | ONROBOTTASKEVENT onRobotTaskEvent; |
| | | ONLOADPORTINUSE onLoadPortInUse; |
| | | } MasterListener; |
| | | |
| | | class CMaster |
| | |
| | | void setCacheFilepath(const char* pszFilepath); |
| | | int abortCurrentTask(); |
| | | int restoreCurrentTask(); |
| | | int resendCurrentTask(); |
| | | void setPortType(unsigned int index, BOOL enable, int type, int mode, |
| | | int cassetteType, int transferMode, BOOL autoChangeEnable); |
| | | void setPortCassetteType(unsigned int index, SERVO::CassetteType type); |
| | | void setCompareMapsBeforeProceeding(BOOL bCompare); |
| | | |
| | | private: |
| | | inline void lock() { EnterCriticalSection(&m_criticalSection); } |
| | |
| | | // é误代ç |
| | | int m_nLastError; |
| | | std::string m_strLastError; |
| | | |
| | | // å¨å¼å§å·¥èºåæ¯å¦å
éè¦å
æ¯è¾map |
| | | BOOL m_isCompareMapsBeforeProceeding; |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | // æµè¯ |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST1) { |
| | | BOOL bTestGenerate = FALSE; |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | if (pEquipment->getID() == EQ_ID_LOADPORT4 && !pEquipment->hasGlass()) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1); |
| | | bTestGenerate = TRUE; |
| | | } |
| | | /* |
| | | else if (pEquipment->getID() == EQ_ID_LOADPORT1 && !pEquipment->hasGlass()) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2); |
| | | bTestGenerate = TRUE; |
| | | } |
| | | */ |
| | | if (!bTestGenerate) { |
| | | SERVO::CRobotTask* pTask = theApp.m_model.getMaster().getActiveRobotTask(); |
| | | if (pTask != nullptr) { |
| | | SERVO::CGlass* pGlass = (SERVO::CGlass*)pTask->getContext(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | | if (pJobDataS != nullptr) { |
| | | SERVO::CJobDataB jobDataB; |
| | | pEquipment->onFetchedOutJob(0, &pJobDataS->getJobDataB(jobDataB)); |
| | | pEquipment->onSentOutJob(0, pJobDataS); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST2) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | |
| | | |
| | | void CPagePortProperty::OnCbnSelchangeComboPortCassertType() |
| | | { |
| | | // ç±åæ¥çæ´æ°å°EFEM, ä¿®æ¹ä¸ºä¿åå°æ¬å°iniæä»¶ |
| | | ASSERT(m_pPort != nullptr); |
| | | int index = ((CComboBox*)GetDlgItem(IDC_COMBO_PORT_CASSERT_TYPE))->GetCurSel(); |
| | | theApp.m_model.setPortCassetteType(m_pPort->getIndex(), SERVO::CassetteType(index + 1)); |
| | | |
| | | |
| | | /* |
| | | g_nMsgDlgShow = 0; |
| | | CMsgDlg msgDlg("请çå¾
", "æ£å¨æä½ï¼è¯·çå¾
..."); |
| | | msgDlg.SetData((DWORD_PTR)this); |
| | |
| | | |
| | | msgDlg.DoModal(); |
| | | g_nMsgDlgShow = 1; |
| | | */ |
| | | } |
| | | |
| | | void CPagePortProperty::OnCbnSelchangeComboPortTransferMode() |
| | |
| | | return m_nPortStatus; |
| | | } |
| | | |
| | | void CPortStatusReport::setPortStatus(short status) |
| | | { |
| | | m_nPortStatus = status; |
| | | } |
| | | |
| | | short CPortStatusReport::getCassetteSequenceNo() |
| | | { |
| | | return m_nCassetteSequenceNo; |
| | |
| | | memcpy(&m_nCassetteStatus, &pszBuffer[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | |
| | | return 15 * 2; |
| | | return 32 * 2; |
| | | } |
| | | |
| | | void CPortStatusReport::getAttributeVector(CAttributeVector& attrubutes, int beginWeight) |
| | |
| | | return m_nJobExistenceSlot[0]; |
| | | } |
| | | |
| | | void CPortStatusReport::setJobExistenceSlot(short map) |
| | | { |
| | | m_nJobExistenceSlot[0] = map; |
| | | } |
| | | |
| | | void CPortStatusReport::WriteString(CArchive& ar, std::string& string) |
| | | { |
| | | CString strTemp = string.c_str(); |
| | |
| | | public: |
| | | void copyEx(CPortStatusReport& other); |
| | | short getPortStatus(); |
| | | void setPortStatus(short status); |
| | | short getCassetteSequenceNo(); |
| | | std::string& getCassetteId(); |
| | | short getLoadingCassetteType(); |
| | |
| | | bool canPickFromPort(); |
| | | bool isJobExistenceSlot(); |
| | | short getJobExistenceSlot(); |
| | | void setJobExistenceSlot(short map); |
| | | |
| | | private: |
| | | void WriteString(CArchive& ar, std::string& string); |
| | |
| | | }); |
| | | } |
| | | |
| | | void CRobotTask::resend() |
| | | { |
| | | // éæ°ä¸åå½ä»¤ï¼æ 鿝ä¸ååææä¸åæ¾æçå½ä»¤ï¼æ ¹æ®å½åç¶ææ¥ |
| | | if (ROBOT_TASK_STATE::Picking == m_state || ROBOT_TASK_STATE::Picked == m_state) { |
| | | pick(); |
| | | } |
| | | else if (ROBOT_TASK_STATE::Placing == m_state) { |
| | | place(); |
| | | } |
| | | } |
| | | |
| | | void CRobotTask::completed() |
| | | { |
| | | m_state = ROBOT_TASK_STATE::Completed; |
| | |
| | | void place(); |
| | | void restore(); |
| | | void restored(); |
| | | void resend(); |
| | | void completed(); |
| | | void error(); |
| | | void abort(); |
| | |
| | | // TODO: 卿¤æ·»å é¢å¤çåå§å |
| | | // å建â忢任å¡âæé®åâæ¤åâæé® |
| | | m_btnAbortTask.Create(_T("忢任å¡"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_ABORT_TASK); |
| | | m_btnRestore.Create(_T("æ¤å"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_RESTORE); |
| | | m_btnRestore.Create(_T("éåæä»¤"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_RESTORE); |
| | | |
| | | // 卿æé®å建å设置åä½ |
| | | if (m_fontButton.GetSafeHandle() == nullptr) { |
| | |
| | | |
| | | void CRobotTaskDlg::OnBnClickedRestore() |
| | | { |
| | | int ret = AfxMessageBox(_T("ç©æå°ä¼è¢«æ¬è¿ååä½ç½®ï¼ç¡®è®¤è¦åæ¤å½åä»»å¡åï¼é¤éåçäºå¼å¸¸ï¼å¦å请ä¸è¦åæ¤ä»»å¡ï¼"), MB_OKCANCEL | MB_ICONEXCLAMATION); |
| | | // 忤任å¡ä¿®æ¹ä¸ºéåä»»å¡ |
| | | int ret = AfxMessageBox(_T("确认è¦éæ°ä¸åä»»å¡åï¼"), MB_OKCANCEL | MB_ICONEXCLAMATION); |
| | | if (ret != IDOK) { |
| | | return; |
| | | } |
| | | |
| | | theApp.m_model.getMaster().restoreCurrentTask(); |
| | | theApp.m_model.getMaster().resendCurrentTask(); |
| | | } |
| | |
| | | #define RX_CODE_EQ_DATA_CHANGED 1010 |
| | | #define RX_CODE_MASTER_STATE_CHANGED 1011 |
| | | #define RX_CODE_EQ_ROBOT_TASK 1012 |
| | | #define RX_CODE_LOADPORT_INUSE 1013 |
| | | |
| | | |
| | | /* Channel Name */ |
| | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CConfiguration::setPortCassetteType(unsigned int index, int cassetteType) |
| | | { |
| | | if (index >= 4) return FALSE; |
| | | if (cassetteType < 1 || 3 < cassetteType) return FALSE; |
| | | |
| | | static char* pszSection[] = { "Port1", "Port2", "Port3", "Port4" }; |
| | | WritePrivateProfileString(pszSection[index], _T("CassetteType"), std::to_string(cassetteType).c_str(), m_strFilepath); |
| | | return true; |
| | | } |
| | | |
| | | BOOL CConfiguration::isCompareMapsBeforeProceeding() |
| | | { |
| | | return GetPrivateProfileInt(_T("Master"), _T("CompareMapsBeforeProceeding"), 0, m_strFilepath); |
| | | } |
| | | |
| | |
| | | int getFilterMode(); |
| | | BOOL getPortParms(unsigned int index, BOOL& bEnable, int& type, int& mode, |
| | | int& cassetteType, int& transferMode, BOOL& bAutoChangeEnable); |
| | | BOOL setPortCassetteType(unsigned int index, int cassetteType); |
| | | BOOL isCompareMapsBeforeProceeding(); |
| | | |
| | | public: |
| | | void setP2RemoteEqReconnectInterval(int second); |
| | |
| | | } |
| | | } |
| | | |
| | | void CModel::setPortCassetteType(unsigned int index, SERVO::CassetteType type) |
| | | { |
| | | m_master.setPortCassetteType(index, type); |
| | | m_configuration.setPortCassetteType(index, (int)type); |
| | | } |
| | | |
| | | int CModel::init() |
| | | { |
| | | CString strIniFile; |
| | |
| | | notifyPtrAndInt(RX_CODE_EQ_ROBOT_TASK, pTask, nullptr, code); |
| | | |
| | | }; |
| | | masterListener.onLoadPortInUse = [&] (void* pMaster, SERVO::CEquipment* pEquipment, short scanMap) { |
| | | LOGE("<CModel>onLoadPortInUse. scanMap = %d", scanMap); |
| | | notifyPtr(RX_CODE_LOADPORT_INUSE, pEquipment); |
| | | }; |
| | | m_master.setListener(masterListener); |
| | | |
| | | |
| | |
| | | CString strMasterDataFile; |
| | | strMasterDataFile.Format(_T("%s\\Master.dat"), (LPTSTR)(LPCTSTR)m_strWorkDir); |
| | | m_master.setCacheFilepath((LPTSTR)(LPCTSTR)strMasterDataFile); |
| | | |
| | | m_master.setCompareMapsBeforeProceeding(m_configuration.isCompareMapsBeforeProceeding()); |
| | | |
| | | // å è½½è¦åä¿¡æ¯ |
| | | AlarmManager& alarmManager = AlarmManager::getInstance(); |
| | |
| | | SERVO::CMaster& getMaster(); |
| | | void setWorkDir(const char* pszWorkDir); |
| | | void loadPortParams(); |
| | | void setPortCassetteType(unsigned int index, SERVO::CassetteType type); |
| | | int init(); |
| | | int term(); |
| | | |
| | |
| | | #include "ServoCommo.h" |
| | | |
| | | |
| | | |
| | | #define CHECKBOX_ALL_ID 0x1234 |
| | | |
| | | // CPortConfigurationDlg å¯¹è¯æ¡ |
| | | |
| | | IMPLEMENT_DYNAMIC(CPortConfigurationDlg, CDialogEx) |
| | |
| | | m_pPort[1] = dynamic_cast<SERVO::CLoadPort*>(theApp.m_model.m_master.getEquipment(EQ_ID_LOADPORT2)); |
| | | m_pPort[2] = dynamic_cast<SERVO::CLoadPort*>(theApp.m_model.m_master.getEquipment(EQ_ID_LOADPORT3)); |
| | | m_pPort[3] = dynamic_cast<SERVO::CLoadPort*>(theApp.m_model.m_master.getEquipment(EQ_ID_LOADPORT4)); |
| | | m_nCurSelPort = -1; |
| | | m_pCheckBox = nullptr; |
| | | m_bCheckedAll = FALSE; |
| | | } |
| | | |
| | | CPortConfigurationDlg::~CPortConfigurationDlg() |
| | | { |
| | | } |
| | | |
| | | void CPortConfigurationDlg::setCurSelPort(int sel) |
| | | { |
| | | m_nCurSelPort = sel; |
| | | } |
| | | |
| | | int CPortConfigurationDlg::GetLoadPortEqID(const std::string& strPortName) |
| | |
| | | SetDlgItemText(IDC_EDIT_OPERATIONID, ""); |
| | | m_comboMaterialsType.SetCurSel(0); |
| | | |
| | | SERVO::CSlot* pSlot = pPort->getSlot(0); |
| | | if (pSlot == nullptr) { |
| | | return; |
| | | bool bJobInfoSet = false; |
| | | for (int i = 0; i < SLOT_MAX; ++i) { |
| | | SERVO::CSlot* pSlot = pPort->getSlot(i); |
| | | if (!pSlot) { |
| | | continue; |
| | | } |
| | | |
| | | |
| | | // 设置 Panel ID åå¾éæ¡ |
| | | SERVO::CGlass* pGlass = dynamic_cast<SERVO::CGlass*>(pSlot->getContext()); |
| | | int nRow = i + 1; |
| | | if (pGlass != nullptr) { |
| | | m_wndGrid.SetItemState(nRow, 0, GVIS_READONLY); |
| | | m_wndGrid.SetItemText(nRow, 0, pSlot->getName().c_str()); |
| | | m_wndGrid.SetCellType(nRow, 1, RUNTIME_CLASS(CGridCellCheck)); |
| | | CGridCellCheck* pCheck = dynamic_cast<CGridCellCheck*>(m_wndGrid.GetCell(nRow, 1)); |
| | | ASSERT(pCheck); |
| | | pCheck->SetCheck(pGlass->isScheduledForProcessing()); |
| | | pCheck->SetText(pGlass->getID().c_str()); |
| | | } |
| | | m_wndGrid.SetItemData(nRow, 0, (LPARAM)pGlass); |
| | | |
| | | |
| | | // åå¡« Job ä¿¡æ¯ï¼åªå第ä¸ä¸ªææ Glassï¼ |
| | | if (!bJobInfoSet && pGlass) { |
| | | SERVO::CJobDataS* pJS = pGlass->getJobDataS(); |
| | | if (pJS) { |
| | | SetDlgItemText(IDC_EDIT_LOTID, CString(pJS->getLotId().c_str())); |
| | | SetDlgItemText(IDC_EDIT_PRODUCTID, CString(pJS->getProductId().c_str())); |
| | | SetDlgItemText(IDC_EDIT_OPERATIONID, CString(pJS->getOperationId().c_str())); |
| | | m_comboMaterialsType.SetCurSel(pJS->getMaterialsType() - 1); |
| | | bJobInfoSet = true; |
| | | } |
| | | } |
| | | |
| | | // å¡«å
Grid |
| | | FillGrid(pSlot, pGlass); |
| | | } |
| | | m_pCheckBox->SetCheck(IsCheckedAll() ? BST_CHECKED : BST_UNCHECKED); |
| | | } |
| | | |
| | | void CPortConfigurationDlg::InitGrid() |
| | |
| | | m_wndGrid.SetColumnWidth(nColIdx, 50); |
| | | m_wndGrid.SetItemText(0, nColIdx++, _T("Slot ID")); |
| | | m_wndGrid.SetColumnWidth(nColIdx, 60); |
| | | m_wndGrid.SetItemText(0, nColIdx++, _T("å¯ç¨")); |
| | | m_wndGrid.SetItemText(0, nColIdx++, _T("Glass ID")); |
| | | |
| | | |
| | | // 设置è¡ä¸ºæ ·å¼ |
| | | m_wndGrid.SetFixedRowSelection(FALSE); |
| | |
| | | for (int i = 0; i < nRows; ++i) { |
| | | m_wndGrid.SetRowHeight(i, nEachRowHeight); |
| | | } |
| | | } |
| | | |
| | | void CPortConfigurationDlg::FillGrid(SERVO::CSlot* pSlot, SERVO::CGlass* pGlass) |
| | | { |
| | | //CStringArray recipeOptions; |
| | | //recipeOptions.Add(_T("Recipe A")); |
| | | //recipeOptions.Add(_T("Recipe B")); |
| | | //recipeOptions.Add(_T("Recipe C")); |
| | | |
| | | // å»é¤è¡¨å¤´ï¼ä»ç¬¬2è¡å¼å§å¡«å
æ°æ® |
| | | for (int i = 1; i < SLOT_MAX + 1; ++i) { |
| | | CString strIndex; |
| | | strIndex.Format(_T("%d"), i); |
| | | m_wndGrid.SetItemText(i, 0, strIndex); |
| | | m_wndGrid.SetItemState(i, 0, GVIS_READONLY); |
| | | |
| | | if (i != 3) { |
| | | // Checkbox |
| | | m_wndGrid.SetCellType(i, 1, RUNTIME_CLASS(CGridCellCheck)); |
| | | CGridCellCheck* pCheck = static_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | if (pCheck) { |
| | | // 设置 Panel ID åå¾éæ¡ |
| | | CGridCellCheck* pCheck = static_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | if (pCheck && pSlot && pGlass) { |
| | | pCheck->SetCheck(pSlot->isEnable() ? TRUE : FALSE); |
| | | pCheck->SetText(pGlass ? pGlass->getID().c_str() : _T("")); |
| | | } |
| | | else { |
| | | pCheck->SetCheck(FALSE); |
| | | pCheck->SetText(_T("")); |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | m_wndGrid.SetItemState(i, 1, GVIS_READONLY); |
| | | } |
| | | } |
| | | |
| | | m_wndGrid.Invalidate(); |
| | | m_wndGrid.UpdateWindow(); |
| | | CRect rect; |
| | | BOOL bOK = m_wndGrid.GetCellRect(0, 1, rect); |
| | | m_pCheckBox = new CCustomCheckBox(); |
| | | m_pCheckBox->Create(_T("éæ©ææ"), |
| | | WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, // èªå¨å¾é |
| | | CRect(0, 0, 150, 32), &m_wndGrid, CHECKBOX_ALL_ID); |
| | | m_pCheckBox->SetFont(GetFont()); |
| | | m_pCheckBox->MoveWindow(rect.left + 5, rect.top + 3, 150, rect.Height() - 6); |
| | | m_pCheckBox->SetBackgroundColor(g_nGridFixCellColor); |
| | | m_pCheckBox->SetNotifyHwnd(GetSafeHwnd()); |
| | | } |
| | | |
| | | void CPortConfigurationDlg::DoDataExchange(CDataExchange* pDX) |
| | |
| | | BEGIN_MESSAGE_MAP(CPortConfigurationDlg, CDialogEx) |
| | | ON_CBN_SELCHANGE(IDC_COMBO_PORT, &CPortConfigurationDlg::OnSelchangeComboPort) |
| | | ON_BN_CLICKED(IDC_BUTTON_APPLY, &CPortConfigurationDlg::OnBnClickedButtonApply) |
| | | ON_MESSAGE(WM_CHECKBOX_STATE_CHANGED, &CPortConfigurationDlg::OnCheckAllClicked) |
| | | ON_WM_DESTROY() |
| | | ON_BN_CLICKED(IDC_BUTTON_PROCESS_START, &CPortConfigurationDlg::OnBnClickedButtonProcessStart) |
| | | ON_BN_CLICKED(IDC_BUTTON_PROCESS_CANCEL, &CPortConfigurationDlg::OnBnClickedButtonProcessCancel) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | for (const auto& item : ports) { |
| | | m_comboPort.AddString(item); |
| | | } |
| | | m_comboPort.SetCurSel(0); // é»è®¤éæ©ç¬¬ä¸ä¸ªç«¯å£ |
| | | if (0 <= m_nCurSelPort && m_nCurSelPort <= 3) { |
| | | m_comboPort.SetCurSel(m_nCurSelPort); |
| | | m_comboPort.EnableWindow(FALSE); |
| | | } |
| | | else { |
| | | m_comboPort.SetCurSel(0); |
| | | } |
| | | |
| | | // åå§åé
æ¹ä¸ææ¡å
容 |
| | | std::vector<std::string> vecRecipe = RecipeManager::getInstance().getAllPPID(); |
| | |
| | | LoadPortConfigToUI(m_pPort[0]); // é»è®¤å 载第ä¸ä¸ªç«¯å£çé
ç½® |
| | | |
| | | // è®¾ç½®å¯¹è¯æ¡æ é¢ |
| | | BOOL bAutoPopup = 0 <= m_nCurSelPort && m_nCurSelPort <= 3; |
| | | if (bAutoPopup) { |
| | | CString strTitle; |
| | | strTitle.Format(_T("%s Configuration"), ports[m_nCurSelPort]); |
| | | SetWindowText(strTitle); |
| | | } |
| | | else { |
| | | SetWindowText(_T("Port Configuration")); |
| | | } |
| | | |
| | | |
| | | // Porcess Start / Process Cancel æé®ç¶æ |
| | | GetDlgItem(IDC_BUTTON_PROCESS_START)->EnableWindow(FALSE); |
| | | GetDlgItem(IDC_BUTTON_PROCESS_CANCEL)->EnableWindow(FALSE); |
| | | |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // å¼å¸¸: OCX 屿§é¡µåºè¿å FALSE |
| | |
| | | } |
| | | |
| | | // è·å Grid è¡¨æ ¼ä¸ Slot ç¶æï¼ç¬¬1~8è¡ï¼ |
| | | for (int i = 1; i <= 8; ++i) { |
| | | SERVO::SlotConfig slot; |
| | | slot.nSlotID = i; |
| | | for (int i = 1; i <= SLOT_MAX; ++i) { |
| | | SERVO::CGlass* pGlass = (SERVO::CGlass*)m_wndGrid.GetItemData(i, 0); |
| | | if (pGlass != nullptr) { |
| | | CGridCellCheck* pCheck = dynamic_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | ASSERT(pCheck); |
| | | pGlass->setScheduledForProcessing(pCheck->GetCheck()); |
| | | pGlass->setType(static_cast<SERVO::MaterialsType>(config.nMaterialType)); |
| | | |
| | | CGridCellCheck* pCheck = static_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | if (pCheck) { |
| | | slot.isEnabled = pCheck->GetCheck(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | | pJobDataS->setLotId(config.strLotID.c_str()); |
| | | pJobDataS->setProductId(config.strProductID.c_str()); |
| | | pJobDataS->setOperationId(config.strOperationID.c_str()); |
| | | pJobDataS->setMaterialsType(config.nMaterialType); |
| | | } |
| | | } |
| | | |
| | | config.vecSlot.push_back(slot); |
| | | GetDlgItem(IDC_BUTTON_PROCESS_START)->EnableWindow(TRUE); |
| | | GetDlgItem(IDC_BUTTON_PROCESS_CANCEL)->EnableWindow(TRUE); |
| | | } |
| | | |
| | | int nEqID = GetLoadPortEqID(config.strPortName); |
| | | if (nEqID < 0) { |
| | | AfxMessageBox(_T("æªç¥ç端å£åç§°ï¼")); |
| | | return; |
| | | void CPortConfigurationDlg::OnDestroy() |
| | | { |
| | | CDialogEx::OnDestroy(); |
| | | |
| | | if (m_pCheckBox != nullptr) { |
| | | m_pCheckBox->DestroyWindow(); |
| | | delete m_pCheckBox; |
| | | m_pCheckBox = nullptr; |
| | | } |
| | | } |
| | | |
| | | SERVO::CLoadPort* pPort = dynamic_cast<SERVO::CLoadPort*>(theApp.m_model.m_master.getEquipment(nEqID)); |
| | | if (!pPort) { |
| | | AfxMessageBox(_T("æ¾ä¸å°å¯¹åºç LoadPort 设å¤ï¼")); |
| | | return; |
| | | LRESULT CPortConfigurationDlg::OnCheckAllClicked(WPARAM wParam, LPARAM lParam) |
| | | { |
| | | UINT ctrlID = (UINT)wParam; |
| | | BOOL bChecked = (BOOL)lParam; |
| | | for (int i = 1; i <= SLOT_MAX; ++i) { |
| | | CGridCellCheck* pCheck = dynamic_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | if (pCheck != nullptr) { |
| | | pCheck->SetCheck(bChecked); |
| | | } |
| | | } |
| | | |
| | | // åºç¨é
ç½®ï¼ä¾å¦æµè¯çæç»çï¼ |
| | | if (pPort->testGenerateGlassListFromConfig(config) < 0) { |
| | | AfxMessageBox(_T("Failed to generate glass list from configuration!")); |
| | | return; |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | OnOK(); |
| | | BOOL CPortConfigurationDlg::IsCheckedAll() |
| | | { |
| | | for (int i = 1; i <= SLOT_MAX; ++i) { |
| | | CGridCellCheck* pCheck = dynamic_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 1)); |
| | | if (pCheck != nullptr) { |
| | | if (!pCheck->GetCheck()) return FALSE; |
| | | } |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | void CPortConfigurationDlg::OnBnClickedButtonProcessStart() |
| | | { |
| | | int selPort = (0 <= m_nCurSelPort && m_nCurSelPort <= 3) ? m_nCurSelPort |
| | | : m_comboPort.GetCurSel(); |
| | | if (selPort < 0 || selPort >= 4) return; |
| | | m_pPort[selPort]->sendCassetteCtrlCmd(CCC_PROCESS_START, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | } |
| | | |
| | | void CPortConfigurationDlg::OnBnClickedButtonProcessCancel() |
| | | { |
| | | int selPort = (0 <= m_nCurSelPort && m_nCurSelPort <= 3) ? m_nCurSelPort |
| | | : m_comboPort.GetCurSel(); |
| | | if (selPort < 0 || selPort >= 4) return; |
| | | m_pPort[selPort]->sendCassetteCtrlCmd(CCC_PROCESS_CANCEL, nullptr, 0, 0, 0, nullptr, nullptr); |
| | | } |
| | |
| | | #include "afxdialogex.h" |
| | | #include "GridCtrl.h" |
| | | #include "CLoadPort.h" |
| | | #include "CCustomCheckBox.h" |
| | | |
| | | |
| | | // CPortConfigurationDlg å¯¹è¯æ¡ |
| | | |
| | |
| | | CPortConfigurationDlg(CWnd* pParent = nullptr); // æ åæé 彿° |
| | | virtual ~CPortConfigurationDlg(); |
| | | |
| | | public: |
| | | void setCurSelPort(int sel); |
| | | BOOL IsCheckedAll(); |
| | | |
| | | // å¯¹è¯æ¡æ°æ® |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DIALOG_PORT_CONFIGURATION }; |
| | |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg void OnSelchangeComboPort(); |
| | | afx_msg void OnBnClickedButtonApply(); |
| | | afx_msg LRESULT OnCheckAllClicked(WPARAM wParam, LPARAM lParam); |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | private: |
| | | int GetLoadPortEqID(const std::string& strPortName); |
| | | void LoadPortConfigToUI(SERVO::CLoadPort* pPort); |
| | | void InitGrid(); |
| | | void FillGrid(SERVO::CSlot* pSlot, SERVO::CGlass* pGlass); |
| | | |
| | | private: |
| | | SERVO::CLoadPort* m_pPort[4]; |
| | | int m_nCurSelPort; |
| | | |
| | | CGridCtrl m_wndGrid; |
| | | CComboBox m_comboPort; |
| | | CComboBox m_comboRecipe; |
| | | CComboBox m_comboMaterialsType; |
| | | |
| | | CCustomCheckBox* m_pCheckBox; |
| | | BOOL m_bCheckedAll; |
| | | |
| | | public: |
| | | afx_msg void OnDestroy(); |
| | | afx_msg void OnBnClickedButtonProcessStart(); |
| | | afx_msg void OnBnClickedButtonProcessCancel(); |
| | | }; |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="CBaseDlg.h" /> |
| | | <ClInclude Include="CCustomCheckBox.h" /> |
| | | <ClInclude Include="CEquipmentPage3.h" /> |
| | | <ClInclude Include="CGlassPool.h" /> |
| | | <ClInclude Include="ChangePasswordDlg.h" /> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClCompile Include="CBaseDlg.cpp" /> |
| | | <ClCompile Include="CCustomCheckBox.cpp" /> |
| | | <ClCompile Include="CEquipmentPage3.cpp" /> |
| | | <ClCompile Include="CGlassPool.cpp" /> |
| | | <ClCompile Include="ChangePasswordDlg.cpp" /> |
| | |
| | | <ClCompile Include="InputDialog.cpp" /> |
| | | <ClCompile Include="RecipeManager.cpp" /> |
| | | <ClCompile Include="RecipeDeviceBindDlg.cpp" /> |
| | | <ClCompile Include="CCustomCheckBox.cpp" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="AlarmManager.h" /> |
| | |
| | | <ClInclude Include="InputDialog.h" /> |
| | | <ClInclude Include="RecipeManager.h" /> |
| | | <ClInclude Include="RecipeDeviceBindDlg.h" /> |
| | | <ClInclude Include="CCustomCheckBox.h" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="Servo.rc" /> |
| | |
| | | /* EQ Data changed code */ |
| | | #define EDCC_FETCHOUT_JOB 1000 /* ȡƬ */ |
| | | #define EDCC_STORED_JOB 1001 /* æ¾ç */ |
| | | |
| | | |
| | | /* Cassette Ctrl CMD */ |
| | | #define CCC_MAP_DOWNLOAD 1 |
| | | #define CCC_CLAMP 2 |
| | | #define CCC_UNCLAMP 3 |
| | | #define CCC_RECLAMP 4 |
| | | #define CCC_PROCESS_START 5 |
| | | #define CCC_PROCESS_START_BY_COUNT 6 |
| | | #define CCC_PROCESS_PAUSE 7 |
| | | #define CCC_PROCESS_RESUME 8 |
| | | #define CCC_PROCESS_ABORT 9 |
| | | #define CCC_PROCESS_CANCEL 10 |
| | | #define CCC_PROCESS_END 11 |
| | | #define CCC_ID_UPDATE 12 |
| | | #define CCC_MAP_UPDATE 13 |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (RX_CODE_LOADPORT_INUSE == code) { |
| | | SERVO::CLoadPort* pLoadPort = nullptr; |
| | | if (pAny->getPtrValue("ptr", (void*&)pLoadPort)) { |
| | | CPortConfigurationDlg dlg; |
| | | dlg.setCurSelPort(pLoadPort->getIndex()); |
| | | dlg.DoModal(); |
| | | } |
| | | } |
| | | |
| | | pAny->release(); |
| | | }, [&]() -> void { |