You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1002 B
C++
36 lines
1002 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <algorithm>
|
|
#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<int> motorIdVec, std::vector<double> posVec, bool waitFinished);
|
|
int RelmoveMulti(std::vector<int> motorIdVec, std::vector<double> posVec, bool waitFinished);
|
|
int Home(int motorId, bool waitFinished);
|
|
int allAxisHome(std::vector<int> allAxisId, bool waitFinished);
|
|
void ResetAxisErr(std::vector<int> 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<MotorAttr>* m_motor = nullptr; //所有电机的管理
|
|
bool m_open = false;;//控制卡是否初始化成功
|
|
const short m_gugaoCardCore = 1;
|
|
};
|
|
|