| | |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, int state, int alarmId, int unitId, int level)> ONEQALARM; |
| | | 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 struct _MasterListener |
| | | { |
| | | ONMASTERSTATECHANGED onMasterStateChanged; |
| | |
| | | ONEQALARM onEqAlarm; |
| | | ONEQVCREVENTREPORT onEqVcrEventReport; |
| | | ONEQDATACHANGED onEqDataChanged; |
| | | ONROBOTTASKEVENT onRobotTaskEvent; |
| | | } MasterListener; |
| | | |
| | | class CMaster |
| | | { |
| | | public: |
| | | CMaster(); |
| | | ~CMaster(); |
| | | virtual ~CMaster(); |
| | | |
| | | |
| | | public: |
| | |
| | | std::list<CEquipment*>& getEquipmentList(); |
| | | CEquipment* getEquipment(int id); |
| | | void setCacheFilepath(const char* pszFilepath); |
| | | int abortCurrentTask(); |
| | | void setPortType(unsigned int index, BOOL enable, int type, int mode, |
| | | int cassetteType, int transferMode, BOOL autoChangeEnable); |
| | | |
| | | private: |
| | | inline void lock() { EnterCriticalSection(&m_criticalSection); } |
| | |
| | | int readCache(); |
| | | void serialize(CArchive& ar); |
| | | void setState(MASTERSTATE state); |
| | | CRobotTask* createTransferTask(CEquipment* pSrcEq, CEquipment* pTarEq, |
| | | MaterialsType primaryType = MaterialsType::G1, MaterialsType secondaryType = MaterialsType::G2, |
| | | int armNo = 1); |
| | | CRobotTask* createTransferTask_bonder_to_bakecooling(CEquipment* pSrcEq, CEquipment* pTarEq); |
| | | CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq); |
| | | CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq); |
| | | |
| | | private: |
| | | CRITICAL_SECTION m_criticalSection; |