| | |
| | | #include "CAligner.h" |
| | | #include "CVacuumBake.h" |
| | | #include "CBakeCooling.h" |
| | | #include "CArm.h" |
| | | #include "CArmTray.h" |
| | | #include "CCLinkIEControl.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | typedef std::function<void(void* pMaster, CEquipment* pEiuipment, BOOL bAlive)> ONEQALIVE; |
| | | typedef std::function<void(CStep* pStep, int code, void* pData)> ONEQSTEPEVENT; |
| | | 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 struct _MasterListener |
| | | { |
| | | ONEQALIVE onEqAlive; |
| | | ONEQALIVE onEqCimStateChanged; |
| | | ONEQSTEPEVENT onEqStepEvent; |
| | | ONEQALARM onEqAlarm; |
| | | ONEQVCREVENTREPORT onEqVcrEventReport; |
| | | ONEQDATACHANGED onEqDataChanged; |
| | | } MasterListener; |
| | | |
| | | class CMaster |
| | |
| | | void setListener(MasterListener listener); |
| | | int init(); |
| | | int term(); |
| | | unsigned ReadBitsProc(); |
| | | void onTimer(UINT nTimerid); |
| | | std::list<CEquipment*>& getEquipmentList(); |
| | | CEquipment* getEquipment(int id); |
| | | void setCacheFilepath(const char* pszFilepath); |
| | | |
| | | private: |
| | | int addToEquipmentList(CEquipment* pEquipment); |
| | | int addLoadPort(int index, StepListener& listener); |
| | | int addFliper(StepListener& listener); |
| | | int addVacuumBake(StepListener& listener); |
| | | int addAligner(StepListener& listener); |
| | | int addEFEM(StepListener& listener); |
| | | int addBonder(int index, StepListener& listener); |
| | | int addBakeCooling(StepListener& listener); |
| | | CLoadPort* addLoadPort(int index); |
| | | CFliper* addFliper(); |
| | | CVacuumBake* addVacuumBake(); |
| | | CAligner* addAligner(); |
| | | CEFEM* addEFEM(); |
| | | CArm* addArm(); |
| | | CArmTray* addArmTray(int index); |
| | | CBonder* addBonder(int index); |
| | | CBakeCooling* addBakeCooling(); |
| | | void connectEquipments(); |
| | | |
| | | int saveCache(); |
| | | int saveCacheAndBackups(); |
| | | int readCache(); |
| | | void serialize(CArchive& ar); |
| | | |
| | | private: |
| | | MasterListener m_listener; |
| | | CCCLinkIEControl m_cclink; |
| | | std::list<CEquipment*> m_listEquipment; |
| | | std::string m_strFilepath; |
| | | BOOL m_bDataModify; |
| | | |
| | | private: |
| | | HANDLE m_hEventReadBitsThreadExit[2]; |
| | | HANDLE m_hReadBitsThreadHandle; |
| | | unsigned m_nReadBitsThreadAddr; |
| | | }; |
| | | } |
| | | |