| | |
| | | #pragma once |
| | | #pragma once |
| | | #include <list> |
| | | #include "CEquipment.h" |
| | | #include "CEFEM.h" |
| | |
| | | #include "CRobotTask.h" |
| | | #include "ProcessJob.h" |
| | | #include "CControlJob.h" |
| | | #include "../DAQBridge/core/Collector.h" |
| | | |
| | | |
| | | #define CTStep_Unknow 0 |
| | |
| | | int abortCurrentTask(); |
| | | int restoreCurrentTask(); |
| | | int resendCurrentTask(); |
| | | void setPortType(unsigned int index, BOOL enable, int type, int mode, |
| | | void setPortTypeEx(unsigned int index, BOOL enable, int type, int mode, |
| | | int cassetteType, int transferMode, BOOL autoChangeEnable); |
| | | void setPortType(unsigned int index, int type); |
| | | void setPortCassetteType(unsigned int index, SERVO::CassetteType type); |
| | | void setPortEnable(unsigned int index, BOOL bEnable); |
| | | void setCompareMapsBeforeProceeding(BOOL bCompare); |
| | |
| | | CControlJob* getControlJob(); |
| | | CLoadPort* getPortWithCarrierId(const std::string& carrierId) const; |
| | | bool saveState() const; |
| | | bool loadState(const std::string& path); |
| | | bool loadState(); |
| | | void setStateFile(const std::string& path); |
| | | int getWipGlasses(std::vector<CGlass*>& glasses); |
| | | void test(); |
| | | bool moveGlassToBuf(int eqid, int slotNo); |
| | | bool moveGlassToSlot(int eqid, int slotNo); |
| | | int getPortCassetteSnSeed(int port); |
| | | void setPortCassetteSnSeed(int port, int seed); |
| | | CGlass* getGlass(int scrPort, int scrSlot); |
| | | |
| | | private: |
| | | inline void lock() { EnterCriticalSection(&m_criticalSection); } |
| | |
| | | CEquipment* pTarEq, int nTarSlot, int armNo = 1); |
| | | |
| | | public: |
| | | // —— IResourceView 覆写 ——(注意 const) |
| | | // —— IResourceView 覆写 ——(注意 const) |
| | | bool isProcessJobsEmpty() const override; |
| | | bool recipeExists(const std::string& ppid) const override; |
| | | bool carrierPresent(const std::string& carrierId) const override; |
| | |
| | | std::string& getLastErrorText(); |
| | | |
| | | public: |
| | | // 新增函数 |
| | | // 新增函数 |
| | | CProcessJob* acquireNextProcessJob(); |
| | | CGlass* acquireNextGlass(); |
| | | int acquireGlassToQueue(); |
| | |
| | | bool checkAndUpdatePjComplete(CProcessJob* pJob); |
| | | bool checkAndUpdateCjComplete(CControlJob* pJob); |
| | | CProcessJob* getGlassProcessJob(CGlass* pGlass); |
| | | bool completeControlJob(); |
| | | bool forceCompleteControlJob(std::string description); |
| | | bool canCreateControlJob(); |
| | | bool canCompleteControlJob(); |
| | | bool canDeleteControlJob(); |
| | | |
| | | // DAQ Bridge鐩稿叧 |
| | | Collector* getCollector() const { return m_pCollector; } |
| | | |
| | | private: |
| | | CRITICAL_SECTION m_criticalSection; |
| | |
| | | bool m_bBatch; |
| | | |
| | | private: |
| | | /* 监控比特位的线程*/ |
| | | /* 监控比特位的线程*/ |
| | | HANDLE m_hEventReadBitsThreadExit[2]; |
| | | HANDLE m_hReadBitsThreadHandle; |
| | | unsigned m_nReadBitsThreadAddr; |
| | | |
| | | // 调度线程 |
| | | // 调度线程 |
| | | HANDLE m_hDispatchEvent; |
| | | HANDLE m_hEventDispatchThreadExit[2]; |
| | | HANDLE m_hDispatchThreadHandle; |
| | | unsigned m_nDispatchThreadAddr; |
| | | |
| | | // 启动时间,运行时间,状态 |
| | | // 启动时间,运行时间,状态 |
| | | ULONGLONG m_ullStartTime; |
| | | ULONGLONG m_ullRunTime; |
| | | MASTERSTATE m_state; |
| | | |
| | | // 当前任务和已完成任务列表 |
| | | // 当前任务和已完成任务列表 |
| | | CRobotTask* m_pActiveRobotTask; |
| | | std::list< CRobotTask* > m_listTask; |
| | | |
| | | // 错误代码 |
| | | // 错误代码 |
| | | int m_nLastError; |
| | | std::string m_strLastError; |
| | | |
| | | // 在开始工艺前是否先需要先比较map |
| | | // 在开始工艺前是否先需要先比较map |
| | | BOOL m_isCompareMapsBeforeProceeding; |
| | | BOOL m_bJobMode; |
| | | |
| | | |
| | | // 千传圈数计数 |
| | | // 千传圈数计数 |
| | | int m_nContinuousTransferCount; |
| | | int m_nContinuousTransferStep; |
| | | int m_nContinuousWorkingPort; |
| | | int m_nContinuousWorkingSlot; |
| | | |
| | | // 新增已经开始处理的ProcessJob列表 |
| | | // 新增已经开始处理的ProcessJob列表 |
| | | std::vector<CProcessJob*> m_inProcesJobs; |
| | | std::vector<CProcessJob*> m_completeProcessJobs; |
| | | std::vector<CGlass*> m_queueGlasses; |
| | |
| | | |
| | | int m_nTestFlag; |
| | | std::list<CGlass*> m_bufGlass; |
| | | |
| | | private: |
| | | Collector* m_pCollector = nullptr; |
| | | void CreateDAQBridgeServer(); |
| | | }; |
| | | } |
| | | |