51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
|
|
#ifndef GRABBAGPRESENTER_H
|
|||
|
|
#define GRABBAGPRESENTER_H
|
|||
|
|
|
|||
|
|
#include "IVrConfig.h"
|
|||
|
|
#include "IVrEyeDevice.h"
|
|||
|
|
#include "IYGrabBagStatus.h"
|
|||
|
|
#include "RobotProtocol.h"
|
|||
|
|
|
|||
|
|
class GrabBagPresenter
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
GrabBagPresenter();
|
|||
|
|
~GrabBagPresenter();
|
|||
|
|
|
|||
|
|
// 初始化
|
|||
|
|
int Init();
|
|||
|
|
|
|||
|
|
// 设置状态回调
|
|||
|
|
void SetStatusCallback(IYGrabBagStatus* status);
|
|||
|
|
|
|||
|
|
// 开始检测
|
|||
|
|
int StartDetection();
|
|||
|
|
|
|||
|
|
// 停止检测
|
|||
|
|
int StopDetection();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
// 机械臂协议相关方法
|
|||
|
|
int InitRobotProtocol();
|
|||
|
|
|
|||
|
|
// 机械臂协议回调函数
|
|||
|
|
void OnRobotConnectionChanged(bool connected);
|
|||
|
|
void OnRobotWorkSignal(bool startWork);
|
|||
|
|
|
|||
|
|
// 静态回调函数,用于传递给SDK
|
|||
|
|
static void _StaticCameraNotify(EVzDeviceWorkStatus eStatus, void* pExtData, unsigned int nDataLength, void* pInfoParam);
|
|||
|
|
|
|||
|
|
// 实例方法,处理回调
|
|||
|
|
void _CameraNotify(EVzDeviceWorkStatus eStatus, void* pExtData, unsigned int nDataLength, void* pInfoParam);
|
|||
|
|
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
IVrConfig* m_vrConfig = nullptr;
|
|||
|
|
IVrEyeDevice* m_vrEyeDevice = nullptr;
|
|||
|
|
IYGrabBagStatus* m_pStatus = nullptr;
|
|||
|
|
|
|||
|
|
RobotProtocol* m_pRobotProtocol = nullptr;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // GRABBAGPRESENTER_H
|