GrabBag/GrabBagApp/Presenter/Inc/GrabBagPresenter.h
2025-06-08 12:48:04 +08:00

51 lines
1.2 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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