mrDarker
2025-06-17 58b5bb07de4bcbf670db5ad79ff8b9bd7afc1e28
SourceCode/Bond/Servo/CMaster.h
@@ -29,6 +29,7 @@
    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;
@@ -37,13 +38,14 @@
        ONEQALARM               onEqAlarm;
        ONEQVCREVENTREPORT       onEqVcrEventReport;
        ONEQDATACHANGED         onEqDataChanged;
        ONROBOTTASKEVENT        onRobotTaskEvent;
    } MasterListener;
    class CMaster
    {
    public:
        CMaster();
        ~CMaster();
        virtual ~CMaster();
    public:
@@ -61,6 +63,9 @@
        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); }
@@ -82,6 +87,12 @@
        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;