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.
|
|
|
|
#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:
|
|
|
|
|
//<2F><>д
|
|
|
|
|
double GetCurPos(int motorId);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::vector<MotorAttr>* m_motor = nullptr; //<2F><><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>
|
|
|
|
|
bool m_open = false;;//<2F><><EFBFBD>ƿ<EFBFBD><C6BF>Ƿ<EFBFBD><C7B7><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ɹ<EFBFBD>
|
|
|
|
|
const short m_gugaoCardCore = 1;
|
|
|
|
|
};
|
|
|
|
|
|