LAPTOP-SNT8I5JK\Boounion
2025-02-25 4acd7cfd96f2099772497713e17ca8bfaf5cf4ec
SourceCode/Bond/Servo/CMaster.h
@@ -7,6 +7,15 @@
namespace SERVO {
    typedef std::function<void(void* pMaster, CEquipment* pEiuipment, BOOL bAlive)> ONEQALIVE;
    typedef std::function<void(void* pEiuipment, CStep* pStep, int code, void* pData)> ONEQSTEPEVENT;
    typedef struct _MasterListener
    {
        ONEQALIVE            onEqAlive;
        ONEQALIVE              onEqCimStateChanged;
        ONEQSTEPEVENT          onEqStepEvent;
    } MasterListener;
    class CMaster
    {
    public:
@@ -15,16 +24,18 @@
    public:
        void setListener(MasterListener listener);
        int init();
        int term();
        void onTimer(UINT nTimerid);
        CEquipment* getEquipment(int id);
    private:
        int addEquipment(CEquipment* pEquipment);
        int addEFEM(StepListener& listener);
    private:
        MasterListener m_listener;
        CCCLinkIEControl m_cclink;
        std::list<CEquipment*> m_listEquipment;
    };