| | |
| | | #pragma once |
| | | #include "Log.h" |
| | | #include "ServoCommo.h" |
| | | #include "CCLinkIEControl.h" |
| | | #include "CSample.h" |
| | | #include "CPin.h" |
| | |
| | | #include "CJobDataB.h" |
| | | #include "CJobDataC.h" |
| | | #include "CJobDataS.h" |
| | | #include "CProcessData.h" |
| | | #include "CPortStatusReport.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | #define BLOCK_BUFFER_MAX 1024 |
| | | #define ALIVE_TIMEOUT 15 |
| | | #define VCR_MAX 1 |
| | | |
| | | typedef std::function<void(void* pEiuipment, BOOL bAlive)> ONALIVE; |
| | | typedef std::function<void(void* pEiuipment, int code)> ONDATACHANGED; |
| | |
| | | ONVCREVENTREPORT onVcrEventReport; |
| | | } EquipmentListener; |
| | | |
| | | // Memory Block 结构体定义 |
| | | typedef struct _MemoryBlock { |
| | | unsigned int type; |
| | | unsigned int start; |
| | | unsigned int end; |
| | | unsigned int size; |
| | | char buffer[BLOCK_BUFFER_MAX]; |
| | | } MemoryBlock; |
| | | |
| | | // ALIVE |
| | | typedef struct _ALIVE { |
| | | BOOL flag; |
| | | int count; |
| | | BOOL alive; |
| | | } ALIVE; |
| | | |
| | | class CEquipment |
| | | { |
| | |
| | | CEquipment(); |
| | | virtual ~CEquipment(); |
| | | |
| | | |
| | | public: |
| | | virtual const char* getClassName() = 0; |
| | | virtual void setListener(EquipmentListener listener); |
| | | void setCcLink(CCCLinkIEControl* pCcLink); |
| | | virtual BOOL isArm() { return FALSE; }; |
| | | void setArm(CEquipment* pEquipment); |
| | | CEquipment* getArm(); |
| | | void setBaseAlarmId(int nBaseId); |
| | | int getBaseAlarmId(); |
| | | void setID(int nID); |
| | |
| | | virtual BOOL glassWillArrive(CGlass* pGlass); |
| | | virtual int outputGlass(int port); |
| | | virtual int glassArrived(CGlass* pGlass); |
| | | virtual int onFetchedOut(int port, const char* pszGlassId); |
| | | virtual int onStore(int port, const char* pszGlassId); |
| | | virtual int fetchedOutJob(CJobDataB* pJobDataB); |
| | | virtual int storedJob(CJobDataB* pJobDataB); |
| | | virtual int onReceivedJob(int port, CJobDataS* pJobDataS); |
| | | virtual int onSentOutJob(int port, CJobDataS* pJobDataS); |
| | | virtual BOOL onPreFetchedOutJob(int port, CJobDataB* pJobDataB); |
| | | virtual int onFetchedOutJob(int port, CJobDataB* pJobDataB); |
| | | virtual BOOL onPreStoredJob(int port, CJobDataB* pJobDataB); |
| | | virtual int onStoredJob(int port, CJobDataB* pJobDataB); |
| | | virtual int onProcessData(CProcessData* pProcessData); |
| | | virtual int getIndexerOperationModeBaseValue(); |
| | | void getGlassList(std::list<CGlass*>& list); |
| | | CGlass* getGlassFromList(const char* pszId); |
| | | CGlass* getFrontGlass(); |
| | | BOOL removeClass(CGlass* pGlass); |
| | | bool isAlarmStep(SERVO::CStep* pStep); |
| | |
| | | int setCimMessage(const char* pszMessage, short id, short nTouchPanelNo); |
| | | int clearCimMessage(short id, short nTouchPanelNo); |
| | | int setDateTime(short year, short month, short day, short hour, short minute, short second); |
| | | |
| | | int setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock = nullptr); |
| | | int indexerOperationModeChange(IDNEXER_OPERATION_MODE mode, ONWRITED onWritedBlock = nullptr); |
| | | |
| | | |
| | | |
| | | // 请求主配方列表 |
| | | // unitNo: 0:local; Others:unit No |
| | | int masterRecipeListRequest(short unitNo); |
| | |
| | | int recipeParameterRequest(short masterRecipeId, short localRecipeId, short unitNo); |
| | | |
| | | public: |
| | | int fetchedOut(const char* pszGlassId); |
| | | int storedJob(const char* pszGlassId); |
| | | BOOL isGlassListEmpty(); |
| | | |
| | | |
| | |
| | | void addGlassToList(CGlass* pGlass); |
| | | short decodeRecipeListReport(const char* pszData, size_t size); |
| | | short decodeRecipeParameterReport(const char* pszData, size_t size); |
| | | int decodeFetchedOutJobReport(int port, const char* pszData, size_t size); |
| | | int decodeStoredJobReport(int port, const char* pszData, size_t size); |
| | | int decodeProcessDataReport(CStep* pStep, const char* pszData, size_t size); |
| | | int decodeReceivedJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeSentOutJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeFetchedOutJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeStoredJobReport(CStep* pStep, int port, const char* pszData, size_t size); |
| | | int decodeVCREventReport(CStep* pStep, const char* pszData, size_t size); |
| | | int addJobDataB(CJobDataB* pJobDataB); |
| | | int removeJobDataB(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | CJobDataB* getJobDataB(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | int addJobDataS(CJobDataS* pJobDataS); |
| | | int removeJobDataS(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | CJobDataS* getJobDataS(int nCassetteSequenceNo, int nJobSequenceNo); |
| | | |
| | | protected: |
| | | EquipmentListener m_listener; |
| | |
| | | |
| | | private: |
| | | CEquipment* m_pArm; |
| | | std::list<CJobDataS> m_listJobDataS; |
| | | std::list<CJobDataB> m_listJobDataB; |
| | | }; |
| | | } |
| | | |