#pragma once #include #include #include "Logger.h" #include "CGugaoDriver.h" #include "Motor.h" class _declspec(dllexport) CMotorDriver : public CGugaoDriver { public: CMotorDriver(); ~CMotorDriver(); int Relmove(int motorId, double pos, bool waitFinished); int AbsmoveMulti(std::vector motorIdVec, std::vector posVec, bool waitFinished); int RelmoveMulti(std::vector motorIdVec, std::vector posVec, bool waitFinished); int Home(int motorId, bool waitFinished); int allAxisHome(std::vector allAxisId, bool waitFinished); void ResetAxisErr(std::vector axisId); int AddMotor(const MotorAttr& motor); int DeleteMotor(int motorId); int ModifyMotor(const MotorAttr& motor); MotorAttr QueryMotor(int motorId); void ClearAllAxis(); public: //重写 double GetCurPos(int motorId); public: std::vector* m_motor = nullptr; //所有电机的管理 bool m_open = false;;//控制卡是否初始化成功 const short m_gugaoCardCore = 1; };